@AutoLoad(value=true) public class ChunkListener extends java.lang.Object
ChunkListener class handles the IBlockListener components for blocks.| Modifier and Type | Class and Description |
|---|---|
static interface |
ChunkListener.IBlockListenerCallback
Specialized
ICallback for ChunkCallbackRegistry. |
static interface |
ChunkListener.IBlockListenerPredicate
|
| Constructor and Description |
|---|
ChunkListener() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
callPostListener(net.minecraft.world.chunk.Chunk chunk,
net.minecraft.util.math.BlockPos listener,
net.minecraft.util.math.BlockPos modified,
net.minecraft.block.state.IBlockState oldState,
net.minecraft.block.state.IBlockState newState)
Calls IBlockListener.Pre#onBlockSet(World, BlockPos, BlockPos, IBlockState, IBlockState) for the listener
BlockPos. |
boolean |
callPreListener(net.minecraft.world.chunk.Chunk chunk,
net.minecraft.util.math.BlockPos listener,
net.minecraft.util.math.BlockPos modified,
net.minecraft.block.state.IBlockState oldState,
net.minecraft.block.state.IBlockState newState)
Calls
IBlockListener.Pre.onBlockSet(net.minecraft.world.World, BlockPos, BlockPos, IBlockState, IBlockState) for the listener
BlockPos. |
boolean |
isValidPostListener(net.minecraft.world.chunk.Chunk chunk,
net.minecraft.util.math.BlockPos listener,
net.minecraft.util.math.BlockPos modified,
net.minecraft.block.state.IBlockState oldState,
net.minecraft.block.state.IBlockState newState)
Checks if the listener
BlockPos has a IBlockListener.Pre component and if the modified BlockPos is in range. |
boolean |
isValidPreListener(net.minecraft.world.chunk.Chunk chunk,
net.minecraft.util.math.BlockPos listener,
net.minecraft.util.math.BlockPos modified,
net.minecraft.block.state.IBlockState oldState,
net.minecraft.block.state.IBlockState newState)
Checks if the listener
BlockPos has a IBlockListener.Pre component and if the modified BlockPos is in range. |
public boolean callPreListener(net.minecraft.world.chunk.Chunk chunk,
net.minecraft.util.math.BlockPos listener,
net.minecraft.util.math.BlockPos modified,
net.minecraft.block.state.IBlockState oldState,
net.minecraft.block.state.IBlockState newState)
IBlockListener.Pre.onBlockSet(net.minecraft.world.World, BlockPos, BlockPos, IBlockState, IBlockState) for the listener
BlockPos.chunk - the chunklistener - the listenermodified - the modifiedoldState - the old statenewState - the new statepublic boolean isValidPreListener(net.minecraft.world.chunk.Chunk chunk,
net.minecraft.util.math.BlockPos listener,
net.minecraft.util.math.BlockPos modified,
net.minecraft.block.state.IBlockState oldState,
net.minecraft.block.state.IBlockState newState)
BlockPos has a IBlockListener.Pre component and if the modified BlockPos is in range.chunk - the chunklistener - the listenermodified - the modifiedoldState - the old statenewState - the new statepublic boolean callPostListener(net.minecraft.world.chunk.Chunk chunk,
net.minecraft.util.math.BlockPos listener,
net.minecraft.util.math.BlockPos modified,
net.minecraft.block.state.IBlockState oldState,
net.minecraft.block.state.IBlockState newState)
BlockPos.chunk - the chunklistener - the listenermodified - the modifiedoldState - the old statenewState - the new statepublic boolean isValidPostListener(net.minecraft.world.chunk.Chunk chunk,
net.minecraft.util.math.BlockPos listener,
net.minecraft.util.math.BlockPos modified,
net.minecraft.block.state.IBlockState oldState,
net.minecraft.block.state.IBlockState newState)
BlockPos has a IBlockListener.Pre component and if the modified BlockPos is in range.chunk - the chunklistener - the listenermodified - the modifiedoldState - the old statenewState - the new state