Skip to content

Commit

Permalink
lava cart restricted to lava
Browse files Browse the repository at this point in the history
  • Loading branch information
EternalBlueFlame committed Oct 19, 2024
1 parent 4a60dc0 commit ed0615d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
import net.minecraft.nbt.NBTTagList;
import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import train.common.Traincraft;
import train.common.api.LiquidTank;
import train.common.core.util.TraincraftUtil;
Expand Down Expand Up @@ -115,4 +118,9 @@ public boolean isStorageCart() {
public float getOptimalDistance(EntityMinecart cart) {
return 1.85F;
}

@Override
public boolean canFill(ForgeDirection from, Fluid fluid) {
return fluid==null || fluid == FluidRegistry.LAVA;
}
}

0 comments on commit ed0615d

Please sign in to comment.