diff --git a/common/buildcraft/builders/gui/ContainerFiller.java b/common/buildcraft/builders/gui/ContainerFiller.java index c094bd26..0b59e953 100644 --- a/common/buildcraft/builders/gui/ContainerFiller.java +++ b/common/buildcraft/builders/gui/ContainerFiller.java @@ -1,8 +1,8 @@ -/** +/** * Copyright (c) SpaceToad, 2011 * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ @@ -53,9 +53,9 @@ public class ContainerFiller extends BuildCraftContainer { public boolean canInteractWith(EntityPlayer entityplayer) { return fillerInventory.isUseableByPlayer(entityplayer); } - + @Override - public ItemStack transferStackInSlot(int i) { + public ItemStack func_82846_b(EntityPlayer pl, int i) { ItemStack itemstack = null; Slot slot = (Slot) inventorySlots.get(i); if (slot != null && slot.getHasStack()) { diff --git a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java index ed50312e..f59af4e5 100644 --- a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java @@ -80,7 +80,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft { } @Override - protected void drawGuiContainerForegroundLayer() { + protected void drawGuiContainerForegroundLayer(int par1, int par2) { // fontRenderer.drawString(library.owner + "'s Library", 6, 6, // 0x404040); String title = StringUtil.localize("tile.libraryBlock"); @@ -128,7 +128,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft { drawTexturedModalRect(j + 128 + 22 - inP, k + 61, 176 + 22 - inP, 16, inP, 16); drawTexturedModalRect(j + 128, k + 78, 176, 0, outP, 16); } - + @Override public void updateScreen(){ if (library.locked) { @@ -137,10 +137,10 @@ public class GuiBlueprintLibrary extends GuiBuildCraft { lockButton.displayString = StringUtil.localize("gui.lock"); } } - + @Override protected void actionPerformed(GuiButton button) { - PacketLibraryAction packet = new PacketLibraryAction(PacketIds.LIBRARY_ACTION, + PacketLibraryAction packet = new PacketLibraryAction(PacketIds.LIBRARY_ACTION, library.xCoord, library.yCoord, library.zCoord); if (button == nextPageButton) { packet.actionId = TileBlueprintLibrary.COMMAND_NEXT; @@ -171,7 +171,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft { if (ySlot < library.currentNames.length){ PacketPayload payload = new PacketPayload(); payload.intPayload = new int[]{ySlot}; - PacketLibraryAction packet = new PacketLibraryAction(PacketIds.LIBRARY_SELECT, + PacketLibraryAction packet = new PacketLibraryAction(PacketIds.LIBRARY_SELECT, library.xCoord, library.yCoord, library.zCoord); packet.actionId = ySlot; CoreProxy.proxy.sendToServer(packet.getPacket()); diff --git a/common/buildcraft/builders/gui/GuiBuilder.java b/common/buildcraft/builders/gui/GuiBuilder.java index c78abcf1..031fc837 100644 --- a/common/buildcraft/builders/gui/GuiBuilder.java +++ b/common/buildcraft/builders/gui/GuiBuilder.java @@ -41,8 +41,8 @@ public class GuiBuilder extends GuiAdvancedInterface { } @Override - protected void drawGuiContainerForegroundLayer() { - super.drawGuiContainerForegroundLayer(); + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + super.drawGuiContainerForegroundLayer(par1, par2); String title = StringUtil.localize("tile.builderBlock"); fontRenderer.drawString(title, getCenteredOffset(title), 12, 0x404040); diff --git a/common/buildcraft/builders/gui/GuiFiller.java b/common/buildcraft/builders/gui/GuiFiller.java index e7ca838f..5e1d6847 100644 --- a/common/buildcraft/builders/gui/GuiFiller.java +++ b/common/buildcraft/builders/gui/GuiFiller.java @@ -32,7 +32,7 @@ public class GuiFiller extends GuiBuildCraft { } @Override - protected void drawGuiContainerForegroundLayer() { + protected void drawGuiContainerForegroundLayer(int par1, int par2) { String title = StringUtil.localize("tile.fillerBlock"); fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRenderer.drawString(StringUtil.localize("gui.filling.resources"), 8, 74, 0x404040); diff --git a/common/buildcraft/builders/gui/GuiTemplate.java b/common/buildcraft/builders/gui/GuiTemplate.java index f6639eb3..bab6e256 100644 --- a/common/buildcraft/builders/gui/GuiTemplate.java +++ b/common/buildcraft/builders/gui/GuiTemplate.java @@ -40,7 +40,7 @@ public class GuiTemplate extends GuiBuildCraft { } @Override - protected void drawGuiContainerForegroundLayer() { + protected void drawGuiContainerForegroundLayer(int par1, int par2) { String title = StringUtil.localize("tile.architectBlock"); fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 152, 0x404040); diff --git a/common/buildcraft/builders/network/PacketHandlerBuilders.java b/common/buildcraft/builders/network/PacketHandlerBuilders.java index d249c9cf..4ed28c3a 100644 --- a/common/buildcraft/builders/network/PacketHandlerBuilders.java +++ b/common/buildcraft/builders/network/PacketHandlerBuilders.java @@ -4,7 +4,7 @@ import java.io.ByteArrayInputStream; import java.io.DataInputStream; import net.minecraft.src.EntityPlayer; -import net.minecraft.src.NetworkManager; +import net.minecraft.src.INetworkManager; import net.minecraft.src.Packet250CustomPayload; import net.minecraft.src.TileEntity; import buildcraft.builders.TileArchitect; @@ -17,7 +17,7 @@ import cpw.mods.fml.common.network.Player; public class PacketHandlerBuilders implements IPacketHandler { @Override - public void onPacketData(NetworkManager manager, Packet250CustomPayload packet, Player player) { + public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet.data)); try { diff --git a/common/buildcraft/core/gui/BuildCraftContainer.java b/common/buildcraft/core/gui/BuildCraftContainer.java index 82ceccfa..369adeaa 100644 --- a/common/buildcraft/core/gui/BuildCraftContainer.java +++ b/common/buildcraft/core/gui/BuildCraftContainer.java @@ -10,6 +10,7 @@ package buildcraft.core.gui; import net.minecraft.src.Container; +import net.minecraft.src.EntityPlayer; import net.minecraft.src.ItemStack; import net.minecraft.src.Slot; @@ -22,7 +23,7 @@ public abstract class BuildCraftContainer extends Container { } @Override - public ItemStack transferStackInSlot(int i) { + public ItemStack func_82846_b(EntityPlayer pl, int i) { ItemStack itemstack = null; Slot slot = (Slot) inventorySlots.get(i); if (slot != null && slot.getHasStack()) { diff --git a/common/buildcraft/core/gui/GuiBuildCraft.java b/common/buildcraft/core/gui/GuiBuildCraft.java index a41cf56d..3241464d 100644 --- a/common/buildcraft/core/gui/GuiBuildCraft.java +++ b/common/buildcraft/core/gui/GuiBuildCraft.java @@ -33,7 +33,7 @@ public abstract class GuiBuildCraft extends GuiContainer { /** * Inserts a ledger into the next-to-last position. - * + * * @param ledger */ public void insert(Ledger ledger) { @@ -237,7 +237,7 @@ public abstract class GuiBuildCraft extends GuiContainer { protected void initLedgers(IInventory inventory) {} @Override - protected void drawGuiContainerForegroundLayer() { + protected void drawGuiContainerForegroundLayer(int par1, int par2) { ledgerManager.drawLedgers(mouseX, mouseY); } diff --git a/common/buildcraft/core/network/PacketHandler.java b/common/buildcraft/core/network/PacketHandler.java index d0f5690b..f59d30e8 100644 --- a/common/buildcraft/core/network/PacketHandler.java +++ b/common/buildcraft/core/network/PacketHandler.java @@ -4,7 +4,7 @@ import java.io.ByteArrayInputStream; import java.io.DataInputStream; import net.minecraft.src.EntityPlayer; -import net.minecraft.src.NetworkManager; +import net.minecraft.src.INetworkManager; import net.minecraft.src.Packet250CustomPayload; import net.minecraft.src.TileEntity; import net.minecraft.src.World; @@ -29,7 +29,7 @@ public class PacketHandler implements IPacketHandler { } @Override - public void onPacketData(NetworkManager manager, Packet250CustomPayload packet, Player player) { + public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet.data)); try { diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index f2b43c78..4e98e5af 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -20,6 +20,7 @@ import buildcraft.core.ItemBlockBuildCraft; import buildcraft.core.network.BuildCraftPacket; import net.minecraft.src.Block; +import net.minecraft.src.ChunkCoordinates; import net.minecraft.src.CreativeTabs; import net.minecraft.src.Entity; import net.minecraft.src.EntityItem; @@ -144,10 +145,15 @@ public class CoreProxy { } @Override - public boolean canCommandSenderUseCommand(String var1) { + public boolean canCommandSenderUseCommand(int var1, String var2) { return false; } + @Override + public ChunkCoordinates func_82114_b() { + return null; + } + }; } diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index 7f8f1b35..8947535a 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -33,6 +33,7 @@ import buildcraft.transport.render.TileEntityPickupFX; import net.minecraft.client.Minecraft; import net.minecraft.src.Block; +import net.minecraft.src.ChunkCoordinates; import net.minecraft.src.CreativeTabs; import net.minecraft.src.Entity; import net.minecraft.src.EntityItem; @@ -52,7 +53,7 @@ public class CoreProxyClient extends CoreProxy { public Object getClient() { return FMLClientHandler.instance().getClient(); } - + public World getClientWorld() { return FMLClientHandler.instance().getClient().theWorld; } @@ -70,10 +71,10 @@ public class CoreProxyClient extends CoreProxy { public void feedSubBlocks(int id, CreativeTabs tab, List itemList) { if(Block.blocksList[id] == null) return; - + Block.blocksList[id].getSubBlocks(id, tab, itemList); } - + /* LOCALIZATION */ @Override public String getCurrentLanguage() { @@ -145,7 +146,14 @@ public class CoreProxyClient extends CoreProxy { private EntityPlayer createNewPlayer(World world) { return new EntityPlayer(world) { @Override public void sendChatToPlayer(String var1) {} - @Override public boolean canCommandSenderUseCommand(String var1) { return false; } + @Override + public boolean canCommandSenderUseCommand(int var1, String var2) { + return false; + } + @Override + public ChunkCoordinates func_82114_b() { + return null; + } }; } diff --git a/common/buildcraft/energy/BlockEngine.java b/common/buildcraft/energy/BlockEngine.java index 30a26fc6..9360266c 100644 --- a/common/buildcraft/energy/BlockEngine.java +++ b/common/buildcraft/energy/BlockEngine.java @@ -115,7 +115,7 @@ public class BlockEngine extends BlockContainer { } @Override - protected int damageDropped(int i) { + public int damageDropped(int i) { return i; } diff --git a/common/buildcraft/energy/Engine.java b/common/buildcraft/energy/Engine.java index 3f032bdd..56a80d98 100644 --- a/common/buildcraft/energy/Engine.java +++ b/common/buildcraft/energy/Engine.java @@ -93,7 +93,7 @@ public abstract class Engine { energy += addition; if (getEnergyStage() == EnergyStage.Explosion) { - tile.worldObj.createExplosion(null, tile.xCoord, tile.yCoord, tile.zCoord, explosionRange()); + tile.worldObj.createExplosion(null, tile.xCoord, tile.yCoord, tile.zCoord, explosionRange(), true); } if (energy > maxEnergy) { diff --git a/common/buildcraft/energy/gui/GuiCombustionEngine.java b/common/buildcraft/energy/gui/GuiCombustionEngine.java index 7784527e..58a557ca 100644 --- a/common/buildcraft/energy/gui/GuiCombustionEngine.java +++ b/common/buildcraft/energy/gui/GuiCombustionEngine.java @@ -29,8 +29,8 @@ public class GuiCombustionEngine extends GuiEngine { } @Override - protected void drawGuiContainerForegroundLayer() { - super.drawGuiContainerForegroundLayer(); + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + super.drawGuiContainerForegroundLayer(par1, par2); String title = StringUtil.localize("tile.engineIron"); fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); @@ -65,7 +65,7 @@ public class GuiCombustionEngine extends GuiEngine { ForgeHooksClient.bindTexture(Item.itemsList[liquidId].getTextureFile(), 0); liquidImgIndex = Item.itemsList[liquidId].getIconFromDamage(0); } else { - return; + return; } int imgLine = liquidImgIndex / 16; diff --git a/common/buildcraft/energy/gui/GuiSteamEngine.java b/common/buildcraft/energy/gui/GuiSteamEngine.java index b96e80f4..24aa8d3a 100644 --- a/common/buildcraft/energy/gui/GuiSteamEngine.java +++ b/common/buildcraft/energy/gui/GuiSteamEngine.java @@ -24,8 +24,8 @@ public class GuiSteamEngine extends GuiEngine { } @Override - protected void drawGuiContainerForegroundLayer() { - super.drawGuiContainerForegroundLayer(); + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + super.drawGuiContainerForegroundLayer(par1, par2); String title = StringUtil.localize("tile.engineStone"); fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); diff --git a/common/buildcraft/factory/TileAutoWorkbench.java b/common/buildcraft/factory/TileAutoWorkbench.java index dab8eb2a..20cbb8ef 100644 --- a/common/buildcraft/factory/TileAutoWorkbench.java +++ b/common/buildcraft/factory/TileAutoWorkbench.java @@ -1,8 +1,8 @@ -/** +/** * Copyright (c) SpaceToad, 2011 * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ @@ -139,7 +139,7 @@ public class TileAutoWorkbench extends TileEntity implements ISpecialInventory { craftMatrix.setInventorySlotContents(i, stack); } - ItemStack recipe = CraftingManager.getInstance().findMatchingRecipe(craftMatrix); + ItemStack recipe = CraftingManager.getInstance().func_82787_a(craftMatrix, worldObj); return recipe; } @@ -179,7 +179,7 @@ public class TileAutoWorkbench extends TileEntity implements ISpecialInventory { craftMatrix.setInventorySlotContents(i, stack); } - ItemStack resultStack = CraftingManager.getInstance().findMatchingRecipe(craftMatrix); + ItemStack resultStack = CraftingManager.getInstance().func_82787_a(craftMatrix, worldObj); if (resultStack == null || !doRemove) { resetPointers(pointerList); @@ -275,7 +275,7 @@ public class TileAutoWorkbench extends TileEntity implements ISpecialInventory { /* ISPECIALINVENTORY */ @Override - public int addItem(ItemStack stack, boolean doAdd, Orientations from) { + public int addItem(ItemStack stack, boolean doAdd, Orientations from) { return new TransactorRoundRobin(this).add(stack, from, doAdd).stackSize; } diff --git a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java index 0d40f9b5..4991593d 100644 --- a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java +++ b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java @@ -1,8 +1,8 @@ -/** +/** * Copyright (c) SpaceToad, 2011 * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ @@ -46,7 +46,7 @@ public class ContainerAutoWorkbench extends BuildCraftContainer { } @Override - public void onPickupFromSlot(ItemStack itemstack) { + public void func_82870_a(EntityPlayer pl, ItemStack itemstack) { CoreProxy.proxy.onCraftingPickup(thePlayer.worldObj, thePlayer, itemstack); if (itemstack.itemID == Block.workbench.blockID) { thePlayer.addStat(AchievementList.buildWorkBench, 1); @@ -112,7 +112,7 @@ public class ContainerAutoWorkbench extends BuildCraftContainer { } @Override - public ItemStack slotClick(int i, int j, boolean flag, EntityPlayer entityplayer) { + public ItemStack slotClick(int i, int j, int flag, EntityPlayer entityplayer) { // This call ensures that the ouptut is correctly computed craftResult.setInventorySlotContents(0, tile.findRecipe()); @@ -128,7 +128,7 @@ public class ContainerAutoWorkbench extends BuildCraftContainer { } @Override - public ItemStack transferStackInSlot(int i) { + public ItemStack func_82846_b(EntityPlayer pl, int i) { ItemStack itemstack = null; Slot slot = (Slot) inventorySlots.get(i); if (slot != null && slot.getHasStack()) { @@ -155,7 +155,7 @@ public class ContainerAutoWorkbench extends BuildCraftContainer { slot.onSlotChanged(); } if (itemstack1.stackSize != itemstack.stackSize) { - slot.onPickupFromSlot(itemstack1); + slot.func_82870_a(pl, itemstack1); } else { return null; } diff --git a/common/buildcraft/factory/gui/GuiAutoCrafting.java b/common/buildcraft/factory/gui/GuiAutoCrafting.java index 0f133052..72a4a870 100644 --- a/common/buildcraft/factory/gui/GuiAutoCrafting.java +++ b/common/buildcraft/factory/gui/GuiAutoCrafting.java @@ -32,7 +32,7 @@ public class GuiAutoCrafting extends GuiBuildCraft { } @Override - protected void drawGuiContainerForegroundLayer() { + protected void drawGuiContainerForegroundLayer(int par1, int par2) { String title = StringUtil.localize("tile.autoWorkbenchBlock"); fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); diff --git a/common/buildcraft/factory/gui/GuiHopper.java b/common/buildcraft/factory/gui/GuiHopper.java index 086cb0b2..aab99283 100644 --- a/common/buildcraft/factory/gui/GuiHopper.java +++ b/common/buildcraft/factory/gui/GuiHopper.java @@ -26,8 +26,8 @@ public class GuiHopper extends GuiContainer { } @Override - protected void drawGuiContainerForegroundLayer() { - super.drawGuiContainerForegroundLayer(); + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + super.drawGuiContainerForegroundLayer(par1, par2); } } diff --git a/common/buildcraft/factory/gui/GuiRefinery.java b/common/buildcraft/factory/gui/GuiRefinery.java index 300d7648..d037e095 100644 --- a/common/buildcraft/factory/gui/GuiRefinery.java +++ b/common/buildcraft/factory/gui/GuiRefinery.java @@ -42,7 +42,7 @@ public class GuiRefinery extends GuiAdvancedInterface { } @Override - protected void drawGuiContainerForegroundLayer() { + protected void drawGuiContainerForegroundLayer(int par1, int par2) { String title = StringUtil.localize("tile.refineryBlock"); fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRenderer.drawString("->", 63, 59, 0x404040); diff --git a/common/buildcraft/factory/network/PacketHandlerFactory.java b/common/buildcraft/factory/network/PacketHandlerFactory.java index 5a03fab5..4e0ca717 100644 --- a/common/buildcraft/factory/network/PacketHandlerFactory.java +++ b/common/buildcraft/factory/network/PacketHandlerFactory.java @@ -9,7 +9,7 @@ import buildcraft.factory.TileRefinery; import cpw.mods.fml.common.network.IPacketHandler; import cpw.mods.fml.common.network.Player; import net.minecraft.src.EntityPlayer; -import net.minecraft.src.NetworkManager; +import net.minecraft.src.INetworkManager; import net.minecraft.src.Packet250CustomPayload; import net.minecraft.src.TileEntity; import net.minecraft.src.World; @@ -17,7 +17,7 @@ import net.minecraft.src.World; public class PacketHandlerFactory implements IPacketHandler { @Override - public void onPacketData(NetworkManager manager, Packet250CustomPayload packet, Player player) { + public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet.data)); try { diff --git a/common/buildcraft/silicon/TileAssemblyAdvancedWorkbench.java b/common/buildcraft/silicon/TileAssemblyAdvancedWorkbench.java index 0bf6b759..5a20ab26 100644 --- a/common/buildcraft/silicon/TileAssemblyAdvancedWorkbench.java +++ b/common/buildcraft/silicon/TileAssemblyAdvancedWorkbench.java @@ -259,7 +259,7 @@ public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInvent } private void updateCraftingResults() { - outputSlot = CraftingManager.getInstance().findMatchingRecipe(new InventoryCrafting( + outputSlot = CraftingManager.getInstance().func_82787_a(new InventoryCrafting( new Container() { @Override public boolean canInteractWith(EntityPlayer var1) { @@ -271,7 +271,7 @@ public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInvent public ItemStack getStackInSlot(int par1) { return craftingSlots.getStackInSlot(par1); } - }); + },worldObj); onInventoryChanged(); } diff --git a/common/buildcraft/silicon/gui/GuiAssemblyAdvancedWorkbench.java b/common/buildcraft/silicon/gui/GuiAssemblyAdvancedWorkbench.java index e261df2e..ccbdcb1f 100644 --- a/common/buildcraft/silicon/gui/GuiAssemblyAdvancedWorkbench.java +++ b/common/buildcraft/silicon/gui/GuiAssemblyAdvancedWorkbench.java @@ -104,8 +104,8 @@ public class GuiAssemblyAdvancedWorkbench extends GuiAdvancedInterface { @Override - protected void drawGuiContainerForegroundLayer() { - super.drawGuiContainerForegroundLayer(); + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + super.drawGuiContainerForegroundLayer(par1, par2); String title = StringUtil.localize("tile.assemblyWorkbenchBlock"); fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 97, 0x404040); diff --git a/common/buildcraft/silicon/gui/GuiAssemblyTable.java b/common/buildcraft/silicon/gui/GuiAssemblyTable.java index bce4213d..8d1a5ee9 100644 --- a/common/buildcraft/silicon/gui/GuiAssemblyTable.java +++ b/common/buildcraft/silicon/gui/GuiAssemblyTable.java @@ -126,8 +126,8 @@ public class GuiAssemblyTable extends GuiAdvancedInterface { } @Override - protected void drawGuiContainerForegroundLayer() { - super.drawGuiContainerForegroundLayer(); + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + super.drawGuiContainerForegroundLayer(par1, par2); String title = StringUtil.localize("tile.assemblyTableBlock"); fontRenderer.drawString(title, getCenteredOffset(title), 15, 0x404040); fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 97, 0x404040); diff --git a/common/buildcraft/silicon/network/PacketHandlerSilicon.java b/common/buildcraft/silicon/network/PacketHandlerSilicon.java index 52285077..38a5e518 100644 --- a/common/buildcraft/silicon/network/PacketHandlerSilicon.java +++ b/common/buildcraft/silicon/network/PacketHandlerSilicon.java @@ -17,7 +17,7 @@ import buildcraft.silicon.gui.ContainerAssemblyTable; import net.minecraft.src.Container; import net.minecraft.src.EntityPlayer; -import net.minecraft.src.NetworkManager; +import net.minecraft.src.INetworkManager; import net.minecraft.src.Packet250CustomPayload; import net.minecraft.src.TileEntity; import net.minecraft.src.World; @@ -25,7 +25,7 @@ import net.minecraft.src.World; public class PacketHandlerSilicon implements IPacketHandler { @Override - public void onPacketData(NetworkManager manager, Packet250CustomPayload packet, Player player) { + public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet.data)); try { diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index e62efb70..114d3063 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -303,13 +303,13 @@ public class BlockGenericPipe extends BlockContainer { // Returns 0 to be safe - the id does not depend on the meta return 0; } - + @SideOnly(Side.CLIENT) @Override public int idPicked(World world, int i, int j, int k) { Pipe pipe = getPipe(world, i, j, k); - + if (pipe == null) return 0; else @@ -505,7 +505,7 @@ public class BlockGenericPipe extends BlockContainer { if (isValid(pipe)) pipe.onEntityCollidedWithBlock(entity); } - + @Override public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) { @@ -533,7 +533,7 @@ public class BlockGenericPipe extends BlockContainer { } @Override - public boolean isIndirectlyPoweringTo(World world, int i, int j, int k, int l) { + public boolean isIndirectlyPoweringTo(IBlockAccess world, int i, int j, int k, int l) { Pipe pipe = getPipe(world, i, j, k); if (isValid(pipe)) diff --git a/common/buildcraft/transport/ItemPipe.java b/common/buildcraft/transport/ItemPipe.java index d48ac1fe..2c0454d7 100644 --- a/common/buildcraft/transport/ItemPipe.java +++ b/common/buildcraft/transport/ItemPipe.java @@ -52,7 +52,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe { if (itemstack.stackSize == 0) return false; - if (entityplayer.canPlayerEdit(i, j, k) + if (entityplayer.func_82246_f(i, j, k) && world.canPlaceEntityOnSide(blockID, i, j, k, false, side, entityplayer)) { Pipe pipe = BlockGenericPipe.createPipe(shiftedIndex); diff --git a/common/buildcraft/transport/PipeTransportItems.java b/common/buildcraft/transport/PipeTransportItems.java index 9e83a982..7c63ae99 100644 --- a/common/buildcraft/transport/PipeTransportItems.java +++ b/common/buildcraft/transport/PipeTransportItems.java @@ -108,7 +108,7 @@ public class PipeTransportItems extends PipeTransport { groupEntities(); if (travelingEntities.size() > BuildCraftTransport.maxItemsInPipes) - worldObj.createExplosion(null, xCoord, yCoord, zCoord, 1); + worldObj.createExplosion(null, xCoord, yCoord, zCoord, 1, false); } } diff --git a/common/buildcraft/transport/PipeTransportPower.java b/common/buildcraft/transport/PipeTransportPower.java index 33528e02..41337c94 100644 --- a/common/buildcraft/transport/PipeTransportPower.java +++ b/common/buildcraft/transport/PipeTransportPower.java @@ -179,7 +179,7 @@ public class PipeTransportPower extends PipeTransport { internalNextPower[from.ordinal()] += val; if (internalNextPower[from.ordinal()] >= 1000) - worldObj.createExplosion(null, xCoord, yCoord, zCoord, 2); + worldObj.createExplosion(null, xCoord, yCoord, zCoord, 2, true); } } diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 95a9f35e..128ba1ca 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -14,6 +14,9 @@ import java.io.DataOutputStream; import java.io.IOException; import java.util.LinkedList; +import cpw.mods.fml.common.Side; +import cpw.mods.fml.common.asm.SideOnly; + import buildcraft.BuildCraftCore; import buildcraft.BuildCraftTransport; import buildcraft.api.core.Orientations; @@ -622,7 +625,8 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank } @Override - public double getRenderDistance() { - return 24; + @SideOnly(Side.CLIENT) + public double func_82115_m() { + return 24 * 24; } } diff --git a/common/buildcraft/transport/gui/GuiDiamondPipe.java b/common/buildcraft/transport/gui/GuiDiamondPipe.java index 3c8e989e..69f7c49f 100644 --- a/common/buildcraft/transport/gui/GuiDiamondPipe.java +++ b/common/buildcraft/transport/gui/GuiDiamondPipe.java @@ -45,7 +45,7 @@ public class GuiDiamondPipe extends GuiAdvancedInterface { } @Override - protected void drawGuiContainerForegroundLayer() { + protected void drawGuiContainerForegroundLayer(int par1, int par2) { fontRenderer.drawString(filterInventory.getInvName(), getCenteredOffset(filterInventory.getInvName()), 6, 0x404040); fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 97, 0x404040); diff --git a/common/buildcraft/transport/gui/GuiGateInterface.java b/common/buildcraft/transport/gui/GuiGateInterface.java index 68054ba3..56f1d976 100644 --- a/common/buildcraft/transport/gui/GuiGateInterface.java +++ b/common/buildcraft/transport/gui/GuiGateInterface.java @@ -237,7 +237,7 @@ public class GuiGateInterface extends GuiAdvancedInterface { } @Override - protected void drawGuiContainerForegroundLayer() { + protected void drawGuiContainerForegroundLayer(int par1, int par2) { String name = _container.getGateName(); fontRenderer.drawString(name, getCenteredOffset(name), 15, 0x404040); diff --git a/common/buildcraft/transport/network/PacketHandlerTransport.java b/common/buildcraft/transport/network/PacketHandlerTransport.java index b1dba611..2ba9875e 100644 --- a/common/buildcraft/transport/network/PacketHandlerTransport.java +++ b/common/buildcraft/transport/network/PacketHandlerTransport.java @@ -6,7 +6,7 @@ import java.io.DataInputStream; import net.minecraft.src.Container; import net.minecraft.src.EntityPlayer; import net.minecraft.src.EntityPlayerMP; -import net.minecraft.src.NetworkManager; +import net.minecraft.src.INetworkManager; import net.minecraft.src.Packet250CustomPayload; import net.minecraft.src.TileEntity; import net.minecraft.src.World; @@ -27,7 +27,7 @@ import cpw.mods.fml.common.network.Player; public class PacketHandlerTransport implements IPacketHandler { @Override - public void onPacketData(NetworkManager manager, Packet250CustomPayload packet2, Player player) { + public void onPacketData(INetworkManager manager, Packet250CustomPayload packet2, Player player) { DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet2.data)); try { //NetClientHandler net = (NetClientHandler) network.getNetHandler(); diff --git a/common/buildcraft/transport/render/RenderPipe.java b/common/buildcraft/transport/render/RenderPipe.java index a9b0a999..3fbf3e36 100644 --- a/common/buildcraft/transport/render/RenderPipe.java +++ b/common/buildcraft/transport/render/RenderPipe.java @@ -52,7 +52,7 @@ public class RenderPipe extends TileEntitySpecialRenderer { final static private int maxPower = 1000; final static private int displayLiquidStages = 40; - + final static private int numItemsToRender = 10; private final static EntityItem dummyEntityItem = new EntityItem(null); @@ -66,7 +66,7 @@ public class RenderPipe extends TileEntitySpecialRenderer { } private HashMap> displayLiquidLists = new HashMap>(); - + private final int[] angleY = { 0, 0, 270, 90, 0, 180 }; private final int[] angleZ = { 90, 270, 0, 0, 0, 0 }; @@ -91,7 +91,7 @@ public class RenderPipe extends TileEntitySpecialRenderer { } else { displayLiquidLists.put(liquidId, new HashMap()); } - + DisplayLiquidList d = new DisplayLiquidList(); displayLiquidLists.get(liquidId).put(meta, d); @@ -101,7 +101,7 @@ public class RenderPipe extends TileEntitySpecialRenderer { block.texture = Block.blocksList[liquidId].blockIndexInTexture; else block.texture = Item.itemsList[liquidId].getIconFromDamage(meta); - + float size = Utils.pipeMaxPos - Utils.pipeMinPos; // render size @@ -239,15 +239,15 @@ public class RenderPipe extends TileEntitySpecialRenderer { if (pipe.pipe == null) return; - if (pipe.pipe.transport instanceof PipeTransportItems) + if (pipe.pipe.transport instanceof PipeTransportItems) renderSolids(pipe.pipe, x, y, z); - else if (pipe.pipe.transport instanceof PipeTransportLiquids) - renderLiquids(pipe.pipe, x, y, z); - - else if (pipe.pipe.transport instanceof PipeTransportPower) + else if (pipe.pipe.transport instanceof PipeTransportLiquids) + renderLiquids(pipe.pipe, x, y, z); + + else if (pipe.pipe.transport instanceof PipeTransportPower) renderPower(pipe.pipe, x, y, z); - + } private void renderPower(Pipe pipe, double x, double y, double z) { @@ -304,7 +304,7 @@ public class RenderPipe extends TileEntitySpecialRenderer { LiquidStack liquid = liq.renderCache[i]; //int amount = liquid != null ? liquid.amount : 0; //int amount = liquid != null ? liq.renderAmmount[i] : 0; - + if ( liquid != null && liquid.amount > 0) { DisplayLiquidList d = getListFromBuffer(liquid, pipe.worldObj); @@ -346,7 +346,7 @@ public class RenderPipe extends TileEntitySpecialRenderer { // LiquidStack liquid = tank.getLiquid(); LiquidStack liquid = liq.renderCache[Orientations.Unknown.ordinal()]; - //int amount = liquid != null ? liquid.amount : 0; + //int amount = liquid != null ? liquid.amount : 0; //int amount = liquid != null ? liq.renderAmmount[Orientations.Unknown.ordinal()] : 0; if (liquid != null && liquid.amount > 0) { //DisplayLiquidList d = getListFromBuffer(liq.getTanks()[Orientations.Unknown.ordinal()].getLiquid(), pipe.worldObj); @@ -386,18 +386,18 @@ public class RenderPipe extends TileEntitySpecialRenderer { private void renderSolids(Pipe pipe, double x, double y, double z) { GL11.glPushMatrix(); GL11.glDisable(2896 /* GL_LIGHTING */); - + float light = pipe.worldObj.getLightBrightness(pipe.xCoord, pipe.yCoord, pipe.zCoord); int count = 0; for (EntityData data : ((PipeTransportItems) pipe.transport).travelingEntities.values()) { if(count >= numItemsToRender) break; - + doRenderItem(data.item, x + data.item.getPosition().x - pipe.xCoord, y + data.item.getPosition().y - pipe.yCoord, z + data.item.getPosition().z - pipe.zCoord, light); count++; - } + } GL11.glEnable(2896 /* GL_LIGHTING */); GL11.glPopMatrix(); @@ -449,7 +449,7 @@ public class RenderPipe extends TileEntitySpecialRenderer { GL11.glPopMatrix(); } - } else if (itemstack.itemID < Block.blocksList.length && Block.blocksList[itemstack.itemID] != null + } else if (itemstack.itemID < Block.blocksList.length && Block.blocksList[itemstack.itemID] != null && Block.blocksList[itemstack.itemID].blockID != 0) { //&& RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType())) { GL11.glTranslatef(0, 0.25F, 0); // BC SPECIFIC @@ -488,7 +488,7 @@ public class RenderPipe extends TileEntitySpecialRenderer { float scale = 1.0F; if (true) { - int itemColour = Item.itemsList[itemstack.itemID].getColorFromDamage(itemstack.getItemDamage(), i); + int itemColour = Item.itemsList[itemstack.itemID].func_82790_a(itemstack, i); float var18 = (itemColour >> 16 & 255) / 255.0F; float var19 = (itemColour >> 8 & 255) / 255.0F; float var20 = (itemColour & 255) / 255.0F;