net.minecraft.client.gui.inventory.GuiCrafting Java Examples
The following examples show how to use
net.minecraft.client.gui.inventory.GuiCrafting.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: QuickCraftModule.java From seppuku with GNU General Public License v3.0 | 6 votes |
@Listener public void onReceivePacket (EventReceivePacket event) { if (event.getStage() == EventStageable.EventStage.PRE) { if (event.getPacket() instanceof SPacketSetSlot) { // Check if this packet updates the recipe result and if the result is not empty if (((SPacketSetSlot) event.getPacket()).getSlot() == 0 && ((SPacketSetSlot) event.getPacket()).getStack().getItem() != Items.AIR) { Minecraft mc = Minecraft.getMinecraft(); if (mc.currentScreen instanceof GuiInventory || mc.currentScreen instanceof GuiCrafting) { mc.playerController.windowClick(mc.player.openContainer.windowId, 0, 0, ClickType.QUICK_MOVE, mc.player); mc.playerController.updateController(); } } } } }
Example #2
Source File: AutoCraftModule.java From seppuku with GNU General Public License v3.0 | 6 votes |
@Listener public void onUpdate(EventPlayerUpdate event) { if (event.getStage() == EventStageable.EventStage.PRE) { final Minecraft mc = Minecraft.getMinecraft(); if (this.recipe.getValue().length() > 0 && this.timer.passed(this.delay.getValue())) { if (mc.currentScreen == null || mc.currentScreen instanceof GuiInventory || mc.currentScreen instanceof GuiCrafting) { mc.player.connection.sendPacket(new CPacketPlaceRecipe(mc.player.openContainer.windowId, CraftingManager.getRecipe(new ResourceLocation(this.recipe.getValue().toLowerCase())), true)); mc.playerController.windowClick(mc.player.openContainer.windowId, 0, 0, this.drop.getValue() ? ClickType.THROW : ClickType.QUICK_MOVE, mc.player); mc.playerController.updateController(); } this.timer.reset(); } } }
Example #3
Source File: ShapedRecipeHandler.java From NotEnoughItems with MIT License | 4 votes |
@Override public Class<? extends GuiContainer> getGuiClass() { return GuiCrafting.class; }
Example #4
Source File: BannerPatternHandler.java From Et-Futurum with The Unlicense | 4 votes |
@Override public Class<? extends GuiContainer> getGuiClass() { return GuiCrafting.class; }
Example #5
Source File: ShapedRecipeHandler.java From NotEnoughItems with MIT License | 4 votes |
@Override public Class<? extends GuiContainer> getGuiClass() { return GuiCrafting.class; }
Example #6
Source File: RecipeHandlerShapedCustom.java From NEI-Integration with MIT License | 4 votes |
@Override public Class<? extends GuiContainer> getGuiClass() { return GuiCrafting.class; }