Fixes
This commit is contained in:
parent
311ca8866e
commit
f4862dc40d
5 changed files with 46 additions and 13 deletions
|
@ -82,7 +82,7 @@ public class FMLCommonHandler
|
||||||
*/
|
*/
|
||||||
public void worldTickStart()
|
public void worldTickStart()
|
||||||
{
|
{
|
||||||
tickStart(ModContainer.TickType.WORLD,0.0);
|
tickStart(ModContainer.TickType.WORLD,0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -90,7 +90,7 @@ public class FMLCommonHandler
|
||||||
*/
|
*/
|
||||||
public void worldTickEnd()
|
public void worldTickEnd()
|
||||||
{
|
{
|
||||||
tickEnd(ModContainer.TickType.WORLD,0.0);
|
tickEnd(ModContainer.TickType.WORLD,0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tickStart(TickType type, Object ... data)
|
public void tickStart(TickType type, Object ... data)
|
||||||
|
|
|
@ -21,6 +21,8 @@ import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
import java.util.AbstractCollection;
|
import java.util.AbstractCollection;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -564,6 +566,9 @@ public class ModLoaderModContainer implements ModContainer
|
||||||
*/
|
*/
|
||||||
public void addRenderHandler(IBlockRenderInfo handler)
|
public void addRenderHandler(IBlockRenderInfo handler)
|
||||||
{
|
{
|
||||||
|
if (blockRenderInfos==null) {
|
||||||
|
blockRenderInfos=new ArrayList<IBlockRenderInfo>();
|
||||||
|
}
|
||||||
blockRenderInfos.add(handler);
|
blockRenderInfos.add(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,12 +578,18 @@ public class ModLoaderModContainer implements ModContainer
|
||||||
*/
|
*/
|
||||||
public void addKeyHandler(IKeyHandler handler)
|
public void addKeyHandler(IKeyHandler handler)
|
||||||
{
|
{
|
||||||
|
if (keyHandlers==null) {
|
||||||
|
keyHandlers=new ArrayList<IKeyHandler>();
|
||||||
|
}
|
||||||
keyHandlers.add(handler);
|
keyHandlers.add(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IKeyHandler> getKeys()
|
public List<IKeyHandler> getKeys()
|
||||||
{
|
{
|
||||||
|
if (keyHandlers==null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
return keyHandlers;
|
return keyHandlers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,27 @@ def main():
|
||||||
clazz=clazz[len("net/minecraft/src/"):]
|
clazz=clazz[len("net/minecraft/src/"):]
|
||||||
fh.write("minecraft_server/%s.class\n" %(clazz))
|
fh.write("minecraft_server/%s.class\n" %(clazz))
|
||||||
|
|
||||||
|
prelist = os.path.join(mcp_root,"temp","client.md5")
|
||||||
|
postlist = os.path.join(mcp_root,"temp","client_reobf.md5")
|
||||||
|
cmd = 'diff --unchanged-group-format='' --old-group-format='' --new-group-format=\'%%>\' --changed-group-format=\'%%>\' %s %s' % (prelist, postlist)
|
||||||
|
process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, bufsize=-1)
|
||||||
|
difflist,_= process.communicate()
|
||||||
|
srg_data = parse_srg(os.path.join(mcp_root,"temp","client_rg.srg"))
|
||||||
|
classes = {}
|
||||||
|
for row in srg_data['CL']:
|
||||||
|
classes[row['deobf_name']] = row['obf_name']
|
||||||
|
|
||||||
|
with open(list_file, 'w') as fh:
|
||||||
|
for diff in difflist.splitlines():
|
||||||
|
diffrow=diff.strip().split()
|
||||||
|
clazz=diffrow[0]
|
||||||
|
if clazz in classes:
|
||||||
|
clazz=classes[clazz]
|
||||||
|
if clazz.startswith("net/minecraft/src/"):
|
||||||
|
clazz=clazz[len("net/minecraft/src/"):]
|
||||||
|
fh.write("minecraft/%s.class\n" %(clazz))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
public abstract class Minecraft implements Runnable
|
public abstract class Minecraft implements Runnable
|
||||||
{
|
{
|
||||||
public static byte[] field_28006_b = new byte[10485760];
|
public static byte[] field_28006_b = new byte[10485760];
|
||||||
@@ -282,6 +284,7 @@
|
@@ -288,6 +290,7 @@
|
||||||
|
this.field_6315_n = new RenderEngine(this.field_6298_C, this.field_6304_y);
|
||||||
OpenGlHelper.func_40453_a();
|
this.func_6257_q();
|
||||||
this.field_6297_D = func_6240_b();
|
this.field_6314_o = new FontRenderer(this.field_6304_y, "/font/default.png", this.field_6315_n, false);
|
||||||
+ FMLClientHandler.instance().onPreLoad(this);
|
+ FMLClientHandler.instance().onPreLoad(this);
|
||||||
this.field_22008_V = new AnvilSaveConverter(new File(this.field_6297_D, "saves"));
|
this.field_40007_r = new FontRenderer(this.field_6304_y, "/font/alternate.png", this.field_6315_n, false);
|
||||||
this.field_6304_y = new GameSettings(this, this.field_6297_D);
|
|
||||||
this.field_6298_C = new TexturePackList(this, this.field_6297_D);
|
if (this.field_6304_y.field_44018_Q != null)
|
||||||
@@ -330,6 +333,7 @@
|
@@ -330,6 +333,7 @@
|
||||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
||||||
GL11.glLoadIdentity();
|
GL11.glLoadIdentity();
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/src/RenderPlayer.java 0000-00-00 00:00:00.000000000 -0000
|
--- ../src-base/minecraft/net/minecraft/src/RenderPlayer.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
+++ ../src-work/minecraft/net/minecraft/src/RenderPlayer.java 0000-00-00 00:00:00.000000000 -0000
|
+++ ../src-work/minecraft/net/minecraft/src/RenderPlayer.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
@@ -1,5 +1,8 @@
|
@@ -1,5 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
+import java.util.ArrayList;
|
||||||
+import java.util.Arrays;
|
+import java.util.Arrays;
|
||||||
+import java.util.List;
|
+import java.util.List;
|
||||||
+
|
+
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
@@ -8,7 +11,7 @@
|
@@ -8,7 +12,7 @@
|
||||||
private ModelBiped field_209_f;
|
private ModelBiped field_209_f;
|
||||||
private ModelBiped field_208_g;
|
private ModelBiped field_208_g;
|
||||||
private ModelBiped field_207_h;
|
private ModelBiped field_207_h;
|
||||||
|
@ -18,13 +19,13 @@
|
||||||
|
|
||||||
public RenderPlayer()
|
public RenderPlayer()
|
||||||
{
|
{
|
||||||
@@ -407,4 +410,11 @@
|
@@ -407,4 +411,11 @@
|
||||||
{
|
{
|
||||||
this.func_188_a((EntityPlayer)p_147_1_, p_147_2_, p_147_4_, p_147_6_, p_147_8_, p_147_9_);
|
this.func_188_a((EntityPlayer)p_147_1_, p_147_2_, p_147_4_, p_147_6_, p_147_8_, p_147_9_);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ public static int addNewArmourPrefix(String prefix) {
|
+ public static int addNewArmourPrefix(String prefix) {
|
||||||
+ List<String> armours=Arrays.asList(field_206_i);
|
+ List<String> armours=new ArrayList(Arrays.asList(field_206_i));
|
||||||
+ armours.add(prefix);
|
+ armours.add(prefix);
|
||||||
+ field_206_i=armours.toArray(new String[0]);
|
+ field_206_i=armours.toArray(new String[0]);
|
||||||
+ return armours.indexOf(prefix);
|
+ return armours.indexOf(prefix);
|
||||||
|
|
Loading…
Reference in a new issue