@AutoLoad public class ChunkBlockHandler extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ChunkBlockHandler.ChunkProcedure
This class is the base for a process that is to be called for every coordinate stored inside a
Chunk. |
| Constructor and Description |
|---|
ChunkBlockHandler() |
| Modifier and Type | Method and Description |
|---|---|
WeakNested.Set<net.minecraft.world.chunk.Chunk,net.minecraft.util.math.BlockPos> |
chunks(net.minecraft.world.chunk.Chunk chunk) |
static ChunkBlockHandler |
get()
Gets the
ChunkBlockHandler instance. |
static java.util.List<net.minecraft.world.chunk.Chunk> |
getAffectedChunks(net.minecraft.world.World world,
net.minecraft.util.math.AxisAlignedBB... aabbs)
Gets the chunks colliding with the specified
AxisAlignedBB. q |
static java.util.List<net.minecraft.world.chunk.Chunk> |
getAffectedChunks(net.minecraft.world.World world,
int x,
int z,
int distance)
Gets the chunks inside distance from coordinates.
|
void |
onChunkWatched(net.minecraftforge.event.world.ChunkWatchEvent.Watch event)
Called when a client requests a
Chunk from the server only. |
void |
onDataLoad(net.minecraftforge.event.world.ChunkDataEvent.Load event)
Called when a
Chunk is loaded on the server. |
void |
onDataSave(net.minecraftforge.event.world.ChunkDataEvent.Save event)
Called when a
Chunk is saved on the server. |
void |
setCoords(int chunkX,
int chunkZ,
java.util.Set<net.minecraft.util.math.BlockPos> coords)
Client only.
|
public WeakNested.Set<net.minecraft.world.chunk.Chunk,net.minecraft.util.math.BlockPos> chunks(net.minecraft.world.chunk.Chunk chunk)
public void onDataLoad(net.minecraftforge.event.world.ChunkDataEvent.Load event)
Chunk is loaded on the server.event - the eventpublic void onDataSave(net.minecraftforge.event.world.ChunkDataEvent.Save event)
Chunk is saved on the server.event - the eventpublic void onChunkWatched(net.minecraftforge.event.world.ChunkWatchEvent.Watch event)
Chunk from the server only.event - the eventpublic void setCoords(int chunkX,
int chunkZ,
java.util.Set<net.minecraft.util.math.BlockPos> coords)
ChunkBlockMessage.chunkX - the chunk xchunkZ - the chunk zcoords - the coordspublic static java.util.List<net.minecraft.world.chunk.Chunk> getAffectedChunks(net.minecraft.world.World world,
int x,
int z,
int distance)
world - the worldx - the xz - the zdistance - the sizepublic static java.util.List<net.minecraft.world.chunk.Chunk> getAffectedChunks(net.minecraft.world.World world,
net.minecraft.util.math.AxisAlignedBB... aabbs)
AxisAlignedBB. qworld - the worldaabbs - the aabbspublic static ChunkBlockHandler get()
ChunkBlockHandler instance.