diff --git a/fml/client/com/pclewis/mcpatcher/mod/TileSize.java b/fml/client/com/pclewis/mcpatcher/mod/TileSize.java deleted file mode 100644 index 9bf00970c3..0000000000 --- a/fml/client/com/pclewis/mcpatcher/mod/TileSize.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * The FML Forge Mod Loader suite. - * Copyright (C) 2012 cpw - * - * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package com.pclewis.mcpatcher.mod; - -/** - * @author cpw - * - */ -@Deprecated -public class TileSize -{ - @Deprecated - public static int int_numPixels; - @Deprecated - public static int int_size; - @Deprecated - public static int int_sizeMinus1; -} diff --git a/fml/client/cpw/mods/fml/client/FMLClientHandler.java b/fml/client/cpw/mods/fml/client/FMLClientHandler.java index 2d025def68..6000ab43d4 100644 --- a/fml/client/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/client/cpw/mods/fml/client/FMLClientHandler.java @@ -38,8 +38,6 @@ import javax.imageio.ImageIO; import org.lwjgl.opengl.GL11; -import com.pclewis.mcpatcher.mod.TileSize; - import net.minecraft.client.Minecraft; import net.minecraft.src.BaseMod; import net.minecraft.src.BiomeGenBase; @@ -106,7 +104,6 @@ import cpw.mods.fml.common.modloader.ModLoaderModContainer; * @author cpw * */ -@SuppressWarnings("deprecation") public class FMLClientHandler implements IFMLSidedHandler { /** @@ -655,7 +652,7 @@ public class FMLClientHandler implements IFMLSidedHandler */ public BufferedImage loadImageFromTexturePack(RenderEngine renderEngine, String path) throws IOException { - InputStream image=renderEngine.getTexturePackList().field_6534_a.func_6481_a(path); + InputStream image=client.field_6298_C.field_6534_a.func_6481_a(path); if (image==null) { throw new RuntimeException(String.format("The requested image path %s is not found",path)); } @@ -825,7 +822,7 @@ public class FMLClientHandler implements IFMLSidedHandler return meta; } - public void preTexturePackChange(TexturePackBase var1, int tileSize, int tileSizeSquare, int tileSizeMask, int tileSizeSquareMask) + public void pruneOldTextureFX(TexturePackBase var1, int tileSize, int tileSizeSquare, int tileSizeMask, int tileSizeSquareMask) { ListIterator li = addedTextureFX.listIterator(); while (li.hasNext()) { @@ -834,15 +831,12 @@ public class FMLClientHandler implements IFMLSidedHandler li.remove(); } } - TileSize.int_numPixels=tileSizeSquare; - TileSize.int_size=tileSize; - TileSize.int_sizeMinus1=tileSizeMask; } /** * @param p_6531_1_ */ - public void postTexturePackChange(TexturePackBase texturePack) + public void loadTextures(TexturePackBase texturePack) { registerTextureOverrides(client.field_6315_n); } @@ -856,7 +850,7 @@ public class FMLClientHandler implements IFMLSidedHandler // We're far too early- let's wait this.fallbackTexturePack=fallback; } else { - postTexturePackChange(fallback); + loadTextures(fallback); } } @@ -898,6 +892,14 @@ public class FMLClientHandler implements IFMLSidedHandler Profiler.func_40662_b(); } + /** + * + */ + public void preGameLoad() + { + // NOOP at the minute + } + /** * @param var1 * @param tileSize diff --git a/fml/common/cpw/mods/fml/common/ModClassLoader.java b/fml/common/cpw/mods/fml/common/ModClassLoader.java index 2a167ff813..44b9196fe0 100644 --- a/fml/common/cpw/mods/fml/common/ModClassLoader.java +++ b/fml/common/cpw/mods/fml/common/ModClassLoader.java @@ -35,6 +35,9 @@ public class ModClassLoader extends URLClassLoader super(new URL[0], ModClassLoader.class.getClassLoader()); } + public ModClassLoader(ClassLoader parent) { + super(new URL[0], null); + } public void addFile(File modFile) throws MalformedURLException { ClassLoader cl=getParent(); diff --git a/fml/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/fml/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs index 123ba5f57f..b37d1dba5d 100644 --- a/fml/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs +++ b/fml/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs @@ -1,5 +1,7 @@ +breadcrumb.org.eclipse.jdt.ui.JavaPerspective=true +content_assist_disabled_computers=org.eclipse.jdt.ui.javaAllProposalCategory\u0000org.eclipse.jdt.ui.javaNoTypeProposalCategory\u0000org.eclipse.jdt.ui.textProposalCategory\u0000org.eclipse.jdt.ui.javaTypeProposalCategory\u0000 content_assist_favorite_static_members= -content_assist_lru_history= +content_assist_lru_history= content_assist_number_of_computers=17 content_assist_proposals_background=255,255,255 content_assist_proposals_foreground=0,0,0 diff --git a/fml/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/fml/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs index a3279e743e..aad820d455 100644 --- a/fml/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs +++ b/fml/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -4,6 +4,6 @@ PROBLEMS_FILTERS_MIGRATE=true SAVE_ALL_BEFORE_BUILD=true TASKS_FILTERS_MIGRATE=true eclipse.preferences.version=1 -platformState=1333336227380 +platformState=1333336227447 quickStart=true tipsAndTricks=true diff --git a/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 0073ae4eea..6d51a78605 100644 --- a/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -55,3 +55,24 @@ this.field_6287_N = System.currentTimeMillis(); } +@@ -2233,7 +2243,7 @@ + return this.field_6322_g instanceof EntityClientPlayerMP ? ((EntityClientPlayerMP)this.field_6322_g).field_797_bg : null; + } + +- public static void main(String[] p_main_0_) ++ public static void main(String[] p_main_0_) throws Exception + { + String var1 = null; + String var2 = null; +@@ -2250,7 +2260,10 @@ + { + var2 = p_main_0_[1]; + } +- ++ FMLClientHandler.instance().preGameLoad(); ++ } ++ public static void fmlReentry(String var1, String var2) ++ { + func_6269_a(var1, var2); + } + diff --git a/fml/patches/minecraft/net/minecraft/src/RenderEngine.java.patch b/fml/patches/minecraft/net/minecraft/src/RenderEngine.java.patch index 273710eae4..fa40ec602c 100644 --- a/fml/patches/minecraft/net/minecraft/src/RenderEngine.java.patch +++ b/fml/patches/minecraft/net/minecraft/src/RenderEngine.java.patch @@ -9,7 +9,7 @@ import java.awt.Color; import java.awt.Graphics; import java.awt.image.BufferedImage; -@@ -13,9 +16,17 @@ +@@ -13,9 +16,15 @@ import java.util.Iterator; import java.util.List; import java.util.Map; @@ -19,15 +19,13 @@ + import org.lwjgl.opengl.GL11; -+import com.pclewis.mcpatcher.mod.TileSize; -+ +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.FMLCommonHandler; + public class RenderEngine { public static boolean field_1609_a = false; -@@ -24,7 +35,7 @@ +@@ -24,7 +33,7 @@ private IntHashMap field_1607_c = new IntHashMap(); private IntBuffer field_1606_d = GLAllocation.func_1125_c(1); private ByteBuffer field_1605_e = GLAllocation.func_1127_b(16777216); @@ -36,7 +34,7 @@ private Map field_1603_g = new HashMap(); private GameSettings field_1602_h; public boolean field_4281_i = false; -@@ -97,6 +108,7 @@ +@@ -97,6 +106,7 @@ } catch (IOException var5) { @@ -44,7 +42,7 @@ var5.printStackTrace(); int[] var4 = this.func_28148_b(this.field_25189_l); this.field_28151_c.put(p_28149_1_, var4); -@@ -459,8 +471,17 @@ +@@ -459,8 +469,17 @@ for (int var2 = 0; var2 < this.field_1604_f.size(); ++var2) { TextureFX var3 = (TextureFX)this.field_1604_f.get(var2); @@ -63,7 +61,7 @@ this.field_1605_e.clear(); this.field_1605_e.put(var3.field_1127_a); this.field_1605_e.position(0).limit(var3.field_1127_a.length); -@@ -470,12 +491,17 @@ +@@ -470,12 +489,17 @@ var3.func_782_a(this); var1 = var3.field_1126_b; } @@ -82,7 +80,7 @@ } } } -@@ -579,6 +605,7 @@ +@@ -579,6 +603,7 @@ } catch (IOException var7) { @@ -90,7 +88,7 @@ var7.printStackTrace(); } } -@@ -616,9 +643,28 @@ +@@ -616,9 +641,28 @@ } catch (IOException var6) { @@ -104,7 +102,7 @@ + int tileSizeMask = tileSize - 1; + int tileSizeSquareMask = tileSizeSquare - 1; + -+ FMLClientHandler.instance().preTexturePackChange(var1, tileSize, tileSizeSquare, tileSizeMask, tileSizeSquareMask); ++ FMLClientHandler.instance().pruneOldTextureFX(var1, tileSize, tileSizeSquare, tileSizeMask, tileSizeSquareMask); + + TextureFX.iconTileSize = tileSize; + TextureFX.tileSizeSquare = tileSizeSquare; @@ -115,16 +113,7 @@ + ((TextureFX)tex).onTexturePackChange(tileSize, tileSizeSquare, tileSizeMask, tileSizeSquareMask); + } + -+ FMLClientHandler.instance().postTexturePackChange(var1); ++ FMLClientHandler.instance().loadTextures(var1); } private BufferedImage func_6526_a(InputStream p_6526_1_) throws IOException -@@ -635,4 +681,8 @@ - GL11.glBindTexture(GL11.GL_TEXTURE_2D, p_1076_1_); - } - } -+ -+ public TexturePackList getTexturePackList() { -+ return field_6527_k; -+ } - }