类 PistonEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.BlockEvent
net.neoforged.neoforge.event.level.PistonEvent
- 直接已知子类:
PistonEvent.Post
,PistonEvent.Pre
Base piston event, use
PistonEvent.Post
and PistonEvent.Pre
-
嵌套类概要
嵌套类修饰符和类型类说明static enum
static class
Fires after the piston has moved and set surrounding states.static class
Fires before the piston has updated block states.从类继承的嵌套类/接口 net.neoforged.neoforge.event.level.BlockEvent
BlockEvent.BlockToolModificationEvent, BlockEvent.BreakEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
-
字段概要
字段 -
构造器概要
构造器构造器说明PistonEvent
(Level world, BlockPos pos, Direction direction, PistonEvent.PistonMoveType moveType) -
方法概要
修饰符和类型方法说明Helper method that gets the piston position offset by its facing@Nullable PistonStructureResolver
从类继承的方法 net.neoforged.neoforge.event.level.BlockEvent
getLevel, getPos, getState
-
字段详细资料
-
direction
-
moveType
-
-
构造器详细资料
-
PistonEvent
public PistonEvent(Level world, BlockPos pos, Direction direction, PistonEvent.PistonMoveType moveType) - 参数:
pos
- - The position of the pistondirection
- - The move direction of the piston
-
-
方法详细资料
-
getDirection
- 返回:
- The direction of the piston block
-
getFaceOffsetPos
Helper method that gets the piston position offset by its facing -
getPistonMoveType
- 返回:
- The movement type of the piston (extension, retraction)
-
getStructureHelper
- 返回:
- A piston structure helper for this movement. Returns null if the world stored is not a
Level
-