java.lang.Object
com.blamejared.crafttweaker.natives.event.block.piston.ExpandPistonEvent

@ZenRegister public class ExpandPistonEvent extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.core.Direction
    getDirection(net.minecraftforge.event.level.PistonEvent internal)
    Gets the direction that the piston is facing.
    static net.minecraft.core.BlockPos
    getFaceOffsetPos(net.minecraftforge.event.level.PistonEvent internal)
    Gets the position that the piston is facing towards.
    static net.minecraft.world.level.Level
    getLevel(net.minecraftforge.event.level.BlockEvent internal)
     
    static net.minecraftforge.event.level.PistonEvent.PistonMoveType
    getPistonMoveType(net.minecraftforge.event.level.PistonEvent internal)
    Gets the move type of the piston (is it extending or retracting).
    static net.minecraft.world.level.block.piston.PistonStructureResolver
    getStructureHelper(net.minecraftforge.event.level.PistonEvent internal)
    Gets a **nullable** structure resolver that can be used to get all the blocks that will be affected by the piston.

    Methods inherited from class java.lang.Object

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

    • ExpandPistonEvent

      public ExpandPistonEvent()
  • Method Details

    • getLevel

      public static net.minecraft.world.level.Level getLevel(net.minecraftforge.event.level.BlockEvent internal)
    • getDirection

      public static net.minecraft.core.Direction getDirection(net.minecraftforge.event.level.PistonEvent internal)
      Gets the direction that the piston is facing.
      Returns:
      the direction tha the piston is facing.
    • getFaceOffsetPos

      public static net.minecraft.core.BlockPos getFaceOffsetPos(net.minecraftforge.event.level.PistonEvent internal)
      Gets the position that the piston is facing towards.
      Returns:
      The position that the piston is facing towards.
    • getPistonMoveType

      public static net.minecraftforge.event.level.PistonEvent.PistonMoveType getPistonMoveType(net.minecraftforge.event.level.PistonEvent internal)
      Gets the move type of the piston (is it extending or retracting).
      Returns:
      The move type of the piston.
    • getStructureHelper

      public static net.minecraft.world.level.block.piston.PistonStructureResolver getStructureHelper(net.minecraftforge.event.level.PistonEvent internal)
      Gets a **nullable** structure resolver that can be used to get all the blocks that will be affected by the piston.

      Be sure to call the `resolve()` method on the structure resolver

      Returns:
      A structure resolver.