Package vazkii.botania.common.item.lens
Class ForceLens
java.lang.Object
vazkii.botania.common.item.lens.Lens
vazkii.botania.common.item.lens.ForceLens
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancollideBurst(ManaBurst burst, net.minecraft.world.phys.HitResult pos, boolean isManaBlock, boolean shouldKill, net.minecraft.world.item.ItemStack stack) static booleanmoveBlocks(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos impliedPistonPos, net.minecraft.core.Direction direction, net.minecraft.core.BlockPos pushSourcePos) Executes a force-push of blocks without an actual piston being present.Methods inherited from class vazkii.botania.common.item.lens.Lens
allowBurstShooting, apply, getManaToTransfer, onControlledSpreaderPulse, onControlledSpreaderTick, updateBurst
-
Constructor Details
-
ForceLens
public ForceLens()
-
-
Method Details
-
collideBurst
public boolean collideBurst(ManaBurst burst, net.minecraft.world.phys.HitResult pos, boolean isManaBlock, boolean shouldKill, net.minecraft.world.item.ItemStack stack) - Overrides:
collideBurstin classLens
-
moveBlocks
public static boolean moveBlocks(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos impliedPistonPos, net.minecraft.core.Direction direction, net.minecraft.core.BlockPos pushSourcePos) Executes a force-push of blocks without an actual piston being present.- Parameters:
level- The level.impliedPistonPos- Position where to push block from.direction- Direction to move block towards from the impliedPistonPos.pushSourcePos- Position of the push source. The block at this position is considered unmovable, and usually it would be the pushing piston.- Returns:
trueif blocks have started moving, orfalseif moving blocks failed, e.g. due to exceeded push limit or unmovable blocks being in the way.
-