Fixed Bug: #0737 - Searching and crafting
This commit is contained in:
@@ -34,6 +34,7 @@ import appeng.core.AELog;
|
|||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
import appeng.core.sync.packets.PacketMEInventoryUpdate;
|
import appeng.core.sync.packets.PacketMEInventoryUpdate;
|
||||||
|
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||||
import appeng.helpers.WirelessTerminalGuiObject;
|
import appeng.helpers.WirelessTerminalGuiObject;
|
||||||
import appeng.parts.reporting.PartCraftingTerminal;
|
import appeng.parts.reporting.PartCraftingTerminal;
|
||||||
import appeng.parts.reporting.PartPatternTerminal;
|
import appeng.parts.reporting.PartPatternTerminal;
|
||||||
@@ -326,6 +327,15 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
|||||||
autoStart = false;
|
autoStart = false;
|
||||||
if ( g != null && OriginalGui != null && openContext != null )
|
if ( g != null && OriginalGui != null && openContext != null )
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
NetworkHandler.instance.sendTo( new PacketSwitchGuis( OriginalGui ), (EntityPlayerMP) invPlayer.player );
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
// :(
|
||||||
|
}
|
||||||
|
|
||||||
TileEntity te = openContext.w.getTileEntity( openContext.x, openContext.y, openContext.z );
|
TileEntity te = openContext.w.getTileEntity( openContext.x, openContext.y, openContext.z );
|
||||||
Platform.openGUI( invPlayer.player, te, openContext.side, OriginalGui );
|
Platform.openGUI( invPlayer.player, te, openContext.side, OriginalGui );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,12 +42,19 @@ public class PacketSwitchGuis extends AppEngPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clientPacketData(INetworkInfo network, AppEngPacket packet, EntityPlayer player)
|
||||||
|
{
|
||||||
|
AEBaseGui.switchingGuis = true;
|
||||||
|
}
|
||||||
|
|
||||||
// api
|
// api
|
||||||
public PacketSwitchGuis(GuiBridge newGui) throws IOException {
|
public PacketSwitchGuis(GuiBridge newGui) throws IOException {
|
||||||
|
|
||||||
this.newGui = newGui;
|
this.newGui = newGui;
|
||||||
|
|
||||||
AEBaseGui.switchingGuis = true;
|
if ( Platform.isClient() )
|
||||||
|
AEBaseGui.switchingGuis = true;
|
||||||
|
|
||||||
ByteBuf data = Unpooled.buffer();
|
ByteBuf data = Unpooled.buffer();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user