Update for 1.4
This commit is contained in:
parent
39572b281d
commit
8c0696b73f
34 changed files with 109 additions and 90 deletions
|
@ -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()) {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public class BlockEngine extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected int damageDropped(int i) {
|
||||
public int damageDropped(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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<Integer, HashMap<Integer, DisplayLiquidList>> displayLiquidLists = new HashMap<Integer, HashMap<Integer, DisplayLiquidList>>();
|
||||
|
||||
|
||||
|
||||
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<Integer, DisplayLiquidList>());
|
||||
}
|
||||
|
||||
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue