Fixed biome registration for spatial storage cells.

Fixed matrix block conversion to air when transferring.
Fixed biome initialization of new chunks.
This commit is contained in:
Sebastian Hartte
2016-10-09 01:51:41 +02:00
parent 0ed8a4c3e8
commit 8e7d63dccb
4 changed files with 53 additions and 25 deletions
+14 -6
View File
@@ -63,10 +63,21 @@ public class CachedPlane
private final LinkedList<WorldCoord> updates = new LinkedList<WorldCoord>();
private final IBlockDefinition matrixFrame = AEApi.instance().definitions().blocks().matrixFrame();
private int verticalBits;
private final IBlockState matrixBlockState;
public CachedPlane( final World w, final int minX, final int minY, final int minZ, final int maxX, final int maxY, final int maxZ )
{
Block matrixFrameBlock = AEApi.instance().definitions().blocks().matrixFrame().maybeBlock().orElse( null );
if( matrixFrameBlock != null )
{
this.matrixBlockState = matrixFrameBlock.getDefaultState();
}
else
{
this.matrixBlockState = null;
}
this.world = w;
this.x_size = maxX - minX + 1;
@@ -403,13 +414,10 @@ public class CachedPlane
private void setBlockIDWithMetadata( final int y, final Object[] blk )
{
CachedPlane.this.matrixFrame.maybeBlock().ifPresent( matrixFrameBlock ->
if( blk[0] == matrixBlockState )
{
if( blk[0] == matrixFrameBlock )
{
blk[0] = Platform.AIR_BLOCK;
}
} );
blk[0] = Platform.AIR_BLOCK.getDefaultState();
}
final ExtendedBlockStorage extendedBlockStorage = this.storage[y >> 4];
extendedBlockStorage.set( this.x, y & 15, this.z, (IBlockState) blk[0] );