diff --git a/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 51b5a9fbc..ffa2859f9 100644 --- a/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -28,15 +28,7 @@ this.field_71446_o = new TextureManager(this.field_110451_am); this.field_110451_am.func_110542_a(this.field_71446_o); this.field_147127_av = new SoundHandler(this.field_110451_am, this.field_71474_y); -@@ -457,6 +462,7 @@ - this.func_71357_I(); - this.field_71466_p = new FontRenderer(this.field_71474_y, new ResourceLocation("textures/font/ascii.png"), this.field_71446_o, false); - -+ - if (this.field_71474_y.field_74363_ab != null) - { - this.field_71466_p.func_78264_a(this.field_135017_as.func_135042_a() || this.field_71474_y.field_151455_aw); -@@ -508,6 +514,7 @@ +@@ -508,6 +513,7 @@ this.field_71446_o.func_130088_a(TextureMap.field_110576_c, new TextureMap(1, "textures/items")); GL11.glViewport(0, 0, this.field_71443_c, this.field_71440_d); this.field_71452_i = new EffectRenderer(this.field_71441_e, this.field_71446_o); @@ -44,7 +36,7 @@ this.func_71361_d("Post startup"); this.field_71456_v = new GuiIngame(this); -@@ -527,6 +534,7 @@ +@@ -527,6 +533,7 @@ this.func_71352_k(); } @@ -52,7 +44,7 @@ Display.setVSyncEnabled(this.field_71474_y.field_74352_v); } -@@ -915,9 +923,11 @@ +@@ -916,9 +923,11 @@ if (!this.field_71454_w) { @@ -64,7 +56,7 @@ } GL11.glFlush(); -@@ -1495,6 +1505,8 @@ +@@ -1496,6 +1505,8 @@ --this.field_71467_ac; } @@ -73,7 +65,7 @@ this.field_71424_I.func_76320_a("gui"); if (!this.field_71445_n) -@@ -1645,6 +1657,7 @@ +@@ -1646,6 +1657,7 @@ this.field_71462_r.func_146274_d(); } } @@ -81,7 +73,7 @@ } if (this.field_71429_W > 0) -@@ -1786,6 +1799,7 @@ +@@ -1787,6 +1799,7 @@ } } } @@ -89,7 +81,7 @@ } } -@@ -1977,6 +1991,8 @@ +@@ -1978,6 +1991,8 @@ this.field_71453_ak.func_74428_b(); } diff --git a/fml/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch b/fml/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch index f6b6c38a2..b820ec114 100644 --- a/fml/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch @@ -8,14 +8,14 @@ import cpw.mods.fml.relauncher.SideOnly; import java.awt.Color; @@ -312,6 +313,11 @@ - this.func_73731_b(fontrenderer, s2, k - fontrenderer.func_78256_a(s2) - 2, 2, 14737632); - s2 = "Allocated memory: " + i4 * 100L / l3 + "% (" + i4 / 1024L / 1024L + "MB)"; - this.func_73731_b(fontrenderer, s2, k - fontrenderer.func_78256_a(s2) - 2, 12, 14737632); + this.func_73731_b(fontrenderer, s, k - fontrenderer.func_78256_a(s) - 2, 2, 14737632); + s = "Allocated memory: " + k5 * 100L / i5 + "% (" + k5 / 1024L / 1024L + "MB)"; + this.func_73731_b(fontrenderer, s, k - fontrenderer.func_78256_a(s) - 2, 12, 14737632); + int offset = 22; + for (String brd : FMLCommonHandler.instance().getBrandings(false)) + { + this.func_73731_b(fontrenderer, brd, k - fontrenderer.func_78256_a(brd) - 2, offset+=10, 14737632); + } - k3 = MathHelper.func_76128_c(this.field_73839_d.field_71439_g.field_70165_t); - j3 = MathHelper.func_76128_c(this.field_73839_d.field_71439_g.field_70163_u); - int l4 = MathHelper.func_76128_c(this.field_73839_d.field_71439_g.field_70161_v); + j3 = MathHelper.func_76128_c(this.field_73839_d.field_71439_g.field_70165_t); + k3 = MathHelper.func_76128_c(this.field_73839_d.field_71439_g.field_70163_u); + int l3 = MathHelper.func_76128_c(this.field_73839_d.field_71439_g.field_70161_v); diff --git a/fml/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch b/fml/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch index 48522307b..f3665c4ea 100644 --- a/fml/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch +++ b/fml/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch @@ -12,7 +12,7 @@ MerchantRecipeList merchantrecipelist; merchantrecipelist = new MerchantRecipeList(); + VillagerRegistry.manageVillagerTrades(merchantrecipelist, this, this.func_70946_n(), this.field_70146_Z); - int j; + int k; label50: @@ -626,7 +628,7 @@ diff --git a/fml/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch b/fml/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch index 006967da7..c26514bc1 100644 --- a/fml/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch +++ b/fml/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch @@ -9,18 +9,15 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import io.netty.buffer.ByteBuf; -@@ -381,7 +383,10 @@ +@@ -385,6 +387,7 @@ { if (this.func_71197_b()) { + FMLCommonHandler.instance().handleServerStarted(); -+ long i = func_130071_aq(); -+ - long j = 0L; + long l = 0L; this.field_147147_p.func_151315_a(new ChatComponentText(this.field_71286_C)); - this.field_147147_p.func_151321_a(new ServerStatusResponse.MinecraftProtocolVersionIdentifier("1.7.2", 4)); -@@ -425,6 +430,7 @@ +@@ -429,6 +432,7 @@ Thread.sleep(1L); this.field_71296_Q = true; } @@ -28,7 +25,7 @@ } else { -@@ -462,6 +468,10 @@ +@@ -466,6 +470,10 @@ { try { @@ -39,7 +36,7 @@ this.func_71260_j(); this.field_71316_v = true; } -@@ -471,6 +481,8 @@ +@@ -475,6 +483,8 @@ } finally { @@ -48,7 +45,7 @@ this.func_71240_o(); } } -@@ -513,6 +525,7 @@ +@@ -517,6 +527,7 @@ { long i = System.nanoTime(); AxisAlignedBB.func_72332_a().func_72298_a(); @@ -56,7 +53,7 @@ ++this.field_71315_w; if (this.field_71295_T) -@@ -566,6 +579,7 @@ +@@ -570,6 +581,7 @@ this.field_71304_b.func_76319_b(); this.field_71304_b.func_76319_b(); @@ -64,7 +61,7 @@ } public void func_71190_q() -@@ -593,6 +607,7 @@ +@@ -597,6 +609,7 @@ } this.field_71304_b.func_76320_a("tick"); @@ -72,7 +69,7 @@ CrashReport crashreport; try -@@ -617,6 +632,7 @@ +@@ -621,6 +634,7 @@ throw new ReportedException(crashreport); } @@ -80,7 +77,7 @@ this.field_71304_b.func_76319_b(); this.field_71304_b.func_76320_a("tracker"); worldserver.func_73039_n().func_72788_a(); -@@ -695,7 +711,7 @@ +@@ -699,7 +713,7 @@ public String getServerModName() { diff --git a/fml/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch b/fml/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch index d6b7ade5c..4af9edd62 100644 --- a/fml/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch +++ b/fml/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch @@ -31,7 +31,7 @@ this.field_71340_o.func_73667_a("max-build-height", Integer.valueOf(this.func_71207_Z())); + if (!FMLCommonHandler.instance().handleServerAboutToStart(this)) { return false; } field_155771_h.info("Preparing level \"" + this.func_71270_I() + "\""); - this.func_71247_a(this.func_71270_I(), this.func_71270_I(), k, worldtype, s3); + this.func_71247_a(this.func_71270_I(), this.func_71270_I(), k, worldtype, s2); long i1 = System.nanoTime() - j; @@ -245,7 +251,7 @@ this.field_71339_n.func_72602_a(); diff --git a/fml/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch b/fml/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch index 3f471a2d2..fb88bdfbe 100644 --- a/fml/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch +++ b/fml/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch @@ -23,18 +23,18 @@ { private static final Logger field_151505_a = LogManager.getLogger(); @@ -260,11 +265,20 @@ - Entity entity = (Entity)iterator.next(); + Entity entity = (Entity)iterator1.next(); nbttagcompound1 = new NBTTagCompound(); - if (entity.func_70039_c(nbttagcompound1)) + try { - p_75820_1_.field_76644_m = true; -- nbttaglist1.func_74742_a(nbttagcompound1); +- nbttaglist2.func_74742_a(nbttagcompound1); + if (entity.func_70039_c(nbttagcompound1)) + { + p_75820_1_.field_76644_m = true; -+ nbttaglist1.func_74742_a(nbttagcompound1); ++ nbttaglist2.func_74742_a(nbttagcompound1); + } } + catch (Exception e) @@ -48,11 +48,11 @@ @@ -276,8 +290,16 @@ { - TileEntity tileentity = (TileEntity)iterator.next(); + TileEntity tileentity = (TileEntity)iterator1.next(); nbttagcompound1 = new NBTTagCompound(); + try { tileentity.func_145841_b(nbttagcompound1); - nbttaglist2.func_74742_a(nbttagcompound1); + nbttaglist3.func_74742_a(nbttagcompound1); + } + catch (Exception e) + { @@ -62,4 +62,4 @@ + } } - p_75820_3_.func_74782_a("TileEntities", nbttaglist2); + p_75820_3_.func_74782_a("TileEntities", nbttaglist3); diff --git a/fml/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch b/fml/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch index 9bc35797f..4cae5f165 100644 --- a/fml/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch +++ b/fml/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch @@ -24,6 +24,24 @@ - return new WorldInfo(nbttagcompound1); + worldInfo = new WorldInfo(nbttagcompound1); + FMLCommonHandler.instance().handleWorldDataLoad(this, worldInfo, nbttagcompound); ++ return worldInfo; + } + catch (Exception exception1) + { ++ if (FMLCommonHandler.instance().shouldServerBeKilledQuietly()) ++ { ++ throw (RuntimeException)exception1; ++ } + exception1.printStackTrace(); + } + } +@@ -129,10 +139,16 @@ + { + nbttagcompound = CompressedStreamTools.func_74796_a(new FileInputStream(file1)); + nbttagcompound1 = nbttagcompound.func_74775_l("Data"); +- return new WorldInfo(nbttagcompound1); ++ worldInfo = new WorldInfo(nbttagcompound1); ++ FMLCommonHandler.instance().handleWorldDataLoad(this, worldInfo, nbttagcompound); + return worldInfo; } catch (Exception exception) @@ -35,18 +53,7 @@ exception.printStackTrace(); } } -@@ -129,7 +139,9 @@ - { - nbttagcompound = CompressedStreamTools.func_74796_a(new FileInputStream(file1)); - nbttagcompound1 = nbttagcompound.func_74775_l("Data"); -- return new WorldInfo(nbttagcompound1); -+ worldInfo = new WorldInfo(nbttagcompound1); -+ FMLCommonHandler.instance().handleWorldDataLoad(this, worldInfo, nbttagcompound); -+ return worldInfo; - } - catch (Exception exception1) - { -@@ -146,6 +158,8 @@ +@@ -146,6 +162,8 @@ NBTTagCompound nbttagcompound2 = new NBTTagCompound(); nbttagcompound2.func_74782_a("Data", nbttagcompound1); @@ -55,7 +62,7 @@ try { File file1 = new File(this.field_75770_b, "level.dat_new"); -@@ -184,6 +198,8 @@ +@@ -184,6 +202,8 @@ NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.func_74782_a("Data", nbttagcompound);