fix references to worldObj

This commit is contained in:
Progwml6 committed 2014-01-01 14:59:11 -05:00
1 parent 2cb0bb34fb
commit 48be78c6a8
27 files changed
+162 -163

No files matched your search

@@ -37,7 +37,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.fill(from, resource, doFill);
}
return 0;
@@ -49,7 +49,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
// TConstruct.logger.info("Attempting drain " + hasValidMaster());
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
// TConstruct.logger.info("Found master");
return smeltery.drain(from, maxDrain, doDrain);
}
@@ -61,7 +61,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.drain(from, resource, doDrain);
}
return null;
@@ -72,7 +72,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster())
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.getFillState() < 2;
}
return false;
@@ -83,7 +83,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster())
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.getFillState() > 0;
}
return false;
@@ -94,7 +94,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && (from == getForgeDirection() || from == getForgeDirection().getOpposite() || from == ForgeDirection.UNKNOWN))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.getTankInfo(ForgeDirection.UNKNOWN);
}
return null;
@@ -175,6 +175,6 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readFromNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
}
@@ -65,7 +65,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
if (tick % 4 == 0)
smeltery.heatItems();
if (!worldObj.isRemote)
if (!field_145850_b.isRemote)
{
if (tick % 20 == 0)
{
@@ -127,9 +127,9 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
/* Structure */
@Override
public void setWorldObj (World world)
public void setfield_145850_b (World world)
{
super.setWorldObj(world);
super.setfield_145850_b(world);
structure.setWorld(world);
smeltery.setWorld(world);
}
@@ -137,7 +137,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
@Override
public void notifyChange (IServantLogic servant, int x, int y, int z)
{
if (!worldObj.isRemote)
if (!field_145850_b.isRemote)
{
//System.out.println("Notifying of change from "+new CoordTuple(x, y, z));
recheckStructure = true;
@@ -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));
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -285,7 +285,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
CoordTuple air = structure.getAirByIndex(slot);
if (air != null)
{
TileEntity te = worldObj.getBlockTileEntity(air.x, air.y, air.z);
TileEntity te = field_145850_b.getBlockTileEntity(air.x, air.y, air.z);
if (te != null && te instanceof TankAirLogic)
{
((TankAirLogic) te).setInventorySlotContents(0, itemstack);
@@ -407,7 +407,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
{
Map.Entry pairs = (Map.Entry) iter.next();
CoordTuple coord = (CoordTuple) pairs.getKey();
TileEntity te = worldObj.getBlockTileEntity(coord.x, coord.y, coord.z);
TileEntity te = field_145850_b.getBlockTileEntity(coord.x, coord.y, coord.z);
if (te instanceof TankAirLogic)
{
((TankAirLogic) te).overrideFluids(((LiquidDataInstance) pairs.getValue()).fluids);
@@ -420,7 +420,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
public void updateAir ()
{
for (CoordTuple loc : structure.airCoords)
worldObj.markBlockForUpdate(loc.x, loc.y, loc.z);
field_145850_b.markBlockForUpdate(loc.x, loc.y, loc.z);
}
class LiquidData
@@ -574,7 +574,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readNetworkNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -142,7 +142,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
castingDelay = recipe.coolTime;
}
renderOffset = copyLiquid.amount;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
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;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
needsUpdate = true;
}
return roomInTank;
@@ -175,7 +175,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
if (doFill)
{
this.liquid.amount += resource.amount;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
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();
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
needsUpdate = true;
}
public ItemStack decrStackSize (int slot, int quantity)
{
ItemStack stack = super.decrStackSize(slot, quantity);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
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.worldObj, this.xCoord, this.yCoord, this.zCoord, this));
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.field_145850_b, this.xCoord, this.yCoord, this.zCoord, this));
return drained;
}
@@ -312,7 +312,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
if (renderOffset > 0)
{
renderOffset -= 6;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
tick++;
@@ -320,7 +320,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
{
tick = 0;
if (needsUpdate)
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
@@ -333,7 +333,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
if (recipe.consumeCast)
inventory[0] = null;
liquid = null;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
@@ -398,7 +398,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readFromNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -43,16 +43,16 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
@Override
public void updateEntity ()
{
if (this.worldObj.isRemote)
if (this.field_145850_b.isRemote)
return;
ticks++;
ticksLPReset++;
if (!worldObj.isRemote)
if (!field_145850_b.isRemote)
{
if (this.pullingLiquids)
pullLiquids();
}
//this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
//this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
if (ticks == 20)
{
if (recentlyFilledDelay != 0)
@@ -83,7 +83,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
boolean pullLiquid (int x, int y, int z, ForgeDirection direction)
{
TileEntity tank = worldObj.getBlockTileEntity(x, y, z);
TileEntity tank = field_145850_b.getBlockTileEntity(x, y, z);
if (tank instanceof IFluidHandler && !(tank instanceof CastingChannelLogic))
{
FluidStack templiquid = ((IFluidHandler) tank).drain(direction, 3, false);
@@ -291,7 +291,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
@SideOnly(Side.CLIENT)
public float tankBelow ()
{
TileEntity te = this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
TileEntity te = this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
if (te instanceof CastingChannelLogic)
return -0.5f;
if (te instanceof LavaTankLogic)
@@ -311,15 +311,15 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
switch (dir)
{
case DOWN:
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof CastingChannelLogic);
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof CastingChannelLogic);
case NORTH:
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof CastingChannelLogic);
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof CastingChannelLogic);
case SOUTH:
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof CastingChannelLogic);
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof CastingChannelLogic);
case WEST:
return (this.worldObj.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
return (this.field_145850_b.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
case EAST:
return (this.worldObj.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
return (this.field_145850_b.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof CastingChannelLogic);
default:
return false;
}
@@ -330,15 +330,15 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
switch (dir)
{
case DOWN:
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof IFluidHandler);
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord) instanceof IFluidHandler);
case NORTH:
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof IFluidHandler);
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1) instanceof IFluidHandler);
case SOUTH:
return (this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof IFluidHandler);
return (this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1) instanceof IFluidHandler);
case WEST:
return (this.worldObj.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
return (this.field_145850_b.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
case EAST:
return (this.worldObj.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
return (this.field_145850_b.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord) instanceof IFluidHandler);
default:
return false;
}
@@ -347,11 +347,11 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
private HashMap getOutputs ()
{
HashMap map = new HashMap();
TileEntity tankXplus = this.worldObj.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord);
TileEntity tankXminus = this.worldObj.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord);
TileEntity tankZplus = this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1);
TileEntity tankZminus = this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1);
TileEntity tankYminus = this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
TileEntity tankXplus = this.field_145850_b.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord);
TileEntity tankXminus = this.field_145850_b.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord);
TileEntity tankZplus = this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1);
TileEntity tankZminus = this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1);
TileEntity tankYminus = this.field_145850_b.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
if (this.pullingLiquids)
{
@@ -420,7 +420,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
if (doFill)
{
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
this.liquid = transfered;
}
recentlyFilledDelay = 2;
@@ -437,7 +437,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
if ((doFill) && (spaceInTank > 0))
{
this.liquid.amount = this.fillMax;
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
}
return spaceInTank;
}
@@ -445,7 +445,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
if (doFill)
{
this.liquid.amount += stack.amount;
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
}
return stack.amount;
}
@@ -492,8 +492,8 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
}
if (doDrain)
{
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.worldObj, this.xCoord, this.yCoord, this.zCoord, this));
this.field_145850_b.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.field_145850_b, this.xCoord, this.yCoord, this.zCoord, this));
}
return drained;
}
@@ -574,7 +574,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readCustomNBT(packet.data);
this.worldObj.markBlockForRenderUpdate(this.xCoord, this.yCoord, this.zCoord);
this.field_145850_b.markBlockForRenderUpdate(this.xCoord, this.yCoord, this.zCoord);
}
public int convertFDToInt (ForgeDirection dir)
@@ -142,7 +142,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
castingDelay = recipe.coolTime;
}
renderOffset = copyLiquid.amount;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
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;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
needsUpdate = true;
}
return roomInTank;
@@ -175,7 +175,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
if (doFill)
{
this.liquid.amount += resource.amount;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
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();
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
needsUpdate = true;
}
public ItemStack decrStackSize (int slot, int quantity)
{
ItemStack stack = super.decrStackSize(slot, quantity);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
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.worldObj, this.xCoord, this.yCoord, this.zCoord, this));
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(drained, this.getWorld(), this.xCoord, this.yCoord, this.zCoord, this));
return drained;
}
@@ -312,7 +312,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
if (renderOffset > 0)
{
renderOffset -= 6;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
tick++;
@@ -320,7 +320,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
{
tick = 0;
if (needsUpdate)
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
getWorld().markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
@@ -333,7 +333,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
if (recipe.consumeCast)
inventory[0] = null;
liquid = null;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
getWorld().markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
@@ -396,7 +396,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readFromNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
getWorld().markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -39,7 +39,7 @@ public class DryingRackLogic extends InventoryLogic
@Override
public void updateEntity ()
{
if (!worldObj.isRemote && maxTime > 0 && currentTime < maxTime)
if (!field_145850_b.isRemote && maxTime > 0 && currentTime < maxTime)
{
currentTime++;
if (currentTime >= maxTime)
@@ -73,7 +73,7 @@ public class DryingRackLogic extends InventoryLogic
maxTime = DryingRackRecipes.getDryingTime(inventory[0]);
else
maxTime = 0;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -115,7 +115,7 @@ public class DryingRackLogic extends InventoryLogic
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readCustomNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
@SideOnly(Side.CLIENT)
@@ -43,8 +43,8 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
break;
}
TileEntity drainte = worldObj.getBlockTileEntity(x, yCoord, z);
TileEntity tankte = worldObj.getBlockTileEntity(xCoord, yCoord - 1, zCoord);
TileEntity drainte = field_145850_b.getBlockTileEntity(x, yCoord, z);
TileEntity tankte = field_145850_b.getBlockTileEntity(xCoord, yCoord - 1, zCoord);
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);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
return true;
}
else
@@ -82,7 +82,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
if (!activateFaucet())
{
active = false;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
}
@@ -180,7 +180,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readCustomNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -55,7 +55,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
public void setActive (boolean flag)
{
active = flag;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
/* Fuel gauge */
@@ -65,7 +65,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
public void setActive (boolean flag)
{
active = flag;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
/* Fuel gauge */
@@ -296,7 +296,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readNetworkNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -31,7 +31,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
if (amount > 0 && doFill)
{
renderOffset = resource.amount;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
return amount;
@@ -44,7 +44,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
if (amount != null && doDrain)
{
renderOffset = -maxDrain;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
return amount;
}
@@ -159,7 +159,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readCustomNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
/* Updating */
@@ -174,7 +174,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
if (renderOffset > 0)
{
renderOffset -= 6;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
}
}
@@ -18,7 +18,7 @@ public class LiquidTextureLogic extends TileEntity
public void setLiquidType (int tex)
{
texturePos = tex;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
public int getLiquidType ()
@@ -60,6 +60,6 @@ public class LiquidTextureLogic extends TileEntity
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readCustomNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
}
@@ -67,6 +67,6 @@ public class RedwireLogic extends TileEntity
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readCustomNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
}
@@ -30,7 +30,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (doFill)
{
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.fill(resource, doFill);
}
else
@@ -49,7 +49,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && canDrain(from, null))
{
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.drain(maxDrain, doDrain);
}
else
@@ -80,7 +80,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
boolean containsFluid = fluid == null;
if (fluid != null)
{
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
for (FluidStack fstack : smeltery.moltenMetal)
{
if (fstack.fluidID == fluid.getID())
@@ -99,7 +99,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && (from == getForgeDirection() || from == getForgeDirection().getOpposite() || from == ForgeDirection.UNKNOWN))
{
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.getMultiTankInfo();
//return new FluidTankInfo[] { smeltery.getInfo() };
}
@@ -181,6 +181,6 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readFromNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
}
@@ -157,7 +157,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
stack.stackSize -= itemSize;
EntityItem entityitem = new EntityItem(worldObj, (double) ((float) xCoord + jumpX + offsetX), (double) ((float) yCoord + jumpY),
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()));
if (stack.hasTagCompound())
@@ -169,7 +169,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);
worldObj.spawnEntityInWorld(entityitem);
field_145850_b.spawnEntityInWorld(entityitem);
}
}
}
@@ -242,7 +242,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
public void setActive (boolean flag)
{
needsUpdate = true;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
public int getScaledFuelGague (int scale)
@@ -271,7 +271,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
/* Updating */
public void updateEntity ()
{
/*if (worldObj.isRemote)
/*if (field_145850_b.isRemote)
return;*/
tick++;
@@ -294,7 +294,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (needsUpdate)
{
needsUpdate = false;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
@@ -310,7 +310,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 = worldObj.getEntitiesWithinAABB(Entity.class, box);
List list = field_145850_b.getEntitiesWithinAABB(Entity.class, box);
for (Object o : list)
{
if (moltenMetal.size() >= 1)
@@ -383,7 +383,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 (worldObj.isRemote)
if (field_145850_b.isRemote)
return;
item.age = 0;
@@ -417,7 +417,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (itemAdded)
{
this.needsUpdate = true;
PacketDispatcher.sendPacketToAllInDimension(getDescriptionPacket(), worldObj.provider.dimensionId);
PacketDispatcher.sendPacketToAllInDimension(getDescriptionPacket(), field_145850_b.provider.dimensionId);
}
}
@@ -437,7 +437,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
else if (activeTemps[i] >= meltingTemps[i])
{
if (!worldObj.isRemote)
if (!field_145850_b.isRemote)
{
FluidStack result = getResultFor(inventory[i]);
if (result != null)
@@ -524,14 +524,14 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (activeLavaTank == null || useTime > 0)
return;
if (!worldObj.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
if (!field_145850_b.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
{
fuelAmount = 0;
fuelGague = 0;
return;
}
TileEntity tankContainer = worldObj.getBlockTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
TileEntity tankContainer = field_145850_b.getBlockTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
if (tankContainer == null)
{
fuelAmount = 0;
@@ -565,14 +565,14 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (activeLavaTank == null || useTime > 0)
return;
if (!worldObj.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
if (!field_145850_b.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
{
fuelAmount = 0;
fuelGague = 0;
return;
}
TileEntity tankContainer = worldObj.getBlockTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
TileEntity tankContainer = field_145850_b.getBlockTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
if (tankContainer == null)
{
fuelAmount = 0;
@@ -609,7 +609,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
while (!foundTank)
{
CoordTuple possibleTank = lavaTanks.get(iter);
TileEntity newTankContainer = worldObj.getBlockTileEntity(possibleTank.x, possibleTank.y, possibleTank.z);
TileEntity newTankContainer = field_145850_b.getBlockTileEntity(possibleTank.x, possibleTank.y, possibleTank.z);
if (newTankContainer instanceof IFluidHandler)
{
//TConstruct.logger.info("Tank: "+possibleTank.toString());
@@ -673,8 +673,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
updateEntity();
super.onInventoryChanged();
needsUpdate = true;
//worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
//worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
//field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
//field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
/*@Override
@@ -711,42 +711,42 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
public void alignInitialPlacement (int x, int y, int z)
{
int northID = worldObj.getBlockId(x, y, z + 1);
int southID = worldObj.getBlockId(x, y, z - 1);
int eastID = worldObj.getBlockId(x + 1, y, z);
int westID = worldObj.getBlockId(x - 1, y, z);
int northID = this.field_145850_b.getBlockId(x, y, z + 1);
int southID = field_145850_b.getBlockId(x, y, z - 1);
int eastID = field_145850_b.getBlockId(x + 1, y, z);
int westID = field_145850_b.getBlockId(x - 1, y, z);
Block northBlock = Block.blocksList[northID];
Block southBlock = Block.blocksList[southID];
Block eastBlock = Block.blocksList[eastID];
Block westBlock = Block.blocksList[westID];
if ((northBlock == null || northBlock.isAirBlock(worldObj, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(worldObj, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(worldObj, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(worldObj, x - 1, y, z)))
if ((northBlock == null || northBlock.isAirBlock(field_145850_b, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(field_145850_b, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(field_145850_b, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(field_145850_b, x - 1, y, z)))
{
checkValidStructure(x, y, z);
}
else if ((northBlock != null && !northBlock.isAirBlock(worldObj, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(worldObj, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(worldObj, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(worldObj, x - 1, y, z)))
else if ((northBlock != null && !northBlock.isAirBlock(field_145850_b, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(field_145850_b, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(field_145850_b, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(field_145850_b, x - 1, y, z)))
{
checkValidStructure(x, y, z - 1);
}
else if ((northBlock == null || northBlock.isAirBlock(worldObj, x, y, z + 1)) && (southBlock != null && !southBlock.isAirBlock(worldObj, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(worldObj, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(worldObj, x - 1, y, z)))
else if ((northBlock == null || northBlock.isAirBlock(field_145850_b, x, y, z + 1)) && (southBlock != null && !southBlock.isAirBlock(field_145850_b, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(field_145850_b, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(field_145850_b, x - 1, y, z)))
{
checkValidStructure(x, y, z + 1);
}
else if ((northBlock == null || northBlock.isAirBlock(worldObj, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(worldObj, x, y, z - 1))
&& (eastBlock != null && !eastBlock.isAirBlock(worldObj, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(worldObj, x - 1, y, z)))
else if ((northBlock == null || northBlock.isAirBlock(field_145850_b, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(field_145850_b, x, y, z - 1))
&& (eastBlock != null && !eastBlock.isAirBlock(field_145850_b, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(field_145850_b, x - 1, y, z)))
{
checkValidStructure(x - 1, y, z);
}
else if ((northBlock == null || northBlock.isAirBlock(worldObj, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(worldObj, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(worldObj, x + 1, y, z)) && (westBlock != null && !westBlock.isAirBlock(worldObj, x - 1, y, z)))
else if ((northBlock == null || northBlock.isAirBlock(field_145850_b, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(field_145850_b, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(field_145850_b, x + 1, y, z)) && (westBlock != null && !westBlock.isAirBlock(field_145850_b, x - 1, y, z)))
{
checkValidStructure(x + 1, y, z);
}
@@ -774,7 +774,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
internalTemp = 800;
activeLavaTank = lavaTanks.get(0);
adjustLayers(checkLayers, false);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
validStructure = true;
}
else
@@ -796,8 +796,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
block = Block.blocksList[worldObj.getBlockId(xPos, y, zPos)];
if (block != null && !block.isAirBlock(worldObj, xPos, y, zPos))
block = Block.blocksList[field_145850_b.getBlockId(xPos, y, zPos)];
if (block != null && !block.isAirBlock(field_145850_b, xPos, y, zPos))
return false;
}
}
@@ -829,8 +829,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
Block block = Block.blocksList[worldObj.getBlockId(xPos, y, zPos)];
if (block != null && !block.isAirBlock(worldObj, xPos, y, zPos))
Block block = Block.blocksList[field_145850_b.getBlockId(xPos, y, zPos)];
if (block != null && !block.isAirBlock(field_145850_b, xPos, y, zPos))
return count;
}
}
@@ -863,9 +863,9 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
int blockID = worldObj.getBlockId(xPos, y, zPos);
int blockID = field_145850_b.getBlockId(xPos, y, zPos);
Block block = Block.blocksList[blockID];
if (block != null && !block.isAirBlock(worldObj, xPos, y, zPos))
if (block != null && !block.isAirBlock(field_145850_b, xPos, y, zPos))
{
if (validBlockID(blockID))
return validateBottom(x, y, z, count);
@@ -902,7 +902,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
if (validBlockID(worldObj.getBlockId(xPos, y, zPos)) && (worldObj.getBlockMetadata(xPos, y, zPos) >= 2))
if (validBlockID(field_145850_b.getBlockId(xPos, y, zPos)) && (field_145850_b.getBlockMetadata(xPos, y, zPos) >= 2))
bottomBricks++;
}
}
@@ -921,10 +921,10 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
int checkBricks (int x, int y, int z)
{
int tempBricks = 0;
int blockID = worldObj.getBlockId(x, y, z);
int blockID = field_145850_b.getBlockId(x, y, z);
if (validBlockID(blockID) || validTankID(blockID))
{
TileEntity te = worldObj.getBlockTileEntity(x, y, z);
TileEntity te = field_145850_b.getBlockTileEntity(x, y, z);
if (te == this)
{
tempBricks++;
@@ -951,14 +951,13 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
return tempBricks;
}
boolean validBlockID (int blockID)
boolean validBlock (Block block)
{
return blockID == TRepo.smeltery.blockID || blockID == TRepo.smelteryNether.blockID;
return block == TRepo.smeltery || block == TRepo.smelteryNether;
}
boolean validTankID (int blockID)
{
return blockID == TRepo.lavaTank.blockID || blockID == TRepo.lavaTankNether.blockID;
return block == TRepo.lavaTank || block == TRepo.lavaTankNether;
}
public int getCapacity ()
@@ -987,7 +986,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
//liquid = null;
moltenMetal.remove(liquid);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
currentLiquid = 0;
needsUpdate = true;
}
@@ -998,7 +997,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (doDrain && maxDrain > 0)
{
liquid.amount -= maxDrain;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
currentLiquid -= maxDrain;
needsUpdate = true;
}
@@ -1032,7 +1031,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
}
needsUpdate = true;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
return amount;
}
@@ -1161,7 +1160,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
readFromNBT(packet.data);
onInventoryChanged();
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
this.needsUpdate = true;
}
@@ -34,7 +34,7 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
public void overrideFluids (ArrayList<FluidStack> fluids)
{
/*multitank.overrideFluids(fluids);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);*/
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);*/
}
public boolean hasItem ()
@@ -59,8 +59,8 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
if (itemstack != null && itemstack.stackSize > getInventoryStackLimit())
{
itemstack.stackSize = getInventoryStackLimit();
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, itemstack.getItemDamage(), 3);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, itemstack.getItemDamage(), 3);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}*/
}
@@ -137,7 +137,7 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
//DELETE
public void updateEntity ()
{
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
field_145850_b.setBlockToAir(xCoord, yCoord, zCoord);
}
//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);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -211,7 +211,7 @@ public class TileEntityLandmine extends TileEntity implements IInventory
@Override
public boolean isUseableByPlayer (EntityPlayer par1EntityPlayer)
{
return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D,
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;
}
@@ -229,7 +229,7 @@ public class TileEntityLandmine extends TileEntity implements IInventory
public void onInventoryChanged ()
{
super.onInventoryChanged();
this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
this.field_145850_b.markBlockForUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -259,7 +259,7 @@ public class TileEntityLandmine extends TileEntity implements IInventory
{
if (shouldUpdateLogic)
{
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
field_145850_b.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
shouldUpdateLogic = false;
}
if (soundcountything > 0)
@@ -58,10 +58,10 @@ public class ToolStationLogic extends InventoryLogic implements ISidedInventory
public void onInventoryChanged ()
{
buildTool(toolName);
if (this.worldObj != null)
if (this.getWorld() != null)
{
this.blockMetadata = this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
this.blockMetadata = this.getWorld().getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
this.getWorld().markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
}
}
@@ -42,7 +42,7 @@ public class CastingBasinSpecialRender extends TileEntitySpecialRenderer
void renderItem (CastingBasinLogic logic, ItemStack stack)
{
FancyEntityItem entityitem = new FancyEntityItem(logic.worldObj, 0.0D, 0.0D, 0.0D, stack);
FancyEntityItem entityitem = new FancyEntityItem(logic.getWorld(), 0.0D, 0.0D, 0.0D, stack);
entityitem.getEntityItem().stackSize = 1;
entityitem.hoverStart = 0.0F;
GL11.glPushMatrix();
@@ -48,7 +48,7 @@ public class CastingTableSpecialRenderer extends TileEntitySpecialRenderer
void renderItem (CastingTableLogic logic, ItemStack stack)
{
FancyEntityItem entityitem = new FancyEntityItem(logic.worldObj, 0.0D, 0.0D, 0.0D, stack);
FancyEntityItem entityitem = new FancyEntityItem(logic.getWorld(), 0.0D, 0.0D, 0.0D, stack);
entityitem.getEntityItem().stackSize = 1;
entityitem.hoverStart = 0.0F;
GL11.glPushMatrix();
@@ -48,11 +48,11 @@ public class DryingRackSpecialRender extends TileEntitySpecialRenderer
void renderItem (DryingRackLogic logic, ItemStack stack)
{
FancyEntityItem entityitem = new FancyEntityItem(logic.worldObj, 0.0D, 0.0D, 0.0D, stack);
FancyEntityItem entityitem = new FancyEntityItem(logic.getWorld(), 0.0D, 0.0D, 0.0D, stack);
entityitem.getEntityItem().stackSize = 1;
entityitem.hoverStart = 0.0F;
GL11.glPushMatrix();
int meta = logic.worldObj.getBlockMetadata(logic.xCoord, logic.yCoord, logic.zCoord);
int meta = logic.getWorld().getBlockMetadata(logic.xCoord, logic.yCoord, logic.zCoord);
if (meta <= 1)
GL11.glTranslatef(1F, -0.375F, 0.905F);
else
@@ -474,7 +474,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui
{
dos.write(11);
dos.writeInt(logic.worldObj.provider.dimensionId);
dos.writeInt(logic.getWorld().provider.dimensionId);
dos.writeInt(logic.xCoord);
dos.writeInt(logic.yCoord);
dos.writeInt(logic.zCoord);
@@ -501,6 +501,6 @@ public class AdaptiveSmelteryGui extends NewContainerGui
public void onGuiClosed ()
{
super.onGuiClosed();
logic.worldObj.markBlockForUpdate(logic.xCoord, logic.yCoord, logic.zCoord);
logic.getWorld().markBlockForUpdate(logic.xCoord, logic.yCoord, logic.zCoord);
}
}
@@ -460,7 +460,7 @@ public class SmelteryGui extends NewContainerGui
{
dos.write(11);
dos.writeInt(logic.worldObj.provider.dimensionId);
dos.writeInt(logic.getWorld().provider.dimensionId);
dos.writeInt(logic.xCoord);
dos.writeInt(logic.yCoord);
dos.writeInt(logic.zCoord);
@@ -127,7 +127,7 @@ public class StencilTableGui extends GuiContainer
try
{
outputStream.writeByte(2);
outputStream.writeInt(logic.worldObj.provider.dimensionId);
outputStream.writeInt(logic.getWorld().provider.dimensionId);
outputStream.writeInt(logic.xCoord);
outputStream.writeInt(logic.yCoord);
outputStream.writeInt(logic.zCoord);
@@ -487,7 +487,7 @@ public class ToolStationGui extends NewContainerGui
try
{
outputStream.writeByte(1);
outputStream.writeInt(logic.worldObj.provider.dimensionId);
outputStream.writeInt(logic.getWorld().provider.dimensionId);
outputStream.writeInt(logic.xCoord);
outputStream.writeInt(logic.yCoord);
outputStream.writeInt(logic.zCoord);
@@ -22,14 +22,14 @@ public class CraftingStationContainer extends Container
public InventoryCrafting craftMatrix;// = new InventoryCrafting(this, 3, 3);
public IInventory craftResult;// = new InventoryCraftResult();
private CraftingStationLogic logic;
private World worldObj;
private World field_145850_b;
private int posX;
private int posY;
private int posZ;
public CraftingStationContainer(InventoryPlayer inventorplayer, CraftingStationLogic logic, int x, int y, int z)
{
this.worldObj = logic.worldObj;
this.field_145850_b = logic.getWorld();
this.posX = x;
this.posY = y;
this.posZ = z;
@@ -94,7 +94,7 @@ public class CraftingStationContainer extends Container
if (tool != null)
this.craftResult.setInventorySlotContents(0, tool);
else
this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj));
this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.field_145850_b));
}
public ItemStack modifyTool ()
@@ -135,7 +135,7 @@ public class CraftingStationContainer extends Container
{
super.onContainerClosed(par1EntityPlayer);
if (!this.worldObj.isRemote)
if (!this.field_145850_b.isRemote)
{
for (int i = 0; i < 9; ++i)
{
@@ -81,8 +81,8 @@ public class ToolForgeContainer extends ToolStationContainer
logic.decrStackSize(i, 1);
int amount = logic.getStackInSlot(1).getItem() instanceof ToolCore ? stack.stackSize : 1;
logic.decrStackSize(1, amount);
if (!logic.worldObj.isRemote)
logic.worldObj.playAuxSFX(1021, (int) logic.xCoord, (int) logic.yCoord, (int) logic.zCoord, 0);
if (!logic.getWorld().isRemote)
logic.getWorld().playAuxSFX(1021, (int) logic.xCoord, (int) logic.yCoord, (int) logic.zCoord, 0);
}
}
}
@@ -566,9 +566,9 @@ public class TConstructRegistry
drawbridgeState[Blocks.redstoneWire] = 1;
blockToItemMapping[Blocks.redstoneWire] = Items.redstone;
blockToItemMapping[Items.redstone] = Blocks.redstoneWire;
drawbridgeState[Blocks.oreDiamond] = 1;
drawbridgeState[Blocks.blockDiamond] = 1;
drawbridgeState[Blocks.workbench] = 1;
drawbridgeState[Blocks.diamond_ore] = 1;
drawbridgeState[Blocks.diamond_block] = 1;
drawbridgeState[Blocks.crafting_table] = 1;
drawbridgeState[Blocks.crops] = 2;
drawbridgeState[Blocks.tilledField] = 1;
drawbridgeState[Blocks.furnaceIdle] = 3;