net.minecraft.world.chunk.storage
Class ExtendedBlockStorage

java.lang.Object
  extended by net.minecraft.world.chunk.storage.ExtendedBlockStorage

public class ExtendedBlockStorage
extends Object


Constructor Summary
ExtendedBlockStorage(int par1, boolean par2)
           
 
Method Summary
 void clearMSBArray()
           
 NibbleArray createBlockMSBArray()
           
 NibbleArray getBlocklightArray()
          Returns the NibbleArray instance containing Block-light data.
 byte[] getBlockLSBArray()
           
 NibbleArray getBlockMSBArray()
          Returns the block ID MSB (bits 11..8) array for this storage array's Chunk.
 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.
 int getExtBlocklightValue(int par1, int par2, int par3)
          Gets the saved Block-light value in the extended block storage structure.
 int getExtBlockMetadata(int par1, int par2, int par3)
          Returns the metadata associated with the block at the given coordinates in this ExtendedBlockStorage.
 int getExtSkylightValue(int par1, int par2, int par3)
          Gets the saved Sky-light value in the extended block storage structure.
 NibbleArray getMetadataArray()
           
 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.
 NibbleArray getSkylightArray()
          Returns the NibbleArray instance containing Sky-light data.
 int getYLocation()
          Returns the Y location of this ExtendedBlockStorage.
 boolean isEmpty()
          Returns whether or not this block storage's Chunk is fully empty, based on its internal reference count.
 void removeInvalidBlocks()
           
 void setBlocklightArray(NibbleArray par1NibbleArray)
          Sets the NibbleArray instance used for Block-light values in this particular storage block.
 void setBlockLSBArray(byte[] par1ArrayOfByte)
          Sets the array of block ID least significant bits for this ExtendedBlockStorage.
 void setBlockMetadataArray(NibbleArray par1NibbleArray)
          Sets the NibbleArray of block metadata (blockMetadataArray) for this ExtendedBlockStorage.
 void setBlockMSBArray(NibbleArray par1NibbleArray)
          Sets the array of blockID most significant bits (blockMSBArray) for this ExtendedBlockStorage.
 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.
 void setExtBlocklightValue(int par1, int par2, int par3, int par4)
          Sets the saved Block-light value in the extended block storage structure.
 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.
 void setExtSkylightValue(int par1, int par2, int par3, int par4)
          Sets the saved Sky-light value in the extended block storage structure.
 void setSkylightArray(NibbleArray par1NibbleArray)
          Sets the NibbleArray instance used for Sky-light values in this particular storage block.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedBlockStorage

public ExtendedBlockStorage(int par1,
                            boolean par2)
Method Detail

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

public NibbleArray getBlockMSBArray()
Returns the block ID MSB (bits 11..8) array for this storage array's Chunk.


getMetadataArray

public NibbleArray getMetadataArray()

getBlocklightArray

public NibbleArray getBlocklightArray()
Returns the NibbleArray instance containing Block-light data.


getSkylightArray

public NibbleArray 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

public void setBlockMSBArray(NibbleArray par1NibbleArray)
Sets the array of blockID most significant bits (blockMSBArray) for this ExtendedBlockStorage.


setBlockMetadataArray

public void setBlockMetadataArray(NibbleArray par1NibbleArray)
Sets the NibbleArray of block metadata (blockMetadataArray) for this ExtendedBlockStorage.


setBlocklightArray

public void setBlocklightArray(NibbleArray par1NibbleArray)
Sets the NibbleArray instance used for Block-light values in this particular storage block.


setSkylightArray

public void setSkylightArray(NibbleArray par1NibbleArray)
Sets the NibbleArray instance used for Sky-light values in this particular storage block.


createBlockMSBArray

public NibbleArray createBlockMSBArray()