run through remap script

This commit is contained in:
Progwml6 committed 2014-02-05 08:28:53 -05:00
1 parent 689aeba09b
commit b8cf7cdc5e
208 files changed
+4117 -4117

No files matched your search

@@ -32,7 +32,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.fill(from, resource, doFill);
}
return 0;
@@ -44,7 +44,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
// TConstruct.logger.info("Attempting drain " + hasValidMaster());
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
// TConstruct.logger.info("Found master");
return smeltery.drain(from, maxDrain, doDrain);
}
@@ -56,7 +56,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.drain(from, resource, doDrain);
}
return null;
@@ -67,7 +67,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster())
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.getFillState() < 2;
}
return false;
@@ -78,7 +78,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster())
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.getFillState() > 0;
}
return false;
@@ -89,7 +89,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && (from == getForgeDirection() || from == getForgeDirection().getOpposite() || from == ForgeDirection.UNKNOWN))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.getTankInfo(ForgeDirection.UNKNOWN);
}
return null;
@@ -144,32 +144,32 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
}
}
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
direction = tags.getByte("Direction");
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
tags.setByte("Direction", direction);
}
/* Packets */
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
func_145841_b(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
writeToNBT(tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
func_145839_a(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
readFromNBT(packet.func_148857_g());
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
}
@@ -51,7 +51,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
if (tick % 4 == 0)
smeltery.heatItems();
if (!field_145850_b.isRemote)
if (!worldObj.isRemote)
{
if (tick % 20 == 0)
{
@@ -113,9 +113,9 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
/* Structure */
@Override
public void func_145834_a (World world)
public void setWorldObj (World world)
{
super.func_145834_a(world);
super.setWorldObj(world);
structure.setWorld(world);
smeltery.setWorld(world);
}
@@ -123,7 +123,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
@Override
public void notifyChange (IServantLogic servant, int x, int y, int z)
{
if (!field_145850_b.isRemote)
if (!worldObj.isRemote)
{
//System.out.println("Notifying of change from "+new CoordTuple(x, y, z));
recheckStructure = true;
@@ -146,7 +146,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.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -271,7 +271,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
CoordTuple air = structure.getAirByIndex(slot);
if (air != null)
{
TileEntity te = field_145850_b.func_147438_o(air.x, air.y, air.z);
TileEntity te = worldObj.getTileEntity(air.x, air.y, air.z);
if (te != null && te instanceof TankAirLogic)
{
((TankAirLogic) te).setInventorySlotContents(0, itemstack);
@@ -393,7 +393,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
{
Map.Entry pairs = (Map.Entry) iter.next();
CoordTuple coord = (CoordTuple) pairs.getKey();
TileEntity te = field_145850_b.func_147438_o(coord.x, coord.y, coord.z);
TileEntity te = worldObj.getTileEntity(coord.x, coord.y, coord.z);
if (te instanceof TankAirLogic)
{
((TankAirLogic) te).overrideFluids(((LiquidDataInstance) pairs.getValue()).fluids);
@@ -406,7 +406,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
public void updateAir ()
{
for (CoordTuple loc : structure.airCoords)
field_145850_b.func_147471_g(loc.x, loc.y, loc.z);
worldObj.markBlockForUpdate(loc.x, loc.y, loc.z);
}
class LiquidData
@@ -513,9 +513,9 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
/* NBT */
@Override
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
readNetworkNBT(tags);
structure.readFromNBT(tags);
@@ -535,9 +535,9 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
writeNetworkNBT(tags);
structure.writeToNBT(tags);
@@ -560,26 +560,26 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readNetworkNBT(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeNetworkNBT(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
// TODO Auto-generated method stub
return getDefaultName();
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return true;
}
@@ -135,7 +135,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
castingDelay = recipe.coolTime;
}
renderOffset = copyLiquid.amount;
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
this.liquid = copyLiquid;
needsUpdate = true;
}
@@ -157,7 +157,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.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
needsUpdate = true;
}
return roomInTank;
@@ -168,7 +168,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
if (doFill)
{
this.liquid.amount += resource.amount;
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
needsUpdate = true;
}
return resource.amount;
@@ -185,14 +185,14 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
public void onInventoryChanged () //Isn't actually called?
{
super.onInventoryChanged();
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
needsUpdate = true;
}
public ItemStack decrStackSize (int slot, int quantity)
{
ItemStack stack = super.decrStackSize(slot, quantity);
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
return stack;
}
@@ -221,7 +221,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
liquid = null;
if (doDrain)
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.field_145850_b, this.field_145851_c, this.field_145848_d, this.field_145849_e, this));
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.worldObj, this.xCoord, this.yCoord, this.zCoord, this));
return drained;
}
@@ -292,7 +292,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
/* Updating */
@Override
public void func_145845_h ()
public void updateEntity ()
{
if (castingDelay > 0)
{
@@ -304,7 +304,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
if (renderOffset > 0)
{
renderOffset -= 6;
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
tick++;
@@ -312,7 +312,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
{
tick = 0;
if (needsUpdate)
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
@@ -325,16 +325,16 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
if (recipe.consumeCast)
inventory[0] = null;
liquid = null;
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
/* NBT */
@Override
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
readCustomNBT(tags);
}
@@ -357,9 +357,9 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
writeCustomNBT(tags);
}
@@ -379,18 +379,18 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
/* Packets */
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
func_145841_b(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
writeToNBT(tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
func_145839_a(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
readFromNBT(packet.func_148857_g());
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
@Override
@@ -421,13 +421,13 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return null;
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return false;
}
@@ -33,18 +33,18 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
}
@Override
public void func_145845_h ()
public void updateEntity ()
{
if (this.field_145850_b.isRemote)
if (this.worldObj.isRemote)
return;
ticks++;
ticksLPReset++;
if (!field_145850_b.isRemote)
if (!worldObj.isRemote)
{
if (this.pullingLiquids)
pullLiquids();
}
//this.field_145850_b.func_147471_g(this.field_145851_c, this.field_145848_d, this.field_145849_e);
//this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
if (ticks == 20)
{
if (recentlyFilledDelay != 0)
@@ -62,8 +62,8 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
void pullLiquids ()
{
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))
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))
{
}
@@ -75,7 +75,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
boolean pullLiquid (int x, int y, int z, ForgeDirection direction)
{
TileEntity tank = field_145850_b.func_147438_o(x, y, z);
TileEntity tank = worldObj.getTileEntity(x, y, z);
if (tank instanceof IFluidHandler && !(tank instanceof CastingChannelLogic))
{
FluidStack templiquid = ((IFluidHandler) tank).drain(direction, 3, false);
@@ -283,7 +283,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
@SideOnly(Side.CLIENT)
public float tankBelow ()
{
TileEntity te = this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e);
TileEntity te = this.worldObj.getTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
if (te instanceof CastingChannelLogic)
return -0.5f;
if (te instanceof LavaTankLogic)
@@ -303,15 +303,15 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
switch (dir)
{
case DOWN:
return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e) instanceof CastingChannelLogic);
return (this.worldObj.getTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof CastingChannelLogic);
case NORTH:
return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1) instanceof CastingChannelLogic);
return (this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof CastingChannelLogic);
case SOUTH:
return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1) instanceof CastingChannelLogic);
return (this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof CastingChannelLogic);
case WEST:
return (this.field_145850_b.func_147438_o(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e) instanceof CastingChannelLogic);
return (this.worldObj.getTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
case EAST:
return (this.field_145850_b.func_147438_o(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e) instanceof CastingChannelLogic);
return (this.worldObj.getTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
default:
return false;
}
@@ -322,15 +322,15 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
switch (dir)
{
case DOWN:
return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e) instanceof IFluidHandler);
return (this.worldObj.getTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof IFluidHandler);
case NORTH:
return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1) instanceof IFluidHandler);
return (this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof IFluidHandler);
case SOUTH:
return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1) instanceof IFluidHandler);
return (this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof IFluidHandler);
case WEST:
return (this.field_145850_b.func_147438_o(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e) instanceof IFluidHandler);
return (this.worldObj.getTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
case EAST:
return (this.field_145850_b.func_147438_o(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e) instanceof IFluidHandler);
return (this.worldObj.getTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
default:
return false;
}
@@ -339,11 +339,11 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
private HashMap getOutputs ()
{
HashMap map = new HashMap();
TileEntity tankXplus = this.field_145850_b.func_147438_o(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e);
TileEntity tankXminus = this.field_145850_b.func_147438_o(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e);
TileEntity tankZplus = this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1);
TileEntity tankZminus = this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1);
TileEntity tankYminus = this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e);
TileEntity tankXplus = this.worldObj.getTileEntity(this.xCoord + 1, this.yCoord, this.zCoord);
TileEntity tankXminus = this.worldObj.getTileEntity(this.xCoord - 1, this.yCoord, this.zCoord);
TileEntity tankZplus = this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord + 1);
TileEntity tankZminus = this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord - 1);
TileEntity tankYminus = this.worldObj.getTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
if (this.pullingLiquids)
{
@@ -412,7 +412,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
if (doFill)
{
this.field_145850_b.func_147471_g(this.field_145851_c, this.field_145848_d, this.field_145849_e);
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
this.liquid = transfered;
}
recentlyFilledDelay = 2;
@@ -429,7 +429,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
if ((doFill) && (spaceInTank > 0))
{
this.liquid.amount = this.fillMax;
this.field_145850_b.func_147471_g(this.field_145851_c, this.field_145848_d, this.field_145849_e);
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
}
return spaceInTank;
}
@@ -437,7 +437,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
if (doFill)
{
this.liquid.amount += stack.amount;
this.field_145850_b.func_147471_g(this.field_145851_c, this.field_145848_d, this.field_145849_e);
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
}
return stack.amount;
}
@@ -484,8 +484,8 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
}
if (doDrain)
{
this.field_145850_b.func_147471_g(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));
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.worldObj, this.xCoord, this.yCoord, this.zCoord, this));
}
return drained;
}
@@ -514,9 +514,9 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
}
@Override
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
readCustomNBT(tags);
pullingLiquids = tags.getBoolean("PullingLiquids");
}
@@ -534,9 +534,9 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
writeCustomNBT(tags);
tags.setBoolean("PullingLiquids", pullingLiquids);
}
@@ -555,18 +555,18 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
}
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeCustomNBT(tag);
return new S35PacketUpdateTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e, 1, tag);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readCustomNBT(packet.func_148857_g());
this.field_145850_b.func_147479_m(this.field_145851_c, this.field_145848_d, this.field_145849_e);
this.worldObj.func_147479_m(this.xCoord, this.yCoord, this.zCoord);
}
public int convertFDToInt (ForgeDirection dir)
@@ -135,7 +135,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
castingDelay = recipe.coolTime;
}
renderOffset = copyLiquid.amount;
getWorld().func_147479_m(field_145851_c, field_145848_d, field_145849_e);
getWorld().func_147479_m(xCoord, yCoord, zCoord);
this.liquid = copyLiquid;
needsUpdate = true;
}
@@ -157,7 +157,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().func_147479_m(field_145851_c, field_145848_d, field_145849_e);
getWorld().func_147479_m(xCoord, yCoord, zCoord);
needsUpdate = true;
}
return roomInTank;
@@ -168,7 +168,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
if (doFill)
{
this.liquid.amount += resource.amount;
getWorld().func_147479_m(field_145851_c, field_145848_d, field_145849_e);
getWorld().func_147479_m(xCoord, yCoord, zCoord);
needsUpdate = true;
}
return resource.amount;
@@ -185,14 +185,14 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
public void onInventoryChanged () //Isn't actually called?
{
super.onInventoryChanged();
getWorld().func_147479_m(field_145851_c, field_145848_d, field_145849_e);
getWorld().func_147479_m(xCoord, yCoord, zCoord);
needsUpdate = true;
}
public ItemStack decrStackSize (int slot, int quantity)
{
ItemStack stack = super.decrStackSize(slot, quantity);
getWorld().func_147479_m(field_145851_c, field_145848_d, field_145849_e);
getWorld().func_147479_m(xCoord, yCoord, zCoord);
return stack;
}
@@ -221,7 +221,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
liquid = null;
if (doDrain)
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.getWorld(), this.field_145851_c, this.field_145848_d, this.field_145849_e, this));
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.getWorld(), this.xCoord, this.yCoord, this.zCoord, this));
return drained;
}
@@ -292,7 +292,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
/* Updating */
@Override
public void func_145845_h ()
public void updateEntity ()
{
if (castingDelay > 0)
{
@@ -304,7 +304,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
if (renderOffset > 0)
{
renderOffset -= 6;
getWorld().func_147479_m(field_145851_c, field_145848_d, field_145849_e);
getWorld().func_147479_m(xCoord, yCoord, zCoord);
}
tick++;
@@ -312,7 +312,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
{
tick = 0;
if (needsUpdate)
getWorld().func_147471_g(field_145851_c, field_145848_d, field_145849_e);
getWorld().markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
@@ -325,16 +325,16 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
if (recipe.consumeCast)
inventory[0] = null;
liquid = null;
getWorld().func_147471_g(field_145851_c, field_145848_d, field_145849_e);
getWorld().markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
/* NBT */
@Override
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
readCustomNBT(tags);
}
@@ -355,9 +355,9 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
writeCustomNBT(tags);
}
@@ -377,18 +377,18 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
/* Packets */
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
func_145839_a(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
readFromNBT(tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
func_145839_a(packet.func_148857_g());
getWorld().func_147479_m(field_145851_c, field_145848_d, field_145849_e);
readFromNBT(packet.func_148857_g());
getWorld().func_147479_m(xCoord, yCoord, zCoord);
}
@Override
@@ -419,13 +419,13 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return null;
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return false;
}
@@ -45,7 +45,7 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
TileEntity tile = world.func_147438_o(xPos, yPos, zPos);
TileEntity tile = world.getTileEntity(xPos, yPos, zPos);
if (chest == null && tile instanceof TileEntityChest)
{
chest = new WeakReference(tile);
@@ -68,7 +68,7 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent
void checkForChest (World world, int x, int y, int z)
{
TileEntity tile = world.func_147438_o(x, y, z);
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TileEntityChest)
doubleChest = new WeakReference(tile);
}
@@ -105,13 +105,13 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return getDefaultName();
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return true;
}
@@ -35,9 +35,9 @@ public class DryingRackLogic extends InventoryLogic
}
@Override
public void func_145845_h ()
public void updateEntity ()
{
if (!field_145850_b.isRemote && maxTime > 0 && currentTime < maxTime)
if (!worldObj.isRemote && maxTime > 0 && currentTime < maxTime)
{
currentTime++;
if (currentTime >= maxTime)
@@ -71,11 +71,11 @@ public class DryingRackLogic extends InventoryLogic
maxTime = DryingRackRecipes.getDryingTime(inventory[0]);
else
maxTime = 0;
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
@Override
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
currentTime = tags.getInteger("Time");
maxTime = tags.getInteger("MaxTime");
@@ -83,7 +83,7 @@ public class DryingRackLogic extends InventoryLogic
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
tags.setInteger("Time", currentTime);
tags.setInteger("MaxTime", maxTime);
@@ -92,45 +92,45 @@ public class DryingRackLogic extends InventoryLogic
public void readCustomNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
}
public void writeCustomNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
}
/* Packets */
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeCustomNBT(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readCustomNBT(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
@SideOnly(Side.CLIENT)
public AxisAlignedBB getRenderBoundingBox ()
{
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);
AxisAlignedBB cbb = AxisAlignedBB.getAABBPool().getAABB(xCoord, yCoord - 1, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
return cbb;
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return null;
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return false;
}
@@ -21,7 +21,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
{
if (liquid == null && active)
{
int x = field_145851_c, z = field_145849_e;
int x = xCoord, z = zCoord;
switch (getRenderDirection())
{
case 2:
@@ -38,8 +38,8 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
break;
}
TileEntity drainte = field_145850_b.func_147438_o(x, field_145848_d, z);
TileEntity tankte = field_145850_b.func_147438_o(field_145851_c, field_145848_d - 1, field_145849_e);
TileEntity drainte = worldObj.getTileEntity(x, yCoord, z);
TileEntity tankte = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if (drainte != null && drainte instanceof IFluidHandler && tankte != null && tankte instanceof IFluidHandler)
{
@@ -51,7 +51,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.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
return true;
}
else
@@ -66,7 +66,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
}
@Override
public void func_145845_h ()
public void updateEntity ()
{
if (liquid != null)
{
@@ -77,7 +77,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
if (!activateFaucet())
{
active = false;
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
}
@@ -126,9 +126,9 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
}
@Override
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
readCustomNBT(tags);
}
@@ -144,9 +144,9 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
writeCustomNBT(tags);
}
@@ -164,18 +164,18 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
/* Packets */
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeCustomNBT(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readCustomNBT(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
@Override
@@ -56,7 +56,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
public void setActive (boolean flag)
{
active = flag;
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
/* Fuel gauge */
@@ -213,7 +213,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
public ItemStack getResultFor (ItemStack stack)
{
ItemStack result = FurnaceRecipes.smelting().func_151395_a(stack);
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack);
if (result != null && result.getItem() instanceof ItemFood) //Only valid for food
return result.copy();
@@ -244,14 +244,14 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
return 2400;
}
if (block.func_149688_o() == Material.field_151575_d)
if (block.getMaterial() == Material.wood)
{
return 300;
}
}
if (item instanceof ItemTool && ((ItemTool) item).getToolMaterialName().equals("WOOD"))
return 200;
if (item instanceof ItemSword && ((ItemSword) item).func_150932_j().equals("WOOD"))
if (item instanceof ItemSword && ((ItemSword) item).getToolMaterialName().equals("WOOD"))
return 200;
if (item instanceof ItemHoe && ((ItemHoe) item).getMaterialName().equals("WOOD"))
return 200;
@@ -270,17 +270,17 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
}
/* NBT */
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
active = tags.getBoolean("Active");
fuel = tags.getInteger("Fuel");
fuelGague = tags.getInteger("FuelGague");
}
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
tags.setBoolean("Active", active);
tags.setInteger("Fuel", fuel);
tags.setInteger("FuelGague", fuelGague);
@@ -293,13 +293,13 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return getDefaultName();
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return true;
}
@@ -58,7 +58,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
public void setActive (boolean flag)
{
active = flag;
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
/* Fuel gauge */
@@ -138,7 +138,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
{
if (this.canSmelt())
{
ItemStack itemstack = FurnaceRecipes.smelting().func_151395_a(this.inventory[0]);
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.inventory[0]);
if (this.inventory[2] == null)
{
@@ -165,7 +165,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
return false;
else
{
ItemStack itemstack = FurnaceRecipes.smelting().func_151395_a(this.inventory[0]);
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.inventory[0]);
if (itemstack == null)
return false;
if (this.inventory[2] == null)
@@ -184,7 +184,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
public ItemStack getResultFor (ItemStack stack)
{
ItemStack result = FurnaceRecipes.smelting().func_151395_a(stack);
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack);
if (result != null) //Only valid for food
return result.copy();
@@ -215,7 +215,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
return 1200;
}
if (block.func_149688_o() == Material.field_151575_d)
if (block.getMaterial() == Material.wood)
{
return 300;
}
@@ -228,7 +228,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
if (item instanceof ItemTool && ((ItemTool) item).getToolMaterialName().equals("WOOD"))
return 200;
if (item instanceof ItemSword && ((ItemSword) item).func_150932_j().equals("WOOD"))
if (item instanceof ItemSword && ((ItemSword) item).getToolMaterialName().equals("WOOD"))
return 200;
if (item instanceof ItemHoe && ((ItemHoe) item).getMaterialName().equals("WOOD"))
return 200;
@@ -247,18 +247,18 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
}
/* NBT */
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
active = tags.getBoolean("Active");
fuel = tags.getInteger("Fuel");
fuelGague = tags.getInteger("FuelGague");
readNetworkNBT(tags);
}
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
tags.setBoolean("Active", active);
tags.setInteger("Fuel", fuel);
tags.setInteger("FuelGague", fuelGague);
@@ -277,18 +277,18 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
/* Packets */
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeNetworkNBT(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readNetworkNBT(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
@Override
@@ -342,13 +342,13 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return getDefaultName();
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return false;
}
@@ -28,7 +28,7 @@ public class LandmineExplodeLogic
public LandmineExplodeLogic(World par1World, int par2, int par3, int par4, Entity entity)
{
worldObj = par1World;
this.tileEntity = (TileEntityLandmine) par1World.func_147438_o(par2, par3, par4);
this.tileEntity = (TileEntityLandmine) par1World.getTileEntity(par2, par3, par4);
this.x = par2;
this.y = par3;
this.z = par4;
@@ -146,7 +146,7 @@ public class LandmineExplodeLogic
if (hasExploded || defBeh != null && !preventExplode)
{
worldObj.func_147475_p(x, y, z);
worldObj.removeTileEntity(x, y, z);
WorldHelper.setBlockToAir(worldObj, x, y, z);
}
else
@@ -22,7 +22,7 @@ public class LandmineSpecialStackLogic
public LandmineSpecialStackLogic(World par1World, int par2, int par3, int par4, Entity entity, boolean mayHurtPlayer, ArrayList<ItemStack> items)
{
worldObj = par1World;
this.tileEntity = (TileEntityLandmine) par1World.func_147438_o(par2, par3, par4);
this.tileEntity = (TileEntityLandmine) par1World.getTileEntity(par2, par3, par4);
this.x = par2;
this.y = par3;
this.z = par4;
@@ -25,7 +25,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
if (amount > 0 && doFill)
{
renderOffset = resource.amount;
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
return amount;
@@ -38,7 +38,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
if (amount != null && doDrain)
{
renderOffset = -maxDrain;
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
return amount;
}
@@ -102,24 +102,24 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
if (id < 4096)
{
//TODO check this!!
Block block = Block.func_149729_e(id);
return block.func_149750_m();
Block block = Block.getBlockById(id);
return block.getLightValue();
}
}
return 0;
}
@Override
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
readCustomNBT(tags);
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
writeCustomNBT(tags);
}
@@ -144,18 +144,18 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
/* Packets */
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeCustomNBT(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readCustomNBT(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
/* Updating */
@@ -165,12 +165,12 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
}
@Override
public void func_145845_h ()
public void updateEntity ()
{
if (renderOffset > 0)
{
renderOffset -= 6;
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
}
}
@@ -17,7 +17,7 @@ public class LiquidTextureLogic extends TileEntity
public void setLiquidType (int tex)
{
texturePos = tex;
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
public int getLiquidType ()
@@ -25,9 +25,9 @@ public class LiquidTextureLogic extends TileEntity
return texturePos;
}
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
readCustomNBT(tags);
}
@@ -36,9 +36,9 @@ public class LiquidTextureLogic extends TileEntity
texturePos = tags.getInteger("Texture");
}
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
writeCustomNBT(tags);
}
@@ -48,17 +48,17 @@ public class LiquidTextureLogic extends TileEntity
}
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeCustomNBT(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readCustomNBT(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
}
@@ -38,7 +38,7 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
TileEntity tile = world.func_147438_o(xPos, y, zPos);
TileEntity tile = world.getTileEntity(xPos, y, zPos);
if (tile != null && tile instanceof PatternChestLogic)
return new PartCrafterChestContainer(inventoryplayer, this, (PatternChestLogic) tile);
}
@@ -146,16 +146,16 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory
}
/* NBT */
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
craftedTop = tags.getBoolean("CraftedTop");
craftedBottom = tags.getBoolean("CraftedBottom");
}
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
tags.setBoolean("CraftedTop", craftedTop);
tags.setBoolean("CraftedBottom", craftedBottom);
}
@@ -179,13 +179,13 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return getDefaultName();
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return false;
}
@@ -31,13 +31,13 @@ public class PatternChestLogic extends InventoryLogic
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return getDefaultName();
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return true;
}
@@ -40,32 +40,32 @@ public class RedwireLogic extends TileEntity
}
@Override
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
readCustomNBT(tags);
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
writeCustomNBT(tags);
}
/* Packets */
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeCustomNBT(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readCustomNBT(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
}
@@ -26,7 +26,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (doFill)
{
SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.fill(resource, doFill);
}
else
@@ -45,7 +45,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && canDrain(from, null))
{
SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.drain(maxDrain, doDrain);
}
else
@@ -76,7 +76,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
boolean containsFluid = fluid == null;
if (fluid != null)
{
SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
for (FluidStack fstack : smeltery.moltenMetal)
{
if (fstack.fluidID == fluid.getID())
@@ -95,7 +95,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && (from == getForgeDirection() || from == getForgeDirection().getOpposite() || from == ForgeDirection.UNKNOWN))
{
SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.getMultiTankInfo();
//return new FluidTankInfo[] { smeltery.getInfo() };
}
@@ -151,32 +151,32 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
}
}
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
direction = tags.getByte("Direction");
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
tags.setByte("Direction", direction);
}
/* Packets */
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
func_145841_b(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
writeToNBT(tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
func_145839_a(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
readFromNBT(packet.func_148857_g());
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
}
@@ -142,8 +142,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
stack.stackSize -= itemSize;
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.getItem(), itemSize, stack.getItemDamage()));
EntityItem entityitem = new EntityItem(worldObj, (double) ((float) xCoord + jumpX + offsetX), (double) ((float) yCoord + jumpY),
(double) ((float) zCoord + jumpZ + offsetZ), new ItemStack(stack.getItem(), itemSize, stack.getItemDamage()));
if (stack.hasTagCompound())
{
@@ -154,7 +154,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
entityitem.motionX = (double) ((float) rand.nextGaussian() * offset);
entityitem.motionY = (double) ((float) rand.nextGaussian() * offset + 0.2F);
entityitem.motionZ = (double) ((float) rand.nextGaussian() * offset);
field_145850_b.spawnEntityInWorld(entityitem);
worldObj.spawnEntityInWorld(entityitem);
}
}
}
@@ -227,7 +227,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
public void setActive (boolean flag)
{
needsUpdate = true;
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
public int getScaledFuelGague (int scale)
@@ -256,7 +256,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
/* Updating */
public void updateEntity ()
{
/*if (field_145850_b.isRemote)
/*if (worldObj.isRemote)
return;*/
tick++;
@@ -279,7 +279,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (needsUpdate)
{
needsUpdate = false;
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
@@ -295,7 +295,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
AxisAlignedBB box = AxisAlignedBB.getAABBPool().getAABB(centerPos.x, centerPos.y, centerPos.z, centerPos.x + 1.0D, centerPos.y + 1.0D, centerPos.z + 1.0D).expand(1.0D, 0.0D, 1.0D);
List list = field_145850_b.getEntitiesWithinAABB(Entity.class, box);
List list = worldObj.getEntitiesWithinAABB(Entity.class, box);
for (Object o : list)
{
if (moltenMetal.size() >= 1)
@@ -368,7 +368,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
private void handleItemEntity (EntityItem item)
{
// Clients like to play merry hell with this and cause breakage (we update their inv on syncs)
if (field_145850_b.isRemote)
if (worldObj.isRemote)
return;
item.age = 0;
@@ -403,8 +403,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
this.needsUpdate = true;
//TODO check if the below method functions as intended
//Old code: PacketDispatcher.sendPacketToAllInDimension(func_145844_m(), field_145850_b.provider.dimensionId);
FMLCommonHandler.instance().getClientToServerNetworkManager().func_150725_a(func_145844_m());
//Old code: PacketDispatcher.sendPacketToAllInDimension(getDescriptionPacket(), worldObj.provider.dimensionId);
FMLCommonHandler.instance().getClientToServerNetworkManager().scheduleOutboundPacket(getDescriptionPacket());
}
}
@@ -424,7 +424,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
else if (activeTemps[i] >= meltingTemps[i])
{
if (!field_145850_b.isRemote)
if (!worldObj.isRemote)
{
FluidStack result = getResultFor(inventory[i]);
if (result != null)
@@ -511,14 +511,14 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (activeLavaTank == null || useTime > 0)
return;
if (!field_145850_b.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
if (!worldObj.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
{
fuelAmount = 0;
fuelGague = 0;
return;
}
TileEntity tankContainer = field_145850_b.func_147438_o(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
TileEntity tankContainer = worldObj.getTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
if (tankContainer == null)
{
fuelAmount = 0;
@@ -552,14 +552,14 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (activeLavaTank == null || useTime > 0)
return;
if (!field_145850_b.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
if (!worldObj.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
{
fuelAmount = 0;
fuelGague = 0;
return;
}
TileEntity tankContainer = field_145850_b.func_147438_o(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
TileEntity tankContainer = worldObj.getTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
if (tankContainer == null)
{
fuelAmount = 0;
@@ -596,7 +596,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
while (!foundTank)
{
CoordTuple possibleTank = lavaTanks.get(iter);
TileEntity newTankContainer = field_145850_b.func_147438_o(possibleTank.x, possibleTank.y, possibleTank.z);
TileEntity newTankContainer = worldObj.getTileEntity(possibleTank.x, possibleTank.y, possibleTank.z);
if (newTankContainer instanceof IFluidHandler)
{
//TConstruct.logger.info("Tank: "+possibleTank.toString());
@@ -660,8 +660,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
updateEntity();
super.onInventoryChanged();
needsUpdate = true;
//field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
//field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
//worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
//worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
/*@Override
@@ -682,26 +682,26 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
switch (getRenderDirection())
{
case 2: // +z
alignInitialPlacement(field_145851_c, field_145848_d, field_145849_e + 2);
alignInitialPlacement(xCoord, yCoord, zCoord + 2);
break;
case 3: // -z
alignInitialPlacement(field_145851_c, field_145848_d, field_145849_e - 2);
alignInitialPlacement(xCoord, yCoord, zCoord - 2);
break;
case 4: // +x
alignInitialPlacement(field_145851_c + 2, field_145848_d, field_145849_e);
alignInitialPlacement(xCoord + 2, yCoord, zCoord);
break;
case 5: // -x
alignInitialPlacement(field_145851_c - 2, field_145848_d, field_145849_e);
alignInitialPlacement(xCoord - 2, yCoord, zCoord);
break;
}
}
public void alignInitialPlacement (int x, int y, int z)
{
Block northBlock = field_145850_b.func_147439_a(x, y, z + 1);
Block southBlock = field_145850_b.func_147439_a(x, y, z - 1);
Block eastBlock = field_145850_b.func_147439_a(x + 1, y, z);
Block westBlock = field_145850_b.func_147439_a(x - 1, y, z);
Block northBlock = worldObj.getBlock(x, y, z + 1);
Block southBlock = worldObj.getBlock(x, y, z - 1);
Block eastBlock = worldObj.getBlock(x + 1, y, z);
Block westBlock = worldObj.getBlock(x - 1, y, z);
if ((northBlock == null || northBlock == Blocks.air) && (southBlock == null || southBlock == Blocks.air)
&& (eastBlock == null || eastBlock == Blocks.air) && (westBlock == null || westBlock == Blocks.air))
@@ -756,7 +756,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
internalTemp = 800;
activeLavaTank = lavaTanks.get(0);
adjustLayers(checkLayers, false);
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
validStructure = true;
}
else
@@ -778,7 +778,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
block = field_145850_b.func_147439_a(xPos, y, zPos);
block = worldObj.getBlock(xPos, y, zPos);
if (block != null && block != Blocks.air)
return false;
}
@@ -811,7 +811,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
Block block = field_145850_b.func_147439_a(xPos, y, zPos);
Block block = worldObj.getBlock(xPos, y, zPos);
if (block != null && !(block == Blocks.air))
return count;
}
@@ -845,7 +845,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
Block block = field_145850_b.func_147439_a(xPos, y, zPos);
Block block = worldObj.getBlock(xPos, y, zPos);
if (block != null && block != Blocks.air)
{
if (validBlock(block))
@@ -883,7 +883,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
if (validBlock(field_145850_b.func_147439_a(xPos, y, zPos)) && (field_145850_b.getBlockMetadata(xPos, y, zPos) >= 2))
if (validBlock(worldObj.getBlock(xPos, y, zPos)) && (worldObj.getBlockMetadata(xPos, y, zPos) >= 2))
bottomBricks++;
}
}
@@ -902,10 +902,10 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
int checkBricks (int x, int y, int z)
{
int tempBricks = 0;
Block block = field_145850_b.func_147439_a(x, y, z);
Block block = worldObj.getBlock(x, y, z);
if (validBlock(block) || validTank(block))
{
TileEntity te = field_145850_b.func_147438_o(x, y, z);
TileEntity te = worldObj.getTileEntity(x, y, z);
if (te == this)
{
tempBricks++;
@@ -915,11 +915,11 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
MultiServantLogic servant = (MultiServantLogic) te;
if (servant.hasValidMaster())
{
if (servant.verifyMaster(this, field_145850_b, this.field_145851_c, this.field_145848_d, this.field_145849_e))
if (servant.verifyMaster(this, worldObj, this.xCoord, this.yCoord, this.zCoord))
tempBricks++;
}
// Temp comment out
/*else if (servant.setMaster(this.field_145851_c, this.field_145848_d, this.field_145849_e))
/*else if (servant.setMaster(this.xCoord, this.yCoord, this.zCoord))
{
tempBricks++;
}*/
@@ -969,7 +969,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
//liquid = null;
moltenMetal.remove(liquid);
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
currentLiquid = 0;
needsUpdate = true;
}
@@ -980,7 +980,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (doDrain && maxDrain > 0)
{
liquid.amount -= maxDrain;
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
currentLiquid -= maxDrain;
needsUpdate = true;
}
@@ -1014,7 +1014,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
}
needsUpdate = true;
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
return amount;
}
@@ -1057,11 +1057,11 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
/* NBT */
@Override
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
layers = tags.getInteger("Layers");
inventory = new ItemStack[layers * 9];
super.func_145839_a(tags);
super.readFromNBT(tags);
//validStructure = tags.getBoolean("ValidStructure");
internalTemp = tags.getInteger("InternalTemp");
@@ -1071,7 +1071,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(field_145851_c, field_145848_d, field_145849_e);
centerPos = new CoordTuple(xCoord, yCoord, zCoord);
direction = tags.getByte("Direction");
useTime = tags.getInteger("UseTime");
@@ -1080,12 +1080,12 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
meltingTemps = tags.getIntArray("MeltingTemps");
activeTemps = tags.getIntArray("ActiveTemps");
NBTTagList liquidTag = tags.func_150295_c("Liquids", 9);
NBTTagList liquidTag = tags.getTagList("Liquids", 9);
moltenMetal.clear();
for (int iter = 0; iter < liquidTag.tagCount(); iter++)
{
NBTTagCompound nbt = (NBTTagCompound) liquidTag.func_150305_b(iter);
NBTTagCompound nbt = (NBTTagCompound) liquidTag.getCompoundTagAt(iter);
FluidStack fluid = FluidStack.loadFluidStackFromNBT(nbt);
if (fluid != null)
moltenMetal.add(fluid);
@@ -1095,9 +1095,9 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145841_b(tags);
super.writeToNBT(tags);
//tags.setBoolean("ValidStructure", validStructure);
tags.setInteger("InternalTemp", internalTemp);
@@ -1105,7 +1105,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[] { field_145851_c, field_145848_d, field_145849_e };
center = new int[] { xCoord, yCoord, zCoord };
else
center = new int[] { centerPos.x, centerPos.y, centerPos.z };
tags.setIntArray("CenterPos", center);
@@ -1131,19 +1131,19 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
/* Packets */
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
func_145839_a(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
readFromNBT(tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
func_145839_a(packet.func_148857_g());
readFromNBT(packet.func_148857_g());
onInventoryChanged();
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
this.needsUpdate = true;
}
@@ -1158,13 +1158,13 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return getDefaultName();
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return true;
}
@@ -123,13 +123,13 @@ public class StencilTableLogic extends InventoryLogic implements ISidedInventory
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return StatCollector.translateToLocal("toolstation.PatternShaper");
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return true;
}
@@ -28,7 +28,7 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
public void overrideFluids (ArrayList<FluidStack> fluids)
{
/*multitank.overrideFluids(fluids);
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);*/
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);*/
}
public boolean hasItem ()
@@ -53,8 +53,8 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
if (itemstack != null && itemstack.stackSize > getInventoryStackLimit())
{
itemstack.stackSize = getInventoryStackLimit();
field_145850_b.setBlockMetadataWithNotify(field_145851_c, field_145848_d, field_145849_e, itemstack.getItemDamage(), 3);
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, itemstack.getItemDamage(), 3);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}*/
}
@@ -101,7 +101,7 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
@Override
public void invalidateMaster (IMasterLogic master, World world, int xMaster, int yMaster, int zMaster)
{
WorldHelper.setBlockToAir(world, field_145851_c, field_145848_d, field_145849_e);
WorldHelper.setBlockToAir(world, xCoord, yCoord, zCoord);
}
@Override
@@ -131,7 +131,7 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
//DELETE
public void updateEntity ()
{
WorldHelper.setBlockToAir(field_145850_b,field_145851_c, field_145848_d, field_145849_e);
WorldHelper.setBlockToAir(worldObj,xCoord, yCoord, zCoord);
}
//Keep TE regardless of metadata
@@ -143,9 +143,9 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
/* NBT */
@Override
public void func_145839_a (NBTTagCompound tags)
public void readFromNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
readNetworkNBT(tags);
multitank.readFromNBT(tags);
}
@@ -157,9 +157,9 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
}
@Override
public void func_145841_b (NBTTagCompound tags)
public void writeToNBT (NBTTagCompound tags)
{
super.func_145839_a(tags);
super.readFromNBT(tags);
writeNetworkNBT(tags);
multitank.writeToNBT(tags);
}
@@ -174,26 +174,26 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readNetworkNBT(packet.func_148857_g());
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeNetworkNBT(tag);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 1, tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return this.func_145825_b();
return this.getInventoryName();
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return false;
}
@@ -39,9 +39,9 @@ public class TileEntityLandmine extends TileEntity implements IInventory
}
@Override
public void func_145841_b (NBTTagCompound par1NBTTagCompound)
public void writeToNBT (NBTTagCompound par1NBTTagCompound)
{
super.func_145841_b(par1NBTTagCompound);
super.writeToNBT(par1NBTTagCompound);
NBTTagList nbttaglist = new NBTTagList();
for (int i = 0; i < this.inventory.length; ++i)
@@ -59,22 +59,22 @@ public class TileEntityLandmine extends TileEntity implements IInventory
par1NBTTagCompound.setInteger("triggerType", triggerType);
if (this.func_145818_k_())
if (this.hasCustomInventoryName())
{
par1NBTTagCompound.setString("CustomName", this.containerName);
}
}
@Override
public void func_145839_a (NBTTagCompound par1NBTTagCompound)
public void readFromNBT (NBTTagCompound par1NBTTagCompound)
{
super.func_145839_a(par1NBTTagCompound);
NBTTagList nbttaglist = par1NBTTagCompound.func_150295_c("Items",9);
super.readFromNBT(par1NBTTagCompound);
NBTTagList nbttaglist = par1NBTTagCompound.getTagList("Items",9);
this.inventory = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < nbttaglist.tagCount(); ++i)
{
NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.func_150305_b(i);
NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.getCompoundTagAt(i);
byte b0 = nbttagcompound1.getByte("Slot");
if (b0 >= 0 && b0 < this.inventory.length)
@@ -92,17 +92,17 @@ public class TileEntityLandmine extends TileEntity implements IInventory
}
@Override
public Packet func_145844_m ()
public Packet getDescriptionPacket ()
{
NBTTagCompound nbt = new NBTTagCompound();
func_145841_b(nbt);
return new S35PacketUpdateTileEntity(field_145851_c, field_145848_d, field_145849_e, 0, nbt);
writeToNBT(nbt);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbt);
}
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
func_145839_a(packet.func_148857_g());
readFromNBT(packet.func_148857_g());
}
@Override
@@ -181,13 +181,13 @@ public class TileEntityLandmine extends TileEntity implements IInventory
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return this.func_145818_k_() ? this.containerName : "Landmine";
return this.hasCustomInventoryName() ? this.containerName : "Landmine";
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return containerName != null && containerName.length() > 0;
}
@@ -206,8 +206,8 @@ public class TileEntityLandmine extends TileEntity implements IInventory
@Override
public boolean isUseableByPlayer (EntityPlayer par1EntityPlayer)
{
return this.field_145850_b.func_147438_o(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;
return this.worldObj.getTileEntity(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;
}
@Override
@@ -224,7 +224,7 @@ public class TileEntityLandmine extends TileEntity implements IInventory
public void onInventoryChanged ()
{
super.onInventoryChanged();
this.field_145850_b.func_147471_g(field_145851_c, field_145848_d, field_145849_e);
this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -250,11 +250,11 @@ public class TileEntityLandmine extends TileEntity implements IInventory
}
@Override
public void func_145845_h ()
public void updateEntity ()
{
if (shouldUpdateLogic)
{
field_145850_b.func_147479_m(field_145851_c, field_145848_d, field_145849_e);
worldObj.func_147479_m(xCoord, yCoord, zCoord);
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.field_145851_c, this.field_145848_d, this.field_145849_e);
this.getWorld().func_147476_b(this.field_145851_c, this.field_145848_d, this.field_145849_e, this);
this.blockMetadata = this.getWorld().getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
this.getWorld().markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
}
}
@@ -111,13 +111,13 @@ public class ToolStationLogic extends InventoryLogic implements ISidedInventory
}
@Override
public String func_145825_b ()
public String getInventoryName ()
{
return getDefaultName();
}
@Override
public boolean func_145818_k_ ()
public boolean hasCustomInventoryName ()
{
return true;
}