mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 14:34:22 +00:00
fix references to worldObj
This commit is contained in:
1 parent
2cb0bb34fb
commit
48be78c6a8
27 files changed
+162
-163
No files matched your search
@@ -43,16 +43,16 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
@Override
|
||||
public void updateEntity ()
|
||||
{
|
||||
if (this.worldObj.isRemote)
|
||||
if (this.field_145850_b.isRemote)
|
||||
return;
|
||||
ticks++;
|
||||
ticksLPReset++;
|
||||
if (!worldObj.isRemote)
|
||||
if (!field_145850_b.isRemote)
|
||||
{
|
||||
if (this.pullingLiquids)
|
||||
pullLiquids();
|
||||
}
|
||||
//this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
//this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
if (ticks == 20)
|
||||
{
|
||||
if (recentlyFilledDelay != 0)
|
||||
@@ -83,7 +83,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
|
||||
boolean pullLiquid (int x, int y, int z, ForgeDirection direction)
|
||||
{
|
||||
TileEntity tank = worldObj.getBlockTileEntity(x, y, z);
|
||||
TileEntity tank = field_145850_b.getBlockTileEntity(x, y, z);
|
||||
if (tank instanceof IFluidHandler && !(tank instanceof CastingChannelLogic))
|
||||
{
|
||||
FluidStack templiquid = ((IFluidHandler) tank).drain(direction, 3, false);
|
||||
@@ -291,7 +291,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float tankBelow ()
|
||||
{
|
||||
TileEntity te = this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
|
||||
TileEntity te = this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
|
||||
if (te instanceof CastingChannelLogic)
|
||||
return -0.5f;
|
||||
if (te instanceof LavaTankLogic)
|
||||
@@ -311,15 +311,15 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
switch (dir)
|
||||
{
|
||||
case DOWN:
|
||||
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof CastingChannelLogic);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof CastingChannelLogic);
|
||||
case NORTH:
|
||||
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof CastingChannelLogic);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof CastingChannelLogic);
|
||||
case SOUTH:
|
||||
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof CastingChannelLogic);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof CastingChannelLogic);
|
||||
case WEST:
|
||||
return (this.worldObj.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
|
||||
case EAST:
|
||||
return (this.worldObj.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -330,15 +330,15 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
switch (dir)
|
||||
{
|
||||
case DOWN:
|
||||
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof IFluidHandler);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof IFluidHandler);
|
||||
case NORTH:
|
||||
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof IFluidHandler);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof IFluidHandler);
|
||||
case SOUTH:
|
||||
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof IFluidHandler);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof IFluidHandler);
|
||||
case WEST:
|
||||
return (this.worldObj.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
|
||||
case EAST:
|
||||
return (this.worldObj.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -347,11 +347,11 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
private HashMap getOutputs ()
|
||||
{
|
||||
HashMap map = new HashMap();
|
||||
TileEntity tankXplus = this.worldObj.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord);
|
||||
TileEntity tankXminus = this.worldObj.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord);
|
||||
TileEntity tankZplus = this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1);
|
||||
TileEntity tankZminus = this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1);
|
||||
TileEntity tankYminus = this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
|
||||
TileEntity tankXplus = this.field_145850_b.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord);
|
||||
TileEntity tankXminus = this.field_145850_b.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord);
|
||||
TileEntity tankZplus = this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1);
|
||||
TileEntity tankZminus = this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1);
|
||||
TileEntity tankYminus = this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
|
||||
|
||||
if (this.pullingLiquids)
|
||||
{
|
||||
@@ -420,7 +420,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
|
||||
if (doFill)
|
||||
{
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.liquid = transfered;
|
||||
}
|
||||
recentlyFilledDelay = 2;
|
||||
@@ -437,7 +437,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
if ((doFill) && (spaceInTank > 0))
|
||||
{
|
||||
this.liquid.amount = this.fillMax;
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
return spaceInTank;
|
||||
}
|
||||
@@ -445,7 +445,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
if (doFill)
|
||||
{
|
||||
this.liquid.amount += stack.amount;
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
return stack.amount;
|
||||
}
|
||||
@@ -492,8 +492,8 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
}
|
||||
if (doDrain)
|
||||
{
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.worldObj, this.xCoord, this.yCoord, this.zCoord, this));
|
||||
this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.field_145850_b, this.xCoord, this.yCoord, this.zCoord, this));
|
||||
}
|
||||
return drained;
|
||||
}
|
||||
@@ -574,7 +574,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readCustomNBT(packet.data);
|
||||
this.worldObj.markBlockForRenderUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.field_145850_b.markBlockForRenderUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
|
||||
public int convertFDToInt (ForgeDirection dir)
|
||||
|
||||
Reference in new issue
Block a user