Package com.hbm_m.util
Class CrucibleUtil
java.lang.Object
com.hbm_m.util.CrucibleUtil
Port of the 1.7.10 com.hbm.util.CrucibleUtil.
The original casts a hitscan straight down to find a pouring target;
here we scan block positions downward until we hit the first non-air block.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.BlockPosgetPouringTarget(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos startPos, int range) Finds the first non-air block from startPos (inclusive) downward within range and returns its position if its block entity is an ICrucibleAcceptor, else null.static intpourSingleStack(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos startPos, int range, MaterialStack stack) Standard pouring: finds a target below startPos and pours the stack into it.
-
Constructor Details
-
CrucibleUtil
public CrucibleUtil()
-
-
Method Details
-
getPouringTarget
@Nullable public static net.minecraft.core.BlockPos getPouringTarget(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos startPos, int range) Finds the first non-air block from startPos (inclusive) downward within range and returns its position if its block entity is an ICrucibleAcceptor, else null. -
pourSingleStack
public static int pourSingleStack(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos startPos, int range, MaterialStack stack) Standard pouring: finds a target below startPos and pours the stack into it. Modifies the passed stack. Returns the amount that was actually poured. "Safe" semantics of the original (safe = true): nothing is lost when no valid target exists, pouring simply does not happen.
-