public void displayGui(IInteractionObject guiOwner) { String s = guiOwner.getGuiID(); if ("minecraft:crafting_table".equals(s)) { this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj)); } else if ("minecraft:enchanting_table".equals(s)) { this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.worldObj, guiOwner)); } else if ("minecraft:anvil".equals(s)) { this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.worldObj)); } }
public void displayGui(IInteractionObject guiOwner) { String s = guiOwner.getGuiID(); if ("minecraft:crafting_table".equals(s)) { this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.world)); } else if ("minecraft:enchanting_table".equals(s)) { this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.world, guiOwner)); } else if ("minecraft:anvil".equals(s)) { this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.world)); } }
public static ItemStack getGridItem(int nr) { GuiContainer menu = (GuiContainer)getMenu(); Container slots = menu.inventorySlots; if (menu instanceof GuiCrafting) { return ((ContainerWorkbench)slots).craftMatrix.getStackInSlot(nr); } else if (menu instanceof GuiInventory) { return ((ContainerPlayer)slots).craftMatrix.getStackInSlot(nr); } return null; }
public Object getServerGuiElement(int iD, EntityPlayer player, World world, int x, int y, int z) { if (iD == 20) { return new GuiCrafting(player.inventory, world); } if (iD == 21) { return new PlayerInventoryGUISurvival(player); } return null; }
@Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID == 20){ //System.out.println("Hello ClientGUI"); return new GuiCrafting(player.inventory, world); } //System.out.println("BYE ClientGUI"); return null; }
@Override public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z){ if(ID == 0) return new GuiCrafting(player.inventory, world, x, y, z); else if(ID == 1 && world.getTileEntity(x, y, z) instanceof TileEntityChestRidiculous) return new GUILargeChest(player.inventory, (TileEntityChestRidiculous)(world.getTileEntity(x, y, z))); return null; }
@ForgeSubscribe public void handleTooltip(ItemTooltipEvent event) { if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT && Minecraft.getMinecraft().currentScreen instanceof GuiCrafting) { GuiCrafting gui = (GuiCrafting) Minecraft.getMinecraft().currentScreen; ItemStack stackInResult = (ItemStack) gui.inventorySlots.getSlot(0).getStack(); if (stackInResult != null && stackInResult.getItem() == event.itemStack.getItem()) event.toolTip.add("WARNING: Stored energy will be lost"); } }
@Override public Class<? extends GuiContainer> getGuiClass() { return GuiCrafting.class; }
public static boolean isCraftingGUI(final GuiContainer gui) { return gui.getClass() == GuiCrafting.class || (RecipeInfo.hasOverlayHandler(gui, "crafting") && RecipeInfo.getOverlayHandler(gui, "crafting").getClass() == DefaultOverlayHandler.class); }
public void loadConfig() { NEIPing.init(); if (ExtraUtils.drum != null) { API.addSubset("Extra Common.Drums", (ItemFilter)new SubsetItemsNBT(Item.getItemFromBlock(ExtraUtils.drum))); } if (ExtraUtils.microBlocks != null) { API.addSubset("Extra Common.Extra Microblocks", (ItemFilter)new SubsetItemsNBT(ExtraUtils.microBlocks)); } if (ExtraUtils.colorBlockDataEnabled) { API.addSubset("Extra Common.Colored Blocks", (ItemFilter)new SubsetBlockClass(BlockColor.class)); } if (ExtraUtils.greenScreen != null) { API.addSubset("Extra Common.Lapis Caelestis", (ItemFilter)new SubsetItems(new Item[] { Item.getItemFromBlock((Block)ExtraUtils.greenScreen) })); } if (ExtraUtils.cobblestoneCompr != null) { API.addSubset("Extra Common.Compressed Blocks", (ItemFilter)new SubsetItems(new Item[] { Item.getItemFromBlock((Block)ExtraUtils.cobblestoneCompr) })); } if (ExtraUtils.decorative1Enabled || ExtraUtils.decorative2Enabled) { API.addSubset("Extra Common.Decorative Blocks", (ItemFilter)new SubsetBlockClass(BlockDecoration.class)); } if (ExtraUtils.generator2 != null) { final SubsetItems s = new SubsetItems(new Item[] { Item.getItemFromBlock(ExtraUtils.generator2) }); if (ExtraUtils.generator3 != null) { s.addItem(Item.getItemFromBlock(ExtraUtils.generator3)); } API.addSubset("Extra Common.Higher Tier Generators", (ItemFilter)s); } for (final Matcher matcher : AdvancedNodeUpgrades.entryList) { if (matcher != AdvancedNodeUpgrades.nullMatcher && matcher.type == Matcher.Type.ITEM && matcher.shouldAddToNEI() && matcher.isSelectable()) { String localizedName = matcher.getLocalizedName(); localizedName = localizedName.replace(".exe", ""); localizedName = localizedName.replaceAll("\\.", ""); API.addSubset("Extra Filtering." + localizedName, (ItemFilter)new ItemFilterWrapper(matcher)); } } API.registerRecipeHandler((ICraftingHandler)new EnderConstructorHandler()); API.registerUsageHandler((IUsageHandler)new EnderConstructorHandler()); API.registerRecipeHandler((ICraftingHandler)new InfoHandler()); API.registerUsageHandler((IUsageHandler)new InfoHandler()); API.registerRecipeHandler((ICraftingHandler)new SoulHandler()); API.registerUsageHandler((IUsageHandler)new SoulHandler()); if (Loader.isModLoaded("ForgeMultipart")) { API.registerRecipeHandler((ICraftingHandler)new FMPMicroBlocksHandler()); API.registerUsageHandler((IUsageHandler)new FMPMicroBlocksHandler()); API.registerRecipeHandler((ICraftingHandler)new MicroBlocksHandler()); API.registerUsageHandler((IUsageHandler)new MicroBlocksHandler()); API.registerGuiOverlayHandler((Class)GuiCrafting.class, (IOverlayHandler)new FMPMicroBlocksOverlayHandler(), "microblocks"); API.registerGuiOverlayHandler((Class)GuiInventory.class, (IOverlayHandler)new FMPMicroBlocksOverlayHandler(63, 20), "microblocks2x2"); } if (ExtraUtils.colorBlockData != null) { API.hideItem(new ItemStack(ExtraUtils.colorBlockData)); } LogHelper.info("Added NEI integration", new Object[0]); }
/** * Displays the crafting GUI for a workbench. */ public void displayGUIWorkbench(int par1, int par2, int par3) { this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj, par1, par2, par3)); }
public void displayGUIWorkbench(int p_71058_1_, int p_71058_2_, int p_71058_3_) { this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj, p_71058_1_, p_71058_2_, p_71058_3_)); }
public void func_71058_b(int p_71058_1_, int p_71058_2_, int p_71058_3_) { this.field_71159_c.func_71373_a(new GuiCrafting(this.field_71071_by, this.field_70170_p, p_71058_1_, p_71058_2_, p_71058_3_)); }