mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 11:59:14 +00:00
fix TE x,y,z coord stuff
This commit is contained in:
1 parent
a5862aae20
commit
f7a86a7377
29 files changed
+179
-179
No files matched your search
@@ -76,7 +76,7 @@ public class SmelteryScan extends TankLayerScan
|
||||
{
|
||||
world.setBlock(coord.x, coord.y, coord.z, TRepo.tankAir);
|
||||
IServantLogic servant = (IServantLogic) world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
servant.verifyMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
servant.verifyMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public class SmelteryScan extends TankLayerScan
|
||||
{
|
||||
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
if (servant instanceof IServantLogic)
|
||||
((IServantLogic) servant).invalidateMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
((IServantLogic) servant).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public class SmelteryScan extends TankLayerScan
|
||||
|
||||
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
if (servant instanceof IServantLogic)
|
||||
((IServantLogic) servant).invalidateMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
((IServantLogic) servant).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public class SmelteryScan extends TankLayerScan
|
||||
TileEntity te = world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
if (te != null && te instanceof IServantLogic)
|
||||
{
|
||||
((IServantLogic) te).invalidateMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
((IServantLogic) te).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,13 +168,13 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeToNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readFromNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
@@ -160,7 +160,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
|
||||
smeltery.adjustSize(structure.getAirSize(), true);
|
||||
multitank.setCapacity(structure.getAirSize() * (TConstruct.ingotLiquidValue * 18));
|
||||
smeltery.setActiveLavaTank(structure.lavaTanks.get(0));
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -574,7 +574,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readNetworkNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -582,6 +582,6 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeNetworkNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
}
|
||||
@@ -142,7 +142,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
castingDelay = recipe.coolTime;
|
||||
}
|
||||
renderOffset = copyLiquid.amount;
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
this.liquid = copyLiquid;
|
||||
needsUpdate = true;
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
renderOffset = roomInTank;
|
||||
castingDelay = TConstruct.basinCasting.getCastingDelay(this.liquid, inventory[0]);
|
||||
this.liquid.amount = this.capacity;
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
needsUpdate = true;
|
||||
}
|
||||
return roomInTank;
|
||||
@@ -175,7 +175,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
if (doFill)
|
||||
{
|
||||
this.liquid.amount += resource.amount;
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
needsUpdate = true;
|
||||
}
|
||||
return resource.amount;
|
||||
@@ -192,14 +192,14 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
public void onInventoryChanged () //Isn't actually called?
|
||||
{
|
||||
super.onInventoryChanged();
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
needsUpdate = true;
|
||||
}
|
||||
|
||||
public ItemStack decrStackSize (int slot, int quantity)
|
||||
{
|
||||
ItemStack stack = super.decrStackSize(slot, quantity);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
liquid = null;
|
||||
|
||||
if (doDrain)
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.field_145850_b, this.xCoord, this.yCoord, this.zCoord, this));
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.field_145850_b, this.field_145851_c, this.field_145848_d, this.field_145849_e, this));
|
||||
|
||||
return drained;
|
||||
}
|
||||
@@ -312,7 +312,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
if (renderOffset > 0)
|
||||
{
|
||||
renderOffset -= 6;
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
tick++;
|
||||
@@ -320,7 +320,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
{
|
||||
tick = 0;
|
||||
if (needsUpdate)
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
if (recipe.consumeCast)
|
||||
inventory[0] = null;
|
||||
liquid = null;
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,14 +391,14 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeToNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readFromNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -52,7 +52,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
if (this.pullingLiquids)
|
||||
pullLiquids();
|
||||
}
|
||||
//this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
//this.field_145850_b.markBlockForUpdate(this.field_145851_c, this.field_145848_d, this.field_145849_e);
|
||||
if (ticks == 20)
|
||||
{
|
||||
if (recentlyFilledDelay != 0)
|
||||
@@ -70,8 +70,8 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
|
||||
void pullLiquids ()
|
||||
{
|
||||
if (pullLiquid(xCoord + 1, yCoord, zCoord, ForgeDirection.EAST) || pullLiquid(xCoord - 1, yCoord, zCoord, ForgeDirection.WEST) || pullLiquid(xCoord, yCoord, zCoord + 1, ForgeDirection.NORTH)
|
||||
|| pullLiquid(xCoord, yCoord, zCoord - 1, ForgeDirection.SOUTH))
|
||||
if (pullLiquid(field_145851_c + 1, field_145848_d, field_145849_e, ForgeDirection.EAST) || pullLiquid(field_145851_c - 1, field_145848_d, field_145849_e, ForgeDirection.WEST) || pullLiquid(field_145851_c, field_145848_d, field_145849_e + 1, ForgeDirection.NORTH)
|
||||
|| pullLiquid(field_145851_c, field_145848_d, field_145849_e - 1, ForgeDirection.SOUTH))
|
||||
{
|
||||
|
||||
}
|
||||
@@ -291,7 +291,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float tankBelow ()
|
||||
{
|
||||
TileEntity te = this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
|
||||
TileEntity te = this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e);
|
||||
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.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof CastingChannelLogic);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e) instanceof CastingChannelLogic);
|
||||
case NORTH:
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof CastingChannelLogic);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1) instanceof CastingChannelLogic);
|
||||
case SOUTH:
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof CastingChannelLogic);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1) instanceof CastingChannelLogic);
|
||||
case WEST:
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e) instanceof CastingChannelLogic);
|
||||
case EAST:
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e) instanceof CastingChannelLogic);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -330,15 +330,15 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
switch (dir)
|
||||
{
|
||||
case DOWN:
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof IFluidHandler);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e) instanceof IFluidHandler);
|
||||
case NORTH:
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof IFluidHandler);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1) instanceof IFluidHandler);
|
||||
case SOUTH:
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof IFluidHandler);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1) instanceof IFluidHandler);
|
||||
case WEST:
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e) instanceof IFluidHandler);
|
||||
case EAST:
|
||||
return (this.field_145850_b.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
|
||||
return (this.field_145850_b.getBlockTileEntity(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e) 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.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);
|
||||
TileEntity tankXplus = this.field_145850_b.getBlockTileEntity(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e);
|
||||
TileEntity tankXminus = this.field_145850_b.getBlockTileEntity(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e);
|
||||
TileEntity tankZplus = this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1);
|
||||
TileEntity tankZminus = this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1);
|
||||
TileEntity tankYminus = this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e);
|
||||
|
||||
if (this.pullingLiquids)
|
||||
{
|
||||
@@ -420,7 +420,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
|
||||
if (doFill)
|
||||
{
|
||||
this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.field_145850_b.markBlockForUpdate(this.field_145851_c, this.field_145848_d, this.field_145849_e);
|
||||
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.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.field_145850_b.markBlockForUpdate(this.field_145851_c, this.field_145848_d, this.field_145849_e);
|
||||
}
|
||||
return spaceInTank;
|
||||
}
|
||||
@@ -445,7 +445,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
if (doFill)
|
||||
{
|
||||
this.liquid.amount += stack.amount;
|
||||
this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.field_145850_b.markBlockForUpdate(this.field_145851_c, this.field_145848_d, this.field_145849_e);
|
||||
}
|
||||
return stack.amount;
|
||||
}
|
||||
@@ -492,8 +492,8 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
}
|
||||
if (doDrain)
|
||||
{
|
||||
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));
|
||||
this.field_145850_b.markBlockForUpdate(this.field_145851_c, this.field_145848_d, this.field_145849_e);
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.field_145850_b, this.field_145851_c, this.field_145848_d, this.field_145849_e, this));
|
||||
}
|
||||
return drained;
|
||||
}
|
||||
@@ -567,14 +567,14 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeCustomNBT(tag);
|
||||
return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(this.field_145851_c, this.field_145848_d, this.field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readCustomNBT(packet.data);
|
||||
this.field_145850_b.markBlockForRenderUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.field_145850_b.markBlockForRenderUpdate(this.field_145851_c, this.field_145848_d, this.field_145849_e);
|
||||
}
|
||||
|
||||
public int convertFDToInt (ForgeDirection dir)
|
||||
|
||||
@@ -142,7 +142,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
castingDelay = recipe.coolTime;
|
||||
}
|
||||
renderOffset = copyLiquid.amount;
|
||||
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
getWorld().markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
this.liquid = copyLiquid;
|
||||
needsUpdate = true;
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
renderOffset = roomInTank;
|
||||
castingDelay = TConstruct.tableCasting.getCastingDelay(this.liquid, inventory[0]);
|
||||
this.liquid.amount = this.capacity;
|
||||
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
getWorld().markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
needsUpdate = true;
|
||||
}
|
||||
return roomInTank;
|
||||
@@ -175,7 +175,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
if (doFill)
|
||||
{
|
||||
this.liquid.amount += resource.amount;
|
||||
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
getWorld().markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
needsUpdate = true;
|
||||
}
|
||||
return resource.amount;
|
||||
@@ -192,14 +192,14 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
public void onInventoryChanged () //Isn't actually called?
|
||||
{
|
||||
super.onInventoryChanged();
|
||||
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
getWorld().markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
needsUpdate = true;
|
||||
}
|
||||
|
||||
public ItemStack decrStackSize (int slot, int quantity)
|
||||
{
|
||||
ItemStack stack = super.decrStackSize(slot, quantity);
|
||||
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
getWorld().markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
liquid = null;
|
||||
|
||||
if (doDrain)
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.getWorld(), this.xCoord, this.yCoord, this.zCoord, this));
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.getWorld(), this.field_145851_c, this.field_145848_d, this.field_145849_e, this));
|
||||
|
||||
return drained;
|
||||
}
|
||||
@@ -312,7 +312,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
if (renderOffset > 0)
|
||||
{
|
||||
renderOffset -= 6;
|
||||
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
getWorld().markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
tick++;
|
||||
@@ -320,7 +320,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
{
|
||||
tick = 0;
|
||||
if (needsUpdate)
|
||||
getWorld().markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
getWorld().markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
if (recipe.consumeCast)
|
||||
inventory[0] = null;
|
||||
liquid = null;
|
||||
getWorld().markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
getWorld().markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,14 +389,14 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeToNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readFromNBT(packet.data);
|
||||
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
getWorld().markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -73,7 +73,7 @@ public class DryingRackLogic extends InventoryLogic
|
||||
maxTime = DryingRackRecipes.getDryingTime(inventory[0]);
|
||||
else
|
||||
maxTime = 0;
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -108,20 +108,20 @@ public class DryingRackLogic extends InventoryLogic
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeCustomNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readCustomNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public AxisAlignedBB getRenderBoundingBox ()
|
||||
{
|
||||
AxisAlignedBB cbb = AxisAlignedBB.getAABBPool().getAABB(xCoord, yCoord - 1, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
|
||||
AxisAlignedBB cbb = AxisAlignedBB.getAABBPool().getAABB(field_145851_c, field_145848_d - 1, field_145849_e, field_145851_c + 1, field_145848_d + 1, field_145849_e + 1);
|
||||
return cbb;
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
|
||||
{
|
||||
if (liquid == null && active)
|
||||
{
|
||||
int x = xCoord, z = zCoord;
|
||||
int x = field_145851_c, z = field_145849_e;
|
||||
switch (getRenderDirection())
|
||||
{
|
||||
case 2:
|
||||
@@ -43,8 +43,8 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
|
||||
break;
|
||||
}
|
||||
|
||||
TileEntity drainte = field_145850_b.getBlockTileEntity(x, yCoord, z);
|
||||
TileEntity tankte = field_145850_b.getBlockTileEntity(xCoord, yCoord - 1, zCoord);
|
||||
TileEntity drainte = field_145850_b.getBlockTileEntity(x, field_145848_d, z);
|
||||
TileEntity tankte = field_145850_b.getBlockTileEntity(field_145851_c, field_145848_d - 1, field_145849_e);
|
||||
|
||||
if (drainte != null && drainte instanceof IFluidHandler && tankte != null && tankte instanceof IFluidHandler)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
|
||||
{
|
||||
liquid = ((IFluidHandler) drainte).drain(getForgeDirection(), drained, true);
|
||||
((IFluidHandler) tankte).fill(ForgeDirection.UP, liquid, true);
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -82,7 +82,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
|
||||
if (!activateFaucet())
|
||||
{
|
||||
active = false;
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,14 +173,14 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeCustomNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readCustomNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -55,7 +55,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
|
||||
public void setActive (boolean flag)
|
||||
{
|
||||
active = flag;
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
/* Fuel gauge */
|
||||
|
||||
@@ -65,7 +65,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
public void setActive (boolean flag)
|
||||
{
|
||||
active = flag;
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
/* Fuel gauge */
|
||||
@@ -288,14 +288,14 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeNetworkNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readNetworkNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,7 +31,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
|
||||
if (amount > 0 && doFill)
|
||||
{
|
||||
renderOffset = resource.amount;
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
return amount;
|
||||
@@ -44,7 +44,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
|
||||
if (amount != null && doDrain)
|
||||
{
|
||||
renderOffset = -maxDrain;
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
@@ -152,14 +152,14 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeCustomNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readCustomNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
/* Updating */
|
||||
@@ -174,7 +174,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
|
||||
if (renderOffset > 0)
|
||||
{
|
||||
renderOffset -= 6;
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ public class LiquidTextureLogic extends TileEntity
|
||||
public void setLiquidType (int tex)
|
||||
{
|
||||
texturePos = tex;
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
public int getLiquidType ()
|
||||
@@ -53,13 +53,13 @@ public class LiquidTextureLogic extends TileEntity
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeCustomNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readCustomNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
@@ -60,13 +60,13 @@ public class RedwireLogic extends TileEntity
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeCustomNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readCustomNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
@@ -174,13 +174,13 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeToNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readFromNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
@@ -158,8 +158,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
}
|
||||
|
||||
stack.stackSize -= itemSize;
|
||||
EntityItem entityitem = new EntityItem(field_145850_b, (double) ((float) xCoord + jumpX + offsetX), (double) ((float) yCoord + jumpY),
|
||||
(double) ((float) zCoord + jumpZ + offsetZ), new ItemStack(stack.itemID, itemSize, stack.getItemDamage()));
|
||||
EntityItem entityitem = new EntityItem(field_145850_b, (double) ((float) field_145851_c + jumpX + offsetX), (double) ((float) field_145848_d + jumpY),
|
||||
(double) ((float) field_145849_e + jumpZ + offsetZ), new ItemStack(stack.itemID, itemSize, stack.getItemDamage()));
|
||||
|
||||
if (stack.hasTagCompound())
|
||||
{
|
||||
@@ -243,7 +243,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
public void setActive (boolean flag)
|
||||
{
|
||||
needsUpdate = true;
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
public int getScaledFuelGague (int scale)
|
||||
@@ -295,7 +295,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
if (needsUpdate)
|
||||
{
|
||||
needsUpdate = false;
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -674,8 +674,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
updateEntity();
|
||||
super.onInventoryChanged();
|
||||
needsUpdate = true;
|
||||
//field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
//field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
//field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
//field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
/*@Override
|
||||
@@ -696,16 +696,16 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
switch (getRenderDirection())
|
||||
{
|
||||
case 2: // +z
|
||||
alignInitialPlacement(xCoord, yCoord, zCoord + 2);
|
||||
alignInitialPlacement(field_145851_c, field_145848_d, field_145849_e + 2);
|
||||
break;
|
||||
case 3: // -z
|
||||
alignInitialPlacement(xCoord, yCoord, zCoord - 2);
|
||||
alignInitialPlacement(field_145851_c, field_145848_d, field_145849_e - 2);
|
||||
break;
|
||||
case 4: // +x
|
||||
alignInitialPlacement(xCoord + 2, yCoord, zCoord);
|
||||
alignInitialPlacement(field_145851_c + 2, field_145848_d, field_145849_e);
|
||||
break;
|
||||
case 5: // -x
|
||||
alignInitialPlacement(xCoord - 2, yCoord, zCoord);
|
||||
alignInitialPlacement(field_145851_c - 2, field_145848_d, field_145849_e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -770,7 +770,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
internalTemp = 800;
|
||||
activeLavaTank = lavaTanks.get(0);
|
||||
adjustLayers(checkLayers, false);
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
validStructure = true;
|
||||
}
|
||||
else
|
||||
@@ -929,10 +929,10 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
MultiServantLogic servant = (MultiServantLogic) te;
|
||||
if (servant.hasValidMaster())
|
||||
{
|
||||
if (servant.verifyMaster(this, this.xCoord, this.yCoord, this.zCoord))
|
||||
if (servant.verifyMaster(this, this.field_145851_c, this.field_145848_d, this.field_145849_e))
|
||||
tempBricks++;
|
||||
}
|
||||
else if (servant.setMaster(this.xCoord, this.yCoord, this.zCoord))
|
||||
else if (servant.setMaster(this.field_145851_c, this.field_145848_d, this.field_145849_e))
|
||||
{
|
||||
tempBricks++;
|
||||
}
|
||||
@@ -981,7 +981,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
{
|
||||
//liquid = null;
|
||||
moltenMetal.remove(liquid);
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
currentLiquid = 0;
|
||||
needsUpdate = true;
|
||||
}
|
||||
@@ -992,7 +992,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
if (doDrain && maxDrain > 0)
|
||||
{
|
||||
liquid.amount -= maxDrain;
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
currentLiquid -= maxDrain;
|
||||
needsUpdate = true;
|
||||
}
|
||||
@@ -1026,7 +1026,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
}
|
||||
}
|
||||
needsUpdate = true;
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
@@ -1083,7 +1083,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
if (center.length > 2)
|
||||
centerPos = new CoordTuple(center[0], center[1], center[2]);
|
||||
else
|
||||
centerPos = new CoordTuple(xCoord, yCoord, zCoord);
|
||||
centerPos = new CoordTuple(field_145851_c, field_145848_d, field_145849_e);
|
||||
|
||||
direction = tags.getByte("Direction");
|
||||
useTime = tags.getInteger("UseTime");
|
||||
@@ -1117,7 +1117,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
|
||||
int[] center = new int[3];// { centerPos.x, centerPos.y, centerPos.z };
|
||||
if (centerPos == null)
|
||||
center = new int[] { xCoord, yCoord, zCoord };
|
||||
center = new int[] { field_145851_c, field_145848_d, field_145849_e };
|
||||
else
|
||||
center = new int[] { centerPos.x, centerPos.y, centerPos.z };
|
||||
tags.setIntArray("CenterPos", center);
|
||||
@@ -1147,7 +1147,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeToNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1155,7 +1155,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
{
|
||||
readFromNBT(packet.data);
|
||||
onInventoryChanged();
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
this.needsUpdate = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
|
||||
public void overrideFluids (ArrayList<FluidStack> fluids)
|
||||
{
|
||||
/*multitank.overrideFluids(fluids);
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);*/
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);*/
|
||||
}
|
||||
|
||||
public boolean hasItem ()
|
||||
@@ -59,8 +59,8 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
|
||||
if (itemstack != null && itemstack.stackSize > getInventoryStackLimit())
|
||||
{
|
||||
itemstack.stackSize = getInventoryStackLimit();
|
||||
field_145850_b.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, itemstack.getItemDamage(), 3);
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.setBlockMetadataWithNotify(field_145851_c, field_145848_d, field_145849_e, itemstack.getItemDamage(), 3);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}*/
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
|
||||
@Override
|
||||
public void invalidateMaster (IMasterLogic master, World world, int xMaster, int yMaster, int zMaster)
|
||||
{
|
||||
world.setBlockToAir(xCoord, yCoord, zCoord);
|
||||
world.setBlockToAir(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -137,7 +137,7 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
|
||||
//DELETE
|
||||
public void updateEntity ()
|
||||
{
|
||||
field_145850_b.setBlockToAir(xCoord, yCoord, zCoord);
|
||||
field_145850_b.setBlockToAir(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
//Keep TE regardless of metadata
|
||||
@@ -180,8 +180,8 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
|
||||
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
|
||||
{
|
||||
readNetworkNBT(packet.data);
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -189,6 +189,6 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeNetworkNBT(tag);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class TileEntityLandmine extends TileEntity implements IInventory
|
||||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
writeToNBT(nbt);
|
||||
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 0, nbt);
|
||||
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 0, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -211,8 +211,8 @@ public class TileEntityLandmine extends TileEntity implements IInventory
|
||||
@Override
|
||||
public boolean isUseableByPlayer (EntityPlayer par1EntityPlayer)
|
||||
{
|
||||
return this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D,
|
||||
(double) this.zCoord + 0.5D) <= 64.0D;
|
||||
return this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e) != this ? false : par1EntityPlayer.getDistanceSq((double) this.field_145851_c + 0.5D, (double) this.field_145848_d + 0.5D,
|
||||
(double) this.field_145849_e + 0.5D) <= 64.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -229,7 +229,7 @@ public class TileEntityLandmine extends TileEntity implements IInventory
|
||||
public void onInventoryChanged ()
|
||||
{
|
||||
super.onInventoryChanged();
|
||||
this.field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
this.field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -259,7 +259,7 @@ public class TileEntityLandmine extends TileEntity implements IInventory
|
||||
{
|
||||
if (shouldUpdateLogic)
|
||||
{
|
||||
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
|
||||
shouldUpdateLogic = false;
|
||||
}
|
||||
if (soundcountything > 0)
|
||||
|
||||
@@ -60,8 +60,8 @@ public class ToolStationLogic extends InventoryLogic implements ISidedInventory
|
||||
buildTool(toolName);
|
||||
if (this.getWorld() != null)
|
||||
{
|
||||
this.field_145847_g = this.getWorld().getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.getWorld().markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
this.field_145847_g = this.getWorld().getBlockMetadata(this.field_145851_c, this.field_145848_d, this.field_145849_e);
|
||||
this.getWorld().markTileEntityChunkModified(this.field_145851_c, this.field_145848_d, this.field_145849_e, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,12 +20,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class DryingRackSpecialRender extends TileEntitySpecialRenderer
|
||||
{
|
||||
@Override
|
||||
public void renderTileEntityAt (TileEntity logic, double var2, double var4, double var6, float var8)
|
||||
{
|
||||
//TConstruct.logger.info("Render!!!");
|
||||
this.render((DryingRackLogic) logic, var2, var4, var6, var8);
|
||||
}
|
||||
|
||||
public void render (DryingRackLogic logic, double posX, double posY, double posZ, float var8)
|
||||
{
|
||||
@@ -52,7 +46,7 @@ public class DryingRackSpecialRender extends TileEntitySpecialRenderer
|
||||
entityitem.getEntityItem().stackSize = 1;
|
||||
entityitem.hoverStart = 0.0F;
|
||||
GL11.glPushMatrix();
|
||||
int meta = logic.getWorld().getBlockMetadata(logic.xCoord, logic.yCoord, logic.zCoord);
|
||||
int meta = logic.getWorld().getBlockMetadata(logic.field_145851_c, logic.field_145848_d, logic.field_145849_e);
|
||||
if (meta <= 1)
|
||||
GL11.glTranslatef(1F, -0.375F, 0.905F);
|
||||
else
|
||||
@@ -86,4 +80,10 @@ public class DryingRackSpecialRender extends TileEntitySpecialRenderer
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_147500_a (TileEntity logic, double var2, double var4, double var6, float var8)
|
||||
{
|
||||
this.render((DryingRackLogic) logic, var2, var4, var6, var8);
|
||||
}
|
||||
}
|
||||
@@ -476,9 +476,9 @@ public class AdaptiveSmelteryGui extends NewContainerGui
|
||||
dos.write(11);
|
||||
|
||||
dos.writeInt(logic.getWorld().provider.dimensionId);
|
||||
dos.writeInt(logic.xCoord);
|
||||
dos.writeInt(logic.yCoord);
|
||||
dos.writeInt(logic.zCoord);
|
||||
dos.writeInt(logic.field_145851_c);
|
||||
dos.writeInt(logic.field_145848_d);
|
||||
dos.writeInt(logic.field_145849_e);
|
||||
|
||||
dos.writeBoolean(this.isShiftKeyDown());
|
||||
|
||||
@@ -502,6 +502,6 @@ public class AdaptiveSmelteryGui extends NewContainerGui
|
||||
public void onGuiClosed ()
|
||||
{
|
||||
super.onGuiClosed();
|
||||
logic.getWorld().markBlockForUpdate(logic.xCoord, logic.yCoord, logic.zCoord);
|
||||
logic.getWorld().markBlockForUpdate(logic.field_145851_c, logic.field_145848_d, logic.field_145849_e);
|
||||
}
|
||||
}
|
||||
@@ -461,9 +461,9 @@ public class SmelteryGui extends NewContainerGui
|
||||
dos.write(11);
|
||||
|
||||
dos.writeInt(logic.getWorld().provider.dimensionId);
|
||||
dos.writeInt(logic.xCoord);
|
||||
dos.writeInt(logic.yCoord);
|
||||
dos.writeInt(logic.zCoord);
|
||||
dos.writeInt(logic.field_145851_c);
|
||||
dos.writeInt(logic.field_145848_d);
|
||||
dos.writeInt(logic.field_145849_e);
|
||||
|
||||
dos.writeBoolean(this.isShiftKeyDown());
|
||||
|
||||
|
||||
@@ -128,9 +128,9 @@ public class StencilTableGui extends GuiContainer
|
||||
{
|
||||
outputStream.writeByte(2);
|
||||
outputStream.writeInt(logic.getWorld().provider.dimensionId);
|
||||
outputStream.writeInt(logic.xCoord);
|
||||
outputStream.writeInt(logic.yCoord);
|
||||
outputStream.writeInt(logic.zCoord);
|
||||
outputStream.writeInt(logic.field_145851_c);
|
||||
outputStream.writeInt(logic.field_145848_d);
|
||||
outputStream.writeInt(logic.field_145849_e);
|
||||
outputStream.writeShort(stack.itemID);
|
||||
outputStream.writeShort(stack.getItemDamage());
|
||||
}
|
||||
|
||||
@@ -488,9 +488,9 @@ public class ToolStationGui extends NewContainerGui
|
||||
{
|
||||
outputStream.writeByte(1);
|
||||
outputStream.writeInt(logic.getWorld().provider.dimensionId);
|
||||
outputStream.writeInt(logic.xCoord);
|
||||
outputStream.writeInt(logic.yCoord);
|
||||
outputStream.writeInt(logic.zCoord);
|
||||
outputStream.writeInt(logic.field_145851_c);
|
||||
outputStream.writeInt(logic.field_145848_d);
|
||||
outputStream.writeInt(logic.field_145849_e);
|
||||
outputStream.writeUTF(name);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -82,7 +82,7 @@ public class ToolForgeContainer extends ToolStationContainer
|
||||
int amount = logic.getStackInSlot(1).getItem() instanceof ToolCore ? stack.stackSize : 1;
|
||||
logic.decrStackSize(1, amount);
|
||||
if (!logic.getWorld().isRemote)
|
||||
logic.getWorld().playAuxSFX(1021, (int) logic.xCoord, (int) logic.yCoord, (int) logic.zCoord, 0);
|
||||
logic.getWorld().playAuxSFX(1021, (int) logic.field_145851_c, (int) logic.field_145848_d, (int) logic.field_145849_e, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public class ToolStationContainer extends ActiveContainer
|
||||
int amount = logic.getStackInSlot(1).getItem() instanceof ToolCore ? stack.stackSize : 1;
|
||||
logic.decrStackSize(1, amount);
|
||||
|
||||
logic.func_145831_w().playSoundEffect(logic.xCoord, logic.yCoord, logic.zCoord, "tinker:little_saw", 1.0F, (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F);
|
||||
logic.func_145831_w().playSoundEffect(logic.field_145851_c, logic.field_145848_d, logic.field_145849_e, "tinker:little_saw", 1.0F, (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -287,8 +287,7 @@ public class LumberAxe extends HarvestTool
|
||||
{
|
||||
if (!(tags.getBoolean("Broken")))
|
||||
{
|
||||
int localblockID = world.getBlockId(xPos, yPos, zPos);
|
||||
Block block = Block.blocksList[localblockID];
|
||||
Block block = world.getBlock(xPos, yPos, zPos);
|
||||
int meta = world.getBlockMetadata(xPos, yPos, zPos);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
|
||||
@@ -310,7 +309,7 @@ public class LumberAxe extends HarvestTool
|
||||
{
|
||||
//TODO harvestBlock
|
||||
block.func_149636_a(world, player, xPos, yPos, zPos, meta);
|
||||
onBlockDestroyed(stack, world, localblockID, xPos, yPos, zPos, player);
|
||||
onBlockDestroyed(stack, world, block, xPos, yPos, zPos, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class TankLayerScan extends LogicComponent
|
||||
master = te;
|
||||
imaster = (IMasterLogic) te;
|
||||
scanBlocks = ids;
|
||||
masterCoord = new CoordTuple(te.xCoord, te.yCoord, te.zCoord);
|
||||
masterCoord = new CoordTuple(te.field_145851_c, te.field_145848_d, te.field_145849_e);
|
||||
validAirCoords.add(new int[] { 1, 0 });
|
||||
validAirCoords.add(new int[] { -1, 0 });
|
||||
validAirCoords.add(new int[] { 0, 1 });
|
||||
@@ -66,12 +66,12 @@ public class TankLayerScan extends LogicComponent
|
||||
{
|
||||
case 2: // +z
|
||||
case 3: // -z
|
||||
if (checkAir(master.xCoord, master.yCoord, master.zCoord - 1) && checkAir(master.xCoord, master.yCoord, master.zCoord + 1))
|
||||
if (checkAir(master.field_145851_c, master.field_145848_d, master.field_145849_e - 1) && checkAir(master.field_145851_c, master.field_145848_d, master.field_145849_e + 1))
|
||||
validAir = true;
|
||||
break;
|
||||
case 4: // +x
|
||||
case 5: // -x
|
||||
if (checkAir(master.xCoord - 1, master.yCoord, master.zCoord) && checkAir(master.xCoord + 1, master.yCoord, master.zCoord))
|
||||
if (checkAir(master.field_145851_c - 1, master.field_145848_d, master.field_145849_e) && checkAir(master.field_145851_c + 1, master.field_145848_d, master.field_145849_e))
|
||||
validAir = true;
|
||||
break;
|
||||
}
|
||||
@@ -89,8 +89,8 @@ public class TankLayerScan extends LogicComponent
|
||||
if (dir == 5)
|
||||
zPos = 1;
|
||||
|
||||
returnStone = new CoordTuple(master.xCoord - xPos, master.yCoord, master.zCoord - zPos);
|
||||
if (initialRecurseLayer(master.xCoord + xPos, master.yCoord, master.zCoord + zPos))
|
||||
returnStone = new CoordTuple(master.field_145851_c - xPos, master.field_145848_d, master.field_145849_e - zPos);
|
||||
if (initialRecurseLayer(master.field_145851_c + xPos, master.field_145848_d, master.field_145849_e + zPos))
|
||||
{
|
||||
xPos = 0;
|
||||
zPos = 0;
|
||||
@@ -115,7 +115,7 @@ public class TankLayerScan extends LogicComponent
|
||||
bricks = 0;
|
||||
|
||||
//Does the actual adding of blocks in the ring
|
||||
boolean sealed = floodTest(master.xCoord + xPos, master.yCoord, master.zCoord + zPos);
|
||||
boolean sealed = floodTest(master.field_145851_c + xPos, master.field_145848_d, master.field_145849_e + zPos);
|
||||
if (!world.isRemote && debug)
|
||||
{
|
||||
TConstruct.logger.info("Air in ring: " + airBlocks);
|
||||
@@ -124,15 +124,15 @@ public class TankLayerScan extends LogicComponent
|
||||
|
||||
if (sealed)
|
||||
{
|
||||
blockCoords.add(new CoordTuple(master.xCoord, master.yCoord, master.zCoord)); //Don't forget me!
|
||||
blockCoords.add(new CoordTuple(master.field_145851_c, master.field_145848_d, master.field_145849_e)); //Don't forget me!
|
||||
layerAirCoords = new HashSet<CoordTuple>(airCoords);
|
||||
layerBlockCoords = new HashSet<CoordTuple>(blockCoords);
|
||||
|
||||
int lowY = recurseStructureDown(master.yCoord - 1);
|
||||
int lowY = recurseStructureDown(master.field_145848_d - 1);
|
||||
if (lowY != -1)
|
||||
{
|
||||
completeStructure = true;
|
||||
structureTop = recurseStructureUp(master.yCoord + 1);
|
||||
structureTop = recurseStructureUp(master.field_145848_d + 1);
|
||||
finalizeStructure();
|
||||
|
||||
if (!world.isRemote && debug)
|
||||
@@ -155,7 +155,7 @@ public class TankLayerScan extends LogicComponent
|
||||
{
|
||||
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
if (servant instanceof IServantLogic)
|
||||
((IServantLogic) servant).verifyMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
((IServantLogic) servant).verifyMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ public class TankLayerScan extends LogicComponent
|
||||
boolean canPass = false;
|
||||
if (servant instanceof IServantLogic)
|
||||
{
|
||||
canPass = ((IServantLogic) servant).verifyMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
canPass = ((IServantLogic) servant).verifyMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
|
||||
if (canPass)
|
||||
continue;
|
||||
}
|
||||
@@ -433,7 +433,7 @@ public class TankLayerScan extends LogicComponent
|
||||
|
||||
if (height != -1)
|
||||
{
|
||||
if (height <= master.yCoord)
|
||||
if (height <= master.field_145848_d)
|
||||
invalidateStructure();
|
||||
else
|
||||
invalidateBlocksAbove(height);
|
||||
@@ -457,9 +457,9 @@ public class TankLayerScan extends LogicComponent
|
||||
{
|
||||
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
if (servant instanceof IServantLogic)
|
||||
((IServantLogic) servant).invalidateMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
((IServantLogic) servant).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
|
||||
}
|
||||
master.worldObj.markBlockForUpdate(master.xCoord, master.yCoord, master.zCoord);
|
||||
master.func_145831_w().markBlockForUpdate(master.field_145851_c, master.field_145848_d, master.field_145849_e);
|
||||
}
|
||||
|
||||
protected void invalidateBlocksAbove (int height)
|
||||
@@ -471,7 +471,7 @@ public class TankLayerScan extends LogicComponent
|
||||
|
||||
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
if (servant instanceof IServantLogic)
|
||||
((IServantLogic) servant).invalidateMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
((IServantLogic) servant).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ public class TankLayerScan extends LogicComponent
|
||||
TileEntity te = world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
if (te != null && te instanceof IServantLogic)
|
||||
{
|
||||
((IServantLogic) te).invalidateMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
((IServantLogic) te).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user