Compare commits

..
5 changed files with 26 additions and 7 deletions

No files matched your search

@@ -141,6 +141,13 @@ public class NEICPH implements IClientPacketHandler {
packet.sendToServer();
}
public static void sendRequestContainer() {
PacketCustom packet = new PacketCustom(channel, 16);
packet.writeInt(
Minecraft.getMinecraft().thePlayer.openContainer.getInventory().size());
packet.sendToServer();
}
public static void sendSetSlot(int slot, ItemStack stack, boolean container) {
PacketCustom packet = new PacketCustom(channel, 5);
packet.writeBoolean(container);
@@ -64,6 +64,9 @@ public class NEISPH implements IServerPacketHandler {
case 15:
handleMobSpawnerID(sender.worldObj, packet.readCoord(), packet.readString());
break;
case 16:
handleRequestContainer(sender, packet.readInt());
break;
case 21:
openEnchantmentGui(sender);
break;
@@ -99,6 +102,11 @@ public class NEISPH implements IServerPacketHandler {
}
}
private void handleRequestContainer(EntityPlayerMP sender, int containerSize) {
if (sender.openContainer.getInventory().size() != containerSize) return;
sender.sendContainerToPlayer(sender.openContainer);
}
private void handlePropertyChange(EntityPlayerMP sender, PacketCustom packet) {
String name = packet.readString();
if (NEIServerConfig.canPlayerPerformAction(sender.getCommandSenderName(), name))
@@ -3,6 +3,7 @@ package codechicken.nei.recipe;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.GuiNEIButton;
import codechicken.nei.LayoutManager;
import codechicken.nei.NEICPH;
import codechicken.nei.NEIClientConfig;
import codechicken.nei.NEIClientUtils;
import codechicken.nei.PositionedStack;
@@ -336,6 +337,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer
if (i == Keyboard.KEY_ESCAPE) // esc
{
mc.displayGuiScreen(firstGuiGeneral);
NEICPH.sendRequestContainer();
return;
}
if (GuiContainerManager.getManager(this).lastKeyTyped(i, c)) return;
@@ -346,6 +348,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer
if (i == mc.gameSettings.keyBindInventory.getKeyCode()) {
mc.displayGuiScreen(firstGuiGeneral);
NEICPH.sendRequestContainer();
} else if (NEIClientConfig.isKeyHashDown("gui.back")) {
mc.displayGuiScreen(prevGui);
} else if (NEIClientConfig.isKeyHashDown("gui.prev_machine")) {
@@ -1186,6 +1186,7 @@ gt.recipe.rockbreaker,gregtech:gt.blockmachines:31065,,miscutils,TRUE,,,,,,
gt.recipe.fermenter,gregtech:gt.blockmachines:860,,miscutils,TRUE,,,,,,
gt.recipe.fluidextractor,gregtech:gt.blockmachines:860,,miscutils,TRUE,,,,,,
gt.recipe.fluidsolidifier,gregtech:gt.blockmachines:860,,miscutils,TRUE,,,,,,
gt.recipe.distillery,gregtech:gt.blockmachines:31021,,miscutils,TRUE,,,,,,
gt.recipe.distillationtower,gregtech:gt.blockmachines:31021,,miscutils,TRUE,,,,,,
gt.recipe.chemicalbath,gregtech:gt.blockmachines:850,,miscutils,TRUE,,,,,,
gt.recipe.polarizer,gregtech:gt.blockmachines:860,,miscutils,TRUE,,,,,,
1 handler itemName nbtInfo modId modRequired excludedModId priority minVersion maxVersion forceClassName itemNotes
1186 gt.recipe.fermenter gregtech:gt.blockmachines:860 miscutils TRUE
1187 gt.recipe.fluidextractor gregtech:gt.blockmachines:860 miscutils TRUE
1188 gt.recipe.fluidsolidifier gregtech:gt.blockmachines:860 miscutils TRUE
1189 gt.recipe.distillery gregtech:gt.blockmachines:31021 miscutils TRUE
1190 gt.recipe.distillationtower gregtech:gt.blockmachines:31021 miscutils TRUE
1191 gt.recipe.chemicalbath gregtech:gt.blockmachines:850 miscutils TRUE
1192 gt.recipe.polarizer gregtech:gt.blockmachines:860 miscutils TRUE
@@ -48,14 +48,14 @@ com.rwtema.extrautils.nei.InfoHandler,Extra Utilities,ExtraUtilities:chandelier,
com.rwtema.extrautils.nei.MicroBlocksHandler,Extra Utilities,ExtraUtilities:microblocks:1,,ExtraUtilities,TRUE,,,,,,,,,,,
com.rwtema.extrautils.nei.SoulHandler,Extra Utilities,ExtraUtilities:mini-soul,,ExtraUtilities,TRUE,,,,,,,,,,,
hellfirepvp.beebetteratbees.client.gui.BBABGuiRecipeTreeHandler,Bees,Forestry:beeQueenGE,,Forestry,TRUE,,,140,,2,,,,,,
forestry.factory.recipes.nei.NEIHandlerBottler,Forestry for Minecraft,Forestry:factory,,Forestry,TRUE,,,68,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerCarpenter,Forestry for Minecraft,Forestry:factory:1,,Forestry,TRUE,,,65,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerCentrifuge,Forestry for Minecraft,Forestry:factory:2,,Forestry,TRUE,,,65,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerBottler,Forestry for Minecraft,Forestry:factory,,Forestry,TRUE,,,84,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerCarpenter,Forestry for Minecraft,Forestry:factory:1,,Forestry,TRUE,,,81,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerCentrifuge,Forestry for Minecraft,Forestry:factory:2,,Forestry,TRUE,,,81,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerFabricator,Forestry for Minecraft,Forestry:factory2,,Forestry,TRUE,,,,,,,,,,,
forestry.factory.recipes.nei.NEIHandlerFermenter,Forestry for Minecraft,Forestry:factory:3,,Forestry,TRUE,,,65,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerMoistener,Forestry for Minecraft,Forestry:factory:4,,Forestry,TRUE,,,68,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerSqueezer,Forestry for Minecraft,Forestry:factory:5,,Forestry,TRUE,,,68,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerStill,Forestry for Minecraft,Forestry:factory:6,,Forestry,TRUE,,,65,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerFermenter,Forestry for Minecraft,Forestry:factory:3,,Forestry,TRUE,,,81,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerMoistener,Forestry for Minecraft,Forestry:factory:4,,Forestry,TRUE,,,84,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerSqueezer,Forestry for Minecraft,Forestry:factory:5,,Forestry,TRUE,,,84,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerStill,Forestry for Minecraft,Forestry:factory:6,,Forestry,TRUE,,,81,,5,,,,,,
net.bdew.neiaddons.forestry.bees.BeeBreedingHandler,Forestry for Minecraft,Forestry:beeQueenGE,,Forestry,TRUE,,,65,,5,,,,,,
net.bdew.neiaddons.forestry.bees.BeeProduceHandler,Forestry for Minecraft,Forestry:beeQueenGE,,Forestry,TRUE,,,65,,5,,,,,,
net.bdew.neiaddons.forestry.butterflies.ButterflyBreedingHandler,Forestry for Minecraft,Forestry:butterflyGE,,Forestry,TRUE,,,,,,,,,,,
1 handler modName itemName nbtInfo modId modRequired excludedModId yShift handlerHeight handlerWidth maxRecipesPerPage imageResource imageX imageY imageWidth imageHeight itemNotes
48 com.rwtema.extrautils.nei.MicroBlocksHandler Extra Utilities ExtraUtilities:microblocks:1 ExtraUtilities TRUE
49 com.rwtema.extrautils.nei.SoulHandler Extra Utilities ExtraUtilities:mini-soul ExtraUtilities TRUE
50 hellfirepvp.beebetteratbees.client.gui.BBABGuiRecipeTreeHandler Bees Forestry:beeQueenGE Forestry TRUE 140 2
51 forestry.factory.recipes.nei.NEIHandlerBottler Forestry for Minecraft Forestry:factory Forestry TRUE 68 84 5
52 forestry.factory.recipes.nei.NEIHandlerCarpenter Forestry for Minecraft Forestry:factory:1 Forestry TRUE 65 81 5
53 forestry.factory.recipes.nei.NEIHandlerCentrifuge Forestry for Minecraft Forestry:factory:2 Forestry TRUE 65 81 5
54 forestry.factory.recipes.nei.NEIHandlerFabricator Forestry for Minecraft Forestry:factory2 Forestry TRUE
55 forestry.factory.recipes.nei.NEIHandlerFermenter Forestry for Minecraft Forestry:factory:3 Forestry TRUE 65 81 5
56 forestry.factory.recipes.nei.NEIHandlerMoistener Forestry for Minecraft Forestry:factory:4 Forestry TRUE 68 84 5
57 forestry.factory.recipes.nei.NEIHandlerSqueezer Forestry for Minecraft Forestry:factory:5 Forestry TRUE 68 84 5
58 forestry.factory.recipes.nei.NEIHandlerStill Forestry for Minecraft Forestry:factory:6 Forestry TRUE 65 81 5
59 net.bdew.neiaddons.forestry.bees.BeeBreedingHandler Forestry for Minecraft Forestry:beeQueenGE Forestry TRUE 65 5
60 net.bdew.neiaddons.forestry.bees.BeeProduceHandler Forestry for Minecraft Forestry:beeQueenGE Forestry TRUE 65 5
61 net.bdew.neiaddons.forestry.butterflies.ButterflyBreedingHandler Forestry for Minecraft Forestry:butterflyGE Forestry TRUE