1.15 port

This commit is contained in:
yueh
2020-05-18 14:02:45 +02:00
parent 0ea86c939c
commit 16d6d55d7f
630 changed files with 4211 additions and 12664 deletions
@@ -25,9 +25,9 @@ import java.util.List;
import java.util.Map.Entry;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.texture.ITickable;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ITickable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.NextTickListEntry;
import net.minecraft.world.World;
@@ -62,7 +62,7 @@ public class CachedPlane
private final IMovableRegistry reg = AEApi.instance().registries().movable();
private final List<WorldCoord> updates = new ArrayList<>();
private int verticalBits;
private final IBlockState matrixBlockState;
private final BlockState matrixBlockState;
public CachedPlane( final World w, final int minX, final int minY, final int minZ, final int maxX, final int maxY, final int maxZ )
{
@@ -111,8 +111,7 @@ public class CachedPlane
{
for( int z = 0; z < this.z_size; z++ )
{
this.myColumns[x][z] = new Column( w.getChunkFromChunkCoords( ( minX + x ) >> 4,
( minZ + z ) >> 4 ), ( minX + x ) & 0xF, ( minZ + z ) & 0xF, minCY, cy_size );
this.myColumns[x][z] = new Column( w.getChunk( ( minX + x ) >> 4, ( minZ + z ) >> 4 ), ( minX + x ) & 0xF, ( minZ + z ) & 0xF, minCY, cy_size );
}
}
@@ -125,7 +124,7 @@ public class CachedPlane
final List<Entry<BlockPos, TileEntity>> rawTiles = new ArrayList<>();
final List<BlockPos> deadTiles = new ArrayList<>();
final Chunk c = w.getChunkFromChunkCoords( minCX + cx, minCZ + cz );
final Chunk c = w.getChunk( minCX + cx, minCZ + cz );
this.myChunks[cx][cz] = c;
rawTiles.addAll( ( (HashMap<BlockPos, TileEntity>) c.getTileEntityMap() ).entrySet() );
@@ -151,7 +150,7 @@ public class CachedPlane
// don't skip air, just let the code replace it...
if( details.state != null && details.state.getBlock() == Platform.AIR_BLOCK && details.state.getMaterial().isReplaceable() )
{
w.setBlockToAir( tePOS );
w.removeBlock( tePOS, false );
}
else
{
@@ -166,7 +165,7 @@ public class CachedPlane
c.getTileEntityMap().remove( cp );
}
final long k = this.getWorld().getTotalWorldTime();
final long k = this.getWorld().getGameTime();
final List<NextTickListEntry> list = this.getWorld().getPendingBlockUpdates( c, false );
if( list != null )
{
@@ -392,7 +391,7 @@ public class CachedPlane
private static class BlockStorageData
{
public IBlockState state;
public BlockState state;
public int light;
}