YATS/Forge Documentation
|
Public Member Functions | |
Chunk (World par1World, int par2, int par3) | |
Chunk (World par1World, byte[] par2ArrayOfByte, int par3, int par4) | |
Chunk (World world, byte[] ids, byte[] metadata, int chunkX, int chunkZ) | |
Chunk (World world, short[] ids, byte[] metadata, int chunkX, int chunkZ) | |
boolean | isAtLocation (int par1, int par2) |
int | getHeightValue (int par1, int par2) |
int | getTopFilledSegment () |
ExtendedBlockStorage[] | getBlockStorageArray () |
void | generateHeightMap () |
void | generateSkylightMap () |
int | getBlockLightOpacity (int par1, int par2, int par3) |
int | getBlockID (int par1, int par2, int par3) |
int | getBlockMetadata (int par1, int par2, int par3) |
boolean | setBlockIDWithMetadata (int par1, int par2, int par3, int par4, int par5) |
boolean | setBlockMetadata (int par1, int par2, int par3, int par4) |
int | getSavedLightValue (EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4) |
void | setLightValue (EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4, int par5) |
int | getBlockLightValue (int par1, int par2, int par3, int par4) |
void | addEntity (Entity par1Entity) |
void | removeEntity (Entity par1Entity) |
void | removeEntityAtIndex (Entity par1Entity, int par2) |
boolean | canBlockSeeTheSky (int par1, int par2, int par3) |
TileEntity | getChunkBlockTileEntity (int par1, int par2, int par3) |
void | addTileEntity (TileEntity par1TileEntity) |
void | setChunkBlockTileEntity (int par1, int par2, int par3, TileEntity par4TileEntity) |
void | removeChunkBlockTileEntity (int par1, int par2, int par3) |
void | onChunkLoad () |
void | onChunkUnload () |
void | setChunkModified () |
void | getEntitiesWithinAABBForEntity (Entity par1Entity, AxisAlignedBB par2AxisAlignedBB, List par3List, IEntitySelector par4IEntitySelector) |
void | getEntitiesOfTypeWithinAAAB (Class par1Class, AxisAlignedBB par2AxisAlignedBB, List par3List, IEntitySelector par4IEntitySelector) |
boolean | needsSaving (boolean par1) |
Random | getRandomWithSeed (long par1) |
boolean | isEmpty () |
void | populateChunk (IChunkProvider par1IChunkProvider, IChunkProvider par2IChunkProvider, int par3, int par4) |
int | getPrecipitationHeight (int par1, int par2) |
void | updateSkylight () |
ChunkCoordIntPair | getChunkCoordIntPair () |
boolean | getAreLevelsEmpty (int par1, int par2) |
void | setStorageArrays (ExtendedBlockStorage[] par1ArrayOfExtendedBlockStorage) |
void | fillChunk (byte[] par1ArrayOfByte, int par2, int par3, boolean par4) |
BiomeGenBase | getBiomeGenForWorldCoords (int par1, int par2, WorldChunkManager par3WorldChunkManager) |
byte[] | getBiomeArray () |
void | setBiomeArray (byte[] par1ArrayOfByte) |
void | resetRelightChecks () |
void | enqueueRelightChecks () |
void | cleanChunkBlockTileEntity (int x, int y, int z) |
Public Attributes | |
int[] | precipitationHeightMap |
boolean[] | updateSkylightColumns |
boolean | isChunkLoaded |
World | worldObj |
int[] | heightMap |
final int | xPosition |
final int | zPosition |
Map | chunkTileEntityMap |
List[] | entityLists |
boolean | isTerrainPopulated |
boolean | isModified |
boolean | hasEntities |
long | lastSaveTime |
boolean | sendUpdates |
int | heightMapMinimum |
Static Public Attributes | |
static boolean | isLit |
net.minecraft.world.chunk.Chunk.Chunk | ( | World | par1World, |
int | par2, | ||
int | par3 | ||
) |
net.minecraft.world.chunk.Chunk.Chunk | ( | World | par1World, |
byte[] | par2ArrayOfByte, | ||
int | par3, | ||
int | par4 | ||
) |
net.minecraft.world.chunk.Chunk.Chunk | ( | World | world, |
byte[] | ids, | ||
byte[] | metadata, | ||
int | chunkX, | ||
int | chunkZ | ||
) |
Metadata sensitive Chunk constructor for use in new ChunkProviders that use metadata sensitive blocks during generation.
world | The world this chunk belongs to |
ids | A ByteArray containing all the BlockID's to set this chunk to |
metadata | A ByteArray containing all the metadata to set this chunk to |
chunkX | The chunk's X position |
chunkZ | The Chunk's Z position |
net.minecraft.world.chunk.Chunk.Chunk | ( | World | world, |
short[] | ids, | ||
byte[] | metadata, | ||
int | chunkX, | ||
int | chunkZ | ||
) |
A Chunk Constructor which handles shorts to allow block ids > 256 (full 4096 range) Meta data sensitive NOTE: The x,y,z order of the array is different from the native Chunk constructor to allow for generation > y127 NOTE: This is possibly more efficient than the standard constructor due to less memory skipping
world | The world this chunk belongs to |
ids | A ShortArray containing all the BlockID's to set this chunk to (x is low order, z is mid, y is high) |
metadata | A ByteArray containing all the metadata to set this chunk to |
chunkX | The chunk's X position |
chunkZ | The Chunk's Z position |
void net.minecraft.world.chunk.Chunk.addEntity | ( | Entity | par1Entity) |
Adds an entity to the chunk. Args: entity
void net.minecraft.world.chunk.Chunk.addTileEntity | ( | TileEntity | par1TileEntity) |
Adds a TileEntity to a chunk
boolean net.minecraft.world.chunk.Chunk.canBlockSeeTheSky | ( | int | par1, |
int | par2, | ||
int | par3 | ||
) |
Returns whether is not a block above this one blocking sight to the sky (done via checking against the heightmap)
void net.minecraft.world.chunk.Chunk.cleanChunkBlockTileEntity | ( | int | x, |
int | y, | ||
int | z | ||
) |
FORGE: Used to remove only invalid TileEntities
void net.minecraft.world.chunk.Chunk.enqueueRelightChecks | ( | ) |
Called once-per-chunk-per-tick, and advances the round-robin relight check index per-storage-block by up to 8 blocks at a time. In a worst-case scenario, can potentially take up to 1.6 seconds, calculated via (4096/(8*16))/20, to re-check all blocks in a chunk, which could explain both lagging light updates in certain cases as well as Nether relight
void net.minecraft.world.chunk.Chunk.fillChunk | ( | byte[] | par1ArrayOfByte, |
int | par2, | ||
int | par3, | ||
boolean | par4 | ||
) |
Initialise this chunk with new binary data
void net.minecraft.world.chunk.Chunk.generateHeightMap | ( | ) |
Generates the height map for a chunk from scratch
void net.minecraft.world.chunk.Chunk.generateSkylightMap | ( | ) |
Generates the initial skylight map for the chunk upon generation or load.
boolean net.minecraft.world.chunk.Chunk.getAreLevelsEmpty | ( | int | par1, |
int | par2 | ||
) |
Returns whether the ExtendedBlockStorages containing levels (in blocks) from arg 1 to arg 2 are fully empty (true) or not (false).
byte [] net.minecraft.world.chunk.Chunk.getBiomeArray | ( | ) |
Returns an array containing a 16x16 mapping on the X/Z of block positions in this Chunk to biome IDs.
BiomeGenBase net.minecraft.world.chunk.Chunk.getBiomeGenForWorldCoords | ( | int | par1, |
int | par2, | ||
WorldChunkManager | par3WorldChunkManager | ||
) |
This method retrieves the biome at a set of coordinates
int net.minecraft.world.chunk.Chunk.getBlockID | ( | int | par1, |
int | par2, | ||
int | par3 | ||
) |
Return the ID of a block in the chunk.
int net.minecraft.world.chunk.Chunk.getBlockLightOpacity | ( | int | par1, |
int | par2, | ||
int | par3 | ||
) |
int net.minecraft.world.chunk.Chunk.getBlockLightValue | ( | int | par1, |
int | par2, | ||
int | par3, | ||
int | par4 | ||
) |
Gets the amount of light on a block taking into account sunlight
int net.minecraft.world.chunk.Chunk.getBlockMetadata | ( | int | par1, |
int | par2, | ||
int | par3 | ||
) |
Return the metadata corresponding to the given coordinates inside a chunk.
ExtendedBlockStorage [] net.minecraft.world.chunk.Chunk.getBlockStorageArray | ( | ) |
Returns the ExtendedBlockStorage array for this Chunk.
TileEntity net.minecraft.world.chunk.Chunk.getChunkBlockTileEntity | ( | int | par1, |
int | par2, | ||
int | par3 | ||
) |
Gets the TileEntity for a given block in this chunk
ChunkCoordIntPair net.minecraft.world.chunk.Chunk.getChunkCoordIntPair | ( | ) |
Gets a ChunkCoordIntPair representing the Chunk's position.
void net.minecraft.world.chunk.Chunk.getEntitiesOfTypeWithinAAAB | ( | Class | par1Class, |
AxisAlignedBB | par2AxisAlignedBB, | ||
List | par3List, | ||
IEntitySelector | par4IEntitySelector | ||
) |
Gets all entities that can be assigned to the specified class. Args: entityClass, aabb, listToFill
void net.minecraft.world.chunk.Chunk.getEntitiesWithinAABBForEntity | ( | Entity | par1Entity, |
AxisAlignedBB | par2AxisAlignedBB, | ||
List | par3List, | ||
IEntitySelector | par4IEntitySelector | ||
) |
Fills the given list of all entities that intersect within the given bounding box that aren't the passed entity Args: entity, aabb, listToFill
int net.minecraft.world.chunk.Chunk.getHeightValue | ( | int | par1, |
int | par2 | ||
) |
Returns the value in the height map at this x, z coordinate in the chunk
int net.minecraft.world.chunk.Chunk.getPrecipitationHeight | ( | int | par1, |
int | par2 | ||
) |
Gets the height to which rain/snow will fall. Calculates it if not already stored.
Random net.minecraft.world.chunk.Chunk.getRandomWithSeed | ( | long | par1) |
int net.minecraft.world.chunk.Chunk.getSavedLightValue | ( | EnumSkyBlock | par1EnumSkyBlock, |
int | par2, | ||
int | par3, | ||
int | par4 | ||
) |
Gets the amount of light saved in this block (doesn't adjust for daylight)
int net.minecraft.world.chunk.Chunk.getTopFilledSegment | ( | ) |
Returns the topmost ExtendedBlockStorage instance for this Chunk that actually contains a block.
boolean net.minecraft.world.chunk.Chunk.isAtLocation | ( | int | par1, |
int | par2 | ||
) |
Checks whether the chunk is at the X/Z location specified
boolean net.minecraft.world.chunk.Chunk.isEmpty | ( | ) |
boolean net.minecraft.world.chunk.Chunk.needsSaving | ( | boolean | par1) |
Returns true if this Chunk needs to be saved
void net.minecraft.world.chunk.Chunk.onChunkLoad | ( | ) |
Called when this Chunk is loaded by the ChunkProvider
void net.minecraft.world.chunk.Chunk.onChunkUnload | ( | ) |
Called when this Chunk is unloaded by the ChunkProvider
void net.minecraft.world.chunk.Chunk.populateChunk | ( | IChunkProvider | par1IChunkProvider, |
IChunkProvider | par2IChunkProvider, | ||
int | par3, | ||
int | par4 | ||
) |
void net.minecraft.world.chunk.Chunk.removeChunkBlockTileEntity | ( | int | par1, |
int | par2, | ||
int | par3 | ||
) |
Removes the TileEntity for a given block in this chunk
void net.minecraft.world.chunk.Chunk.removeEntity | ( | Entity | par1Entity) |
removes entity using its y chunk coordinate as its index
void net.minecraft.world.chunk.Chunk.removeEntityAtIndex | ( | Entity | par1Entity, |
int | par2 | ||
) |
Removes entity at the specified index from the entity array.
void net.minecraft.world.chunk.Chunk.resetRelightChecks | ( | ) |
Resets the relight check index to 0 for this Chunk.
void net.minecraft.world.chunk.Chunk.setBiomeArray | ( | byte[] | par1ArrayOfByte) |
Accepts a 256-entry array that contains a 16x16 mapping on the X/Z plane of block positions in this Chunk to biome IDs.
boolean net.minecraft.world.chunk.Chunk.setBlockIDWithMetadata | ( | int | par1, |
int | par2, | ||
int | par3, | ||
int | par4, | ||
int | par5 | ||
) |
Sets a blockID of a position within a chunk with metadata. Args: x, y, z, blockID, metadata
boolean net.minecraft.world.chunk.Chunk.setBlockMetadata | ( | int | par1, |
int | par2, | ||
int | par3, | ||
int | par4 | ||
) |
Set the metadata of a block in the chunk
void net.minecraft.world.chunk.Chunk.setChunkBlockTileEntity | ( | int | par1, |
int | par2, | ||
int | par3, | ||
TileEntity | par4TileEntity | ||
) |
Sets the TileEntity for a given block in this chunk
void net.minecraft.world.chunk.Chunk.setChunkModified | ( | ) |
Sets the isModified flag for this Chunk
void net.minecraft.world.chunk.Chunk.setLightValue | ( | EnumSkyBlock | par1EnumSkyBlock, |
int | par2, | ||
int | par3, | ||
int | par4, | ||
int | par5 | ||
) |
Sets the light value at the coordinate. If enumskyblock is set to sky it sets it in the skylightmap and if its a block then into the blocklightmap. Args enumSkyBlock, x, y, z, lightValue
void net.minecraft.world.chunk.Chunk.setStorageArrays | ( | ExtendedBlockStorage[] | par1ArrayOfExtendedBlockStorage) |
void net.minecraft.world.chunk.Chunk.updateSkylight | ( | ) |
Checks whether skylight needs updated; if it does, calls updateSkylight_do
Map net.minecraft.world.chunk.Chunk.chunkTileEntityMap |
A Map of ChunkPositions to TileEntities in this chunk
List [] net.minecraft.world.chunk.Chunk.entityLists |
Array of Lists containing the entities in this Chunk. Each List represents a 16 block subchunk.
boolean net.minecraft.world.chunk.Chunk.hasEntities |
Whether this Chunk has any Entities and thus requires saving on every tick
int [] net.minecraft.world.chunk.Chunk.heightMap |
int net.minecraft.world.chunk.Chunk.heightMapMinimum |
Lowest value in the heightmap.
boolean net.minecraft.world.chunk.Chunk.isChunkLoaded |
|
static |
Determines if the chunk is lit or not at a light value greater than 0.
boolean net.minecraft.world.chunk.Chunk.isModified |
Set to true if the chunk has been modified and needs to be updated internally.
boolean net.minecraft.world.chunk.Chunk.isTerrainPopulated |
Boolean value indicating if the terrain is populated.
long net.minecraft.world.chunk.Chunk.lastSaveTime |
The time according to World.worldTime when this chunk was last saved
int [] net.minecraft.world.chunk.Chunk.precipitationHeightMap |
A map, similar to heightMap, that tracks how far down precipitation can fall.
boolean net.minecraft.world.chunk.Chunk.sendUpdates |
Updates to this chunk will not be sent to clients if this is false. This field is set to true the first time the chunk is sent to a client, and never set to false.
boolean [] net.minecraft.world.chunk.Chunk.updateSkylightColumns |
Which columns need their skylightMaps updated.
final int net.minecraft.world.chunk.Chunk.xPosition |
The x coordinate of the chunk.
final int net.minecraft.world.chunk.Chunk.zPosition |
The z coordinate of the chunk.