Class ForceLens

java.lang.Object
vazkii.botania.common.item.lens.Lens
vazkii.botania.common.item.lens.ForceLens

public class ForceLens extends Lens
  • 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:
      collideBurst in class Lens
    • 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:
      true if blocks have started moving, or false if moving blocks failed, e.g. due to exceeded push limit or unmovable blocks being in the way.