Fix misobfed methods due to mapping conflict.

This commit is contained in:
LexManos 2019-06-08 09:22:03 -07:00
parent 9fa4641cb0
commit 728b4857c3
8 changed files with 3 additions and 140 deletions

View File

@ -1,14 +1,5 @@
--- a/net/minecraft/client/gui/recipebook/RecipeBookGui.java
+++ b/net/minecraft/client/gui/recipebook/RecipeBookGui.java
@@ -367,7 +367,7 @@
return true;
} else if (this.field_191888_F.field_71474_y.field_74310_D.func_197976_a(p_keyPressed_1_, p_keyPressed_2_) && !this.field_193962_q.isFocused()) {
this.field_199738_u = true;
- this.field_193962_q.func_146195_b(true);
+ this.field_193962_q.setFocused(true);
return true;
} else {
return false;
@@ -421,7 +421,7 @@
languagemanager.func_135045_a(language);

View File

@ -1,29 +0,0 @@
--- a/net/minecraft/client/gui/screen/AbstractCommandBlockScreen.java
+++ b/net/minecraft/client/gui/screen/AbstractCommandBlockScreen.java
@@ -86,7 +86,7 @@
this.field_195239_f.func_146180_a("-");
this.children.add(this.field_195239_f);
this.func_212928_a(this.field_195237_a);
- this.field_195237_a.func_146195_b(true);
+ this.field_195237_a.setFocused(true);
this.func_209106_o();
}
@@ -247,7 +247,7 @@
if (!list.isEmpty()) {
this.field_209111_t.addAll(list);
- this.field_209112_u = MathHelper.func_76125_a(this.field_195237_a.func_195611_j(suggestioncontext.startPos), 0, this.field_195237_a.func_195611_j(0) + this.field_195237_a.func_146200_o() - i);
+ this.field_209112_u = MathHelper.func_76125_a(this.field_195237_a.func_195611_j(suggestioncontext.startPos), 0, this.field_195237_a.func_195611_j(0) + this.field_195237_a.getWidth() - i);
this.field_209113_v = i;
}
@@ -290,7 +290,7 @@
i = Math.max(i, this.font.func_78256_a(suggestion.getText()));
}
- int j = MathHelper.func_76125_a(this.field_195237_a.func_195611_j(suggestions.getRange().getStart()), 0, this.field_195237_a.func_195611_j(0) + this.field_195237_a.func_146200_o() - i);
+ int j = MathHelper.func_76125_a(this.field_195237_a.func_195611_j(suggestions.getRange().getStart()), 0, this.field_195237_a.func_195611_j(0) + this.field_195237_a.getWidth() - i);
this.field_209116_y = new AbstractCommandBlockScreen.SuggestionsList(j, 72, i, suggestions);
}
}

View File

@ -1,11 +0,0 @@
--- a/net/minecraft/client/gui/screen/AddServerScreen.java
+++ b/net/minecraft/client/gui/screen/AddServerScreen.java
@@ -53,7 +53,7 @@
protected void init() {
this.minecraft.field_195559_v.func_197967_a(true);
this.field_146309_g = new TextFieldWidget(this.font, this.width / 2 - 100, 66, 200, 20, I18n.func_135052_a("addServer.enterName"));
- this.field_146309_g.func_146195_b(true);
+ this.field_146309_g.setFocused(true);
this.field_146309_g.func_146180_a(this.field_146311_h.field_78847_a);
this.field_146309_g.func_212954_a(this::func_213028_a);
this.children.add(this.field_146309_g);

View File

@ -1,11 +0,0 @@
--- a/net/minecraft/client/gui/screen/ChatScreen.java
+++ b/net/minecraft/client/gui/screen/ChatScreen.java
@@ -351,7 +351,7 @@
public void render(int p_render_1_, int p_render_2_, float p_render_3_) {
this.setFocused(this.field_146415_a);
- this.field_146415_a.func_146195_b(true);
+ this.field_146415_a.setFocused(true);
fill(2, this.height - 14, this.width - 2, this.height - 2, this.minecraft.field_71474_y.func_216839_a(Integer.MIN_VALUE));
this.field_146415_a.render(p_render_1_, p_render_2_, p_render_3_);
if (this.field_195139_w != null) {

View File

@ -1,11 +0,0 @@
--- a/net/minecraft/client/gui/screen/ServerListScreen.java
+++ b/net/minecraft/client/gui/screen/ServerListScreen.java
@@ -37,7 +37,7 @@
}));
this.field_146302_g = new TextFieldWidget(this.font, this.width / 2 - 100, 116, 200, 20, I18n.func_135052_a("addServer.enterIp"));
this.field_146302_g.func_146203_f(128);
- this.field_146302_g.func_146195_b(true);
+ this.field_146302_g.setFocused(true);
this.field_146302_g.func_146180_a(this.minecraft.field_71474_y.field_74332_R);
this.field_146302_g.func_212954_a((p_213024_1_) -> {
this.func_195168_i();

View File

@ -119,7 +119,7 @@
this.field_147008_s.clear();
(this.field_147002_h).field_148330_a.clear();
if (p_147050_1_ == ItemGroup.field_192395_m) {
@@ -494,19 +531,21 @@
@@ -494,13 +531,15 @@
}
if (this.field_147062_A != null) {
@ -127,8 +127,7 @@
+ if (p_147050_1_.hasSearchBar()) {
this.field_147062_A.func_146189_e(true);
this.field_147062_A.func_146205_d(false);
- this.field_147062_A.func_146195_b(true);
+ this.field_147062_A.setFocused(true);
this.field_147062_A.func_146195_b(true);
if (i != p_147050_1_.func_78021_a()) {
this.field_147062_A.func_146180_a("");
}
@ -137,13 +136,6 @@
this.func_147053_i();
} else {
this.field_147062_A.func_146189_e(false);
this.field_147062_A.func_146205_d(true);
- this.field_147062_A.func_146195_b(false);
+ this.field_147062_A.setFocused(false);
this.field_147062_A.func_146180_a("");
}
}
@@ -560,16 +599,35 @@
this.renderBackground();
super.render(p_render_1_, p_render_2_, p_render_3_);

View File

@ -1,58 +0,0 @@
--- a/net/minecraft/client/gui/widget/TextFieldWidget.java
+++ b/net/minecraft/client/gui/widget/TextFieldWidget.java
@@ -349,7 +349,7 @@
} else {
boolean flag = p_mouseClicked_1_ >= (double)this.x && p_mouseClicked_1_ < (double)(this.x + this.width) && p_mouseClicked_3_ >= (double)this.y && p_mouseClicked_3_ < (double)(this.y + this.height);
if (this.field_146212_n) {
- this.func_146195_b(flag);
+ this.setFocused(flag);
}
if (this.isFocused() && flag && p_mouseClicked_5_ == 0) {
@@ -358,7 +358,7 @@
i -= 4;
}
- String s = this.field_146211_a.func_78269_a(this.field_146216_j.substring(this.field_146225_q), this.func_146200_o());
+ String s = this.field_146211_a.func_78269_a(this.field_146216_j.substring(this.field_146225_q), this.getWidth());
this.func_146190_e(this.field_146211_a.func_78269_a(s, i).length() + this.field_146225_q);
return true;
} else {
@@ -367,8 +367,8 @@
}
}
- public void func_146195_b(boolean p_146195_1_) {
- super.setFocused(p_146195_1_);
+ public void setFocused(boolean isFocusedIn) {
+ super.setFocused(isFocusedIn);
}
public void renderButton(int p_renderButton_1_, int p_renderButton_2_, float p_renderButton_3_) {
@@ -381,7 +381,7 @@
int i = this.field_146226_p ? this.field_146222_t : this.field_146221_u;
int j = this.field_146224_r - this.field_146225_q;
int k = this.field_146223_s - this.field_146225_q;
- String s = this.field_146211_a.func_78269_a(this.field_146216_j.substring(this.field_146225_q), this.func_146200_o());
+ String s = this.field_146211_a.func_78269_a(this.field_146216_j.substring(this.field_146225_q), this.getWidth());
boolean flag = j >= 0 && j <= s.length();
boolean flag1 = this.isFocused() && this.field_146214_l / 6 % 2 == 0 && flag;
int l = this.field_146215_m ? this.x + 4 : this.x;
@@ -522,7 +522,7 @@
this.field_146226_p = p_146184_1_;
}
- public int func_146200_o() {
+ public int getWidth() {
return this.func_146181_i() ? this.width - 8 : this.width;
}
@@ -534,7 +534,7 @@
this.field_146225_q = i;
}
- int j = this.func_146200_o();
+ int j = this.getWidth();
String s = this.field_146211_a.func_78269_a(this.field_146216_j.substring(this.field_146225_q), j);
int k = s.length() + this.field_146225_q;
if (this.field_146223_s == this.field_146225_q) {

View File

@ -283,7 +283,7 @@ public class GuiModList extends Screen
children.add(search);
children.add(modList);
children.add(modInfo);
search.setFocused(true);
search.setFocused2(true);
search.setCanLoseFocus(true);
final int width = listWidth / numButtons;