Package net.minecraftforge.event.world
Class BlockEvent.FluidPlaceBlockEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.world.BlockEvent
net.minecraftforge.event.world.BlockEvent.FluidPlaceBlockEvent
- Enclosing class:
- 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.- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.event.world.BlockEventBlockEvent.BlockToolInteractEvent, BlockEvent.BlockToolModificationEvent, BlockEvent.BreakEvent, BlockEvent.CreateFluidSourceEvent, BlockEvent.CropGrowEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEventNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionFluidPlaceBlockEvent(LevelAccessor world, BlockPos pos, BlockPos liquidPos, BlockState state) 
- 
Method SummaryMethods inherited from class net.minecraftforge.event.world.BlockEventgetPos, getState, getWorldMethods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
- 
Field Details- 
liquidPos
- 
newState
- 
origState
 
- 
- 
Constructor Details- 
FluidPlaceBlockEventpublic FluidPlaceBlockEvent(LevelAccessor world, BlockPos pos, BlockPos liquidPos, BlockState state) 
 
- 
- 
Method Details- 
getLiquidPos- Returns:
- The position of the liquid this event originated from. This may be the same as BlockEvent.getPos().
 
- 
getNewState- Returns:
- The block state that will be placed after this event resolves.
 
- 
setNewState
- 
getOriginalState- Returns:
- The state of the block to be changed before the event was fired.
 
 
-