diff --git a/common/buildcraft/factory/TileRefinery.java b/common/buildcraft/factory/TileRefinery.java index 2f62a192..0b71064e 100644 --- a/common/buildcraft/factory/TileRefinery.java +++ b/common/buildcraft/factory/TileRefinery.java @@ -170,7 +170,6 @@ public class TileRefinery extends TileMachine implements ITankContainer, IPowerR return; } else if (CoreProxy.proxy.isSimulating(worldObj) && updateNetworkTime.markTimeIfDelay(worldObj, 2 * BuildCraftCore.updateFactor)) { - System.out.printf("Server Anim state: %d %f\n", animationStage, animationSpeed); sendNetworkUpdate(); } diff --git a/common/buildcraft/silicon/network/PacketHandlerSilicon.java b/common/buildcraft/silicon/network/PacketHandlerSilicon.java index bf0fe262..df3cea2d 100644 --- a/common/buildcraft/silicon/network/PacketHandlerSilicon.java +++ b/common/buildcraft/silicon/network/PacketHandlerSilicon.java @@ -62,7 +62,7 @@ public class PacketHandlerSilicon implements IPacketHandler { private void onSelectionUpdate(EntityPlayer player, PacketUpdate packet) { - Container container = player.inventoryContainer; + Container container = player.openContainer; if (container instanceof ContainerAssemblyTable) { SelectionMessage message = new SelectionMessage(); diff --git a/common/buildcraft/transport/GuiHandler.java b/common/buildcraft/transport/GuiHandler.java index a3fd8edc..a2185297 100644 --- a/common/buildcraft/transport/GuiHandler.java +++ b/common/buildcraft/transport/GuiHandler.java @@ -31,10 +31,10 @@ public class GuiHandler implements IGuiHandler { switch (ID) { case GuiIds.PIPE_DIAMOND: return new ContainerDiamondPipe(player.inventory, (PipeLogicDiamond)pipe.pipe.logic); - + case GuiIds.GATES: return new ContainerGateInterface(player.inventory, pipe.pipe); - + default: return null; } @@ -57,10 +57,10 @@ public class GuiHandler implements IGuiHandler { switch (ID) { case GuiIds.PIPE_DIAMOND: return new GuiDiamondPipe(player.inventory, pipe); - + case GuiIds.GATES: return new GuiGateInterface(player.inventory, pipe.pipe); - + default: return null; } diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index e4ce6456..4409e2a8 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -252,7 +252,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank if (renderState.isDirty()){ - worldObj.markBlockForRenderUpdate(this.xCoord, this.yCoord, this.zCoord); + worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); renderState.clean(); } @@ -621,7 +621,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank } break; } - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); } @Override diff --git a/common/buildcraft/transport/gui/ContainerGateInterface.java b/common/buildcraft/transport/gui/ContainerGateInterface.java index 46bca1dc..30da2d1f 100644 --- a/common/buildcraft/transport/gui/ContainerGateInterface.java +++ b/common/buildcraft/transport/gui/ContainerGateInterface.java @@ -61,6 +61,8 @@ public class ContainerGateInterface extends BuildCraftContainer { // Do not attempt to create a list of potential actions and triggers on // the client. + System.out.printf("Gate gui %s\n", this); + if (!CoreProxy.proxy.isRenderWorld(pipe.worldObj)) { _potentialActions.addAll(pipe.getActions()); _potentialTriggers.addAll(ActionManager.getPipeTriggers(pipe)); @@ -88,6 +90,7 @@ public class ContainerGateInterface extends BuildCraftContainer { if (!_potentialActions.contains(a)) _potentialActions.add(a); } + System.out.printf("Action list %s %s\n", _potentialActions, _potentialTriggers); } } @@ -108,7 +111,7 @@ public class ContainerGateInterface extends BuildCraftContainer { /** * Clears list of potential actions and refills it according to packet. - * + * * @param packet */ public void updateActions(PacketUpdate packet) { @@ -123,7 +126,7 @@ public class ContainerGateInterface extends BuildCraftContainer { /** * Clears list of potential triggers and refills it according to packet. - * + * * @param packet */ public void updateTriggers(PacketUpdate packet) { @@ -136,7 +139,7 @@ public class ContainerGateInterface extends BuildCraftContainer { /** * Sets the currently selected actions and triggers according to packet. - * + * * @param packet */ public void setSelection(PacketUpdate packet) { @@ -260,7 +263,7 @@ public class ContainerGateInterface extends BuildCraftContainer { /** * Sends the list of potential actions to the client - * + * * @param player */ private void sendActions(EntityPlayer player) { @@ -275,13 +278,14 @@ public class ContainerGateInterface extends BuildCraftContainer { PacketUpdate packet = new PacketUpdate(PacketIds.GATE_ACTIONS, pipe.xCoord, pipe.yCoord, pipe.zCoord, payload); + System.out.printf("Packet to player %s\n", packet); // Send to player CoreProxy.proxy.sendToPlayer(player, packet); } /** * Sends the list of potential triggers to the client - * + * * @param player */ private void sendTriggers(EntityPlayer player) { @@ -302,7 +306,7 @@ public class ContainerGateInterface extends BuildCraftContainer { /** * Sends the current selection on the gate to the client. - * + * * @param player */ public void sendSelection(EntityPlayer player) { diff --git a/common/buildcraft/transport/gui/GuiGateInterface.java b/common/buildcraft/transport/gui/GuiGateInterface.java index 56f1d976..b84364e6 100644 --- a/common/buildcraft/transport/gui/GuiGateInterface.java +++ b/common/buildcraft/transport/gui/GuiGateInterface.java @@ -296,6 +296,7 @@ public class GuiGateInterface extends GuiAdvancedInterface { @Override protected void mouseClicked(int i, int j, int k) { + System.out.printf("Mouse click %d %d %d\n", i,j,k); super.mouseClicked(i, j, k); int cornerX = (width - xSize) / 2; diff --git a/common/buildcraft/transport/network/PacketHandlerTransport.java b/common/buildcraft/transport/network/PacketHandlerTransport.java index 2c2d2fe3..e5ae430c 100644 --- a/common/buildcraft/transport/network/PacketHandlerTransport.java +++ b/common/buildcraft/transport/network/PacketHandlerTransport.java @@ -107,7 +107,7 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateActions(EntityPlayer player, PacketUpdate packet) { - Container container = player.inventoryContainer; + Container container = player.openContainer; if (!(container instanceof ContainerGateInterface)) return; @@ -121,7 +121,7 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateTriggers(EntityPlayer player, PacketUpdate packet) { - Container container = player.inventoryContainer; + Container container = player.openContainer; if (!(container instanceof ContainerGateInterface)) return; @@ -135,7 +135,7 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateSelection(EntityPlayer player, PacketUpdate packet) { - Container container = player.inventoryContainer; + Container container = player.openContainer; if (!(container instanceof ContainerGateInterface)) return; @@ -248,10 +248,10 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateSelectionChange(EntityPlayer playerEntity, PacketUpdate packet) { - if (!(playerEntity.inventoryContainer instanceof ContainerGateInterface)) + if (!(playerEntity.openContainer instanceof ContainerGateInterface)) return; - ((ContainerGateInterface) playerEntity.inventoryContainer).handleSelectionChange(packet); + ((ContainerGateInterface) playerEntity.openContainer).handleSelectionChange(packet); } /** @@ -261,10 +261,10 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateSelectionRequest(EntityPlayer playerEntity, PacketCoordinates packet) { - if (!(playerEntity.inventoryContainer instanceof ContainerGateInterface)) + if (!(playerEntity.openContainer instanceof ContainerGateInterface)) return; - ((ContainerGateInterface) playerEntity.inventoryContainer).sendSelection(playerEntity); + ((ContainerGateInterface) playerEntity.openContainer).sendSelection(playerEntity); } /** @@ -274,10 +274,11 @@ public class PacketHandlerTransport implements IPacketHandler { * @param packet */ private void onGateInitRequest(EntityPlayer playerEntity, PacketCoordinates packet) { - if (!(playerEntity.inventoryContainer instanceof ContainerGateInterface)) + System.out.printf("gate init %s\n",playerEntity.openContainer); + if (!(playerEntity.openContainer instanceof ContainerGateInterface)) return; - ((ContainerGateInterface) playerEntity.inventoryContainer).handleInitRequest(playerEntity); + ((ContainerGateInterface) playerEntity.openContainer).handleInitRequest(playerEntity); } /**