类 BlockEvent.FluidPlaceBlockEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.level.BlockEvent
net.minecraftforge.event.level.BlockEvent.FluidPlaceBlockEvent
- 封闭类:
BlockEvent
Fired when a liquid places a block. Use
setNewState(BlockState)
to change the result of
a cobblestone generator or add variants of obsidian. Alternatively, you could execute
arbitrary code when lava sets blocks on fire, even preventing it.
BlockEvent.getState()
will return the block that was originally going to be placed.
BlockEvent.getPos()
will return the position of the block to be changed.-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.event.level.BlockEvent
BlockEvent.BlockToolModificationEvent, BlockEvent.BreakEvent, BlockEvent.CreateFluidSourceEvent, BlockEvent.CropGrowEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段 -
构造器概要
构造器构造器说明FluidPlaceBlockEvent
(LevelAccessor level, BlockPos pos, BlockPos liquidPos, BlockState state) -
方法概要
从类继承的方法 net.minecraftforge.event.level.BlockEvent
getLevel, getPos, getState
从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
liquidPos
-
newState
-
origState
-
-
构造器详细资料
-
FluidPlaceBlockEvent
public FluidPlaceBlockEvent(LevelAccessor level, BlockPos pos, BlockPos liquidPos, BlockState state)
-
-
方法详细资料
-
getLiquidPos
- 返回:
- The position of the liquid this event originated from. This may be the same as
BlockEvent.getPos()
.
-
getNewState
- 返回:
- The block state that will be placed after this event resolves.
-
setNewState
-
getOriginalState
- 返回:
- The state of the block to be changed before the event was fired.
-