diff --git a/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch index 6017c729c0..c2b87f70fb 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch @@ -1,12 +1,12 @@ --- ../src-base/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java +++ ../src-work/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java -@@ -107,6 +107,9 @@ - { - BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX, this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ); +@@ -177,6 +177,9 @@ + long l = j - k; + List list = Lists.newArrayList(new String[] {String.format("Java: %s %dbit", new Object[]{System.getProperty("java.version"), Integer.valueOf(this.mc.isJava64bit() ? 64 : 32)}), String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)), Long.valueOf(bytesToMb(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j))}), "", String.format("CPU: %s", new Object[]{OpenGlHelper.func_183029_j()}), "", String.format("Display: %dx%d (%s)", new Object[]{Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), GL11.glGetString(GL11.GL_VENDOR)}), GL11.glGetString(GL11.GL_RENDERER), GL11.glGetString(GL11.GL_VERSION)}); -+ arraylist.add(""); -+ arraylist.addAll(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(false)); ++ list.add(""); ++ list.addAll(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(false)); + if (this.isReducedDebug()) { - return Lists.newArrayList(new String[] {"Minecraft 1.8.8 (" + this.mc.getVersion() + "/" + ClientBrandRetriever.getClientModName() + ")", this.mc.debug, this.mc.renderGlobal.getDebugInfoRenders(), this.mc.renderGlobal.getDebugInfoEntities(), "P: " + this.mc.effectRenderer.getStatistics() + ". T: " + this.mc.theWorld.getDebugLoadedEntities(), this.mc.theWorld.getProviderName(), "", String.format("Chunk-relative: %d %d %d", new Object[]{Integer.valueOf(blockpos.getX() & 15), Integer.valueOf(blockpos.getY() & 15), Integer.valueOf(blockpos.getZ() & 15)})}); + return list; diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch index 90194230c9..6eb02f833b 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch @@ -16,7 +16,19 @@ } } -@@ -103,7 +105,17 @@ +@@ -83,9 +85,10 @@ + { + TileEntity tileentity = null; + ++ Class oclass = null; + try + { +- Class oclass = (Class)nameToClassMap.get(nbt.getString("id")); ++ oclass = (Class)nameToClassMap.get(nbt.getString("id")); + + if (oclass != null) + { +@@ -103,7 +106,17 @@ } else { @@ -34,7 +46,7 @@ } return tileentity; -@@ -135,7 +147,6 @@ +@@ -135,7 +148,6 @@ } } @@ -42,7 +54,7 @@ public double getDistanceSq(double x, double y, double z) { double d0 = (double)this.pos.getX() + 0.5D - x; -@@ -283,4 +294,135 @@ +@@ -283,4 +295,135 @@ addMapping(TileEntityFlowerPot.class, "FlowerPot"); addMapping(TileEntityBanner.class, "Banner"); } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch new file mode 100644 index 0000000000..c8e28eb858 --- /dev/null +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch @@ -0,0 +1,35 @@ +--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityHopper.java ++++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityHopper.java +@@ -516,17 +516,31 @@ + + if (itemstack == null) + { ++ //Forge: BUGFIX: Again, make things respect max stack sizes. ++ int max = Math.min(p_174916_1_.getMaxStackSize(), p_174916_0_.getInventoryStackLimit()); ++ if (max >= p_174916_1_.stackSize) ++ { + p_174916_0_.setInventorySlotContents(p_174916_2_, p_174916_1_); + p_174916_1_ = null; ++ } ++ else ++ { ++ p_174916_0_.setInventorySlotContents(p_174916_2_, p_174916_1_.splitStack(max)); ++ } + flag = true; + } + else if (canCombine(itemstack, p_174916_1_)) + { +- int i = p_174916_1_.getMaxStackSize() - itemstack.stackSize; ++ //Forge: BUGFIX: Again, make things respect max stack sizes. ++ int max = Math.min(p_174916_1_.getMaxStackSize(), p_174916_0_.getInventoryStackLimit()); ++ if (max > itemstack.stackSize) ++ { ++ int i = max - itemstack.stackSize; + int j = Math.min(p_174916_1_.stackSize, i); + p_174916_1_.stackSize -= j; + itemstack.stackSize += j; + flag = j > 0; ++ } + } + + if (flag) diff --git a/rejects/minecraft/net/minecraft/tileentity/TileEntity.java.patch.rej b/rejects/minecraft/net/minecraft/tileentity/TileEntity.java.patch.rej deleted file mode 100644 index 7a2b4ecfd6..0000000000 --- a/rejects/minecraft/net/minecraft/tileentity/TileEntity.java.patch.rej +++ /dev/null @@ -1,13 +0,0 @@ -++++ REJECTED PATCH 3 - { - TileEntity tileentity = null; - -+ Class oclass = null; - try - { -- Class oclass = (Class)nameToClassMap.get(nbt.getString("id")); -+ oclass = (Class)nameToClassMap.get(nbt.getString("id")); - - if (oclass != null) - { -++++ END PATCH diff --git a/rejects/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch.rej b/rejects/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch.rej deleted file mode 100644 index 5e7eb1c9e1..0000000000 --- a/rejects/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch.rej +++ /dev/null @@ -1,39 +0,0 @@ -++++ REJECTED PATCH 1 - - if (itemstack1 == null) - { -- p_174916_0_.setInventorySlotContents(p_174916_2_, p_174916_1_); -- p_174916_1_ = null; -+ //Forge: BUGFIX: Again, make things respect max stack sizes. -+ int max = Math.min(p_174916_1_.getMaxStackSize(), p_174916_0_.getInventoryStackLimit()); -+ if (max >= p_174916_1_.stackSize) -+ { -+ p_174916_0_.setInventorySlotContents(p_174916_2_, p_174916_1_); -+ p_174916_1_ = null; -+ } -+ else -+ { -+ p_174916_0_.setInventorySlotContents(p_174916_2_, p_174916_1_.splitStack(max)); -+ } - flag = true; - } - else if (canCombine(itemstack1, p_174916_1_)) - { -- int j = p_174916_1_.getMaxStackSize() - itemstack1.stackSize; -- int k = Math.min(p_174916_1_.stackSize, j); -- p_174916_1_.stackSize -= k; -- itemstack1.stackSize += k; -- flag = k > 0; -+ //Forge: BUGFIX: Again, make things respect max stack sizes. -+ int max = Math.min(p_174916_1_.getMaxStackSize(), p_174916_0_.getInventoryStackLimit()); -+ if (max > itemstack1.stackSize) -+ { -+ int size = Math.min(p_174916_1_.stackSize, max - itemstack1.stackSize); -+ p_174916_1_.stackSize -= size; -+ itemstack1.stackSize += size; -+ flag = size > 0; -+ } - } - - if (flag) -++++ END PATCH