public class Chunk
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.util.Map |
chunkTileEntityMap
A Map of ChunkPositions to TileEntities in this chunk
|
java.util.List[] |
entityLists
Array of Lists containing the entities in this Chunk.
|
boolean |
field_150815_m |
boolean |
hasEntities
Whether this Chunk has any Entities and thus requires saving on every tick
|
int[] |
heightMap |
int |
heightMapMinimum
Lowest value in the heightmap.
|
long |
inhabitedTime
the cumulative number of ticks players have been in this chunk
|
boolean |
isChunkLoaded
Whether or not this Chunk is currently loaded into the World
|
boolean |
isLightPopulated |
static boolean |
isLit
Determines if the chunk is lit or not at a light value greater than 0.
|
boolean |
isModified
Set to true if the chunk has been modified and needs to be updated internally.
|
boolean |
isTerrainPopulated
Boolean value indicating if the terrain is populated.
|
long |
lastSaveTime
The time according to World.worldTime when this chunk was last saved
|
int[] |
precipitationHeightMap
A map, similar to heightMap, that tracks how far down precipitation can fall.
|
boolean |
sendUpdates
Updates to this chunk will not be sent to clients if this is false.
|
boolean[] |
updateSkylightColumns
Which columns need their skylightMaps updated.
|
World |
worldObj
Reference to the World object.
|
int |
xPosition
The x coordinate of the chunk.
|
int |
zPosition
The z coordinate of the chunk.
|
| Constructor and Description |
|---|
Chunk(World p_i45447_1_,
Block[] p_i45447_2_,
byte[] p_i45447_3_,
int p_i45447_4_,
int p_i45447_5_) |
Chunk(World p_i45446_1_,
Block[] p_i45446_2_,
int p_i45446_3_,
int p_i45446_4_) |
Chunk(World p_i1995_1_,
int p_i1995_2_,
int p_i1995_3_) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntity(Entity p_76612_1_)
Adds an entity to the chunk.
|
void |
addTileEntity(TileEntity p_150813_1_) |
boolean |
canBlockSeeTheSky(int p_76619_1_,
int p_76619_2_,
int p_76619_3_)
Returns whether is not a block above this one blocking sight to the sky (done via checking against the heightmap)
|
void |
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.
|
void |
fillChunk(byte[] p_76607_1_,
int p_76607_2_,
int p_76607_3_,
boolean p_76607_4_)
Initialise this chunk with new binary data
|
boolean |
func_150802_k() |
void |
func_150804_b(boolean p_150804_1_) |
TileEntity |
func_150806_e(int p_150806_1_,
int p_150806_2_,
int p_150806_3_) |
boolean |
func_150807_a(int p_150807_1_,
int p_150807_2_,
int p_150807_3_,
Block p_150807_4_,
int p_150807_5_) |
int |
func_150808_b(int p_150808_1_,
int p_150808_2_,
int p_150808_3_) |
void |
func_150809_p() |
void |
func_150812_a(int p_150812_1_,
int p_150812_2_,
int p_150812_3_,
TileEntity p_150812_4_) |
void |
generateHeightMap()
Generates the height map for a chunk from scratch
|
void |
generateSkylightMap()
Generates the initial skylight map for the chunk upon generation or load.
|
boolean |
getAreLevelsEmpty(int p_76606_1_,
int p_76606_2_)
Returns whether the ExtendedBlockStorages containing levels (in blocks) from arg 1 to arg 2 are fully empty
(true) or not (false).
|
byte[] |
getBiomeArray()
Returns an array containing a 16x16 mapping on the X/Z of block positions in this Chunk to biome IDs.
|
BiomeGenBase |
getBiomeGenForWorldCoords(int p_76591_1_,
int p_76591_2_,
WorldChunkManager p_76591_3_)
This method retrieves the biome at a set of coordinates
|
Block |
getBlock(int p_150810_1_,
int p_150810_2_,
int p_150810_3_)
Returns the block corresponding to the given coordinates inside a chunk.
|
int |
getBlockLightValue(int p_76629_1_,
int p_76629_2_,
int p_76629_3_,
int p_76629_4_)
Gets the amount of light on a block taking into account sunlight
|
int |
getBlockMetadata(int p_76628_1_,
int p_76628_2_,
int p_76628_3_)
Return the metadata corresponding to the given coordinates inside a chunk.
|
ExtendedBlockStorage[] |
getBlockStorageArray()
Returns the ExtendedBlockStorage array for this Chunk.
|
ChunkCoordIntPair |
getChunkCoordIntPair()
Gets a ChunkCoordIntPair representing the Chunk's position.
|
void |
getEntitiesOfTypeWithinAAAB(java.lang.Class p_76618_1_,
AxisAlignedBB p_76618_2_,
java.util.List p_76618_3_,
IEntitySelector p_76618_4_)
Gets all entities that can be assigned to the specified class.
|
void |
getEntitiesWithinAABBForEntity(Entity p_76588_1_,
AxisAlignedBB p_76588_2_,
java.util.List p_76588_3_,
IEntitySelector p_76588_4_)
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 |
getHeightValue(int p_76611_1_,
int p_76611_2_)
Returns the value in the height map at this x, z coordinate in the chunk
|
int |
getPrecipitationHeight(int p_76626_1_,
int p_76626_2_)
Gets the height to which rain/snow will fall.
|
java.util.Random |
getRandomWithSeed(long p_76617_1_) |
int |
getSavedLightValue(EnumSkyBlock p_76614_1_,
int p_76614_2_,
int p_76614_3_,
int p_76614_4_)
Gets the amount of light saved in this block (doesn't adjust for daylight)
|
TileEntity |
getTileEntityUnsafe(int x,
int y,
int z)
Retrieves the tile entity, WITHOUT creating it.
|
int |
getTopFilledSegment()
Returns the topmost ExtendedBlockStorage instance for this Chunk that actually contains a block.
|
boolean |
isAtLocation(int p_76600_1_,
int p_76600_2_)
Checks whether the chunk is at the X/Z location specified
|
boolean |
isEmpty() |
boolean |
needsSaving(boolean p_76601_1_)
Returns true if this Chunk needs to be saved
|
void |
onChunkLoad()
Called when this Chunk is loaded by the ChunkProvider
|
void |
onChunkUnload()
Called when this Chunk is unloaded by the ChunkProvider
|
void |
populateChunk(IChunkProvider p_76624_1_,
IChunkProvider p_76624_2_,
int p_76624_3_,
int p_76624_4_) |
void |
removeEntity(Entity p_76622_1_)
removes entity using its y chunk coordinate as its index
|
void |
removeEntityAtIndex(Entity p_76608_1_,
int p_76608_2_)
Removes entity at the specified index from the entity array.
|
void |
removeInvalidTileEntity(int x,
int y,
int z)
Removes the tile entity at the specified position, only if it's
marked as invalid.
|
void |
removeTileEntity(int p_150805_1_,
int p_150805_2_,
int p_150805_3_) |
void |
resetRelightChecks()
Resets the relight check index to 0 for this Chunk.
|
void |
setBiomeArray(byte[] p_76616_1_)
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 |
setBlockMetadata(int p_76589_1_,
int p_76589_2_,
int p_76589_3_,
int p_76589_4_)
Set the metadata of a block in the chunk
|
void |
setChunkModified()
Sets the isModified flag for this Chunk
|
void |
setLightValue(EnumSkyBlock p_76633_1_,
int p_76633_2_,
int p_76633_3_,
int p_76633_4_,
int p_76633_5_)
Sets the light value at the coordinate.
|
void |
setStorageArrays(ExtendedBlockStorage[] p_76602_1_) |
public static boolean isLit
public int[] precipitationHeightMap
public boolean[] updateSkylightColumns
public boolean isChunkLoaded
public World worldObj
public int[] heightMap
public final int xPosition
public final int zPosition
public java.util.Map chunkTileEntityMap
public java.util.List[] entityLists
public boolean isTerrainPopulated
public boolean isLightPopulated
public boolean field_150815_m
public boolean isModified
public boolean hasEntities
public long lastSaveTime
public boolean sendUpdates
public int heightMapMinimum
public long inhabitedTime
public Chunk(World p_i1995_1_, int p_i1995_2_, int p_i1995_3_)
public boolean isAtLocation(int p_76600_1_,
int p_76600_2_)
public int getHeightValue(int p_76611_1_,
int p_76611_2_)
public int getTopFilledSegment()
public ExtendedBlockStorage[] getBlockStorageArray()
public void generateHeightMap()
public void generateSkylightMap()
public int func_150808_b(int p_150808_1_,
int p_150808_2_,
int p_150808_3_)
public Block getBlock(int p_150810_1_, int p_150810_2_, int p_150810_3_)
public int getBlockMetadata(int p_76628_1_,
int p_76628_2_,
int p_76628_3_)
public boolean func_150807_a(int p_150807_1_,
int p_150807_2_,
int p_150807_3_,
Block p_150807_4_,
int p_150807_5_)
public boolean setBlockMetadata(int p_76589_1_,
int p_76589_2_,
int p_76589_3_,
int p_76589_4_)
public int getSavedLightValue(EnumSkyBlock p_76614_1_, int p_76614_2_, int p_76614_3_, int p_76614_4_)
public void setLightValue(EnumSkyBlock p_76633_1_, int p_76633_2_, int p_76633_3_, int p_76633_4_, int p_76633_5_)
public int getBlockLightValue(int p_76629_1_,
int p_76629_2_,
int p_76629_3_,
int p_76629_4_)
public void addEntity(Entity p_76612_1_)
public void removeEntity(Entity p_76622_1_)
public void removeEntityAtIndex(Entity p_76608_1_, int p_76608_2_)
public boolean canBlockSeeTheSky(int p_76619_1_,
int p_76619_2_,
int p_76619_3_)
public TileEntity func_150806_e(int p_150806_1_, int p_150806_2_, int p_150806_3_)
public void addTileEntity(TileEntity p_150813_1_)
public void func_150812_a(int p_150812_1_,
int p_150812_2_,
int p_150812_3_,
TileEntity p_150812_4_)
public void removeTileEntity(int p_150805_1_,
int p_150805_2_,
int p_150805_3_)
public void onChunkLoad()
public void onChunkUnload()
public void setChunkModified()
public void getEntitiesWithinAABBForEntity(Entity p_76588_1_, AxisAlignedBB p_76588_2_, java.util.List p_76588_3_, IEntitySelector p_76588_4_)
public void getEntitiesOfTypeWithinAAAB(java.lang.Class p_76618_1_,
AxisAlignedBB p_76618_2_,
java.util.List p_76618_3_,
IEntitySelector p_76618_4_)
public boolean needsSaving(boolean p_76601_1_)
public java.util.Random getRandomWithSeed(long p_76617_1_)
public boolean isEmpty()
public void populateChunk(IChunkProvider p_76624_1_, IChunkProvider p_76624_2_, int p_76624_3_, int p_76624_4_)
public int getPrecipitationHeight(int p_76626_1_,
int p_76626_2_)
public void func_150804_b(boolean p_150804_1_)
public boolean func_150802_k()
public ChunkCoordIntPair getChunkCoordIntPair()
public boolean getAreLevelsEmpty(int p_76606_1_,
int p_76606_2_)
public void setStorageArrays(ExtendedBlockStorage[] p_76602_1_)
public void fillChunk(byte[] p_76607_1_,
int p_76607_2_,
int p_76607_3_,
boolean p_76607_4_)
public BiomeGenBase getBiomeGenForWorldCoords(int p_76591_1_, int p_76591_2_, WorldChunkManager p_76591_3_)
public byte[] getBiomeArray()
public void setBiomeArray(byte[] p_76616_1_)
public void resetRelightChecks()
public void enqueueRelightChecks()
public void func_150809_p()
public TileEntity getTileEntityUnsafe(int x, int y, int z)
x - y - z - public void removeInvalidTileEntity(int x,
int y,
int z)
x - y - z -