From 9d2025ec466fbb9d3b83f9ad1beb571aea94a470 Mon Sep 17 00:00:00 2001 From: Hileb <107909747+Ecdcaeb@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:04:33 +0800 Subject: [PATCH 1/4] Make IClickEventAction and IHoverEventAction --- .../client/gui/text/IClickEventAction.java | 11 +++++++++++ .../client/gui/text/IHoverEventAction.java | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/main/java/net/minecraftforge/client/gui/text/IClickEventAction.java create mode 100644 src/main/java/net/minecraftforge/client/gui/text/IHoverEventAction.java diff --git a/src/main/java/net/minecraftforge/client/gui/text/IClickEventAction.java b/src/main/java/net/minecraftforge/client/gui/text/IClickEventAction.java new file mode 100644 index 000000000..a4b0b3930 --- /dev/null +++ b/src/main/java/net/minecraftforge/client/gui/text/IClickEventAction.java @@ -0,0 +1,11 @@ +package net.minecraftforge.client.gui.text; + +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.event.ClickEvent; + +@FunctionalInterface +public interface IClickEventAction { + IClickEventAction EMPTY = (clickEvent, screen, textComponent) -> false; + boolean handle(ClickEvent clickEvent, GuiScreen screen, ITextComponent textComponent); +} diff --git a/src/main/java/net/minecraftforge/client/gui/text/IHoverEventAction.java b/src/main/java/net/minecraftforge/client/gui/text/IHoverEventAction.java new file mode 100644 index 000000000..2e1bfb918 --- /dev/null +++ b/src/main/java/net/minecraftforge/client/gui/text/IHoverEventAction.java @@ -0,0 +1,11 @@ +package net.minecraftforge.client.gui.text; + +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.event.HoverEvent; + +@FunctionalInterface +public interface IHoverEventAction { + IHoverEventAction EMPTY = (hoverEvent, screen, textComponent, x, y) -> {}; + void handle(HoverEvent hoverEvent, GuiScreen screen, ITextComponent textComponent, int x, int y); +} From 3b69dd14cea3279fa3790c852a4a5a55ec24bf73 Mon Sep 17 00:00:00 2001 From: Hileb <107909747+Ecdcaeb@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:23:38 +0800 Subject: [PATCH 2/4] Implement the actions by patches --- .../minecraft/client/gui/GuiScreen.java.patch | 81 ++++++++++++++----- .../util/text/event/ClickEvent.java.patch | 80 ++++++++++++++++++ .../util/text/event/HoverEvent.java.patch | 60 ++++++++++++++ 3 files changed, 202 insertions(+), 19 deletions(-) create mode 100644 patches/minecraft/net/minecraft/util/text/event/ClickEvent.java.patch create mode 100644 patches/minecraft/net/minecraft/util/text/event/HoverEvent.java.patch diff --git a/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch index 396c38d71..6512b9b1f 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch @@ -124,7 +124,18 @@ { GlStateManager.func_179101_C(); RenderHelper.func_74518_a(); -@@ -263,8 +273,9 @@ +@@ -249,8 +259,9 @@ + if (p_175272_1_ != null && p_175272_1_.func_150256_b().func_150210_i() != null) + { + HoverEvent hoverevent = p_175272_1_.func_150256_b().func_150210_i(); ++ HoverEvent.Action action = hoverevent.func_150701_a(); + +- if (hoverevent.func_150701_a() == HoverEvent.Action.SHOW_ITEM) ++ if (action == HoverEvent.Action.SHOW_ITEM) + { + ItemStack itemstack = ItemStack.field_190927_a; + +@@ -263,8 +274,9 @@ itemstack = new ItemStack((NBTTagCompound)nbtbase); } } @@ -135,7 +146,15 @@ } if (itemstack.func_190926_b()) -@@ -283,7 +294,7 @@ +@@ -276,14 +288,14 @@ + this.func_146285_a(itemstack, p_175272_2_, p_175272_3_); + } + } +- else if (hoverevent.func_150701_a() == HoverEvent.Action.SHOW_ENTITY) ++ else if (action == HoverEvent.Action.SHOW_ENTITY) + { + if (this.field_146297_k.field_71474_y.field_82882_x) + { try { NBTTagCompound nbttagcompound = JsonToNBT.func_180713_a(hoverevent.func_150702_b().func_150260_c()); @@ -144,7 +163,7 @@ list.add(nbttagcompound.func_74779_i("name")); if (nbttagcompound.func_150297_b("type", 8)) -@@ -295,7 +306,7 @@ +@@ -295,19 +307,17 @@ list.add(nbttagcompound.func_74779_i("id")); this.func_146283_a(list, p_175272_2_, p_175272_3_); } @@ -153,9 +172,10 @@ { this.func_146279_a(TextFormatting.RED + "Invalid Entity!", p_175272_2_, p_175272_3_); } -@@ -303,11 +314,7 @@ + } } - else if (hoverevent.func_150701_a() == HoverEvent.Action.SHOW_TEXT) +- else if (hoverevent.func_150701_a() == HoverEvent.Action.SHOW_TEXT) ++ else if (action == HoverEvent.Action.SHOW_TEXT) { - this.func_146283_a( - this.field_146297_k.field_71466_p.func_78271_c(hoverevent.func_150702_b().func_150254_d(), Math.max(this.field_146294_l / 2, 200)), @@ -163,28 +183,51 @@ - p_175272_3_ - ); + this.func_146283_a(this.field_146297_k.field_71466_p.func_78271_c(hoverevent.func_150702_b().func_150254_d(), Math.max(this.field_146294_l / 2, 200)), p_175272_2_, p_175272_3_); ++ }else if (action != null){ ++ action.handle(hoverevent, this, p_175272_1_, p_175272_2_, p_175272_3_); } GlStateManager.func_179140_f(); -@@ -376,7 +383,7 @@ +@@ -337,7 +347,8 @@ + } + else if (clickevent != null) + { +- if (clickevent.func_150669_a() == ClickEvent.Action.OPEN_URL) ++ ClickEvent.Action action = clickevent.func_150669_a(); ++ if (action == ClickEvent.Action.OPEN_URL) + { + if (!this.field_146297_k.field_71474_y.field_74359_p) + { +@@ -374,22 +385,23 @@ + field_175287_a.error("Can't open url for {}", clickevent, urisyntaxexception); + } } - else if (clickevent.func_150669_a() == ClickEvent.Action.OPEN_FILE) +- else if (clickevent.func_150669_a() == ClickEvent.Action.OPEN_FILE) ++ else if (action == ClickEvent.Action.OPEN_FILE) { - URI uri1 = new File(clickevent.func_150668_b()).toURI(); + URI uri1 = (new File(clickevent.func_150668_b())).toURI(); this.func_175282_a(uri1); } - else if (clickevent.func_150669_a() == ClickEvent.Action.SUGGEST_COMMAND) -@@ -389,7 +396,7 @@ +- else if (clickevent.func_150669_a() == ClickEvent.Action.SUGGEST_COMMAND) ++ else if (action == ClickEvent.Action.SUGGEST_COMMAND) + { + this.func_175274_a(clickevent.func_150668_b(), true); + } +- else if (clickevent.func_150669_a() == ClickEvent.Action.RUN_COMMAND) ++ else if (action == ClickEvent.Action.RUN_COMMAND) + { + this.func_175281_b(clickevent.func_150668_b(), false); } else { - field_175287_a.error("Don't know how to handle {}", clickevent); -+ field_175287_a.error("Don't know how to handle {}", (Object)clickevent); ++ if (action != null && action.handle(clickevent, this, p_175276_1_)) return true; ++ else field_175287_a.error("Don't know how to handle {}", (Object)clickevent); } return true; -@@ -406,10 +413,13 @@ +@@ -406,10 +418,13 @@ public void func_175281_b(String p_175281_1_, boolean p_175281_2_) { @@ -198,7 +241,7 @@ this.field_146297_k.field_71439_g.func_71165_d(p_175281_1_); } -@@ -424,9 +434,15 @@ +@@ -424,9 +439,15 @@ if (guibutton.func_146116_c(this.field_146297_k, p_73864_1_, p_73864_2_)) { @@ -214,7 +257,7 @@ } } } -@@ -456,8 +472,12 @@ +@@ -456,8 +477,12 @@ this.field_146289_q = p_146280_1_.field_71466_p; this.field_146294_l = p_146280_2_; this.field_146295_m = p_146280_3_; @@ -227,7 +270,7 @@ } public void func_183500_a(int p_183500_1_, int p_183500_2_) -@@ -476,7 +496,10 @@ +@@ -476,7 +501,10 @@ { while (Mouse.next()) { @@ -238,7 +281,7 @@ } } -@@ -484,7 +507,10 @@ +@@ -484,7 +512,10 @@ { while (Keyboard.next()) { @@ -249,7 +292,7 @@ } } } -@@ -546,6 +572,7 @@ +@@ -546,6 +577,7 @@ public void func_146276_q_() { this.func_146270_b(0); @@ -257,7 +300,7 @@ } public void func_146270_b(int p_146270_1_) -@@ -570,19 +597,10 @@ +@@ -570,19 +602,10 @@ GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); float f = 32.0F; bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181709_i); @@ -281,7 +324,7 @@ tessellator.func_78381_a(); } -@@ -591,7 +609,6 @@ +@@ -591,7 +614,6 @@ return true; } @@ -289,7 +332,7 @@ public void func_73878_a(boolean p_73878_1_, int p_73878_2_) { if (p_73878_2_ == 31102009) -@@ -611,13 +628,13 @@ +@@ -611,13 +633,13 @@ try { Class oclass = Class.forName("java.awt.Desktop"); diff --git a/patches/minecraft/net/minecraft/util/text/event/ClickEvent.java.patch b/patches/minecraft/net/minecraft/util/text/event/ClickEvent.java.patch new file mode 100644 index 000000000..e01015c8b --- /dev/null +++ b/patches/minecraft/net/minecraft/util/text/event/ClickEvent.java.patch @@ -0,0 +1,80 @@ +--- before/net/minecraft/util/text/event/ClickEvent.java ++++ after/net/minecraft/util/text/event/ClickEvent.java +@@ -2,6 +2,7 @@ + + import com.google.common.collect.Maps; + import java.util.Map; ++import java.util.Objects; + + public class ClickEvent + { +@@ -41,7 +42,7 @@ + } + else + { +- return this.field_150670_b != null ? this.field_150670_b.equals(clickevent.field_150670_b) : clickevent.field_150670_b == null; ++ return Objects.equals(this.field_150670_b, clickevent.field_150670_b); + } + } + else +@@ -63,7 +64,8 @@ + return 31 * i + (this.field_150670_b != null ? this.field_150670_b.hashCode() : 0); + } + +- public static enum Action ++ private static final Map NAME_MAPPING = Maps.newHashMap(); ++ public static enum Action implements net.minecraftforge.client.gui.text.IClickEventAction + { + OPEN_URL("open_url", true), + OPEN_FILE("open_file", false), +@@ -71,14 +73,23 @@ + SUGGEST_COMMAND("suggest_command", true), + CHANGE_PAGE("change_page", true); + ++ @Deprecated //Forge : use ClickEvent#NAME_MAPPING + private static final Map field_150679_e = Maps.newHashMap(); + private final boolean field_150676_f; + private final String field_150677_g; +- +- private Action(String p_i45155_3_, boolean p_i45155_4_) +- { +- this.field_150677_g = p_i45155_3_; +- this.field_150676_f = p_i45155_4_; ++ private final net.minecraftforge.client.gui.text.IClickEventAction action; ++ ++ Action(net.minecraftforge.client.gui.text.IClickEventAction actionIn, String canonicalNameIn, boolean allowedInChatIn) ++ { ++ this.action = actionIn; ++ this.field_150677_g = canonicalNameIn; ++ this.field_150676_f = allowedInChatIn; ++ ClickEvent.NAME_MAPPING.put(canonicalNameIn, this); ++ } ++ ++ Action(String p_i45155_3_, boolean p_i45155_4_) ++ { ++ this(net.minecraftforge.client.gui.text.IClickEventAction.EMPTY, p_i45155_3_, p_i45155_4_); + } + + public boolean func_150674_a() +@@ -93,15 +104,14 @@ + + public static ClickEvent.Action func_150672_a(String p_150672_0_) + { +- return field_150679_e.get(p_150672_0_); ++ ClickEvent.Action action = ClickEvent.NAME_MAPPING.get(p_150672_0_); ++ if (action == null) return Action.field_150679_e.get(p_150672_0_); // if somebody have already harked in the mapping. ++ else return action; + } + +- static +- { +- for (ClickEvent.Action clickevent$action : values()) +- { +- field_150679_e.put(clickevent$action.func_150673_b(), clickevent$action); +- } ++ @Override ++ public boolean handle(ClickEvent clickEvent, net.minecraft.client.gui.GuiScreen screen, net.minecraft.util.text.ITextComponent textComponent){ ++ return action.handle(clickEvent, screen, textComponent); + } + } + } diff --git a/patches/minecraft/net/minecraft/util/text/event/HoverEvent.java.patch b/patches/minecraft/net/minecraft/util/text/event/HoverEvent.java.patch new file mode 100644 index 000000000..ab33b8848 --- /dev/null +++ b/patches/minecraft/net/minecraft/util/text/event/HoverEvent.java.patch @@ -0,0 +1,60 @@ +--- before/net/minecraft/util/text/event/HoverEvent.java ++++ after/net/minecraft/util/text/event/HoverEvent.java +@@ -64,20 +64,30 @@ + return 31 * i + (this.field_150703_b != null ? this.field_150703_b.hashCode() : 0); + } + +- public static enum Action ++ private static final Map NAME_MAPPING = Maps.newHashMap(); ++ public static enum Action implements net.minecraftforge.client.gui.text.IHoverEventAction + { + SHOW_TEXT("show_text", true), + SHOW_ITEM("show_item", true), + SHOW_ENTITY("show_entity", true); + ++ @Deprecated //Forge : use HoverEvent#NAME_MAPPING + private static final Map field_150690_d = Maps.newHashMap(); ++ + private final boolean field_150691_e; + private final String field_150688_f; ++ private final net.minecraftforge.client.gui.text.IHoverEventAction action; + +- private Action(String p_i45157_3_, boolean p_i45157_4_) +- { +- this.field_150688_f = p_i45157_3_; +- this.field_150691_e = p_i45157_4_; ++ Action(net.minecraftforge.client.gui.text.IHoverEventAction actionIn, String canonicalNameIn, boolean allowedInChatIn) ++ { ++ this.field_150688_f = canonicalNameIn; ++ this.field_150691_e = allowedInChatIn; ++ this.action = actionIn; ++ HoverEvent.NAME_MAPPING.put(canonicalNameIn, this); ++ } ++ Action(String p_i45157_3_, boolean p_i45157_4_) ++ { ++ this(net.minecraftforge.client.gui.text.IHoverEventAction.EMPTY, p_i45157_3_, p_i45157_4_); + } + + public boolean func_150686_a() +@@ -92,15 +102,14 @@ + + public static HoverEvent.Action func_150684_a(String p_150684_0_) + { +- return field_150690_d.get(p_150684_0_); ++ HoverEvent.Action action = HoverEvent.NAME_MAPPING.get(p_150684_0_); ++ if (action == null) return Action.field_150690_d.get(p_150684_0_); // if somebody have already harked in the mapping. ++ else return action; + } + +- static +- { +- for (HoverEvent.Action hoverevent$action : values()) +- { +- field_150690_d.put(hoverevent$action.func_150685_b(), hoverevent$action); +- } ++ @Override ++ public void handle(HoverEvent hoverEvent, net.minecraft.client.gui.GuiScreen screen, ITextComponent textComponent, int x, int y) { ++ action.handle(hoverEvent, screen, textComponent, x, y); + } + } + } From a89acefd20b483ab877a16bb174656a0edabef11 Mon Sep 17 00:00:00 2001 From: Hileb <107909747+Ecdcaeb@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:29:46 +0800 Subject: [PATCH 3/4] Fix Spell Error --- .../net/minecraft/util/text/event/ClickEvent.java.patch | 2 +- .../net/minecraft/util/text/event/HoverEvent.java.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/minecraft/net/minecraft/util/text/event/ClickEvent.java.patch b/patches/minecraft/net/minecraft/util/text/event/ClickEvent.java.patch index e01015c8b..64d83284f 100644 --- a/patches/minecraft/net/minecraft/util/text/event/ClickEvent.java.patch +++ b/patches/minecraft/net/minecraft/util/text/event/ClickEvent.java.patch @@ -62,7 +62,7 @@ { - return field_150679_e.get(p_150672_0_); + ClickEvent.Action action = ClickEvent.NAME_MAPPING.get(p_150672_0_); -+ if (action == null) return Action.field_150679_e.get(p_150672_0_); // if somebody have already harked in the mapping. ++ if (action == null) return Action.field_150679_e.get(p_150672_0_); // if somebody has already hacked in the mapping. + else return action; } diff --git a/patches/minecraft/net/minecraft/util/text/event/HoverEvent.java.patch b/patches/minecraft/net/minecraft/util/text/event/HoverEvent.java.patch index ab33b8848..e03c9b5c4 100644 --- a/patches/minecraft/net/minecraft/util/text/event/HoverEvent.java.patch +++ b/patches/minecraft/net/minecraft/util/text/event/HoverEvent.java.patch @@ -42,7 +42,7 @@ { - return field_150690_d.get(p_150684_0_); + HoverEvent.Action action = HoverEvent.NAME_MAPPING.get(p_150684_0_); -+ if (action == null) return Action.field_150690_d.get(p_150684_0_); // if somebody have already harked in the mapping. ++ if (action == null) return Action.field_150690_d.get(p_150684_0_); // if somebody has already hacked in the mapping. + else return action; } From 362ee968fb9d2fff8f7814ce285e4bbaeae9148e Mon Sep 17 00:00:00 2001 From: Hileb <107909747+Ecdcaeb@users.noreply.github.com> Date: Wed, 5 Jun 2024 17:50:31 +0800 Subject: [PATCH 4/4] less patches --- .../minecraft/client/gui/GuiScreen.java.patch | 82 +++++-------------- 1 file changed, 21 insertions(+), 61 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch index 6512b9b1f..82a8749a5 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch @@ -124,18 +124,7 @@ { GlStateManager.func_179101_C(); RenderHelper.func_74518_a(); -@@ -249,8 +259,9 @@ - if (p_175272_1_ != null && p_175272_1_.func_150256_b().func_150210_i() != null) - { - HoverEvent hoverevent = p_175272_1_.func_150256_b().func_150210_i(); -+ HoverEvent.Action action = hoverevent.func_150701_a(); - -- if (hoverevent.func_150701_a() == HoverEvent.Action.SHOW_ITEM) -+ if (action == HoverEvent.Action.SHOW_ITEM) - { - ItemStack itemstack = ItemStack.field_190927_a; - -@@ -263,8 +274,9 @@ +@@ -263,8 +273,9 @@ itemstack = new ItemStack((NBTTagCompound)nbtbase); } } @@ -146,15 +135,7 @@ } if (itemstack.func_190926_b()) -@@ -276,14 +288,14 @@ - this.func_146285_a(itemstack, p_175272_2_, p_175272_3_); - } - } -- else if (hoverevent.func_150701_a() == HoverEvent.Action.SHOW_ENTITY) -+ else if (action == HoverEvent.Action.SHOW_ENTITY) - { - if (this.field_146297_k.field_71474_y.field_82882_x) - { +@@ -283,7 +294,7 @@ try { NBTTagCompound nbttagcompound = JsonToNBT.func_180713_a(hoverevent.func_150702_b().func_150260_c()); @@ -163,7 +144,7 @@ list.add(nbttagcompound.func_74779_i("name")); if (nbttagcompound.func_150297_b("type", 8)) -@@ -295,19 +307,17 @@ +@@ -295,7 +306,7 @@ list.add(nbttagcompound.func_74779_i("id")); this.func_146283_a(list, p_175272_2_, p_175272_3_); } @@ -172,10 +153,9 @@ { this.func_146279_a(TextFormatting.RED + "Invalid Entity!", p_175272_2_, p_175272_3_); } - } +@@ -303,11 +314,9 @@ } -- else if (hoverevent.func_150701_a() == HoverEvent.Action.SHOW_TEXT) -+ else if (action == HoverEvent.Action.SHOW_TEXT) + else if (hoverevent.func_150701_a() == HoverEvent.Action.SHOW_TEXT) { - this.func_146283_a( - this.field_146297_k.field_71466_p.func_78271_c(hoverevent.func_150702_b().func_150254_d(), Math.max(this.field_146294_l / 2, 200)), @@ -183,51 +163,31 @@ - p_175272_3_ - ); + this.func_146283_a(this.field_146297_k.field_71466_p.func_78271_c(hoverevent.func_150702_b().func_150254_d(), Math.max(this.field_146294_l / 2, 200)), p_175272_2_, p_175272_3_); -+ }else if (action != null){ -+ action.handle(hoverevent, this, p_175272_1_, p_175272_2_, p_175272_3_); ++ }else if (hoverevent.func_150701_a() != null){ ++ hoverevent.func_150701_a().handle(hoverevent, this, p_175272_1_, p_175272_2_, p_175272_3_); } GlStateManager.func_179140_f(); -@@ -337,7 +347,8 @@ - } - else if (clickevent != null) - { -- if (clickevent.func_150669_a() == ClickEvent.Action.OPEN_URL) -+ ClickEvent.Action action = clickevent.func_150669_a(); -+ if (action == ClickEvent.Action.OPEN_URL) - { - if (!this.field_146297_k.field_71474_y.field_74359_p) - { -@@ -374,22 +385,23 @@ - field_175287_a.error("Can't open url for {}", clickevent, urisyntaxexception); - } +@@ -376,7 +385,7 @@ } -- else if (clickevent.func_150669_a() == ClickEvent.Action.OPEN_FILE) -+ else if (action == ClickEvent.Action.OPEN_FILE) + else if (clickevent.func_150669_a() == ClickEvent.Action.OPEN_FILE) { - URI uri1 = new File(clickevent.func_150668_b()).toURI(); + URI uri1 = (new File(clickevent.func_150668_b())).toURI(); this.func_175282_a(uri1); } -- else if (clickevent.func_150669_a() == ClickEvent.Action.SUGGEST_COMMAND) -+ else if (action == ClickEvent.Action.SUGGEST_COMMAND) - { - this.func_175274_a(clickevent.func_150668_b(), true); - } -- else if (clickevent.func_150669_a() == ClickEvent.Action.RUN_COMMAND) -+ else if (action == ClickEvent.Action.RUN_COMMAND) - { - this.func_175281_b(clickevent.func_150668_b(), false); + else if (clickevent.func_150669_a() == ClickEvent.Action.SUGGEST_COMMAND) +@@ -389,7 +398,8 @@ } else { - field_175287_a.error("Don't know how to handle {}", clickevent); -+ if (action != null && action.handle(clickevent, this, p_175276_1_)) return true; ++ if (clickevent.func_150669_a() != null && clickevent.func_150669_a().handle(clickevent, this, p_175276_1_)) return true; + else field_175287_a.error("Don't know how to handle {}", (Object)clickevent); } return true; -@@ -406,10 +418,13 @@ +@@ -406,10 +416,13 @@ public void func_175281_b(String p_175281_1_, boolean p_175281_2_) { @@ -241,7 +201,7 @@ this.field_146297_k.field_71439_g.func_71165_d(p_175281_1_); } -@@ -424,9 +439,15 @@ +@@ -424,9 +437,15 @@ if (guibutton.func_146116_c(this.field_146297_k, p_73864_1_, p_73864_2_)) { @@ -257,7 +217,7 @@ } } } -@@ -456,8 +477,12 @@ +@@ -456,8 +475,12 @@ this.field_146289_q = p_146280_1_.field_71466_p; this.field_146294_l = p_146280_2_; this.field_146295_m = p_146280_3_; @@ -270,7 +230,7 @@ } public void func_183500_a(int p_183500_1_, int p_183500_2_) -@@ -476,7 +501,10 @@ +@@ -476,7 +499,10 @@ { while (Mouse.next()) { @@ -281,7 +241,7 @@ } } -@@ -484,7 +512,10 @@ +@@ -484,7 +510,10 @@ { while (Keyboard.next()) { @@ -292,7 +252,7 @@ } } } -@@ -546,6 +577,7 @@ +@@ -546,6 +575,7 @@ public void func_146276_q_() { this.func_146270_b(0); @@ -300,7 +260,7 @@ } public void func_146270_b(int p_146270_1_) -@@ -570,19 +602,10 @@ +@@ -570,19 +600,10 @@ GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); float f = 32.0F; bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181709_i); @@ -324,7 +284,7 @@ tessellator.func_78381_a(); } -@@ -591,7 +614,6 @@ +@@ -591,7 +612,6 @@ return true; } @@ -332,7 +292,7 @@ public void func_73878_a(boolean p_73878_1_, int p_73878_2_) { if (p_73878_2_ == 31102009) -@@ -611,13 +633,13 @@ +@@ -611,13 +631,13 @@ try { Class oclass = Class.forName("java.awt.Desktop");