Start on the update
This commit is contained in:
parent
c8d8ce0241
commit
a0e6a2dc34
112 changed files with 522 additions and 503 deletions
|
@ -80,7 +80,7 @@ public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable,
|
|||
|
||||
public int getHeat() {
|
||||
for (EnumFacing direction : EnumFacing.values()) {
|
||||
TileEntity tileEntity = worldObj.getTileEntity(new BlockPos(getPos().getX() + direction.getFrontOffsetX(),
|
||||
TileEntity tileEntity = world.getTileEntity(new BlockPos(getPos().getX() + direction.getFrontOffsetX(),
|
||||
getPos().getY() + direction.getFrontOffsetY(), getPos().getZ() + direction.getFrontOffsetZ()));
|
||||
if (tileEntity instanceof TileMachineCasing) {
|
||||
if (((TileMachineCasing) tileEntity).isConnected()
|
||||
|
@ -89,22 +89,22 @@ public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable,
|
|||
Location location = new Location(getPos().getX(), getPos().getY(), getPos().getZ(), direction);
|
||||
location.modifyPositionFromSide(direction, 1);
|
||||
int heat = 0;
|
||||
if (worldObj.getBlockState(new BlockPos(location.getX(), location.getY() - 1, location.getZ()))
|
||||
if (world.getBlockState(new BlockPos(location.getX(), location.getY() - 1, location.getZ()))
|
||||
.getBlock() == tileEntity.getBlockType()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (IMultiblockPart part : casing.connectedParts) {
|
||||
BlockMachineCasing casing1 = (BlockMachineCasing) worldObj.getBlockState(part.getPos())
|
||||
BlockMachineCasing casing1 = (BlockMachineCasing) world.getBlockState(part.getPos())
|
||||
.getBlock();
|
||||
heat += casing1
|
||||
.getHeatFromState(part.getWorld().getBlockState(part.getWorldLocation().toBlockPos()));
|
||||
// TODO meta fix
|
||||
}
|
||||
|
||||
if (worldObj.getBlockState(new BlockPos(location.getX(), location.getY(), location.getZ()))
|
||||
if (world.getBlockState(new BlockPos(location.getX(), location.getY(), location.getZ()))
|
||||
.getBlock().getUnlocalizedName().equals("tile.lava")
|
||||
&& worldObj
|
||||
&& world
|
||||
.getBlockState(new BlockPos(location.getX(), location.getY() + 1, location.getZ()))
|
||||
.getBlock().getUnlocalizedName().equals("tile.lava")) {
|
||||
heat += 500;
|
||||
|
@ -118,7 +118,7 @@ public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable,
|
|||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity packet) {
|
||||
worldObj.markBlockRangeForRenderUpdate(getPos().getX(), getPos().getY(), getPos().getZ(), getPos().getX(),
|
||||
world.markBlockRangeForRenderUpdate(getPos().getX(), getPos().getY(), getPos().getZ(), getPos().getX(),
|
||||
getPos().getY(), getPos().getZ());
|
||||
readFromNBT(packet.getNbtCompound());
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public class TileImplosionCompressor extends TilePowerAcceptor implements IWrenc
|
|||
@Override
|
||||
public void validate() {
|
||||
super.validate();
|
||||
multiblockChecker = new MultiblockChecker(worldObj, getPos().down(3));
|
||||
multiblockChecker = new MultiblockChecker(world, getPos().down(3));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -94,7 +94,7 @@ public class TileIndustrialGrinder extends TilePowerAcceptor
|
|||
|
||||
if (multiblockChecker == null) {
|
||||
BlockPos pos = getPos().offset(getFacing().getOpposite(), 2).down();
|
||||
multiblockChecker = new MultiblockChecker(worldObj, pos);
|
||||
multiblockChecker = new MultiblockChecker(world, pos);
|
||||
}
|
||||
|
||||
if (getMutliBlock()) {
|
||||
|
|
|
@ -57,7 +57,7 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
canUseEnergy(128.0F) &&
|
||||
!tank.isEmpty() &&
|
||||
tank.getFluid().amount >= 1000) {
|
||||
if (--wood.stackSize == 0)
|
||||
if (--wood.getCount() == 0)
|
||||
setInventorySlotContents(0, null);
|
||||
tank.drain(1000, true);
|
||||
useEnergy(128.0F);
|
||||
|
@ -66,7 +66,7 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
}
|
||||
} else if (++tickTime > 100) {
|
||||
Random rnd = worldObj.rand;
|
||||
Random rnd = world.rand;
|
||||
addOutput(2, new ItemStack(Blocks.PLANKS, 6 + rnd.nextInt(4)));
|
||||
if (rnd.nextInt(4) != 0) {
|
||||
ItemStack pulp = ItemDusts.getDustByName("sawDust", 2 + rnd.nextInt(3));
|
||||
|
@ -85,18 +85,18 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
public void addOutput(int slot, ItemStack stack) {
|
||||
if (getStackInSlot(slot) == null)
|
||||
setInventorySlotContents(slot, stack);
|
||||
getStackInSlot(slot).stackSize += stack.stackSize;
|
||||
getStackInSlot(slot).getCount() += stack.getCount();
|
||||
}
|
||||
|
||||
public boolean canAddOutput(int slot, int amount) {
|
||||
ItemStack stack = getStackInSlot(slot);
|
||||
return stack == null || getInventoryStackLimit() - stack.stackSize >= amount;
|
||||
return stack == null || getInventoryStackLimit() - stack.getCount() >= amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate() {
|
||||
super.validate();
|
||||
multiblockChecker = new MultiblockChecker(worldObj, getPos().down(3));
|
||||
multiblockChecker = new MultiblockChecker(world, getPos().down(3));
|
||||
}
|
||||
|
||||
public boolean getMutliBlock() {
|
||||
|
|
|
@ -34,7 +34,7 @@ public class TileVacuumFreezer extends TilePowerAcceptor implements IWrenchable,
|
|||
@Override
|
||||
public void validate() {
|
||||
super.validate();
|
||||
multiblockChecker = new MultiblockChecker(worldObj, getPos().down());
|
||||
multiblockChecker = new MultiblockChecker(world, getPos().down());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue