Merge branch 'master' into newliquid
This commit is contained in:
commit
ab62ca7b1f
9 changed files with 96 additions and 9 deletions
|
@ -150,6 +150,8 @@ public class GuiIngameForge extends GuiIngame
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||||
|
|
||||||
|
post(ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScaledResolution getResolution()
|
public ScaledResolution getResolution()
|
||||||
|
|
|
@ -3,12 +3,15 @@ package net.minecraftforge.event;
|
||||||
import static org.objectweb.asm.Opcodes.*;
|
import static org.objectweb.asm.Opcodes.*;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
import org.objectweb.asm.ClassWriter;
|
import org.objectweb.asm.ClassWriter;
|
||||||
import org.objectweb.asm.MethodVisitor;
|
import org.objectweb.asm.MethodVisitor;
|
||||||
import org.objectweb.asm.Type;
|
import org.objectweb.asm.Type;
|
||||||
|
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
|
|
||||||
public class ASMEventHandler implements IEventListener
|
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_DESC = Type.getInternalName(IEventListener.class);
|
||||||
private static final String HANDLER_FUNC_DESC = Type.getMethodDescriptor(IEventListener.class.getDeclaredMethods()[0]);
|
private static final String HANDLER_FUNC_DESC = Type.getMethodDescriptor(IEventListener.class.getDeclaredMethods()[0]);
|
||||||
private static final ASMClassLoader LOADER = new ASMClassLoader();
|
private static final ASMClassLoader LOADER = new ASMClassLoader();
|
||||||
|
private static final HashMap<Method, Class<?>> cache = Maps.newHashMap();
|
||||||
|
|
||||||
private final IEventListener handler;
|
private final IEventListener handler;
|
||||||
private final ForgeSubscribe subInfo;
|
private final ForgeSubscribe subInfo;
|
||||||
|
@ -44,6 +48,11 @@ public class ASMEventHandler implements IEventListener
|
||||||
|
|
||||||
public Class<?> createWrapper(Method callback)
|
public Class<?> createWrapper(Method callback)
|
||||||
{
|
{
|
||||||
|
if (cache.containsKey(callback))
|
||||||
|
{
|
||||||
|
return cache.get(callback);
|
||||||
|
}
|
||||||
|
|
||||||
ClassWriter cw = new ClassWriter(0);
|
ClassWriter cw = new ClassWriter(0);
|
||||||
MethodVisitor mv;
|
MethodVisitor mv;
|
||||||
|
|
||||||
|
@ -92,7 +101,9 @@ public class ASMEventHandler implements IEventListener
|
||||||
mv.visitEnd();
|
mv.visitEnd();
|
||||||
}
|
}
|
||||||
cw.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)
|
private String getUniqueName(Method callback)
|
||||||
|
|
|
@ -24,6 +24,11 @@ public class EventBus
|
||||||
|
|
||||||
public void register(Object target)
|
public void register(Object target)
|
||||||
{
|
{
|
||||||
|
if (listeners.containsKey(target))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Set<? extends Class<?>> supers = TypeToken.of(target.getClass()).getTypes().rawTypes();
|
Set<? extends Class<?>> supers = TypeToken.of(target.getClass()).getTypes().rawTypes();
|
||||||
for (Method method : target.getClass().getMethods())
|
for (Method method : target.getClass().getMethods())
|
||||||
{
|
{
|
||||||
|
|
2
fml
2
fml
|
@ -1 +1 @@
|
||||||
Subproject commit edc1fb24e2cad9badd2dd18ccccd590d77156e18
|
Subproject commit 59fe905695421a5be9370b0009ef794abaaf75bb
|
11
patches/minecraft/net/minecraft/block/BlockPortal.java.patch
Normal file
11
patches/minecraft/net/minecraft/block/BlockPortal.java.patch
Normal file
|
@ -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;
|
|
@ -8,7 +8,19 @@
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.renderer.OpenGlHelper;
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
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);
|
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
|
||||||
this.zLevel = 200.0F;
|
this.zLevel = 200.0F;
|
||||||
itemRenderer.zLevel = 200.0F;
|
itemRenderer.zLevel = 200.0F;
|
||||||
|
@ -22,7 +34,7 @@
|
||||||
this.zLevel = 0.0F;
|
this.zLevel = 0.0F;
|
||||||
itemRenderer.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)
|
protected void func_102021_a(List par1List, int par2, int par3)
|
||||||
|
@ -44,7 +56,7 @@
|
||||||
{
|
{
|
||||||
if (!par1List.isEmpty())
|
if (!par1List.isEmpty())
|
||||||
{
|
{
|
||||||
@@ -251,7 +261,7 @@
|
@@ -251,7 +265,7 @@
|
||||||
while (iterator.hasNext())
|
while (iterator.hasNext())
|
||||||
{
|
{
|
||||||
String s = (String)iterator.next();
|
String s = (String)iterator.next();
|
||||||
|
@ -53,7 +65,7 @@
|
||||||
|
|
||||||
if (l > k)
|
if (l > k)
|
||||||
{
|
{
|
||||||
@@ -296,7 +306,7 @@
|
@@ -296,7 +310,7 @@
|
||||||
for (int k2 = 0; k2 < par1List.size(); ++k2)
|
for (int k2 = 0; k2 < par1List.size(); ++k2)
|
||||||
{
|
{
|
||||||
String s1 = (String)par1List.get(k2);
|
String s1 = (String)par1List.get(k2);
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
|
@ -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)
|
||||||
|
{
|
|
@ -2,6 +2,7 @@ import os, os.path, sys, glob
|
||||||
import shutil, fnmatch
|
import shutil, fnmatch
|
||||||
import logging, zipfile, re
|
import logging, zipfile, re
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
from urllib2 import HTTPError
|
||||||
|
|
||||||
forge_dir = os.path.dirname(os.path.abspath(__file__))
|
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
|
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
|
# options.skip_changelog = True #Disable till jenkins fixes its shit
|
||||||
if not options.skip_changelog:
|
if not options.skip_changelog:
|
||||||
changelog_file = 'forge-%s/minecraftforge-changelog-%s.txt' % (version_str, version_str)
|
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)
|
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'
|
version_file = 'forgeversion.properties'
|
||||||
if os.path.exists(version_file):
|
if os.path.exists(version_file):
|
||||||
|
|
Loading…
Reference in a new issue