Start on the update

This commit is contained in:
modmuss50 2016-11-19 12:50:08 +00:00
parent c8d8ce0241
commit a0e6a2dc34
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
112 changed files with 522 additions and 503 deletions

View file

@ -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());
}

View file

@ -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

View file

@ -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()) {

View file

@ -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() {

View file

@ -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