Port to 1.11
This commit is contained in:
@@ -87,7 +87,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
if( newLV != this.oldLV )
|
||||
{
|
||||
this.oldLV = newLV;
|
||||
this.worldObj.checkLight( this.pos );
|
||||
this.world.checkLight( this.pos );
|
||||
}
|
||||
|
||||
this.updateTileSetting();
|
||||
@@ -176,7 +176,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
@Override
|
||||
public void markForUpdate()
|
||||
{
|
||||
if( this.worldObj == null )
|
||||
if( this.world == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -185,8 +185,8 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
if( newLV != this.oldLV )
|
||||
{
|
||||
this.oldLV = newLV;
|
||||
this.worldObj.checkLight( this.pos );
|
||||
// worldObj.updateAllLightTypes( xCoord, yCoord, zCoord );
|
||||
this.world.checkLight( this.pos );
|
||||
// world.updateAllLightTypes( xCoord, yCoord, zCoord );
|
||||
}
|
||||
|
||||
super.markForUpdate();
|
||||
@@ -216,9 +216,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
super.onReady();
|
||||
if( this.getCableBus().isEmpty() )
|
||||
{
|
||||
if( this.worldObj.getTileEntity( this.pos ) == this )
|
||||
if( this.world.getTileEntity( this.pos ) == this )
|
||||
{
|
||||
this.worldObj.destroyBlock( this.pos, true );
|
||||
this.world.destroyBlock( this.pos, true );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -354,9 +354,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
@Override
|
||||
public void notifyNeighbors()
|
||||
{
|
||||
if( this.worldObj != null && this.worldObj.isBlockLoaded( this.pos ) && !CableBusContainer.isLoading() )
|
||||
if( this.world != null && this.world.isBlockLoaded( this.pos ) && !CableBusContainer.isLoading() )
|
||||
{
|
||||
Platform.notifyBlocksOfNeighbors( this.worldObj, this.pos );
|
||||
Platform.notifyBlocksOfNeighbors( this.world, this.pos );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,9 +128,9 @@ public class TileController extends AENetworkPowerTile
|
||||
metaState = ControllerBlockState.offline;
|
||||
}
|
||||
|
||||
if( this.checkController( this.pos ) && this.worldObj.getBlockState( this.pos ).getValue( BlockController.CONTROLLER_STATE ) != metaState )
|
||||
if( this.checkController( this.pos ) && this.world.getBlockState( this.pos ).getValue( BlockController.CONTROLLER_STATE ) != metaState )
|
||||
{
|
||||
this.worldObj.setBlockState( this.pos, this.worldObj.getBlockState( this.pos ).withProperty( BlockController.CONTROLLER_STATE, metaState ) );
|
||||
this.world.setBlockState( this.pos, this.world.getBlockState( this.pos ).withProperty( BlockController.CONTROLLER_STATE, metaState ) );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -219,11 +219,18 @@ public class TileController extends AENetworkPowerTile
|
||||
private boolean checkController( final BlockPos pos )
|
||||
{
|
||||
final BlockPos ownPos = this.getPos();
|
||||
if( this.worldObj.getChunkProvider().getLoadedChunk( ownPos.getX() >> 4, ownPos.getZ() >> 4 ) != null )
|
||||
if( this.world.getChunkProvider().getLoadedChunk( ownPos.getX() >> 4, ownPos.getZ() >> 4 ) != null )
|
||||
{
|
||||
return this.worldObj.getTileEntity( pos ) instanceof TileController;
|
||||
return this.world.getTileEntity( pos ) instanceof TileController;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,4 +119,11 @@ public class TileEnergyAcceptor extends AENetworkPowerTile
|
||||
return this.sides;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
public void onReady()
|
||||
{
|
||||
super.onReady();
|
||||
final int value = this.worldObj.getBlockState( this.pos ).getValue( BlockEnergyCell.ENERGY_STORAGE );
|
||||
final int value = this.world.getBlockState( this.pos ).getValue( BlockEnergyCell.ENERGY_STORAGE );
|
||||
this.currentMeta = (byte) value;
|
||||
this.changePowerLevel();
|
||||
}
|
||||
@@ -95,14 +95,14 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
if( this.currentMeta != storageLevel )
|
||||
{
|
||||
this.currentMeta = (byte) storageLevel;
|
||||
this.worldObj.setBlockState( this.pos, this.worldObj.getBlockState( this.pos ).withProperty( BlockEnergyCell.ENERGY_STORAGE, storageLevel ) );
|
||||
this.world.setBlockState( this.pos, this.world.getBlockState( this.pos ).withProperty( BlockEnergyCell.ENERGY_STORAGE, storageLevel ) );
|
||||
}
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_WRITE )
|
||||
public void writeToNBT_TileEnergyCell( final NBTTagCompound data )
|
||||
{
|
||||
if( !this.worldObj.isRemote )
|
||||
if( !this.world.isRemote )
|
||||
{
|
||||
data.setDouble( "internalCurrentPower", this.internalCurrentPower );
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ public class TileWireless extends AENetworkInvTile implements IWirelessAccessPoi
|
||||
private int getBoosters()
|
||||
{
|
||||
final ItemStack boosters = this.inv.getStackInSlot( 0 );
|
||||
return boosters == null ? 0 : boosters.stackSize;
|
||||
return boosters == null ? 0 : boosters.getCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -223,4 +223,11 @@ public class TileWireless extends AENetworkInvTile implements IWirelessAccessPoi
|
||||
{
|
||||
this.clientFlags = clientFlags;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user