Port to 1.11
This commit is contained in:
@@ -315,7 +315,7 @@ public class CachedPlane
|
||||
final BlockPos pos = new BlockPos( x, y, z );
|
||||
|
||||
// attempt recovery...
|
||||
te.setWorldObj( this.world );
|
||||
te.setWorld( this.world );
|
||||
te.setPos( pos );
|
||||
c.c.addTileEntity( new BlockPos( c.x, y + y, c.z ), te );
|
||||
// c.c.setChunkTileEntity( c.x, y + y, c.z, te );
|
||||
@@ -407,7 +407,7 @@ public class CachedPlane
|
||||
ExtendedBlockStorage extendedblockstorage = this.storage[by];
|
||||
if( extendedblockstorage == null )
|
||||
{
|
||||
extendedblockstorage = this.storage[by] = new ExtendedBlockStorage( by << 4, !this.c.getWorld().provider.getHasNoSky() );
|
||||
extendedblockstorage = this.storage[by] = new ExtendedBlockStorage( by << 4, !this.c.getWorld().provider.hasNoSky() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class DefaultSpatialHandler implements IMovableHandler
|
||||
@Override
|
||||
public void moveTile( final TileEntity te, final World w, final BlockPos newPosition )
|
||||
{
|
||||
te.setWorldObj( w );
|
||||
te.setWorld( w );
|
||||
te.setPos( newPosition );
|
||||
|
||||
final Chunk c = w.getChunkFromBlockCoords( newPosition );
|
||||
|
||||
@@ -52,7 +52,7 @@ public class StorageChunkProvider extends ChunkProviderOverworld
|
||||
|
||||
final byte[] biomes = chunk.getBiomeArray();
|
||||
Biome biome = AppEng.instance().getRegistration().getStorageBiome();
|
||||
byte biomeId = (byte) Biome.getIdForBiome(biome);
|
||||
byte biomeId = (byte) Biome.getIdForBiome( biome );
|
||||
|
||||
for( int k = 0; k < biomes.length; ++k )
|
||||
{
|
||||
@@ -105,7 +105,7 @@ public class StorageChunkProvider extends ChunkProviderOverworld
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPos getStrongholdGen( World worldIn, String structureName, BlockPos position )
|
||||
public BlockPos getStrongholdGen( World worldIn, String structureName, BlockPos position, boolean p_180513_4_ )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -113,6 +113,6 @@ public class StorageChunkProvider extends ChunkProviderOverworld
|
||||
@Override
|
||||
public void recreateStructures( Chunk chunkIn, int x, int z )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class StorageHelper
|
||||
|
||||
try
|
||||
{
|
||||
oldWorld = (WorldServer) entity.worldObj;
|
||||
oldWorld = (WorldServer) entity.world;
|
||||
newWorld = (WorldServer) link.dim;
|
||||
player = ( entity instanceof EntityPlayerMP ) ? (EntityPlayerMP) entity : null;
|
||||
}
|
||||
@@ -86,13 +86,13 @@ public class StorageHelper
|
||||
{
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
// Are we riding something? Teleport it instead.
|
||||
if( entity.isRiding() )
|
||||
{
|
||||
return this.teleportEntity( entity.getRidingEntity(), link );
|
||||
}
|
||||
|
||||
|
||||
// Is something riding us? Handle it first.
|
||||
final List<Entity> passangers = entity.getPassengers();
|
||||
final List<Entity> passangersOnOtherSide = new ArrayList<>();
|
||||
@@ -107,7 +107,7 @@ public class StorageHelper
|
||||
}
|
||||
|
||||
// load the chunk!
|
||||
newWorld.getChunkProvider().provideChunk( MathHelper.floor_double( link.x ) >> 4, MathHelper.floor_double( link.z ) >> 4 );
|
||||
newWorld.getChunkProvider().provideChunk( MathHelper.floor( link.x ) >> 4, MathHelper.floor( link.z ) >> 4 );
|
||||
|
||||
if( newWorld != oldWorld )
|
||||
{
|
||||
@@ -122,7 +122,8 @@ public class StorageHelper
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.getServer().getPlayerList().transferEntityToWorld( entity, entity.dimension, entity.getServer().worldServerForDimension( entity.dimension ), (WorldServer) link.dim, new METeleporter( newWorld, link ) );
|
||||
entity.getServer().getPlayerList().transferEntityToWorld( entity, entity.dimension,
|
||||
entity.getServer().worldServerForDimension( entity.dimension ), (WorldServer) link.dim, new METeleporter( newWorld, link ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +131,7 @@ public class StorageHelper
|
||||
{
|
||||
if( player != null )
|
||||
{
|
||||
entity.worldObj.updateEntityWithOptionalForce( entity, true );
|
||||
entity.world.updateEntityWithOptionalForce( entity, true );
|
||||
}
|
||||
|
||||
for( Entity passanger : passangersOnOtherSide )
|
||||
@@ -172,15 +173,10 @@ public class StorageHelper
|
||||
}
|
||||
}
|
||||
|
||||
public void swapRegions( final World srcWorld,
|
||||
final int srcX, final int srcY, final int srcZ,
|
||||
final World dstWorld,
|
||||
final int dstX, final int dstY, final int dstZ,
|
||||
final int scaleX, final int scaleY, final int scaleZ )
|
||||
public void swapRegions( final World srcWorld, final int srcX, final int srcY, final int srcZ, final World dstWorld, final int dstX, final int dstY, final int dstZ, final int scaleX, final int scaleY, final int scaleZ )
|
||||
{
|
||||
AEApi.instance().definitions().blocks().matrixFrame().maybeBlock().ifPresent( matrixFrameBlock ->
|
||||
this.transverseEdges( dstX - 1, dstY - 1, dstZ - 1, dstX + scaleX + 1, dstY + scaleY + 1, dstZ + scaleZ + 1, new WrapInMatrixFrame( matrixFrameBlock.getDefaultState(), dstWorld ) )
|
||||
);
|
||||
AEApi.instance().definitions().blocks().matrixFrame().maybeBlock().ifPresent( matrixFrameBlock -> this.transverseEdges( dstX - 1, dstY - 1, dstZ - 1,
|
||||
dstX + scaleX + 1, dstY + scaleY + 1, dstZ + scaleZ + 1, new WrapInMatrixFrame( matrixFrameBlock.getDefaultState(), dstWorld ) ) );
|
||||
|
||||
final AxisAlignedBB srcBox = new AxisAlignedBB( srcX, srcY, srcZ, srcX + scaleX + 1, srcY + scaleY + 1, srcZ + scaleZ + 1 );
|
||||
|
||||
@@ -207,12 +203,12 @@ public class StorageHelper
|
||||
|
||||
for( final WorldCoord wc : cDst.getUpdates() )
|
||||
{
|
||||
cSrc.getWorld().notifyBlockOfStateChange( wc.getPos(), Platform.AIR_BLOCK );
|
||||
cSrc.getWorld().notifyNeighborsOfStateChange( wc.getPos(), Platform.AIR_BLOCK, true );
|
||||
}
|
||||
|
||||
for( final WorldCoord wc : cSrc.getUpdates() )
|
||||
{
|
||||
cSrc.getWorld().notifyBlockOfStateChange( wc.getPos(), Platform.AIR_BLOCK );
|
||||
cSrc.getWorld().notifyNeighborsOfStateChange( wc.getPos(), Platform.AIR_BLOCK, true );
|
||||
}
|
||||
|
||||
this.transverseEdges( srcX - 1, srcY - 1, srcZ - 1, srcX + scaleX + 1, srcY + scaleY + 1, srcZ + scaleZ + 1, new TriggerUpdates( srcWorld ) );
|
||||
@@ -244,7 +240,7 @@ public class StorageHelper
|
||||
public void visit( final BlockPos pos )
|
||||
{
|
||||
final Block blk = this.dst.getBlockState( pos ).getBlock();
|
||||
blk.neighborChanged( Platform.AIR_BLOCK.getDefaultState(), this.dst, pos, Platform.AIR_BLOCK );
|
||||
blk.neighborChanged( Platform.AIR_BLOCK.getDefaultState(), this.dst, pos, Platform.AIR_BLOCK, pos );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public class StorageWorldProvider extends WorldProvider
|
||||
@Override
|
||||
public IChunkGenerator createChunkGenerator()
|
||||
{
|
||||
return new StorageChunkProvider( this.worldObj, 0 );
|
||||
return new StorageChunkProvider( this.world, 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user