Package net.minecraft.src
Class ExtendedBlockStorage
java.lang.Object
net.minecraft.src.ExtendedBlockStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled by a Chunk to initialize the MSB array if getBlockMSBArray returns null.Returns the NibbleArray instance containing Block-light data.byte[]Returns the block ID MSB (bits 11..8) array for this storage array's Chunk.intgetExtBlockID(int par1, int par2, int par3) Returns the extended block ID for a location in a chunk, merged from a byte array and a NibbleArray to form a full 12-bit block ID.intgetExtBlocklightValue(int par1, int par2, int par3) Gets the saved Block-light value in the extended block storage structure.intgetExtBlockMetadata(int par1, int par2, int par3) Returns the metadata associated with the block at the given coordinates in this ExtendedBlockStorage.intgetExtSkylightValue(int par1, int par2, int par3) Gets the saved Sky-light value in the extended block storage structure.booleanReturns whether or not this block storage's Chunk will require random ticking, used to avoid looping through random block ticks when there are no blocks that would randomly tick.Returns the NibbleArray instance containing Sky-light data.intReturns the Y location of this ExtendedBlockStorage.booleanisEmpty()Returns whether or not this block storage's Chunk is fully empty, based on its internal reference count.voidvoidsetBlocklightArray(NibbleArray par1NibbleArray) Sets the NibbleArray instance used for Block-light values in this particular storage block.voidsetBlockLSBArray(byte[] par1ArrayOfByte) Sets the array of block ID least significant bits for this ExtendedBlockStorage.voidsetBlockMetadataArray(NibbleArray par1NibbleArray) Sets the NibbleArray of block metadata (blockMetadataArray) for this ExtendedBlockStorage.voidsetBlockMSBArray(NibbleArray par1NibbleArray) Sets the array of blockID most significant bits (blockMSBArray) for this ExtendedBlockStorage.voidsetExtBlockID(int par1, int par2, int par3, int par4) Sets the extended block ID for a location in a chunk, splitting bits 11..8 into a NibbleArray and bits 7..0 into a byte array.voidsetExtBlocklightValue(int par1, int par2, int par3, int par4) Sets the saved Block-light value in the extended block storage structure.voidsetExtBlockMetadata(int par1, int par2, int par3, int par4) Sets the metadata of the Block at the given coordinates in this ExtendedBlockStorage to the given metadata.voidsetExtSkylightValue(int par1, int par2, int par3, int par4) Sets the saved Sky-light value in the extended block storage structure.voidsetSkylightArray(NibbleArray par1NibbleArray) Sets the NibbleArray instance used for Sky-light values in this particular storage block.
-
Constructor Details
-
ExtendedBlockStorage
public ExtendedBlockStorage(int par1, boolean par2)
-
-
Method Details
-
getExtBlockID
public int getExtBlockID(int par1, int par2, int par3) Returns the extended block ID for a location in a chunk, merged from a byte array and a NibbleArray to form a full 12-bit block ID. -
setExtBlockID
public void setExtBlockID(int par1, int par2, int par3, int par4) Sets the extended block ID for a location in a chunk, splitting bits 11..8 into a NibbleArray and bits 7..0 into a byte array. Also performs reference counting to determine whether or not to broadly cull this Chunk from the random-update tick list. -
getExtBlockMetadata
public int getExtBlockMetadata(int par1, int par2, int par3) Returns the metadata associated with the block at the given coordinates in this ExtendedBlockStorage. -
setExtBlockMetadata
public void setExtBlockMetadata(int par1, int par2, int par3, int par4) Sets the metadata of the Block at the given coordinates in this ExtendedBlockStorage to the given metadata. -
isEmpty
public boolean isEmpty()Returns whether or not this block storage's Chunk is fully empty, based on its internal reference count. -
getNeedsRandomTick
public boolean getNeedsRandomTick()Returns whether or not this block storage's Chunk will require random ticking, used to avoid looping through random block ticks when there are no blocks that would randomly tick. -
getYLocation
public int getYLocation()Returns the Y location of this ExtendedBlockStorage. -
setExtSkylightValue
public void setExtSkylightValue(int par1, int par2, int par3, int par4) Sets the saved Sky-light value in the extended block storage structure. -
getExtSkylightValue
public int getExtSkylightValue(int par1, int par2, int par3) Gets the saved Sky-light value in the extended block storage structure. -
setExtBlocklightValue
public void setExtBlocklightValue(int par1, int par2, int par3, int par4) Sets the saved Block-light value in the extended block storage structure. -
getExtBlocklightValue
public int getExtBlocklightValue(int par1, int par2, int par3) Gets the saved Block-light value in the extended block storage structure. -
removeInvalidBlocks
public void removeInvalidBlocks() -
getBlockLSBArray
public byte[] getBlockLSBArray() -
clearMSBArray
public void clearMSBArray() -
getBlockMSBArray
Returns the block ID MSB (bits 11..8) array for this storage array's Chunk. -
getMetadataArray
-
getBlocklightArray
Returns the NibbleArray instance containing Block-light data. -
getSkylightArray
Returns the NibbleArray instance containing Sky-light data. -
setBlockLSBArray
public void setBlockLSBArray(byte[] par1ArrayOfByte) Sets the array of block ID least significant bits for this ExtendedBlockStorage. -
setBlockMSBArray
Sets the array of blockID most significant bits (blockMSBArray) for this ExtendedBlockStorage. -
setBlockMetadataArray
Sets the NibbleArray of block metadata (blockMetadataArray) for this ExtendedBlockStorage. -
setBlocklightArray
Sets the NibbleArray instance used for Block-light values in this particular storage block. -
setSkylightArray
Sets the NibbleArray instance used for Sky-light values in this particular storage block. -
createBlockMSBArray
Called by a Chunk to initialize the MSB array if getBlockMSBArray returns null. Returns the newly-created NibbleArray instance.
-