类 PistonEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.level.BlockEvent
net.minecraftforge.event.level.PistonEvent
直接已知子类:
PistonEvent.Post, PistonEvent.Pre

public abstract class PistonEvent extends BlockEvent
Base piston event, use PistonEvent.Post and PistonEvent.Pre
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • getDirection

      public Direction getDirection()
      返回:
      The direction of the piston block
    • getFaceOffsetPos

      public BlockPos getFaceOffsetPos()
      Helper method that gets the piston position offset by its facing
    • getPistonMoveType

      public PistonEvent.PistonMoveType getPistonMoveType()
      返回:
      The movement type of the piston (extension, retraction)
    • getStructureHelper

      @Nullable public @Nullable PistonStructureResolver getStructureHelper()
      返回:
      A piston structure helper for this movement. Returns null if the world stored is not a Level