GuiButton, GuiChat, GuiCreateWorld, GuiIngameMenu, ServerListEntryNormal, GuiStats rejects updated.
This commit is contained in:
parent
b6f91817f0
commit
632c190e6f
12 changed files with 91 additions and 97 deletions
|
@ -8,3 +8,15 @@
|
||||||
|
|
||||||
public GuiButton(int buttonId, int x, int y, String buttonText)
|
public GuiButton(int buttonId, int x, int y, String buttonText)
|
||||||
{
|
{
|
||||||
|
@@ -75,6 +76,11 @@
|
||||||
|
this.mouseDragged(mc, mouseX, mouseY);
|
||||||
|
int j = 14737632;
|
||||||
|
|
||||||
|
+ if (packedFGColour != 0)
|
||||||
|
+ {
|
||||||
|
+ j = packedFGColour;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
if (!this.enabled)
|
||||||
|
{
|
||||||
|
j = 10526880;
|
||||||
|
|
|
@ -16,3 +16,16 @@
|
||||||
BlockPos blockpos = null;
|
BlockPos blockpos = null;
|
||||||
|
|
||||||
if (this.mc.objectMouseOver != null && this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
if (this.mc.objectMouseOver != null && this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||||
|
@@ -282,6 +283,12 @@
|
||||||
|
this.playerNamesFound = false;
|
||||||
|
this.foundPlayerNames.clear();
|
||||||
|
|
||||||
|
+ String[] complete = net.minecraftforge.client.ClientCommandHandler.instance.latestAutoComplete;
|
||||||
|
+ if (complete != null)
|
||||||
|
+ {
|
||||||
|
+ p_146406_1_ = com.google.common.collect.ObjectArrays.concat(complete, p_146406_1_, String.class);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
for (String s : p_146406_1_)
|
||||||
|
{
|
||||||
|
if (s.length() > 0)
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
||||||
@@ -313,14 +313,7 @@
|
@@ -206,6 +206,8 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ WorldType.worldTypes[this.selectedIndex].onGUICreateWorldPress();
|
||||||
|
+
|
||||||
|
WorldSettings.GameType worldsettings$gametype = WorldSettings.GameType.getByName(this.field_146342_r);
|
||||||
|
WorldSettings worldsettings = new WorldSettings(i, worldsettings$gametype, this.field_146341_s, this.field_146337_w, WorldType.worldTypes[this.selectedIndex]);
|
||||||
|
worldsettings.setWorldName(this.chunkProviderSettingsJson);
|
||||||
|
@@ -313,14 +315,7 @@
|
||||||
}
|
}
|
||||||
else if (button.id == 8)
|
else if (button.id == 8)
|
||||||
{
|
{
|
||||||
|
@ -16,7 +25,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -372,7 +365,7 @@
|
@@ -372,7 +367,7 @@
|
||||||
this.btnBonusItems.visible = this.field_146344_y;
|
this.btnBonusItems.visible = this.field_146344_y;
|
||||||
this.btnMapType.visible = this.field_146344_y;
|
this.btnMapType.visible = this.field_146344_y;
|
||||||
this.btnAllowCommands.visible = this.field_146344_y;
|
this.btnAllowCommands.visible = this.field_146344_y;
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiIngameMenu.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/GuiIngameMenu.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngameMenu.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngameMenu.java
|
||||||
@@ -75,13 +75,19 @@
|
@@ -31,8 +31,9 @@
|
||||||
|
|
||||||
|
this.buttonList.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 24 + i, I18n.format("menu.returnToGame", new Object[0])));
|
||||||
|
this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + i, 98, 20, I18n.format("menu.options", new Object[0])));
|
||||||
|
+ this.buttonList.add(new GuiButton(12, this.width / 2 + 2, this.height / 4 + 96 + i, 98, 20, I18n.format("fml.menu.modoptions")));
|
||||||
|
GuiButton guibutton;
|
||||||
|
- this.buttonList.add(guibutton = new GuiButton(7, this.width / 2 + 2, this.height / 4 + 96 + i, 98, 20, I18n.format("menu.shareToLan", new Object[0])));
|
||||||
|
+ this.buttonList.add(guibutton = new GuiButton(7, this.width / 2 - 100, this.height / 4 + 72 + i, 200, 20, I18n.format("menu.shareToLan", new Object[0])));
|
||||||
|
this.buttonList.add(new GuiButton(5, this.width / 2 - 100, this.height / 4 + 48 + i, 98, 20, I18n.format("gui.achievements", new Object[0])));
|
||||||
|
this.buttonList.add(new GuiButton(6, this.width / 2 + 2, this.height / 4 + 48 + i, 98, 20, I18n.format("gui.stats", new Object[0])));
|
||||||
|
guibutton.enabled = this.mc.isSingleplayer() && !this.mc.getIntegratedServer().getPublic();
|
||||||
|
@@ -75,13 +76,19 @@
|
||||||
this.mc.setIngameFocus();
|
this.mc.setIngameFocus();
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
--- ../src-base/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
|
||||||
|
+++ ../src-work/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
|
||||||
|
@@ -84,7 +84,7 @@
|
||||||
|
boolean flag1 = this.field_148301_e.version < 47;
|
||||||
|
boolean flag2 = flag || flag1;
|
||||||
|
this.field_148300_d.fontRendererObj.drawString(this.field_148301_e.serverName, x + 32 + 3, y + 1, 16777215);
|
||||||
|
- List<String> list = this.field_148300_d.fontRendererObj.listFormattedStringToWidth(this.field_148301_e.serverMOTD, listWidth - 32 - 2);
|
||||||
|
+ List<String> list = this.field_148300_d.fontRendererObj.listFormattedStringToWidth(net.minecraftforge.fml.client.FMLClientHandler.instance().fixDescription(this.field_148301_e.serverMOTD), listWidth - 48 - 2);
|
||||||
|
|
||||||
|
for (int i = 0; i < Math.min(list.size(), 2); ++i)
|
||||||
|
{
|
||||||
|
@@ -178,6 +178,11 @@
|
||||||
|
int i1 = mouseX - x;
|
||||||
|
int j1 = mouseY - y;
|
||||||
|
|
||||||
|
+ String tooltip = net.minecraftforge.fml.client.FMLClientHandler.instance().enhanceServerListEntry(this, this.field_148301_e, x, listWidth, y, i1, j1);
|
||||||
|
+ if (tooltip != null)
|
||||||
|
+ {
|
||||||
|
+ this.field_148303_c.func_146793_a(tooltip);
|
||||||
|
+ } else
|
||||||
|
if (i1 >= listWidth - 15 && i1 <= listWidth - 5 && j1 >= 0 && j1 <= 8)
|
||||||
|
{
|
||||||
|
this.field_148303_c.func_146793_a(s1);
|
|
@ -0,0 +1,20 @@
|
||||||
|
--- ../src-base/minecraft/net/minecraft/client/gui/achievement/GuiStats.java
|
||||||
|
+++ ../src-work/minecraft/net/minecraft/client/gui/achievement/GuiStats.java
|
||||||
|
@@ -759,7 +759,7 @@
|
||||||
|
super(mcIn, GuiStats.this.width, GuiStats.this.height, 32, GuiStats.this.height - 64, GuiStats.this.fontRendererObj.FONT_HEIGHT * 4);
|
||||||
|
this.setShowSelectionBox(false);
|
||||||
|
|
||||||
|
- for (EntityList.EntityEggInfo entitylist$entityegginfo : EntityList.entityEggs.values())
|
||||||
|
+ for (EntityList.EntityEggInfo entitylist$entityegginfo : com.google.common.collect.Iterables.concat(EntityList.entityEggs.values(), net.minecraftforge.fml.common.registry.EntityRegistry.getEggs().values()))
|
||||||
|
{
|
||||||
|
if (GuiStats.this.field_146546_t.readStat(entitylist$entityegginfo.field_151512_d) > 0 || GuiStats.this.field_146546_t.readStat(entitylist$entityegginfo.field_151513_e) > 0)
|
||||||
|
{
|
||||||
|
@@ -795,7 +795,7 @@
|
||||||
|
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int p_180791_5_, int p_180791_6_)
|
||||||
|
{
|
||||||
|
EntityList.EntityEggInfo entitylist$entityegginfo = (EntityList.EntityEggInfo)this.field_148222_l.get(entryID);
|
||||||
|
- String s = I18n.format("entity." + EntityList.getStringFromID(entitylist$entityegginfo.spawnedID) + ".name", new Object[0]);
|
||||||
|
+ String s = I18n.format("entity." + entitylist$entityegginfo.name + ".name", new Object[0]);
|
||||||
|
int i = GuiStats.this.field_146546_t.readStat(entitylist$entityegginfo.field_151512_d);
|
||||||
|
int j = GuiStats.this.field_146546_t.readStat(entitylist$entityegginfo.field_151513_e);
|
||||||
|
String s1 = I18n.format("stat.entityKills", new Object[] {Integer.valueOf(i), s});
|
|
@ -1,15 +0,0 @@
|
||||||
++++ REJECTED PATCH 2
|
|
||||||
this.mouseDragged(mc, mouseX, mouseY);
|
|
||||||
int l = 14737632;
|
|
||||||
|
|
||||||
- if (!this.enabled)
|
|
||||||
+ if (packedFGColour != 0)
|
|
||||||
{
|
|
||||||
+ l = packedFGColour;
|
|
||||||
+ }
|
|
||||||
+ else if (!this.enabled)
|
|
||||||
+ {
|
|
||||||
l = 10526880;
|
|
||||||
}
|
|
||||||
else if (this.hovered)
|
|
||||||
++++ END PATCH
|
|
|
@ -1,15 +0,0 @@
|
||||||
++++ REJECTED PATCH 2
|
|
||||||
String[] astring1 = p_146406_1_;
|
|
||||||
int i = p_146406_1_.length;
|
|
||||||
|
|
||||||
+ String[] complete = net.minecraftforge.client.ClientCommandHandler.instance.latestAutoComplete;
|
|
||||||
+ if (complete != null)
|
|
||||||
+ {
|
|
||||||
+ astring1 = com.google.common.collect.ObjectArrays.concat(complete, astring1, String.class);
|
|
||||||
+ i = astring1.length;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
for (int j = 0; j < i; ++j)
|
|
||||||
{
|
|
||||||
String s = astring1[j];
|
|
||||||
++++ END PATCH
|
|
|
@ -1,10 +0,0 @@
|
||||||
++++ REJECTED PATCH 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ WorldType.worldTypes[this.selectedIndex].onGUICreateWorldPress();
|
|
||||||
+
|
|
||||||
WorldSettings.GameType gametype = WorldSettings.GameType.getByName(this.field_146342_r);
|
|
||||||
WorldSettings worldsettings = new WorldSettings(i, gametype, this.field_146341_s, this.field_146337_w, WorldType.worldTypes[this.selectedIndex]);
|
|
||||||
worldsettings.setWorldName(this.chunkProviderSettingsJson);
|
|
||||||
++++ END PATCH
|
|
|
@ -1,12 +0,0 @@
|
||||||
++++ REJECTED PATCH 1
|
|
||||||
|
|
||||||
this.buttonList.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 24 + b0, I18n.format("menu.returnToGame", new Object[0])));
|
|
||||||
this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + b0, 98, 20, I18n.format("menu.options", new Object[0])));
|
|
||||||
+ this.buttonList.add(new GuiButton(12, this.width / 2 + 2, this.height / 4 + 96 + b0, 98, 20, I18n.format("fml.menu.modoptions")));
|
|
||||||
GuiButton guibutton;
|
|
||||||
- this.buttonList.add(guibutton = new GuiButton(7, this.width / 2 + 2, this.height / 4 + 96 + b0, 98, 20, I18n.format("menu.shareToLan", new Object[0])));
|
|
||||||
+ this.buttonList.add(guibutton = new GuiButton(7, this.width / 2 - 100, this.height / 4 + 72 + b0, 200, 20, I18n.format("menu.shareToLan", new Object[0])));
|
|
||||||
this.buttonList.add(new GuiButton(5, this.width / 2 - 100, this.height / 4 + 48 + b0, 98, 20, I18n.format("gui.achievements", new Object[0])));
|
|
||||||
this.buttonList.add(new GuiButton(6, this.width / 2 + 2, this.height / 4 + 48 + b0, 98, 20, I18n.format("gui.stats", new Object[0])));
|
|
||||||
guibutton.enabled = this.mc.isSingleplayer() && !this.mc.getIntegratedServer().getPublic();
|
|
||||||
++++ END PATCH
|
|
|
@ -1,23 +0,0 @@
|
||||||
++++ REJECTED PATCH 1
|
|
||||||
boolean flag2 = this.field_148301_e.version < 47;
|
|
||||||
boolean flag3 = flag1 || flag2;
|
|
||||||
this.field_148300_d.fontRendererObj.drawString(this.field_148301_e.serverName, x + 32 + 3, y + 1, 16777215);
|
|
||||||
- List list = this.field_148300_d.fontRendererObj.listFormattedStringToWidth(this.field_148301_e.serverMOTD, listWidth - 32 - 2);
|
|
||||||
+ List list = this.field_148300_d.fontRendererObj.listFormattedStringToWidth(net.minecraftforge.fml.client.FMLClientHandler.instance().fixDescription(this.field_148301_e.serverMOTD), listWidth - 48 - 2);
|
|
||||||
|
|
||||||
for (int l1 = 0; l1 < Math.min(list.size(), 2); ++l1)
|
|
||||||
{
|
|
||||||
++++ END PATCH
|
|
||||||
++++ REJECTED PATCH 2
|
|
||||||
int k2 = mouseX - x;
|
|
||||||
int l2 = mouseY - y;
|
|
||||||
|
|
||||||
+ String tooltip = net.minecraftforge.fml.client.FMLClientHandler.instance().enhanceServerListEntry(this, this.field_148301_e, x, listWidth, y, k2, l2);
|
|
||||||
+ if (tooltip != null)
|
|
||||||
+ {
|
|
||||||
+ this.field_148303_c.func_146793_a(tooltip);
|
|
||||||
+ } else
|
|
||||||
if (k2 >= listWidth - 15 && k2 <= listWidth - 5 && l2 >= 0 && l2 <= 8)
|
|
||||||
{
|
|
||||||
this.field_148303_c.func_146793_a(s1);
|
|
||||||
++++ END PATCH
|
|
|
@ -1,19 +0,0 @@
|
||||||
++++ REJECTED PATCH 1
|
|
||||||
super(mcIn, GuiStats.this.width, GuiStats.this.height, 32, GuiStats.this.height - 64, GuiStats.this.fontRendererObj.FONT_HEIGHT * 4);
|
|
||||||
this.setShowSelectionBox(false);
|
|
||||||
Iterator iterator = EntityList.entityEggs.values().iterator();
|
|
||||||
+ iterator = com.google.common.collect.Iterators.concat(iterator, net.minecraftforge.fml.common.registry.EntityRegistry.getEggs().values().iterator());
|
|
||||||
|
|
||||||
while (iterator.hasNext())
|
|
||||||
{
|
|
||||||
++++ END PATCH
|
|
||||||
++++ REJECTED PATCH 2
|
|
||||||
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int p_180791_5_, int p_180791_6_)
|
|
||||||
{
|
|
||||||
EntityList.EntityEggInfo entityegginfo = (EntityList.EntityEggInfo)this.field_148222_l.get(entryID);
|
|
||||||
- String s = I18n.format("entity." + EntityList.getStringFromID(entityegginfo.spawnedID) + ".name", new Object[0]);
|
|
||||||
+ String s = I18n.format("entity." + entityegginfo.name + ".name", new Object[0]);
|
|
||||||
int k1 = GuiStats.this.field_146546_t.readStat(entityegginfo.field_151512_d);
|
|
||||||
int l1 = GuiStats.this.field_146546_t.readStat(entityegginfo.field_151513_e);
|
|
||||||
String s1 = I18n.format("stat.entityKills", new Object[] {Integer.valueOf(k1), s});
|
|
||||||
++++ END PATCH
|
|
Loading…
Reference in a new issue