diff --git a/client/net/minecraftforge/client/GuiIngameForge.java b/client/net/minecraftforge/client/GuiIngameForge.java index e75f614a3..e8cad6d05 100644 --- a/client/net/minecraftforge/client/GuiIngameForge.java +++ b/client/net/minecraftforge/client/GuiIngameForge.java @@ -150,6 +150,8 @@ public class GuiIngameForge extends GuiIngame GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_ALPHA_TEST); + + post(ALL); } public ScaledResolution getResolution() diff --git a/common/net/minecraftforge/event/ASMEventHandler.java b/common/net/minecraftforge/event/ASMEventHandler.java index fdddb3993..a9af9d329 100644 --- a/common/net/minecraftforge/event/ASMEventHandler.java +++ b/common/net/minecraftforge/event/ASMEventHandler.java @@ -3,12 +3,15 @@ package net.minecraftforge.event; import static org.objectweb.asm.Opcodes.*; import java.lang.reflect.Method; +import java.util.HashMap; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Type; +import com.google.common.collect.Maps; + public class ASMEventHandler implements IEventListener { @@ -16,6 +19,7 @@ public class ASMEventHandler implements IEventListener private static final String HANDLER_DESC = Type.getInternalName(IEventListener.class); private static final String HANDLER_FUNC_DESC = Type.getMethodDescriptor(IEventListener.class.getDeclaredMethods()[0]); private static final ASMClassLoader LOADER = new ASMClassLoader(); + private static final HashMap> cache = Maps.newHashMap(); private final IEventListener handler; private final ForgeSubscribe subInfo; @@ -44,6 +48,11 @@ public class ASMEventHandler implements IEventListener public Class createWrapper(Method callback) { + if (cache.containsKey(callback)) + { + return cache.get(callback); + } + ClassWriter cw = new ClassWriter(0); MethodVisitor mv; @@ -92,7 +101,9 @@ public class ASMEventHandler implements IEventListener mv.visitEnd(); } cw.visitEnd(); - return LOADER.define(name, cw.toByteArray()); + Class ret = LOADER.define(name, cw.toByteArray()); + cache.put(callback, ret); + return ret; } private String getUniqueName(Method callback) diff --git a/common/net/minecraftforge/event/EventBus.java b/common/net/minecraftforge/event/EventBus.java index cce20e92f..3fe149c44 100644 --- a/common/net/minecraftforge/event/EventBus.java +++ b/common/net/minecraftforge/event/EventBus.java @@ -24,6 +24,11 @@ public class EventBus public void register(Object target) { + if (listeners.containsKey(target)) + { + return; + } + Set> supers = TypeToken.of(target.getClass()).getTypes().rawTypes(); for (Method method : target.getClass().getMethods()) { diff --git a/fml b/fml index edc1fb24e..59fe90569 160000 --- a/fml +++ b/fml @@ -1 +1 @@ -Subproject commit edc1fb24e2cad9badd2dd18ccccd590d77156e18 +Subproject commit 59fe905695421a5be9370b0009ef794abaaf75bb diff --git a/patches/minecraft/net/minecraft/block/BlockPortal.java.patch b/patches/minecraft/net/minecraft/block/BlockPortal.java.patch new file mode 100644 index 000000000..a0b0d74b5 --- /dev/null +++ b/patches/minecraft/net/minecraft/block/BlockPortal.java.patch @@ -0,0 +1,11 @@ +--- ../src_base/minecraft/net/minecraft/block/BlockPortal.java ++++ ../src_work/minecraft/net/minecraft/block/BlockPortal.java +@@ -118,7 +118,7 @@ + } + else + { +- if (par1World.getBlockId(par2 - b0, par3, par4 - b1) == 0) ++ if (par1World.isAirBlock(par2 - b0, par3, par4 - b1)) + { + par2 -= b0; + par4 -= b1; diff --git a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch index 56adb7ccf..aaf40dd18 100644 --- a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch @@ -8,7 +8,19 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderHelper; -@@ -203,8 +204,11 @@ +@@ -139,7 +140,11 @@ + } + } + ++ //Forge: Force lighting to be disabled as there are some issue where lighting would ++ //incorrectly be applied based on items that are in the inventory. ++ GL11.glDisable(GL11.GL_LIGHTING); + this.drawGuiContainerForegroundLayer(par1, par2); ++ GL11.glEnable(GL11.GL_LIGHTING); + InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory; + ItemStack itemstack = this.draggedStack == null ? inventoryplayer.getItemStack() : this.draggedStack; + +@@ -203,8 +208,11 @@ GL11.glTranslatef(0.0F, 0.0F, 32.0F); this.zLevel = 200.0F; itemRenderer.zLevel = 200.0F; @@ -22,7 +34,7 @@ this.zLevel = 0.0F; itemRenderer.zLevel = 0.0F; } -@@ -225,7 +229,8 @@ +@@ -225,7 +233,8 @@ } } @@ -32,7 +44,7 @@ } /** -@@ -238,6 +243,11 @@ +@@ -238,6 +247,11 @@ } protected void func_102021_a(List par1List, int par2, int par3) @@ -44,7 +56,7 @@ { if (!par1List.isEmpty()) { -@@ -251,7 +261,7 @@ +@@ -251,7 +265,7 @@ while (iterator.hasNext()) { String s = (String)iterator.next(); @@ -53,7 +65,7 @@ if (l > k) { -@@ -296,7 +306,7 @@ +@@ -296,7 +310,7 @@ for (int k2 = 0; k2 < par1List.size(); ++k2) { String s1 = (String)par1List.get(k2); diff --git a/patches/minecraft/net/minecraft/util/ChunkCoordinates.java.patch b/patches/minecraft/net/minecraft/util/ChunkCoordinates.java.patch new file mode 100644 index 000000000..df4f80f89 --- /dev/null +++ b/patches/minecraft/net/minecraft/util/ChunkCoordinates.java.patch @@ -0,0 +1,17 @@ +--- ../src_base/minecraft/net/minecraft/util/ChunkCoordinates.java ++++ ../src_work/minecraft/net/minecraft/util/ChunkCoordinates.java +@@ -64,10 +64,10 @@ + */ + public float getDistanceSquared(int par1, int par2, int par3) + { +- int l = this.posX - par1; +- int i1 = this.posY - par2; +- int j1 = this.posZ - par3; +- return (float)(l * l + i1 * i1 + j1 * j1); ++ float l = this.posX - par1; ++ float i1 = this.posY - par2; ++ float j1 = this.posZ - par3; ++ return l * l + i1 * i1 + j1 * j1; + } + + /** diff --git a/patches/minecraft/net/minecraft/village/VillageCollection.java.patch b/patches/minecraft/net/minecraft/village/VillageCollection.java.patch new file mode 100644 index 000000000..b0870dfaf --- /dev/null +++ b/patches/minecraft/net/minecraft/village/VillageCollection.java.patch @@ -0,0 +1,24 @@ +--- ../src_base/minecraft/net/minecraft/village/VillageCollection.java ++++ ../src_work/minecraft/net/minecraft/village/VillageCollection.java +@@ -128,9 +128,9 @@ + + if (f1 < f) + { +- int i1 = par4 + village1.getVillageRadius(); +- +- if (f1 <= (float)(i1 * i1)) ++ float i1 = par4 + village1.getVillageRadius(); ++ ++ if (f1 <= i1 * i1) + { + village = village1; + f = f1; +@@ -165,7 +165,7 @@ + { + Village village = (Village)iterator.next(); + int j = (int)village.getCenter().getDistanceSquared(villagedoorinfo.posX, villagedoorinfo.posY, villagedoorinfo.posZ); +- int k = 32 + village.getVillageRadius(); ++ float k = 32f + village.getVillageRadius(); + + if (j > k * k) + { diff --git a/release.py b/release.py index b8e8b7216..1f9f19bda 100644 --- a/release.py +++ b/release.py @@ -2,6 +2,7 @@ import os, os.path, sys, glob import shutil, fnmatch import logging, zipfile, re from optparse import OptionParser +from urllib2 import HTTPError forge_dir = os.path.dirname(os.path.abspath(__file__)) from forge import reset_logger, load_version, zip_folder, zip_create, inject_version, build_forge_dev @@ -98,8 +99,12 @@ def main(): # options.skip_changelog = True #Disable till jenkins fixes its shit if not options.skip_changelog: - changelog_file = 'forge-%s/minecraftforge-changelog-%s.txt' % (version_str, version_str) - make_changelog("http://jenkins.minecraftforge.net/job/minecraftforge/", build_num, changelog_file, version_str) + changelog_file = 'forge-%s/minecraftforge-changelog-%s.txt' % (version_str, version_str) + try: + make_changelog("http://jenkins.minecraftforge.net/job/minecraftforge/", build_num, changelog_file, version_str) + except HTTPError, e: + print 'Changelog failed to generate: %s' % e + options.skip_changelog = True version_file = 'forgeversion.properties' if os.path.exists(version_file):