Search in sources :

Example 1 with ClientSideOnlyMethodContent

use of logisticspipes.asm.ClientSideOnlyMethodContent in project LogisticsPipes by RS485.

the class CPipeCleanupStatus method processPacket.

@Override
@ClientSideOnlyMethodContent
public void processPacket(EntityPlayer player) {
    final ModuleCrafter module = this.getLogisticsModule(player, ModuleCrafter.class);
    if (module == null) {
        return;
    }
    module.cleanupModeIsExclude = mode;
    if (Minecraft.getMinecraft().currentScreen instanceof GuiCraftingPipe) {
        ((GuiCraftingPipe) Minecraft.getMinecraft().currentScreen).onCleanupModeChange();
    }
}
Also used : GuiCraftingPipe(logisticspipes.gui.GuiCraftingPipe) ModuleCrafter(logisticspipes.modules.ModuleCrafter) ClientSideOnlyMethodContent(logisticspipes.asm.ClientSideOnlyMethodContent)

Example 2 with ClientSideOnlyMethodContent

use of logisticspipes.asm.ClientSideOnlyMethodContent in project LogisticsPipes by RS485.

the class MostLikelyRecipeComponentsResponse method processPacket.

@Override
@ClientSideOnlyMethodContent
public void processPacket(EntityPlayer player) {
    GuiScreen firstGui = Minecraft.getMinecraft().currentScreen;
    LogisticsBaseGuiScreen gui;
    if (firstGui instanceof GuiLogisticsCraftingTable) {
        gui = (GuiLogisticsCraftingTable) firstGui;
    } else if (firstGui instanceof GuiRequestTable) {
        gui = (GuiRequestTable) firstGui;
    } else {
        return;
    }
    GuiRecipeImport importGui = null;
    SubGuiScreen sub = gui.getSubGui();
    while (sub != null) {
        if (sub instanceof GuiRecipeImport) {
            importGui = (GuiRecipeImport) sub;
            break;
        }
        sub = sub.getSubGui();
    }
    if (importGui == null)
        return;
    importGui.handleProposePacket(response);
}
Also used : GuiRecipeImport(logisticspipes.gui.popup.GuiRecipeImport) GuiRequestTable(logisticspipes.gui.orderer.GuiRequestTable) GuiLogisticsCraftingTable(logisticspipes.gui.GuiLogisticsCraftingTable) LogisticsBaseGuiScreen(logisticspipes.utils.gui.LogisticsBaseGuiScreen) LogisticsBaseGuiScreen(logisticspipes.utils.gui.LogisticsBaseGuiScreen) SubGuiScreen(logisticspipes.utils.gui.SubGuiScreen) GuiScreen(net.minecraft.client.gui.GuiScreen) SubGuiScreen(logisticspipes.utils.gui.SubGuiScreen) ClientSideOnlyMethodContent(logisticspipes.asm.ClientSideOnlyMethodContent)

Aggregations

ClientSideOnlyMethodContent (logisticspipes.asm.ClientSideOnlyMethodContent)2 GuiCraftingPipe (logisticspipes.gui.GuiCraftingPipe)1 GuiLogisticsCraftingTable (logisticspipes.gui.GuiLogisticsCraftingTable)1 GuiRequestTable (logisticspipes.gui.orderer.GuiRequestTable)1 GuiRecipeImport (logisticspipes.gui.popup.GuiRecipeImport)1 ModuleCrafter (logisticspipes.modules.ModuleCrafter)1 LogisticsBaseGuiScreen (logisticspipes.utils.gui.LogisticsBaseGuiScreen)1 SubGuiScreen (logisticspipes.utils.gui.SubGuiScreen)1 GuiScreen (net.minecraft.client.gui.GuiScreen)1