Package net.minecraftforge.event.world
Class BlockEvent.NeighborNotifyEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.world.BlockEvent
-
- net.minecraftforge.event.world.BlockEvent.NeighborNotifyEvent
-
- Enclosing class:
- BlockEvent
public static class BlockEvent.NeighborNotifyEvent extends BlockEvent
Fired when a physics update occurs on a block. This event acts as a way for mods to detect physics updates, in the same way a BUD switch does. This event is only called on the server.
-
-
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
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
forceRedstoneUpdate
private java.util.EnumSet<Direction>
notifiedSides
-
Constructor Summary
Constructors Constructor Description NeighborNotifyEvent(World world, BlockPos pos, BlockState state, java.util.EnumSet<Direction> notifiedSides, boolean forceRedstoneUpdate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getForceRedstoneUpdate()
Get if redstone update was forced during setBlock call (0x16 to flags)java.util.EnumSet<Direction>
getNotifiedSides()
Gets a list of directions from the base block that updates will occur upon.-
Methods inherited from class net.minecraftforge.event.world.BlockEvent
getPos, getState, getWorld
-
-
-
-
Field Detail
-
notifiedSides
private final java.util.EnumSet<Direction> notifiedSides
-
forceRedstoneUpdate
private final boolean forceRedstoneUpdate
-
-
Constructor Detail
-
NeighborNotifyEvent
public NeighborNotifyEvent(World world, BlockPos pos, BlockState state, java.util.EnumSet<Direction> notifiedSides, boolean forceRedstoneUpdate)
-
-
Method Detail
-
getNotifiedSides
public java.util.EnumSet<Direction> getNotifiedSides()
Gets a list of directions from the base block that updates will occur upon.- Returns:
- list of notified directions
-
getForceRedstoneUpdate
public boolean getForceRedstoneUpdate()
Get if redstone update was forced during setBlock call (0x16 to flags)- Returns:
- if the flag was set
-
-