diff --git a/common/buildcraft/builders/TileArchitect.java b/common/buildcraft/builders/TileArchitect.java index ebe96b65..96bbfbe6 100644 --- a/common/buildcraft/builders/TileArchitect.java +++ b/common/buildcraft/builders/TileArchitect.java @@ -218,7 +218,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory, IBoxPro } private void initializeComputing() { - if (getWorld().isRemote) { + if (getWorldObj().isRemote) { return; } diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 8d4c6793..d93b5fdf 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -411,7 +411,7 @@ public class TileBuilder extends TileAbstractBuilder implements IHasWork, IFluid } } if (dropBlueprint) { - InvUtils.dropItems(getWorld(), getStackInSlot(0), xCoord, yCoord, zCoord); + InvUtils.dropItems(getWorldObj(), getStackInSlot(0), xCoord, yCoord, zCoord); } setInventorySlotContents(0, null); @@ -586,7 +586,7 @@ public class TileBuilder extends TileAbstractBuilder implements IHasWork, IFluid iterateBpt(false); - if (getWorld().getWorldInfo().getGameType() == GameType.CREATIVE) { + if (getWorldObj().getWorldInfo().getGameType() == GameType.CREATIVE) { build(); } else { if (getBattery().getEnergyStored() > POWER_ACTIVATION) { diff --git a/common/buildcraft/builders/TileFiller.java b/common/buildcraft/builders/TileFiller.java index a63385b0..e42b0832 100644 --- a/common/buildcraft/builders/TileFiller.java +++ b/common/buildcraft/builders/TileFiller.java @@ -78,7 +78,7 @@ public class TileFiller extends TileAbstractBuilder implements IHasWork, IContro if (currentPattern != null && currentTemplate == null) { currentTemplate = currentPattern - .getTemplateBuilder(box, getWorld()); + .getTemplateBuilder(box, getWorldObj()); context = currentTemplate.getContext(); } @@ -121,7 +121,7 @@ public class TileFiller extends TileAbstractBuilder implements IHasWork, IContro } if (currentPattern != null && currentTemplate == null) { - currentTemplate = currentPattern.getTemplateBuilder(box, getWorld()); + currentTemplate = currentPattern.getTemplateBuilder(box, getWorldObj()); context = currentTemplate.getContext(); } diff --git a/common/buildcraft/builders/TilePathMarker.java b/common/buildcraft/builders/TilePathMarker.java index 5f2235b3..949a1c69 100644 --- a/common/buildcraft/builders/TilePathMarker.java +++ b/common/buildcraft/builders/TilePathMarker.java @@ -142,7 +142,7 @@ public class TilePathMarker extends TileMarker { tryingToConnect = false; sendNetworkUpdate(); - getWorld().markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, + getWorldObj().markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord); } } diff --git a/common/buildcraft/commander/TileZonePlan.java b/common/buildcraft/commander/TileZonePlan.java old mode 100755 new mode 100644 index ec300534..3546762c --- a/common/buildcraft/commander/TileZonePlan.java +++ b/common/buildcraft/commander/TileZonePlan.java @@ -150,7 +150,7 @@ public class TileZonePlan extends TileBuildCraft implements IInventory { int color = 0; - for (int y = getWorld().getHeight() - 1; y >= 0; --y) { + for (int y = getWorldObj().getHeight() - 1; y >= 0; --y) { if (!chunk.getBlock(cx, y, cz).isAir(worldObj, x, y, z)) { color = chunk.getBlock(cx, y, cz).getMapColor(0).colorIndex; break; diff --git a/common/buildcraft/core/blueprints/RecursiveBlueprintReader.java b/common/buildcraft/core/blueprints/RecursiveBlueprintReader.java old mode 100755 new mode 100644 index 61f0f65a..2b34da99 --- a/common/buildcraft/core/blueprints/RecursiveBlueprintReader.java +++ b/common/buildcraft/core/blueprints/RecursiveBlueprintReader.java @@ -48,7 +48,7 @@ public class RecursiveBlueprintReader { ItemStack stack = architect.getStackInSlot(0); if (stack != null && stack.getItem() instanceof ItemBlueprint && architect.box.isInitialized()) { - blockScanner = new BlockScanner(architect.box, architect.getWorld(), SCANNER_ITERATION); + blockScanner = new BlockScanner(architect.box, architect.getWorldObj(), SCANNER_ITERATION); if (stack.getItem() instanceof ItemBlueprintStandard) { writingBlueprint = new Blueprint(architect.box.sizeX(), architect.box.sizeY(), architect.box.sizeZ()); @@ -56,7 +56,7 @@ public class RecursiveBlueprintReader { writingBlueprint = new Template(architect.box.sizeX(), architect.box.sizeY(), architect.box.sizeZ()); } - writingContext = writingBlueprint.getContext(architect.getWorld(), architect.box); + writingContext = writingBlueprint.getContext(architect.getWorldObj(), architect.box); writingContext.readConfiguration = architect.readConfiguration; writingBlueprint.id.name = architect.name; @@ -74,7 +74,7 @@ public class RecursiveBlueprintReader { architect = iArchitect; if (architect.box.isInitialized()) { - blockScanner = new BlockScanner(architect.box, architect.getWorld(), SCANNER_ITERATION); + blockScanner = new BlockScanner(architect.box, architect.getWorldObj(), SCANNER_ITERATION); if (parentBlueprint instanceof Blueprint) { writingBlueprint = new Blueprint(architect.box.sizeX(), architect.box.sizeY(), architect.box.sizeZ()); @@ -82,7 +82,7 @@ public class RecursiveBlueprintReader { writingBlueprint = new Template(architect.box.sizeX(), architect.box.sizeY(), architect.box.sizeZ()); } - writingContext = writingBlueprint.getContext(architect.getWorld(), architect.box); + writingContext = writingBlueprint.getContext(architect.getWorldObj(), architect.box); writingContext.readConfiguration = architect.readConfiguration; writingBlueprint.id.name = architect.name; @@ -99,7 +99,7 @@ public class RecursiveBlueprintReader { } else if (currentSubReader == null && subIndex < architect.subBlueprints.size()) { BlockIndex subBlock = architect.subBlueprints.get(subIndex); - TileEntity subTile = architect.getWorld().getTileEntity(subBlock.x, subBlock.y, + TileEntity subTile = architect.getWorldObj().getTileEntity(subBlock.x, subBlock.y, subBlock.z); if (subTile instanceof TileArchitect) { @@ -116,7 +116,7 @@ public class RecursiveBlueprintReader { } else if (subTile instanceof TileBuilder) { TileBuilder builder = (TileBuilder) subTile; blueprint = ItemBlueprint.loadBlueprint(builder.getStackInSlot(0)); - orientation = ForgeDirection.values()[architect.getWorld().getBlockMetadata(subBlock.x, subBlock.y, + orientation = ForgeDirection.values()[architect.getWorldObj().getBlockMetadata(subBlock.x, subBlock.y, subBlock.z)].getOpposite(); } @@ -143,7 +143,7 @@ public class RecursiveBlueprintReader { currentSubReader.architect.yCoord - architect.getBox().yMin, currentSubReader.architect.zCoord - architect.getBox().zMin, ForgeDirection.values()[ - currentSubReader.architect.getWorld().getBlockMetadata( + currentSubReader.architect.getWorldObj().getBlockMetadata( currentSubReader.architect.xCoord, currentSubReader.architect.yCoord, currentSubReader.architect.zCoord)].getOpposite()); @@ -171,7 +171,7 @@ public class RecursiveBlueprintReader { writingBlueprint.translateToBlueprint(transform); - ForgeDirection o = ForgeDirection.values()[architect.getWorld().getBlockMetadata( + ForgeDirection o = ForgeDirection.values()[architect.getWorldObj().getBlockMetadata( architect.xCoord, architect.yCoord, architect.zCoord)].getOpposite(); writingBlueprint.rotate = architect.readConfiguration.rotate; diff --git a/common/buildcraft/core/robots/boards/BoardRobotBuilder.java b/common/buildcraft/core/robots/boards/BoardRobotBuilder.java old mode 100755 new mode 100644 index a00ac486..272cbf56 --- a/common/buildcraft/core/robots/boards/BoardRobotBuilder.java +++ b/common/buildcraft/core/robots/boards/BoardRobotBuilder.java @@ -53,7 +53,7 @@ public class BoardRobotBuilder extends RedstoneBoardRobot { double minDistance = Double.MAX_VALUE; for (TileConstructionMarker marker : TileConstructionMarker.currentMarkers) { - if (marker.getWorld() == robot.worldObj && marker.needsToBuild()) { + if (marker.getWorldObj() == robot.worldObj && marker.needsToBuild()) { double dx = robot.posX - marker.xCoord; double dy = robot.posY - marker.yCoord; double dz = robot.posZ - marker.zCoord; diff --git a/common/buildcraft/energy/TileEnergyEmitter.java b/common/buildcraft/energy/TileEnergyEmitter.java old mode 100755 new mode 100644 index 70ef5441..c7b738a1 --- a/common/buildcraft/energy/TileEnergyEmitter.java +++ b/common/buildcraft/energy/TileEnergyEmitter.java @@ -191,11 +191,6 @@ public class TileEnergyEmitter extends TileBuildCraft { } } - @Override - public World getWorld() { - return worldObj; - } - @Override public AxisAlignedBB getRenderBoundingBox() { double xMin = xCoord; diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index 8bce5f13..d1914dea 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -29,7 +29,7 @@ import buildcraft.core.TileBuffer; import buildcraft.core.TileBuildCraft; import buildcraft.energy.gui.ContainerEngine; -public abstract class TileEngine extends TileBuildCraft implements IPowerReceptor, IPowerEmitter, +public abstract class TileEngine extends TileBuildCraft implements IPowerEmitter, IPipeConnection, IEnergyHandler { // Index corresponds to metadata public static final ResourceLocation[] BASE_TEXTURES = new ResourceLocation[]{ @@ -80,7 +80,6 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto protected int progressPart = 0; protected boolean lastPower = false; - protected PowerHandler powerHandler; private boolean checkOrientation = false; private TileBuffer[] tileCache; @@ -89,14 +88,11 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto private boolean isPumping = false; // Used for SMP synch public TileEngine() { - powerHandler = new PowerHandler(this, Type.ENGINE); - powerHandler.configurePowerPerdition(1, 100); } @Override public void initialize() { if (!worldObj.isRemote) { - powerHandler.configure(minEnergyReceived() / 10, maxEnergyReceived() / 10, 1, getMaxEnergy() / 10); checkRedstonePower(); } } @@ -457,16 +453,6 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto /* STATE INFORMATION */ public abstract boolean isBurning(); - @Override - public PowerReceiver getPowerReceiver(ForgeDirection side) { - return powerHandler.getPowerReceiver(); - } - - @Override - public void doWork(PowerHandler workProvider) { - - } - public void addEnergy(int addition) { energy += addition; diff --git a/common/buildcraft/energy/TileEngineCreative.java b/common/buildcraft/energy/TileEngineCreative.java index 80626e1c..697da28f 100644 --- a/common/buildcraft/energy/TileEngineCreative.java +++ b/common/buildcraft/energy/TileEngineCreative.java @@ -46,7 +46,7 @@ public class TileEngineCreative extends TileEngine { @Override public boolean onBlockActivated(EntityPlayer player, ForgeDirection side) { - if (!getWorld().isRemote) { + if (!getWorldObj().isRemote) { Item equipped = player.getCurrentEquippedItem() != null ? player.getCurrentEquippedItem().getItem() : null; if (equipped instanceof IToolWrench && ((IToolWrench) equipped).canWrench(player, xCoord, yCoord, zCoord)) {