Class ExpandPistonStructureResolver

java.lang.Object
com.blamejared.crafttweaker.natives.block.type.piston.ExpandPistonStructureResolver

@ZenRegister public class ExpandPistonStructureResolver extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.core.Direction
    getPushDirection(net.minecraft.world.level.block.piston.PistonStructureResolver internal)
    Gets the direction that the piston is moving.
    static List<net.minecraft.core.BlockPos>
    getToDestroy(net.minecraft.world.level.block.piston.PistonStructureResolver internal)
    Gets the blocks that will be destroyed by pushing the piston.
    static List<net.minecraft.core.BlockPos>
    getToPush(net.minecraft.world.level.block.piston.PistonStructureResolver internal)
    Gets the blocks that will be pushed.
    static boolean
    resolve(net.minecraft.world.level.block.piston.PistonStructureResolver internal)
    Calculates and caches the blocks to push and the blocks to destroy.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExpandPistonStructureResolver

      public ExpandPistonStructureResolver()
  • Method Details

    • resolve

      public static boolean resolve(net.minecraft.world.level.block.piston.PistonStructureResolver internal)
      Calculates and caches the blocks to push and the blocks to destroy.
      Returns:
      True if blocks should move, false otherwise
    • getPushDirection

      public static net.minecraft.core.Direction getPushDirection(net.minecraft.world.level.block.piston.PistonStructureResolver internal)
      Gets the direction that the piston is moving.

      This is usually the direction that the piston block is facing, however if the piston is retracting, the direction is the opposite.

      Returns:
      The direction that the piston is moving.
    • getToPush

      public static List<net.minecraft.core.BlockPos> getToPush(net.minecraft.world.level.block.piston.PistonStructureResolver internal)
      Gets the blocks that will be pushed.
      Returns:
      The blocks that will be pushed.
    • getToDestroy

      public static List<net.minecraft.core.BlockPos> getToDestroy(net.minecraft.world.level.block.piston.PistonStructureResolver internal)
      Gets the blocks that will be destroyed by pushing the piston.
      Returns:
      The blocks that will be destroyed.