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 GuiEnchantmentWrapper wrap( GuiEnchantment base, EnchantmentWorker worker, BlockPos pos) { return new GuiEnchantmentWrapper( inventoryField.get(base), worldField.get(containerField.get(base)), worker, pos); }
@SubscribeEvent public void onGui(GuiOpenEvent event) { if (event.getGui() == null || !GuiEnchantment.class.equals(event.getGui().getClass())) { // Only hook the enchantment GUI. We don't use instanceof, because we *only* want to // hook the unmodified GUI. return; } event.setGui(GuiEnchantmentWrapper.wrap((GuiEnchantment) event.getGui(), worker, lastInteractPos)); }
@SideOnly(Side.CLIENT) @SubscribeEvent public void onGuiOpen(GuiOpenEvent event) { if (event.gui instanceof GuiEnchantment && !(event.gui instanceof SK_GuiEnchantment)) { event.gui = new SK_GuiEnchantment((GuiEnchantment) event.gui); } }
public SK_GuiEnchantment(GuiEnchantment parent) { super((InventoryPlayer) Utils.getPrivateField(parent, GuiEnchantment.class, "playerInventory"),Minecraft.getMinecraft().theWorld,(IWorldNameable) Utils.getPrivateField(parent, GuiEnchantment.class, "field_175380_I")); this.containerEnchantment = Utils.getPrivateField(parent, GuiEnchantment.class, "container"); Utils.setPrivateField(this, GuiEnchantment.class, this.containerEnchantment, "container"); this.inventorySlots = this.containerEnchantment; instance = this; }
public void displayGUIEnchantment(int par1, int par2, int par3, String par4Str) { this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.worldObj, par1, par2, par3, par4Str)); }
public void gui(GuiScreenEvent.InitGuiEvent.Pre event) { if (event.gui instanceof GuiEnchantment && FMLCommonHandler.instance().getSide() == Side.CLIENT) { NetworkHandler.wrapper.sendToServer(new MessageDiscoveryItem(QADiscoveries.Item.ENCHANT.get().getKey(), false)); } }
public void displayGUIEnchantment(int p_71002_1_, int p_71002_2_, int p_71002_3_, String p_71002_4_) { this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.worldObj, p_71002_1_, p_71002_2_, p_71002_3_, p_71002_4_)); }
public void func_71002_c(int p_71002_1_, int p_71002_2_, int p_71002_3_, String p_71002_4_) { this.field_71159_c.func_71373_a(new GuiEnchantment(this.field_71071_by, this.field_70170_p, p_71002_1_, p_71002_2_, p_71002_3_, p_71002_4_)); }