Fixed Bug: #0737 - Searching and crafting
This commit is contained in:
parent
823fa4bd73
commit
4790ab51e0
2 changed files with 18 additions and 1 deletions
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue