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(IBlockState)
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 Summary
Nested classes/interfaces inherited from class net.minecraftforge.event.world.BlockEvent
BlockEvent.BlockToolInteractEvent, BlockEvent.BreakEvent, BlockEvent.CreateFluidSourceEvent, BlockEvent.CropGrowEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFluidPlaceBlockEvent
(IWorld world, BlockPos pos, BlockPos liquidPos, BlockState state) -
Method Summary
Methods inherited from class net.minecraftforge.event.world.BlockEvent
getPos, getState, getWorld
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
liquidPos
-
newState
-
origState
-
-
Constructor Details
-
FluidPlaceBlockEvent
-
-
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.
-