Changed access to use this qualifier
This commit is contained in:
@@ -44,23 +44,23 @@ public class FacadeContainer implements IFacadeContainer
|
||||
final CableBusStorage storage;
|
||||
|
||||
public FacadeContainer(CableBusStorage cbs) {
|
||||
storage = cbs;
|
||||
this.storage = cbs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToStream(ByteBuf out) throws IOException
|
||||
{
|
||||
int facadeSides = 0;
|
||||
for (int x = 0; x < facades; x++)
|
||||
for (int x = 0; x < this.facades; x++)
|
||||
{
|
||||
if ( getFacade( ForgeDirection.getOrientation( x ) ) != null )
|
||||
if ( this.getFacade( ForgeDirection.getOrientation( x ) ) != null )
|
||||
facadeSides = facadeSides | (1 << x);
|
||||
}
|
||||
out.writeByte( (byte) facadeSides );
|
||||
|
||||
for (int x = 0; x < facades; x++)
|
||||
for (int x = 0; x < this.facades; x++)
|
||||
{
|
||||
IFacadePart part = getFacade( ForgeDirection.getOrientation( x ) );
|
||||
IFacadePart part = this.getFacade( ForgeDirection.getOrientation( x ) );
|
||||
if ( part != null )
|
||||
{
|
||||
int itemID = Item.getIdFromItem( part.getItem() );
|
||||
@@ -79,7 +79,7 @@ public class FacadeContainer implements IFacadeContainer
|
||||
boolean changed = false;
|
||||
|
||||
int ids[] = new int[2];
|
||||
for (int x = 0; x < facades; x++)
|
||||
for (int x = 0; x < this.facades; x++)
|
||||
{
|
||||
ForgeDirection side = ForgeDirection.getOrientation( x );
|
||||
int ix = (1 << x);
|
||||
@@ -93,8 +93,8 @@ public class FacadeContainer implements IFacadeContainer
|
||||
if ( isBC && AppEng.instance.isIntegrationEnabled( IntegrationType.BC ) )
|
||||
{
|
||||
IBC bc = (IBC) AppEng.instance.getIntegration( IntegrationType.BC );
|
||||
changed = changed || storage.getFacade( x ) == null;
|
||||
storage.setFacade( x, bc.createFacadePart( (Block) Block.blockRegistry.getObjectById( ids[0] ), ids[1], side ) );
|
||||
changed = changed || this.storage.getFacade( x ) == null;
|
||||
this.storage.setFacade( x, bc.createFacadePart( (Block) Block.blockRegistry.getObjectById( ids[0] ), ids[1], side ) );
|
||||
}
|
||||
else if ( !isBC )
|
||||
{
|
||||
@@ -102,15 +102,15 @@ public class FacadeContainer implements IFacadeContainer
|
||||
ItemStack facade = ifa.createFromIDs( ids );
|
||||
if ( facade != null )
|
||||
{
|
||||
changed = changed || storage.getFacade( x ) == null;
|
||||
storage.setFacade( x, ifa.createPartFromItemStack( facade, side ) );
|
||||
changed = changed || this.storage.getFacade( x ) == null;
|
||||
this.storage.setFacade( x, ifa.createPartFromItemStack( facade, side ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
changed = changed || storage.getFacade( x ) != null;
|
||||
storage.setFacade( x, null );
|
||||
changed = changed || this.storage.getFacade( x ) != null;
|
||||
this.storage.setFacade( x, null );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,9 +120,9 @@ public class FacadeContainer implements IFacadeContainer
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound c)
|
||||
{
|
||||
for (int x = 0; x < facades; x++)
|
||||
for (int x = 0; x < this.facades; x++)
|
||||
{
|
||||
storage.setFacade( x, null );
|
||||
this.storage.setFacade( x, null );
|
||||
|
||||
NBTTagCompound t = c.getCompoundTag( "facade:" + x );
|
||||
if ( t != null )
|
||||
@@ -132,14 +132,14 @@ public class FacadeContainer implements IFacadeContainer
|
||||
{
|
||||
Item i = is.getItem();
|
||||
if ( i instanceof IFacadeItem )
|
||||
storage.setFacade( x, ((IFacadeItem) i).createPartFromItemStack( is, ForgeDirection.getOrientation( x ) ) );
|
||||
this.storage.setFacade( x, ((IFacadeItem) i).createPartFromItemStack( is, ForgeDirection.getOrientation( x ) ) );
|
||||
else
|
||||
{
|
||||
if ( AppEng.instance.isIntegrationEnabled( IntegrationType.BC ) )
|
||||
{
|
||||
IBC bc = (IBC) AppEng.instance.getIntegration( IntegrationType.BC );
|
||||
if ( bc.isFacade( is ) )
|
||||
storage.setFacade( x, bc.createFacadePart( is, ForgeDirection.getOrientation( x ) ) );
|
||||
this.storage.setFacade( x, bc.createFacadePart( is, ForgeDirection.getOrientation( x ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,12 +150,12 @@ public class FacadeContainer implements IFacadeContainer
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound c)
|
||||
{
|
||||
for (int x = 0; x < facades; x++)
|
||||
for (int x = 0; x < this.facades; x++)
|
||||
{
|
||||
if ( storage.getFacade( x ) != null )
|
||||
if ( this.storage.getFacade( x ) != null )
|
||||
{
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
storage.getFacade( x ).getItemStack().writeToNBT( data );
|
||||
this.storage.getFacade( x ).getItemStack().writeToNBT( data );
|
||||
c.setTag( "facade:" + x, data );
|
||||
}
|
||||
}
|
||||
@@ -164,9 +164,9 @@ public class FacadeContainer implements IFacadeContainer
|
||||
@Override
|
||||
public boolean addFacade(IFacadePart a)
|
||||
{
|
||||
if ( getFacade( a.getSide() ) == null )
|
||||
if ( this.getFacade( a.getSide() ) == null )
|
||||
{
|
||||
storage.setFacade( a.getSide().ordinal(), a );
|
||||
this.storage.setFacade( a.getSide().ordinal(), a );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -177,9 +177,9 @@ public class FacadeContainer implements IFacadeContainer
|
||||
{
|
||||
if ( side != null && side != ForgeDirection.UNKNOWN )
|
||||
{
|
||||
if ( storage.getFacade( side.ordinal() ) != null )
|
||||
if ( this.storage.getFacade( side.ordinal() ) != null )
|
||||
{
|
||||
storage.setFacade( side.ordinal(), null );
|
||||
this.storage.setFacade( side.ordinal(), null );
|
||||
if ( host != null )
|
||||
host.markForUpdate();
|
||||
}
|
||||
@@ -189,14 +189,14 @@ public class FacadeContainer implements IFacadeContainer
|
||||
@Override
|
||||
public IFacadePart getFacade(ForgeDirection s)
|
||||
{
|
||||
return storage.getFacade( s.ordinal() );
|
||||
return this.storage.getFacade( s.ordinal() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty()
|
||||
{
|
||||
for (int x = 0; x < facades; x++)
|
||||
if ( storage.getFacade( x ) != null )
|
||||
for (int x = 0; x < this.facades; x++)
|
||||
if ( this.storage.getFacade( x ) != null )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -206,16 +206,16 @@ public class FacadeContainer implements IFacadeContainer
|
||||
{
|
||||
IFacadePart newFacades[] = new FacadePart[6];
|
||||
|
||||
newFacades[ForgeDirection.UP.ordinal()] = storage.getFacade( ForgeDirection.UP.ordinal() );
|
||||
newFacades[ForgeDirection.DOWN.ordinal()] = storage.getFacade( ForgeDirection.DOWN.ordinal() );
|
||||
newFacades[ForgeDirection.UP.ordinal()] = this.storage.getFacade( ForgeDirection.UP.ordinal() );
|
||||
newFacades[ForgeDirection.DOWN.ordinal()] = this.storage.getFacade( ForgeDirection.DOWN.ordinal() );
|
||||
|
||||
newFacades[ForgeDirection.EAST.ordinal()] = storage.getFacade( ForgeDirection.NORTH.ordinal() );
|
||||
newFacades[ForgeDirection.SOUTH.ordinal()] = storage.getFacade( ForgeDirection.EAST.ordinal() );
|
||||
newFacades[ForgeDirection.EAST.ordinal()] = this.storage.getFacade( ForgeDirection.NORTH.ordinal() );
|
||||
newFacades[ForgeDirection.SOUTH.ordinal()] = this.storage.getFacade( ForgeDirection.EAST.ordinal() );
|
||||
|
||||
newFacades[ForgeDirection.WEST.ordinal()] = storage.getFacade( ForgeDirection.SOUTH.ordinal() );
|
||||
newFacades[ForgeDirection.NORTH.ordinal()] = storage.getFacade( ForgeDirection.WEST.ordinal() );
|
||||
newFacades[ForgeDirection.WEST.ordinal()] = this.storage.getFacade( ForgeDirection.SOUTH.ordinal() );
|
||||
newFacades[ForgeDirection.NORTH.ordinal()] = this.storage.getFacade( ForgeDirection.WEST.ordinal() );
|
||||
|
||||
for (int x = 0; x < facades; x++)
|
||||
storage.setFacade( x, newFacades[x] );
|
||||
for (int x = 0; x < this.facades; x++)
|
||||
this.storage.setFacade( x, newFacades[x] );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user