Merge branch '16launch'

This commit is contained in:
Christian committed 2013-06-30 13:20:46 -04:00
commit a82c90d7d6
151 files changed
+33976 -39387

No files matched your search

+3
View File
@@ -12,3 +12,6 @@ fmlbranding.properties
/mcp
/eclipse
/deobfuscation_data*.zip
/binpatch
/mcp_data/
/map_client.txt
+69
View File
@@ -0,0 +1,69 @@
{
"id": "FML152",
"time": "2013-03-20T12:00:00-04:00",
"releaseTime": "2013-03-20T12:00:00-04:00",
"type": "release",
"minecraftArguments": "${auth_player_name} ${auth_session} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"libraries": [
{
"name": "cpw.mods:fml:5.2"
},
{
"name": "net.minecraft:launchwrapper:1.3"
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "org.ow2.asm:asm-all:4.1"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0"
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0"
},
{
"name": "net.java.jinput:jinput:2.0.5"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47"
},
{
"name": "com.google.guava:guava:14.0"
},
{
"name": "net.java.jutils:jutils:1.0.0"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.launchwrapper.Launch"
}
+14
View File
@@ -9,6 +9,12 @@ included based on guidelines at
http://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html
with notices intact. The only change is a non-functional change of package name.
This software contains a partial repackaging of javaxdelta, a BSD licensed program for generating
binary differences and applying them, sourced from the subversion at http://sourceforge.net/projects/javaxdelta/
authored by genman, heikok, pivot.
The only changes are to replace some Trove collection types with standard Java collections, and repackaged.
=== MCP Data ===
This software includes data from the Minecraft Coder Pack (MCP), with kind permission
from them. The license to MCP data is not transitive - distribution of this data by
@@ -16,6 +22,14 @@ third parties requires independent licensing from the MCP team. This data is not
redistributable without permission from the MCP team.
=== Sharing ===
I grant permission for some parts of FML to be redistributed outside the terms of the LGPL, for the benefit of
the minecraft modding community. All contributions to these parts should be licensed under the same additional grant.
-- Runtime patcher --
License is granted to redistribute the runtime patcher code (common/cpw/mods/fml/patcher and subdirectories) under
any alternative open source license as classified by the OSI (http://opensource.org/licenses)
-- ASM transformers --
License is granted to redistribute the ASM transformer code (common/cpw/mods/fml/common/asm/ and subdirectories)
under any alternative open source license as classified by the OSI (http://opensource.org/licenses)
+113 -77
View File
@@ -15,8 +15,8 @@
<arg value="${mcp.home}" />
</exec>
<propertyfile file="fmlversion.properties">
<entry key="fmlbuild.build.number" type="int" value="${version.build}"/>
<entry key="fmlbuild.deobfuscation.hash" type="string" value="${deobf.checksum}"/>
<entry key="fmlbuild.build.number" type="int" value="${version.build}" />
<entry key="fmlbuild.deobfuscation.hash" type="string" value="${deobf.checksum}" />
</propertyfile>
</target>
@@ -34,11 +34,11 @@
<os family="Windows" />
</condition>
<condition property="mcp.exists">
<available file="${mcp.home}/runtime/commands.py"/>
<available file="${mcp.home}/runtime/commands.py" />
</condition>
<condition property="signature.exists">
<available file="${env.JENKINS_HOME}/fmlsigned.properties" />
</condition>
<condition property="signature.exists">
<available file="${env.JENKINS_HOME}/fmlsigned.properties"/>
</condition>
<property name="mcp.obfoutput" location="${mcp.home}/reobf" />
<property name="client.mcp.obfoutput" location="${mcp.obfoutput}/minecraft" />
<property name="mcp.srcdir" location="${mcp.home}/src" />
@@ -54,7 +54,7 @@
<condition property="version.build" value="${env.BUILD_NUMBER}" else="1">
<isset property="env.BUILD_NUMBER" />
</condition>
<available file="eclipse" property="eclipse.exists"/>
<available file="eclipse" property="eclipse.exists" />
</target>
<target name="makeversion" depends="buildenvsetup">
@@ -79,8 +79,11 @@
<target name="clean" depends="buildenvsetup,makeclean" if="mcp.exists">
<exec executable="${python.exe}" dir="${mcp.home}">
<arg value="${basedir}/decompile.py" />
<arg value="--mcp-dir" />
<arg value="${mcp.home}" />
<arg value="--fml-dir" />
<arg value="${basedir}" />
<arg value="--gen-conf" />
</exec>
</target>
@@ -89,19 +92,19 @@
<arg value="${mcp.home}/runtime/reobfuscate.py" />
</exec>
<fail message="Reobfuscation failed">
<condition>
<not>
<and>
<available file="${mcp.home}/temp/client.md5"/>
<available file="${mcp.home}/temp/client_reobf.md5"/>
</and>
</not>
</condition>
<condition>
<not>
<and>
<available file="${mcp.home}/temp/client.md5" />
<available file="${mcp.home}/temp/client_reobf.md5" />
</and>
</not>
</condition>
</fail>
<exec executable="${python.exe}" dir="${mcp.home}">
<arg value="${basedir}/generatechangedfilelist.py"/>
<arg value="${mcp.home}"/>
<arg value="${basedir}/difflist.txt"/>
<arg value="${basedir}/generatechangedfilelist.py" />
<arg value="${mcp.home}" />
<arg value="${basedir}/difflist.txt" />
</exec>
</target>
@@ -110,11 +113,11 @@
<arg value="${mcp.home}/runtime/recompile.py" />
</exec>
<fail message="Compilation failed">
<condition>
<not>
<available file="${mcp.home}/bin/minecraft/net/minecraft/client/Minecraft.class"/>
</not>
</condition>
<condition>
<not>
<available file="${mcp.home}/bin/minecraft/net/minecraft/client/Minecraft.class" />
</not>
</condition>
</fail>
</target>
@@ -132,7 +135,7 @@
<target name="merge-source" depends="buildenvsetup,merge-client,merge-common" />
<target name="build-universal" depends="buildenvsetup,merge-client,merge-common,reobfuscate,makeversion">
<target name="build-universal" depends="buildenvsetup,merge-client,merge-common,reobfuscate,makeversion,makebinpatches">
<condition property="universal.jarname" value="${modname}-universal-${version.minecraft}-${version}" else="${modname}-universal-${version.minecraft}-${version}-${version.branch}">
<equals arg1="${version.branch}" arg2="master" />
</condition>
@@ -140,19 +143,20 @@
<mkdir dir="${basedir}/target" />
<jar destfile="${basedir}/target/${universal.jarname}.zip" duplicate="preserve">
<manifest>
<attribute name="Main-Class" value="net.minecraft.server.MinecraftServer"/>
<attribute name="Class-Path" value="minecraft_server.jar"/>
<attribute name="Main-Class" value="cpw.mods.fml.relauncher.ServerLaunchWrapper" />
<attribute name="Class-Path" value="minecraft_server.jar:lib/guava-14.0-rc3.jar:lib/bcprov-jdk15on-148-src.zip:lib/asm-debug-all-4.1.jar:lib/scala-library.jar:lib/argo-3.2-src.jar" />
</manifest>
<fileset dir="${client.mcp.obfoutput}" includes="**/*.class" excludes="*.class"/>
<fileset dir="${client.mcp.obfoutput}" includes="**/*.class" excludes="*.class,net/minecraft/**/*.class" />
</jar>
<antcall target="signjar"/>
<zip update="true" destfile="${basedir}/target/${universal.jarname}.zip" >
<fileset dir="${client.mcp.obfoutput}" includes="*.class"/>
<zipfileset dir="${basedir}" includes="fmlversion.properties"/>
<antcall target="signjar" />
<zip update="true" destfile="${basedir}/target/${universal.jarname}.zip">
<zipfileset dir="${basedir}/binpatch" prefix="binpatch" includes="**/*.binpatch"/>
<fileset dir="${client.mcp.obfoutput}" includes="*.class" />
<zipfileset dir="${basedir}" includes="fmlversion.properties" />
<zipfileset dir="${basedir}" includes="LICENSE-fml.txt" />
<zipfileset dir="${common.src.dir}" includes="mcpmod.info" />
<zipfileset dir="${client.src.dir}" includes="mcp.png" />
<zipfileset dir="${basedir}" includes="install/CREDITS-fml.txt" fullpath="CREDITS-fml.txt"/>
<zipfileset dir="${common.src.dir}" includes="mcpmod.info" />
<zipfileset dir="${client.src.dir}" includes="mcp.png" />
<zipfileset dir="${basedir}" includes="install/CREDITS-fml.txt" fullpath="CREDITS-fml.txt" />
<zipfileset dir="${common.src.dir}" includes="*.cfg" />
<mappedresources>
<concat>
@@ -205,25 +209,30 @@
</target>
<target name="build-deobf-data" depends="makeversion">
<mkdir dir="build-tmp-deobf"/>
<mkdir dir="build-tmp-deobf" />
<copy todir="build-tmp-deobf">
<mappedresources>
<fileset dir="${mcp.home}/conf" includes="packaged.srg"/>
<globmapper from="packaged.srg" to="joined.srg"/>
<fileset dir="${mcp.home}/conf" includes="packaged.srg" />
<globmapper from="packaged.srg" to="deobfuscation_data-${version.minecraft}" />
</mappedresources>
</copy>
<touch millis="0" file="build-tmp-deobf/joined.srg"/>
<zip file="deobfuscation_data_${version.minecraft}.zip" encoding="UTF-8">
<fileset dir="build-tmp-deobf" includes="joined.srg"/>
</zip>
<checksum algorithm="SHA1" property="deobf.checksum" file="deobfuscation_data_${version.minecraft}.zip"/>
<antcall target="writeversion"/>
<exec executable="lzma">
<arg line="build-tmp-deobf/deobfuscation_data-${version.minecraft}"/>
<arg line="-v"/>
</exec>
<copy todir="${basedir}">
<fileset dir="build-tmp-deobf" includes="*.lzma" />
</copy>
<antcall target="writeversion" />
<delete dir="build-tmp-deobf" />
<zip destfile="deobfuscation_data-${version.minecraft}.jar" basedir="${basedir}">
<include name="deobfuscation_data-${version.minecraft}.lzma"/>
</zip>
</target>
<target name="build" depends="buildenvsetup,merge-client,merge-common,build-deobf-data,build-universal,build-source-pack" />
<target name="jenkinsbuild" depends="buildenvsetup,jenkinsfmldecompile,patch,build"/>
<target name="jenkinsbuild" depends="buildenvsetup,jenkinsfmldecompile,patch,build" />
<target name="patch" depends="buildenvsetup">
<exec executable="${python.exe}" dir="${basedir}">
@@ -242,87 +251,91 @@
</condition>
<fail if="do.not.continue">You have decided not to continue. This script will stop now.</fail>
<echo>Preparing the MCP environment at ${mcp.home}</echo>
<antcall target="fmldecompile"/>
<antcall target="fmldecompile" />
<echo>Moving old patched sources at ${patch.mcp.srcdir} out of the way</echo>
<move todir="${mcp.home}/src-work${timestamp}" failonerror="false" verbose="true">
<fileset dir="${patch.mcp.srcdir}"/>
<fileset dir="${patch.mcp.srcdir}" />
</move>
<echo>Deleting old patch references at ${clean.mcp.srcdir}</echo>
<delete dir="${clean.mcp.srcdir}" failonerror="false"/>
<delete dir="${clean.mcp.srcdir}" failonerror="false" />
<echo>Creating new patch references at ${clean.mcp.srcdir}</echo>
<copy todir="${clean.mcp.srcdir}">
<fileset dir="${mcp.srcdir}"/>
<fileset dir="${mcp.srcdir}" />
</copy>
<antcall target="cleanargo"/>
<antcall target="patch"/>
<antcall target="cleanargo" />
<antcall target="patch" />
<echo>Creating clean patched references at ${patch.mcp.srcdir}</echo>
<copy todir="${patch.mcp.srcdir}">
<fileset dir="${mcp.srcdir}"/>
<fileset dir="${mcp.srcdir}" />
</copy>
<antcall target="writeversion"/>
<antcall target="makeeclipse"/>
<antcall target="writeversion" />
<antcall target="makeeclipse" />
<echo>Setup complete! You should now be able to open ${basedir}/eclipse as a workspace in eclipse and import/refresh the FML project</echo>
</target>
<target name="fmldecompile" depends="buildenvsetup,makeclean">
<exec executable="${python.exe}" dir="${basedir}">
<arg value="${basedir}/decompile.py" />
<arg value="--mcp-dir" />
<arg value="${mcp.home}" />
<arg value="--fml-dir" />
<arg value="${basedir}" />
<arg value="--gen-conf" />
</exec>
</target>
<target name="jenkinsfmldecompile" depends="buildenvsetup,makeclean">
<exec executable="${python.exe}" dir="${basedir}">
<arg value="${basedir}/decompile.py" />
<arg value="--mcp-dir" />
<arg value="${mcp.home}" />
<arg value="--fml-dir" />
<arg value="${basedir}" />
<arg value="-no_gen_conf" />
</exec>
</target>
<target name="repatch" depends="buildenvsetup,checkpatches">
<echo>Moving old patched sources at ${mcp.home}/src-work out of the way</echo>
<move todir="${mcp.home}/src-work${timestamp}" failonerror="false" verbose="true">
<fileset dir="${patch.mcp.srcdir}"/>
<fileset dir="${patch.mcp.srcdir}" />
</move>
<delete dir="${mcp.srcdir}"/>
<delete dir="${mcp.srcdir}" />
<copy todir="${mcp.srcdir}">
<fileset dir="${clean.mcp.srcdir}"/>
<fileset dir="${clean.mcp.srcdir}" />
</copy>
<antcall target="cleanargo"/>
<antcall target="cleanargo" />
<antcall target="patch"/>
<antcall target="patch" />
<copy todir="${patch.mcp.srcdir}">
<fileset dir="${mcp.srcdir}"/>
<fileset dir="${mcp.srcdir}" />
</copy>
</target>
<target name="repatchclean" depends="buildenvsetup">
<delete dir="${mcp.srcdir}"/>
<delete dir="${mcp.srcdir}" />
<copy todir="${mcp.srcdir}">
<fileset dir="${clean.mcp.srcdir}"/>
<fileset dir="${clean.mcp.srcdir}" />
</copy>
<antcall target="cleanargo"/>
<antcall target="cleanargo" />
<antcall target="patch"/>
<antcall target="patch" />
</target>
<target name="cleanargo" depends="buildenvsetup">
<delete dir="${client.mcp.srcdir}/argo"/>
<delete dir="${client.mcp.srcdir}/org"/>
<delete dir="${client.mcp.srcdir}/argo" />
<delete dir="${client.mcp.srcdir}/org" />
</target>
<target name="checkpatches" depends="buildenvsetup">
<uptodate property="checkUptodate.uptodate">
<srcfiles dir="${patch.mcp.srcdir}" includes="**/*.java">
<present targetdir="${patch.src.dir}">
<globmapper from="*.java" to="*.java.patch"/>
<globmapper from="*.java" to="*.java.patch" />
</present>
</srcfiles>
<globmapper from="*.java" to="${patch.src.dir}/*.java.patch"/>
<globmapper from="*.java" to="${patch.src.dir}/*.java.patch" />
</uptodate>
<fail unless="checkUptodate.uptodate">
A patch is out of date. Update your patches!
@@ -332,8 +345,8 @@
<target name="updatepatches" depends="buildenvsetup">
<exec executable="${python.exe}" dir="${basedir}">
<arg value="${basedir}/update_patches.py" />
<arg value="${mcp.home}"/>
<arg value="${basedir}"/>
<arg value="${mcp.home}" />
<arg value="${basedir}" />
</exec>
</target>
@@ -341,30 +354,53 @@
<echo>
Extracting fresh eclipse workspace to ${basedir}/eclipse
</echo>
<unzip src="${basedir}/eclipse-workspace-dev.zip" dest="${basedir}"/>
<unzip src="${basedir}/eclipse-workspace-dev.zip" dest="${basedir}" />
</target>
<target name="makerenamedsource" depends="buildenvsetup,repatch,merge-client,merge-common,reobfuscate">
<copy todir="${tmp.mcp.srcdir}">
<fileset dir="${mcp.srcdir}"/>
<fileset dir="${mcp.srcdir}" />
</copy>
<exec executable="${python.exe}" dir="${mcp.home}">
<arg value="${mcp.home}/runtime/updatenames.py" />
<arg value="-f" />
</exec>
<copy todir="${renamed.mcp.srcdir}">
<fileset dir="${mcp.srcdir}"/>
<fileset dir="${mcp.srcdir}" />
</copy>
<move todir="${mcp.srcdir}">
<fileset dir="${tmp.mcp.srcdir}"/>
<fileset dir="${tmp.mcp.srcdir}" />
</move>
</target>
<target name="signjar" depends="buildenvsetup,makeversion" if="signature.exists">
<condition property="universal.jarname" value="${modname}-universal-${version.minecraft}-${version}" else="${modname}-universal-${version.minecraft}-${version}-${version.branch}">
<equals arg1="${version.branch}" arg2="master" />
</condition>
<property file="${env.JENKINS_HOME}/fmlsigned.properties" prefix="sign"/>
<echo>${env.JENKINS_HOME} ${universal.jarname} ${sign.KEYPASS}</echo>
<signjar alias="FML" jar="${basedir}/target/${universal.jarname}.zip" keypass="${sign.KEYPASS}" keystore="${env.JENKINS_HOME}/${sign.KEYSTORE}" storepass="${sign.STOREPASS}" verbose="true"/>
<property file="${env.JENKINS_HOME}/fmlsigned.properties" prefix="sign" />
<echo>${env.JENKINS_HOME} ${universal.jarname} ${sign.KEYPASS}</echo>
<signjar alias="FML" jar="${basedir}/target/${universal.jarname}.zip" keypass="${sign.KEYPASS}" keystore="${env.JENKINS_HOME}/${sign.KEYSTORE}" storepass="${sign.STOREPASS}" verbose="true" />
</target>
<target name="makebinpatches" depends="buildenvsetup,makeversion">
<path id="diffset.libs">
<pathelement path="${mcp.home}/jars/libraries/com/google/guava/guava/14.0/guava-14.0.jar"/>
<pathelement path="${mcp.home}/jars/libraries/org/ow2/asm/asm-all/4.1/asm-all-4.1.jar"/>
<pathelement path="${mcp.home}/jars/libraries/lzma/lzma/0.0.1/lzma-0.0.1.jar"/>
<pathelement path="${mcp.obfoutput}/minecraft"/>
</path>
<delete dir="${basedir}/binpatch" verbose="true"/>
<java classname="cpw.mods.fml.common.patcher.GenDiffSet" classpathref="diffset.libs">
<arg path="${mcp.home}/jars/versions/${version.minecraft}/${version.minecraft}.jar.backup"/>
<arg path="${mcp.obfoutput}/minecraft"/>
<arg path="${basedir}/deobfuscation_data-${version.minecraft}.lzma"/>
<arg path="${basedir}/binpatch/client"/>
<arg value="false"/>
</java>
<java classname="cpw.mods.fml.common.patcher.GenDiffSet" classpathref="diffset.libs">
<arg path="${mcp.home}/jars/minecraft_server.${version.minecraft}.jar.backup"/>
<arg path="${mcp.obfoutput}/minecraft"/>
<arg path="${basedir}/deobfuscation_data-${version.minecraft}.lzma"/>
<arg path="${basedir}/binpatch/server"/>
<arg value="true"/>
</java>
</target>
</project>
@@ -1,30 +0,0 @@
package cpw.mods.fml.client;
import java.nio.ByteBuffer;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.renderer.texture.Texture;
import net.minecraft.client.renderer.texture.TextureStitched;
public class CopySubimageTextureHelper extends TextureHelper {
@Override
public void doTextureCopy(Texture atlas, Texture source, int atlasX, int atlasY)
{
if (atlas.func_94282_c() == -1)
{
return;
}
atlas.func_94277_a(0);
ByteBuffer buffer = source.func_94273_h();
buffer.position(0);
GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, atlasX, atlasY, source.func_94275_d(), source.func_94276_e(), GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buffer);
}
@Override
public void doTextureUpload(TextureStitched source)
{
// NO OP for copysubimage
}
}
@@ -255,7 +255,7 @@ public class FMLClientHandler implements IFMLSidedHandler
else
{
// Force renderengine to reload and re-initialize all textures
client.field_71446_o.func_78352_b();
// client.field_71446_o.func_78352_b();
// TextureFXManager.instance().loadTextures(client.field_71418_C.func_77292_e());
}
}
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -21,6 +21,7 @@ public class GuiCustomModLoadingErrorScreen extends GuiErrorScreen
private CustomModLoadingErrorDisplayException customException;
public GuiCustomModLoadingErrorScreen(CustomModLoadingErrorDisplayException customException)
{
super(null,null);
this.customException = customException;
}
@Override
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -29,6 +29,7 @@ public class GuiDupesFound extends GuiErrorScreen
public GuiDupesFound(DuplicateModsFoundException dupes)
{
super(null,null);
this.dupes = dupes;
}
@@ -17,6 +17,7 @@ import java.util.Map.Entry;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiYesNo;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.StringTranslate;
import com.google.common.collect.Lists;
@@ -99,7 +100,7 @@ public class GuiIdMismatchScreen extends GuiYesNo {
if (!allowContinue)
{
var5.field_73746_c = this.field_73880_f / 2 - 75;
var5.field_73744_e = StringTranslate.func_74808_a().func_74805_b("gui.done");
var5.field_73744_e = I18n.func_135053_a("gui.done");
}
var5.func_73737_a(this.field_73882_e, p_73863_1_, p_73863_2_);
}
@@ -23,6 +23,7 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiSmallButton;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.StringTranslate;
import org.lwjgl.opengl.GL11;
@@ -80,8 +81,7 @@ public class GuiModList extends GuiScreen
listWidth=Math.max(listWidth,getFontRenderer().func_78256_a(mod.getVersion()) + 10);
}
listWidth=Math.min(listWidth, 150);
StringTranslate translations = StringTranslate.func_74808_a();
this.field_73887_h.add(new GuiSmallButton(6, this.field_73880_f / 2 - 75, this.field_73881_g - 38, translations.func_74805_b("gui.done")));
this.field_73887_h.add(new GuiSmallButton(6, this.field_73880_f / 2 - 75, this.field_73881_g - 38, I18n.func_135053_a("gui.done")));
this.modList=new GuiSlotModList(this, mods, listWidth);
this.modList.registerScrollButtons(this.field_73887_h, 7, 8);
}
@@ -120,7 +120,8 @@ public class GuiModList extends GuiScreen
if (!logoFile.isEmpty())
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.field_73882_e.field_71446_o.func_98187_b(logoFile);
// TODO
// this.field_73882_e.field_71446_o.func_98187_b(logoFile);
Dimension dim = TextureFXManager.instance().getTextureDimensions(logoFile);
double scaleX = dim.width / 200.0;
double scaleY = dim.height / 65.0;
@@ -24,6 +24,7 @@ public class GuiModsMissing extends GuiErrorScreen
public GuiModsMissing(MissingModsException modsMissing)
{
super(null,null);
this.modsMissing = modsMissing;
}
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -15,6 +15,7 @@ package cpw.mods.fml.client;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiSmallButton;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.StringTranslate;
import cpw.mods.fml.common.network.ModMissingPacket;
import cpw.mods.fml.common.versioning.ArtifactVersion;
@@ -31,8 +32,7 @@ public class GuiModsMissingForServer extends GuiScreen
@Override
public void func_73866_w_()
{
StringTranslate translations = StringTranslate.func_74808_a();
this.field_73887_h.add(new GuiSmallButton(1, this.field_73880_f / 2 - 75, this.field_73881_g - 38, translations.func_74805_b("gui.done")));
this.field_73887_h.add(new GuiSmallButton(1, this.field_73880_f / 2 - 75, this.field_73881_g - 38, I18n.func_135053_a("gui.done")));
}
@Override
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -15,6 +15,7 @@ package cpw.mods.fml.client;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.Tessellator;
@@ -264,7 +265,7 @@ public abstract class GuiScrollingList
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_FOG);
Tessellator var18 = Tessellator.field_78398_a;
this.client.field_71446_o.func_98187_b("/gui/background.png");
this.client.field_71446_o.func_110577_a(Gui.field_110325_k);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
float var17 = 32.0F;
var18.func_78382_b();
@@ -397,7 +398,7 @@ public abstract class GuiScrollingList
private void overlayBackground(int p_22239_1_, int p_22239_2_, int p_22239_3_, int p_22239_4_)
{
Tessellator var5 = Tessellator.field_78398_a;
this.client.field_71446_o.func_98187_b("/gui/background.png");
this.client.field_71446_o.func_110577_a(Gui.field_110325_k);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
float var6 = 32.0F;
var5.func_78382_b();
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -22,6 +22,7 @@ public class GuiWrongMinecraft extends GuiErrorScreen
private WrongMinecraftVersionException wrongMC;
public GuiWrongMinecraft(WrongMinecraftVersionException wrongMC)
{
super(null,null);
this.wrongMC = wrongMC;
}
@Override
@@ -1,29 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.client;
import java.awt.Dimension;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.texturepacks.ITexturePack;
public interface ITextureFX
{
public void onTexturePackChanged(RenderEngine engine, ITexturePack texturepack, Dimension dimensions);
public void onTextureDimensionsUpdate(int width, int height);
public void setErrored(boolean errored);
public boolean getErrored();
}
@@ -1,29 +0,0 @@
package cpw.mods.fml.client;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.renderer.texture.Texture;
import net.minecraft.client.renderer.texture.TextureStitched;
public class OpenGL43TextureHelper extends TextureHelper {
public OpenGL43TextureHelper()
{
// GL43.
// glCopyMethod = Class.forName("org.lwjgl.OpenGL")
}
@Override
public void doTextureCopy(Texture atlas, Texture source, int atlasX, int atlasY)
{
// System.out.printf("Src: %d Targ: %d, Coords %d %d %d %d\n", source.func_94282_c(), atlas.func_94282_c(), atlasX, atlasY, source.func_94275_d(), source.func_94276_e());
// GL43.glCopyImageSubData(source.func_94282_c(), GL11.GL_TEXTURE_2D, 0, 0, 0, 0, atlas.func_94282_c(), GL11.GL_TEXTURE_2D, 0, atlasX, atlasY, 0, source.func_94275_d(), source.func_94276_e(), 1);
// System.out.printf("Err: %x\n", GL11.glGetError());
}
@Override
public void doTextureUpload(TextureStitched source)
{
// source.createAndUploadTextures();
}
}
@@ -28,7 +28,6 @@ import com.google.common.collect.Maps;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderEngine;
public class TextureFXManager
{
@@ -39,26 +38,26 @@ public class TextureFXManager
private Map<Integer,TextureHolder> texturesById = Maps.newHashMap();
private Map<String, TextureHolder> texturesByName = Maps.newHashMap();
private TextureHelper helper;
// private TextureHelper helper;
void setClient(Minecraft client)
{
this.client = client;
}
public BufferedImage loadImageFromTexturePack(RenderEngine renderEngine, String path) throws IOException
{
InputStream image=client.field_71418_C.func_77292_e().func_77532_a(path);
if (image==null) {
throw new RuntimeException(String.format("The requested image path %s is not found",path));
}
BufferedImage result=ImageIO.read(image);
if (result==null)
{
throw new RuntimeException(String.format("The requested image path %s appears to be corrupted",path));
}
return result;
}
// public BufferedImage loadImageFromTexturePack(RenderEngine renderEngine, String path) throws IOException
// {
// InputStream image=client.field_71418_C.func_77292_e().func_77532_a(path);
// if (image==null) {
// throw new RuntimeException(String.format("The requested image path %s is not found",path));
// }
// BufferedImage result=ImageIO.read(image);
// if (result==null)
// {
// throw new RuntimeException(String.format("The requested image path %s appears to be corrupted",path));
// }
// return result;
// }
//
public static TextureFXManager instance()
{
return INSTANCE;
@@ -111,33 +110,33 @@ public class TextureFXManager
}
public TextureHelper getHelper()
{
if (helper == null)
{
ContextCapabilities capabilities = GLContext.getCapabilities();
boolean has43 = false;
try
{
has43 = capabilities.getClass().getField("GL_ARB_copy_image").getBoolean(capabilities);
}
catch (Exception e)
{
//e.printStackTrace();
// NOOP - LWJGL needs updating
FMLLog.info("Forge Mod Loader has detected an older LWJGL version, new advanced texture animation features are disabled");
}
// if (has43 && Boolean.parseBoolean(System.getProperty("fml.useGL43","true")))
// public TextureHelper getHelper()
// {
// if (helper == null)
// {
// ContextCapabilities capabilities = GLContext.getCapabilities();
// boolean has43 = false;
// try
// {
// FMLLog.info("Using the new OpenGL 4.3 advanced capability for animations");
// helper = new OpenGL43TextureHelper();
// has43 = capabilities.getClass().getField("GL_ARB_copy_image").getBoolean(capabilities);
// }
// else
{
FMLLog.info("Not using advanced OpenGL 4.3 advanced capability for animations : OpenGL 4.3 is %s", has43 ? "available" : "not available");
helper = new CopySubimageTextureHelper();
}
}
return helper;
}
// catch (Exception e)
// {
// //e.printStackTrace();
// // NOOP - LWJGL needs updating
// FMLLog.info("Forge Mod Loader has detected an older LWJGL version, new advanced texture animation features are disabled");
// }
//// if (has43 && Boolean.parseBoolean(System.getProperty("fml.useGL43","true")))
//// {
//// FMLLog.info("Using the new OpenGL 4.3 advanced capability for animations");
//// helper = new OpenGL43TextureHelper();
//// }
//// else
// {
// FMLLog.info("Not using advanced OpenGL 4.3 advanced capability for animations : OpenGL 4.3 is %s", has43 ? "available" : "not available");
//// helper = new CopySubimageTextureHelper();
// }
// }
// return helper;
// }
}
@@ -1,70 +0,0 @@
package cpw.mods.fml.client;
import java.nio.ByteBuffer;
import java.util.List;
import net.minecraft.client.renderer.texture.Texture;
import net.minecraft.client.renderer.texture.TextureStitched;
public abstract class TextureHelper {
/**
* Copy the texture from the source to the atlas at the specified position
*
* This will use the devised GL helper to do either GL-side copy or a subimage upload
*
* @param atlas The atlas texture we're copying into
* @param source The source texture we're copying from (complete)
* @param atlasX The X position on the atlas
* @param atlasY The Y position on the atlas
*/
public abstract void doTextureCopy(Texture atlas, Texture source, int atlasX, int atlasY);
/**
* Upload the texture to the GPU for GL side copying operations
* This may be a no-op depending on the active implementation.
*
* @param source The texture to upload
*/
public abstract void doTextureUpload(TextureStitched source);
/**
* Rotate the texture so that it doesn't need a rotational transform applied each tick
*
* @param texture The texture to rotate
* @param buffer The buffer for the texture
*/
public void rotateTexture(Texture texture, ByteBuffer buffer)
{
ByteBuffer bytebuffer = buffer;
buffer.position(0);
ByteBuffer other = ByteBuffer.allocateDirect(buffer.capacity());
other.position(0);
int texHeight = texture.func_94276_e();
int texWidth = texture.func_94275_d();
for (int row = 0; row < texHeight; ++row)
{
int targCol = texHeight - row - 1;
int srcRowOffset = row * texWidth;
for (int col = 0; col < texWidth; ++col)
{
int targIndex = col * texHeight + targCol;
int srcIndex = srcRowOffset + col;
srcIndex <<=2;
targIndex <<=2;
other.put(targIndex + 0, bytebuffer.get(srcIndex + 0));
other.put(targIndex + 1, bytebuffer.get(srcIndex + 1));
other.put(targIndex + 2, bytebuffer.get(srcIndex + 2));
other.put(targIndex + 3, bytebuffer.get(srcIndex + 3));
}
}
buffer.position(0);
buffer.put(other);
}
}
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -48,9 +48,8 @@ public class RenderingRegistry
*/
public static int addNewArmourRendererPrefix(String armor)
{
RenderPlayer.field_77110_j = ObjectArrays.concat(RenderPlayer.field_77110_j, armor);
RenderBiped.field_82424_k = RenderPlayer.field_77110_j;
return RenderPlayer.field_77110_j.length - 1;
RenderBiped.field_82424_k = ObjectArrays.concat(RenderBiped.field_82424_k, armor);
return RenderBiped.field_82424_k.length - 1;
}
/**
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -19,9 +19,6 @@ import java.util.logging.Logger;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.texture.Texture;
import net.minecraft.client.texturepacks.ITexturePack;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.TextureFXManager;
@@ -72,8 +69,8 @@ public class FMLRenderAccessLibrary
return RenderingRegistry.instance().renderItemAsFull3DBlock(modelId);
}
public static void doTextureCopy(Texture atlas, Texture source, int targetX, int targetY)
{
TextureFXManager.instance().getHelper().doTextureCopy(atlas, source, targetX, targetY);
}
// public static void doTextureCopy(Texture atlas, Texture source, int targetX, int targetY)
// {
// TextureFXManager.instance().getHelper().doTextureCopy(atlas, source, targetX, targetY);
// }
}
+10 -11
View File
@@ -26,7 +26,6 @@ import net.minecraft.client.*;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.multiplayer.NetClientHandler;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.settings.KeyBinding;
@@ -564,11 +563,11 @@ public class ModLoader
{
}
@SideOnly(CLIENT)
public static BufferedImage loadImage(RenderEngine renderEngine, String path) throws Exception
{
return TextureFXManager.instance().loadImageFromTexturePack(renderEngine, path);
}
// @SideOnly(CLIENT)
// public static BufferedImage loadImage(RenderEngine renderEngine, String path) throws Exception
// {
// return TextureFXManager.instance().loadImageFromTexturePack(renderEngine, path);
// }
/**
* Call in from elsewhere. Unimplemented here.
@@ -616,11 +615,11 @@ public class ModLoader
return keys;
}
@Deprecated
@SideOnly(CLIENT)
public static void registerAllTextureOverrides(RenderEngine cache)
{
}
// @Deprecated
// @SideOnly(CLIENT)
// public static void registerAllTextureOverrides(RenderEngine cache)
// {
// }
/**
* Register a new block
+10 -232
View File
@@ -1,125 +1,15 @@
--- commands.py
+++ commands.py
@@ -58,6 +58,8 @@
def reallyrmtree(path):
+ if os.path.isfile(os.path.join(path, 'asm-4.1.tar.gz')): #Check if asm exists, indicating the libs folder, if so, don't delete it
+ return
if not sys.platform.startswith('win'):
if os.path.exists(path):
shutil.rmtree(path)
@@ -139,6 +141,8 @@
@@ -139,6 +139,8 @@
fieldnames = csvreader.fieldnames
return set(fieldnames)
+def commands_sanity_check():
+ print 'Commands patch applied successfully'
+ print ' Commands patch applied successfully'
class Commands(object):
"""Contains the commands and initialisation for a full mcp run"""
@@ -194,6 +198,7 @@
sys.exit(1)
self.checkjava()
+ self.checkscala()
self.readcommands(verify, no_patch=no_patch)
def checkcommand(self, name, command, java=False, single_line=False, check_return=True, error=True):
@@ -230,6 +235,9 @@
self.checkcommand('java', '%s -version' % self.cmdjava)
self.checkcommand('javac', '%s -version' % self.cmdjavac)
self.checkcommand('javac runtime', '%s -J-version' % self.cmdjavac)
+ if self.cmdscalac:
+ self.checkcommand('scalac', '%s -version' % self.cmdscalac)
+ self.checkcommand('scalac runtime', '%s -J-version' % self.cmdscalac)
self.checkcommand('retroguard', '%s --version' % self.retroguard, java=True)
self.exceptor = os.path.normpath(self.config.get('COMMANDS', 'Exceptor'))
@@ -268,6 +276,24 @@
self.astyle = os.path.normpath(self.config.get('COMMANDS', 'AStyle_%s' % self.osname))
if verify:
self.has_astyle = self.checkcommand('astyle', '%s --version' % self.astyle, error=False)
+
+ if verify:
+ output = self.runcmd('%s --version' % self.astyle).rstrip().split(' ')
+ try:
+ version = output[len(output) - 1].split('.')
+ if int(version[0]) >= 2 and int(version[1]) >= 0:
+ self.has_astyle = True
+ else:
+ self.logger.error('!! Astyle version out of date, 2.0+ required found: \"%s\"' % output[len(output) - 1])
+ self.as_astyle = False
+ except:
+ self.logger.error('!! Could not extract astyle version information !!')
+ self.logger.error(sys.exc_info()[0])
+ self.has_astyle = False
+
+ if not self.has_astyle:
+ self.logger.error('!! astyle is needed for FML, can not continue !!')
+ sys.exit(1)
# only check jad and jadretro if we can use it
if self.jad:
@@ -324,6 +350,8 @@
reqs.append('astyle')
if self.has_astyle_cfg:
reqs.append('astyle config')
+ if self.cmdscalac:
+ reqs.append('scalac')
self.logger.info('# found %s', ', '.join(reqs))
if not self.has_jad_patch and not no_patch:
self.has_jad = False
@@ -350,6 +378,13 @@
self.cmdfernflower = self.config.get('COMMANDS', 'CmdFernflower', raw=1) % (self.cmdjava, self.fernflower)
self.cmdexceptor = self.config.get('COMMANDS', 'CmdExceptor', raw=1) % (self.cmdjava, self.exceptor)
self.cmdrecomp = self.config.get('COMMANDS', 'CmdRecomp', raw=1) % self.cmdjavac
+ try:
+ if self.cmdscalac:
+ self.cmdrecompscalac = self.config.get('COMMANDS', 'CmdRecompScalac', raw=1) % self.cmdscalac
+ else:
+ self.cmdrecompscalac = None
+ except ConfigParser.NoOptionError:
+ pass
self.cmdstartsrv = self.config.get('COMMANDS', 'CmdStartSrv', raw=1) % self.cmdjava
self.cmdstartclt = self.config.get('COMMANDS', 'CmdStartClt', raw=1) % self.cmdjava
@@ -753,6 +788,34 @@
self.cmdjavac = '"%s"' % os.path.join(results[0], 'javac')
self.cmdjava = '"%s"' % os.path.join(results[0], 'java')
+ def checkscala(self):
+ cmd = None
+ try:
+ # TODO: Verify at least version 2.10
+ self.runcmd('scalac -version', quiet=True)
+ cmd = 'scalac'
+ except (CalledProcessError, OSError):
+ pass
+ if cmd is None: # Stupid windows...
+ try:
+ # TODO: Verify at least version 2.10
+ self.runcmd('scalac.bat -version', quiet=True)
+ cmd = 'scalac.bat'
+ except (CalledProcessError, OSError):
+ pass
+
+ if cmd is None:
+ self.logger.warning('"scalac" is not found on the PATH. Scala files will not be recompiled')
+ self.cmdscalac = None
+ else:
+ self.cmdscalac = '"%s"' % cmd
+
+ try:
+ self.runcmd('%s -target:jvm-1.6 -version' % self.cmdscalac, quiet=True)
+ except (CalledProcessError, OSError):
+ self.logger.info('%s does not support jvm-1.6 target, it is out of date. Ignoring' % self.cmdscalac)
+ self.cmdscalac = None
+
def checkjars(self, side):
jarlk = {CLIENT: self.jarclient, SERVER: self.jarserver}
md5jarlk = {CLIENT: self.md5jarclt, SERVER: self.md5jarsrv}
@@ -798,6 +861,8 @@
@@ -892,6 +894,8 @@
binlk = {CLIENT: self.binclient, SERVER: self.binserver}
testlk = {CLIENT: self.testclient, SERVER: self.testserver}
@@ -128,7 +18,7 @@
if not os.path.exists(os.path.join(binlk[side], os.path.normpath(testlk[side] + '.class'))):
return False
return True
@@ -1038,6 +1103,9 @@
@@ -1223,6 +1227,9 @@
pathbinlk = {CLIENT: self.binclient, SERVER: self.binserver}
pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver}
pathlog = {CLIENT: self.clientrecomplog, SERVER: self.serverrecomplog}
@@ -138,46 +28,7 @@
if not os.path.exists(pathbinlk[side]):
os.makedirs(pathbinlk[side])
@@ -1051,6 +1119,29 @@
all_files = True
append_pattern = False
pkglist = filterdirs(pathsrclk[side], '*.java', append_pattern=append_pattern, all_files=all_files)
+ if self.cmdrecompscalac: # Compile scala before java as scala scans java files, but not vice-versa
+ pkglistscala = pkglist[:]
+ pkglistscala.extend(filterdirs(pathsrclk[side], '*.scala', append_pattern=append_pattern, all_files=all_files))
+ dirs = ' '.join(pkglistscala)
+ classpath = os.pathsep.join(cplk[side])
+ forkcmd = self.cmdrecompscalac.format(classpath=classpath, sourcepath=pathsrclk[side], outpath=pathbinlk[side], pkgs=dirs)
+ try:
+ self.runcmd(forkcmd, log_file=pathlog[side])
+ except CalledProcessError as ex:
+ self.logger.error('')
+ self.logger.error('== ERRORS FOUND in SCALA CODE ==')
+ self.logger.error('')
+ for line in ex.output.splitlines():
+ if line.strip():
+ if line.find("jvm-1.6") != -1:
+ self.logger.error(' === Your scala version is out of date, update to at least 2.10.0 ===')
+ if line[0] != '[' and line[0:4] != 'Note':
+ self.logger.error(line)
+ if '^' in line:
+ self.logger.error('')
+ self.logger.error('================================')
+ self.logger.error('')
+ raise
dirs = ' '.join(pkglist)
classpath = os.pathsep.join(cplk[side])
forkcmd = self.cmdrecomp.format(classpath=classpath, sourcepath=pathsrclk[side], outpath=pathbinlk[side],
@@ -1059,7 +1150,7 @@
self.runcmd(forkcmd, log_file=pathlog[side])
except CalledProcessError as ex:
self.logger.error('')
- self.logger.error('== ERRORS FOUND ==')
+ self.logger.error('== ERRORS FOUND in JAVA CODE ==')
self.logger.error('')
for line in ex.output.splitlines():
if line.strip():
@@ -1072,7 +1163,7 @@
@@ -1280,7 +1287,7 @@
raise
def startserver(self):
@@ -186,7 +37,7 @@
classpath = [os.path.join('..', p) for p in classpath]
classpath = os.pathsep.join(classpath)
os.chdir(self.dirjars)
@@ -1080,7 +1171,7 @@
@@ -1288,7 +1295,7 @@
self.runmc(forkcmd)
def startclient(self):
@@ -195,47 +46,7 @@
classpath = [os.path.join('..', p) for p in classpath]
classpath = os.pathsep.join(classpath)
natives = os.path.join('..', self.dirnatives)
@@ -1207,20 +1298,20 @@
with open(self.csvmethods, 'rb') as fh:
methodsreader = csv.DictReader(fh)
for row in methodsreader:
- if int(row['side']) == side:
+ if int(row['side']) == side or int(row['side']) == 2:
if row['name'] != row['searge']:
names['methods'][row['searge']] = row['name']
with open(self.csvfields, 'rb') as fh:
fieldsreader = csv.DictReader(fh)
for row in fieldsreader:
- if int(row['side']) == side:
+ if int(row['side']) == side or int(row['side']) == 2:
if row['name'] != row['searge']:
names['fields'][row['searge']] = row['name']
if self.has_param_csv:
with open(self.csvparams, 'rb') as fh:
paramsreader = csv.DictReader(fh)
for row in paramsreader:
- if int(row['side']) == side:
+ if int(row['side']) == side or int(row['side']) == 2:
names['params'][row['param']] = row['name']
regexps = {
@@ -1354,13 +1445,13 @@
methods = {}
for row in methodsreader:
#HINT: Only include methods that have a non-empty description
- if int(row['side']) == side and row['desc']:
+ if (int(row['side']) == side or int(row['side']) == 2) and row['desc']:
methods[row['searge']] = row['desc'].replace('*/', '* /')
fields = {}
for row in fieldsreader:
#HINT: Only include fields that have a non-empty description
- if int(row['side']) == side and row['desc']:
+ if (int(row['side']) == side or int(row['side']) == 2) and row['desc']:
fields[row['searge']] = row['desc'].replace('*/', '* /')
regexps = {
@@ -1437,7 +1528,7 @@
@@ -1645,7 +1652,7 @@
self.runcmd(forkcmd)
return True
@@ -244,7 +55,7 @@
if not reobf:
md5lk = {CLIENT: self.md5client, SERVER: self.md5server}
else:
@@ -1452,6 +1543,9 @@
@@ -1660,6 +1667,9 @@
class_path = ''
else:
class_path += '/'
@@ -254,40 +65,7 @@
for class_file in fnmatch.filter(filelist, '*.class'):
class_name = class_path + os.path.splitext(class_file)[0]
bin_file = os.path.normpath(os.path.join(path, class_file))
@@ -1548,6 +1642,8 @@
if not os.path.exists(outpathlk[side]):
os.makedirs(outpathlk[side])
+ reserved = ['CON', 'PRN', 'AUX', 'NUL', 'COM1', 'COM2', 'COM3', 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9', 'LPT1', 'LPT2', 'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', 'LPT8', 'LPT9']
+
# HINT: We extract the modified class files
with closing(zipfile.ZipFile(jarlk[side])) as zipjar:
for in_class in trgclasses:
@@ -1561,6 +1657,23 @@
out_class = out_class.replace(self.nullpkg, '')
if out_class[0] == '/':
out_class = out_class[1:]
+
+ rename = False
+ for res in reserved:
+ if out_class.upper().startswith(res):
+ rename = True
+ break
+
+ if rename:
+ try:
+ f = open(os.path.join(outpathlk[side], '_' + out_class), 'wb')
+ f.write(zipjar.read(out_class))
+ f.close()
+ self.logger.info('> Outputted %s to %s as %s', in_class.ljust(35), outpathlk[side], '_' + out_class)
+ except IOError:
+ self.logger.error('* File %s failed extracting for %s', out_class, in_class)
+ continue
+
try:
zipjar.extract(out_class, outpathlk[side])
self.logger.info('> Outputted %s to %s as %s', in_class.ljust(35), outpathlk[side], out_class)
@@ -1607,6 +1720,9 @@
@@ -1832,6 +1842,9 @@
sys.exit(1)
for entry in newfiles:
@@ -297,7 +75,7 @@
if entry[3] == 'U':
self.logger.info('Retrieving file from server : %s', entry[0])
cur_file = os.path.normpath(entry[0])
@@ -1627,6 +1743,9 @@
@@ -1852,6 +1865,9 @@
md5reoblk = {CLIENT: self.md5reobfclient, SERVER: self.md5reobfserver}
outpathlk = {CLIENT: self.srcmodclient, SERVER: self.srcmodserver}
src = {CLIENT: self.srcclient, SERVER: self.srcserver}
@@ -16,6 +16,7 @@ import java.io.File;
import java.security.cert.Certificate;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.eventbus.EventBus;
@@ -168,4 +169,10 @@ public class DummyModContainer implements ModContainer
{
return md != null ? getModId() : "Dummy Container ("+label+") @" + System.identityHashCode(this);
}
@Override
public Map<String, String> getCustomModProperties()
{
return EMPTY_PROPERTIES;
}
}
@@ -38,8 +38,10 @@ import com.google.common.collect.BiMap;
import com.google.common.collect.ImmutableBiMap;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Builder;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterators;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
import com.google.common.collect.SetMultimap;
@@ -47,6 +49,7 @@ import com.google.common.collect.Sets;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import cpw.mods.fml.common.Mod.CustomProperty;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.Metadata;
import cpw.mods.fml.common.discovery.ASMDataTable;
@@ -83,7 +86,6 @@ public class FMLModContainer implements ModContainer
private boolean overridesMetadata;
private EventBus eventBus;
private LoadController controller;
private Multimap<Class<? extends Annotation>, Object> annotations;
private DefaultArtifactVersion processedVersion;
private boolean isNetworkMod;
@@ -107,6 +109,8 @@ public class FMLModContainer implements ModContainer
private Certificate certificate;
private String modLanguage;
private ILanguageAdapter languageAdapter;
private ListMultimap<Class<? extends FMLEvent>,Method> eventMethods;
private Map<String, String> customModProperties;
public FMLModContainer(String className, File modSource, Map<String,Object> modDescriptor)
{
@@ -115,6 +119,7 @@ public class FMLModContainer implements ModContainer
this.descriptor = modDescriptor;
this.modLanguage = (String) modDescriptor.get("modLanguage");
this.languageAdapter = "scala".equals(modLanguage) ? new ILanguageAdapter.ScalaAdapter() : new ILanguageAdapter.JavaAdapter();
this.eventMethods = ArrayListMultimap.create();
}
private ILanguageAdapter getLanguageAdapter()
@@ -312,10 +317,9 @@ public class FMLModContainer implements ModContainer
}
}
private Multimap<Class<? extends Annotation>, Object> gatherAnnotations(Class<?> clazz) throws Exception
private Method gatherAnnotations(Class<?> clazz) throws Exception
{
Multimap<Class<? extends Annotation>,Object> anns = ArrayListMultimap.create();
Method factoryMethod = null;
for (Method m : clazz.getDeclaredMethods())
{
for (Annotation a : m.getAnnotations())
@@ -323,20 +327,47 @@ public class FMLModContainer implements ModContainer
if (modTypeAnnotations.containsKey(a.annotationType()))
{
Class<?>[] paramTypes = new Class[] { modTypeAnnotations.get(a.annotationType()) };
if (Arrays.equals(m.getParameterTypes(), paramTypes))
{
m.setAccessible(true);
anns.put(a.annotationType(), m);
eventMethods.put(modTypeAnnotations.get(a.annotationType()), m);
}
else
{
FMLLog.log(getModId(), Level.SEVERE,"The mod %s appears to have an invalid method annotation %s. This annotation can only apply to methods with argument types %s -it will not be called", getModId(), a.annotationType().getSimpleName(), Arrays.toString(paramTypes));
}
}
else if (a.annotationType().equals(Mod.EventHandler.class))
{
if (m.getParameterTypes().length == 1 && modAnnotationTypes.containsKey(m.getParameterTypes()[0]))
{
m.setAccessible(true);
eventMethods.put((Class<? extends FMLEvent>) m.getParameterTypes()[1],m);
}
else
{
FMLLog.log(getModId(), Level.SEVERE,"The mod %s appears to have an invalid event annotation %s. This annotation can only apply to methods with recognized event arguments - it will not be called", getModId(), a.annotationType().getSimpleName());
}
}
else if (a.annotationType().equals(Mod.InstanceFactory.class))
{
if (Modifier.isStatic(m.getModifiers()) && m.getParameterTypes().length == 0 && factoryMethod == null)
{
m.setAccessible(true);
factoryMethod = m;
}
else if (!(Modifier.isStatic(m.getModifiers()) && m.getParameterTypes().length == 0))
{
FMLLog.log(getModId(), Level.SEVERE, "The InstanceFactory annotation can only apply to a static method, taking zero arguments - it will be ignored on %s(%s)", m.getName(), Arrays.asList(m.getParameterTypes()));
}
else if (factoryMethod != null)
{
FMLLog.log(getModId(), Level.SEVERE, "The InstanceFactory annotation can only be used once, the application to %s(%s) will be ignored", m.getName(), Arrays.asList(m.getParameterTypes()));
}
}
}
}
return anns;
return factoryMethod;
}
private void processFieldAnnotations(ASMDataTable asmDataTable) throws Exception
@@ -461,9 +492,25 @@ public class FMLModContainer implements ModContainer
}
}
annotations = gatherAnnotations(clazz);
CustomProperty[] props = (CustomProperty[]) descriptor.get("customProperties");
if (props!=null && props.length > 0)
{
com.google.common.collect.ImmutableMap.Builder<String, String> builder = ImmutableMap.<String,String>builder();
for (CustomProperty p : props)
{
builder.put(p.k(),p.v());
}
customModProperties = builder.build();
}
else
{
customModProperties = EMPTY_PROPERTIES;
}
Method factoryMethod = gatherAnnotations(clazz);
isNetworkMod = FMLNetworkHandler.instance().registerNetworkMod(this, clazz, event.getASMHarvestedData());
modInstance = getLanguageAdapter().getNewInstance(this,clazz, modClassLoader);
modInstance = getLanguageAdapter().getNewInstance(this,clazz, modClassLoader, factoryMethod);
if (fingerprintNotPresent)
{
eventBus.post(new FMLFingerprintViolationEvent(source.isDirectory(), source, ImmutableSet.copyOf(this.sourceFingerprints), expectedFingerprint));
@@ -481,23 +528,20 @@ public class FMLModContainer implements ModContainer
@Subscribe
public void handleModStateEvent(FMLEvent event)
{
Class<? extends Annotation> annotation = modAnnotationTypes.get(event.getClass());
if (annotation == null)
if (!eventMethods.containsKey(event.getClass()))
{
return;
}
try
{
for (Object o : annotations.get(annotation))
for (Method m : eventMethods.get(event.getClass()))
{
Method m = (Method) o;
m.invoke(modInstance, event);
}
}
catch (Throwable t)
{
controller.errorOccurred(this, t);
Throwables.propagateIfPossible(t);
}
}
@@ -545,4 +589,10 @@ public class FMLModContainer implements ModContainer
{
return "FMLMod:"+getModId()+"{"+getVersion()+"}";
}
@Override
public Map<String, String> getCustomModProperties()
{
return customModProperties;
}
}
@@ -9,14 +9,14 @@ import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.relauncher.Side;
public interface ILanguageAdapter {
public Object getNewInstance(FMLModContainer container, Class<?> objectClass, ClassLoader classLoader) throws Exception;
public Object getNewInstance(FMLModContainer container, Class<?> objectClass, ClassLoader classLoader, Method factoryMarkedAnnotation) throws Exception;
public boolean supportsStatics();
public void setProxy(Field target, Class<?> proxyTarget, Object proxy) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException;
public void setInternalProxies(ModContainer mod, Side side, ClassLoader loader);
public static class ScalaAdapter implements ILanguageAdapter {
@Override
public Object getNewInstance(FMLModContainer container, Class<?> scalaObjectClass, ClassLoader classLoader) throws Exception
public Object getNewInstance(FMLModContainer container, Class<?> scalaObjectClass, ClassLoader classLoader, Method factoryMarkedAnnotation) throws Exception
{
Class<?> sObjectClass = Class.forName(scalaObjectClass.getName()+"$",true,classLoader);
return sObjectClass.getField("MODULE$").get(null);
@@ -163,9 +163,16 @@ public interface ILanguageAdapter {
public static class JavaAdapter implements ILanguageAdapter {
@Override
public Object getNewInstance(FMLModContainer container, Class<?> objectClass, ClassLoader classLoader) throws Exception
public Object getNewInstance(FMLModContainer container, Class<?> objectClass, ClassLoader classLoader, Method factoryMarkedMethod) throws Exception
{
return objectClass.newInstance();
if (factoryMarkedMethod != null)
{
return factoryMarkedMethod.invoke(null);
}
else
{
return objectClass.newInstance();
}
}
@Override
@@ -15,6 +15,7 @@ package cpw.mods.fml.common;
import java.io.File;
import java.security.cert.Certificate;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.eventbus.EventBus;
@@ -154,4 +155,10 @@ public class InjectedModContainer implements ModContainer
{
return "Wrapped{"+wrappedContainer.toString()+"}";
}
@Override
public Map<String, String> getCustomModProperties()
{
return wrappedContainer.getCustomModProperties();
}
}
@@ -832,4 +832,10 @@ public class Loader
}
return fmlBrandingProperties;
}
public Map<String,String> getCustomModProperties(String modId)
{
return getIndexedModList().get(modId).getCustomModProperties();
}
}
+167 -9
View File
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -18,12 +18,57 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import net.minecraft.item.ItemBlock;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.event.FMLFingerprintViolationEvent;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent;
import cpw.mods.fml.common.event.FMLServerStartedEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.event.FMLServerStoppedEvent;
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
import cpw.mods.fml.common.event.FMLStateEvent;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
/**
* The new mod style in FML 1.3
* This defines a Mod to FML.
* Any class found with this annotation applied will be loaded as a Mod. The instance that is loaded will
* represent the mod to other Mods in the system. It will be sent various subclasses of {@link FMLEvent}
* at pre-defined times during the loading of the game, based on where you have applied the {@link EventHandler}
* annotation.
*
* This annotation is usually paired with a second annotation {@link NetworkMod}, which declares the
* network related properties of this mod.
*
* <p>This is a simple example of a Mod. It has the modId of "MyModId", the name of "My example mod", it is
* version 1.0, and depends on FML being loaded. It has the {@link NetworkMod} annotation as well, declaring it uses channel
* "MyModChannel" and {@link IPacketHandler} class PacketHandler.
* <pre>{@code
* package mymod;
* // Declare that this is a mod with modId "MyModId", name "My example mod", version "1.0" and dependency on FML.
* {@literal @}Mod(modId="MyModId",name="My example mod",version="1.0",dependencies="required-after:FML")
* // Declare that this is a network mod using the {@link Packet250CustomPayload} channel "MyModChannel", required on the client if it's present
* // on the server, with {@link IPacketHandler} class PacketHandler.
* {@literal @}NetworkMod(channels = { "MyModChannel" }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
* public class MyMod {
* // Populate this field with the instance of the mod created by FML
* {@literal @}Instance("MyModId")
* public MyMod instance;
*
* // Mark this method for receiving an {@link FMLEvent} (in this case, it's the {@link FMLPreInitializationEvent})
* {@literal @}EventHandler public void preInit(FMLPreInitializationEvent event)
* {
* // Do stuff in pre-init phase (read config, create blocks and items, register them)
* }
* }
* </pre>
*
* @author cpw
*
@@ -65,10 +110,14 @@ public @interface Mod
* An optional bukkit plugin that will be injected into the bukkit plugin framework if
* this mod is loaded into the FML framework and the bukkit coremod is present.
* Instances of the bukkit plugin can be obtained via the {@link BukkitPluginRef} annotation on fields.
*
* This may be implemented by a bukkit integration. It is not provided with vanilla FML or MinecraftForge.
*
* @return The name of the plugin to load for this mod
*/
String bukkitPlugin() default "";
/**
* NOT YET IMPLEMENTED.</br>
* Mods that this mod will <strong>not</strong> load with.
* An optional comma separated string of (+|-)(*|modid[@value]) which specify mods that
* this mod will refuse to load with, resulting in the game failing to start.
@@ -98,34 +147,109 @@ public @interface Mod
*
* @return A string listing modids to exclude from loading with this mod.
*/
@Deprecated
String modExclusionList() default "";
/**
* Specifying this field allows for a mod to expect a signed jar with a fingerprint matching this value.
* The fingerprint should be SHA-1 encoded, lowercase with ':' removed. An empty value indicates that
* the mod is not expecting to be signed.
*
* Any incorrectness of the fingerprint, be it missing or wrong, will result in the {@link FingerprintWarning}
* method firing <i>prior to any other event on the mod</i>.
* Any incorrectness of the fingerprint, be it missing or wrong, will result in the {@link FMLFingerprintViolationEvent}
* event firing <i>prior to any other event on the mod</i>.
*
* @return A certificate fingerprint that is expected for this mod.
*/
String certificateFingerprint() default "";
/**
* The language the mod is authored in. This will be used to control certain libraries being downloaded.
* The language the mod is authored in. This will be used to control certain compatibility behaviours for this mod.
* Valid values are currently "java", "scala"
*
* @return The language the mod is authored in
*/
String modLanguage() default "java";
/**
* NOT YET IMPLEMENTED. </br>
* An optional ASM hook class, that can be used to apply ASM to classes loaded from this mod. It is also given
* the ASM tree of the class declaring {@link Mod} to with what it will.
* the ASM tree of the class declaring {@link Mod} to do with what it will.
*
* @return The name of a class to be loaded and executed. Must implement {@link IASMHook}.
*/
@Deprecated
String asmHookClass() default "";
/**
* A list of custom properties for this mod. Completely up to the mod author if/when they
* want to put anything in here.
* @return an optional list of custom properties
*/
CustomProperty[] customProperties() default {};
/**
* A custom key => value property pair for use with {@link Mod#customProperties()}
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({})
public @interface CustomProperty
{
/**
* A key. Should be unique.
* @return A key
*/
String k();
/**
* A value. Can be anything.
* @return A value
*/
String v();
}
/**
* Marks the associated method as handling an FML lifecycle event.
* The method must have a single parameter, one of the following types. This annotation
* replaces the multiple different annotations that previously were used.
*
* Current event classes. This first section is standard lifecycle events. They are dispatched
* at various phases as the game starts. Each event should have information useful to that
* phase of the lifecycle. They are fired in this order.
*
* These suggestions are mostly just suggestions on what to do in each event.
* <ul>
* <li> {@link FMLPreInitializationEvent} : Run before anything else. Read your config, create blocks,
* items, etc, and register them with the {@link GameRegistry}.</li>
* <li> {@link FMLInitializationEvent} : Do your mod setup. Build whatever data structures you care about. Register recipes,
* send {@link FMLInterModComms} messages to other mods.</li>
* <li> {@link FMLPostInitializationEvent} : Handle interaction with other mods, complete your setup based on this.</li>
* </ul>
* <p>These are the server lifecycle events. They are fired whenever a server is running, or about to run. Each time a server
* starts they will be fired in this sequence.
* <ul>
* <li> {@link FMLServerAboutToStartEvent} : Use if you need to handle something before the server has even been created.</li>
* <li> {@link FMLServerStartingEvent} : Do stuff you need to do to set up the server. register commands, tweak the server.</li>
* <li> {@link FMLServerStartedEvent} : Do what you need to with the running server.</li>
* <li> {@link FMLServerStoppingEvent} : Do what you need to before the server has started it's shutdown sequence.</li>
* <li> {@link FMLServerStoppedEvent} : Do whatever cleanup you need once the server has shutdown. Generally only useful
* on the integrated server.</li>
* </ul>
* The second set of events are more specialized, for receiving notification of specific
* information.
* <ul>
* <li> {@link FMLFingerprintViolationEvent} : Sent just before {@link FMLPreInitializationEvent}
* if something is wrong with your mod signature</li>
* <li> {@link IMCEvent} : Sent just after {@link FMLInitializationEvent} if you have IMC messages waiting
* from other mods</li>
* </ul>
*
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface EventHandler{}
/**
* Deprecated for {@link EventHandler}<br/>
* Mark the designated method as to be called at if there is something wrong with the certificate fingerprint of
* the mod's jar, or it is missing, or otherwise a problem.
* @author cpw
@@ -133,72 +257,90 @@ public @interface Mod
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface FingerprintWarning {}
/**
* Deprecated for {@link EventHandler}<br/>
* Mark the designated method as being called at the "pre-initialization" phase
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface PreInit {}
/**
* Deprecated for {@link EventHandler}<br/>
* Mark the designated method as being called at the "initialization" phase
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface Init {}
/**
* Deprecated for {@link EventHandler}<br/>
* Mark the designated method as being called at the "post-initialization" phase
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface PostInit {}
/**
* Deprecated for {@link EventHandler}<br/>
* Mark the designated method as being called at the "server-about-to-start" phase
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface ServerAboutToStart {}
/**
* Deprecated for {@link EventHandler}<br/>
* Mark the designated method as being called at the "server-starting" phase
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface ServerStarting {}
/**
* Deprecated for {@link EventHandler}<br/>
* Mark the designated method as being called at the "server-started" phase
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface ServerStarted {}
/**
* Deprecated for {@link EventHandler}<br/>
* Mark the designated method as being called at the "server-stopping" phase
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface ServerStopping {}
/**
* Deprecated for {@link EventHandler}<br/>
* Mark the designated method as being called at the "server-stopped" phase
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface ServerStopped {}
/**
* Deprecated for {@link EventHandler}<br/>
* Mark the designated method as the receiver for {@link FMLInterModComms} messages
* Called between {@link Init} and {@link PostInit}
* @author cpw
@@ -206,9 +348,11 @@ public @interface Mod
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface IMCCallback {}
/**
* Populate the annotated field with the mod instance.
* Populate the annotated field with the mod instance based on the specified ModId. This can be used
* to retrieve instances of other mods.
* @author cpw
*
*/
@@ -234,12 +378,14 @@ public @interface Mod
String value() default "";
}
/**
* Populate the annotated field with an instance of the Block as specified
* NOT IMPLEMENTED AND SCHEDULED FOR REMOVAL.<br/>
* Populate the annotated field with an instance of the Block as specified. This never worked. It will be removed.
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Deprecated
public @interface Block {
/**
* The block's name
@@ -251,12 +397,14 @@ public @interface Mod
Class<?> itemTypeClass() default ItemBlock.class;
}
/**
* Populate the annotated field with an Item
* NOT IMPLEMENTED AND SCHEDULED FOR REMOVAL.<br/>
* Populate the annotated field with an Item. This never worked. It will be removed.
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Deprecated
public @interface Item {
/**
* The name of the item
@@ -267,4 +415,14 @@ public @interface Mod
*/
String typeClass();
}
/**
* Mod instance factory method. Should return an instance of the mod. Applies only to static methods on the same class as {@link Mod}.
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface InstanceFactory {
}
}
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -20,12 +20,13 @@ import java.net.URLClassLoader;
import java.util.List;
import java.util.logging.Level;
import net.minecraft.launchwrapper.LaunchClassLoader;
import com.google.common.collect.ImmutableList;
import cpw.mods.fml.common.asm.ASMTransformer;
import cpw.mods.fml.common.asm.transformers.AccessTransformer;
import cpw.mods.fml.common.modloader.BaseModProxy;
import cpw.mods.fml.relauncher.RelaunchClassLoader;
/**
* A simple delegating class loader used to load mods into the system
@@ -37,16 +38,16 @@ import cpw.mods.fml.relauncher.RelaunchClassLoader;
public class ModClassLoader extends URLClassLoader
{
private static final List<String> STANDARD_LIBRARIES = ImmutableList.of("jinput.jar", "lwjgl.jar", "lwjgl_util.jar");
private RelaunchClassLoader mainClassLoader;
private LaunchClassLoader mainClassLoader;
public ModClassLoader(ClassLoader parent) {
super(new URL[0], null);
this.mainClassLoader = (RelaunchClassLoader)parent;
this.mainClassLoader = (LaunchClassLoader)parent;
}
public void addFile(File modFile) throws MalformedURLException
{
URL url = modFile.toURI().toURL();
URL url = modFile.toURI().toURL();
mainClassLoader.addURL(url);
}
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -15,8 +15,10 @@ package cpw.mods.fml.common;
import java.io.File;
import java.security.cert.Certificate;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.collect.ImmutableMap;
import com.google.common.eventbus.EventBus;
import cpw.mods.fml.common.versioning.ArtifactVersion;
@@ -131,4 +133,7 @@ public interface ModContainer
VersionRange acceptableMinecraftVersionRange();
Certificate getSigningCertificate();
public static final Map<String,String> EMPTY_PROPERTIES = ImmutableMap.of();
Map<String,String> getCustomModProperties();
}
@@ -18,6 +18,29 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Sided proxies are loaded based on the specific environment they find themselves loaded into.
* They are used to ensure that client-specific code (such as GUIs) is only loaded into the game
* on the client side.
* It is applied to static fields of a class, anywhere in your mod code. FML will scan
* and load any classes with this annotation at mod construction time.
*
* <p>
* This example will load a CommonProxy on the server side, and a ClientProxy on the client side.
*
* <pre>{@code
* public class MySidedProxyHolder {
* {@literal @}SidedProxy(modId="MyModId",clientSide="mymod.ClientProxy", serverSide="mymod.CommonProxy")
* public static CommonProxy proxy;
* }
*
* public class CommonProxy {
* // Common or server stuff here that needs to be overridden on the client
* }
*
* public class ClientProxy extends CommonProxy {
* // Override common stuff with client specific stuff here
* }
* </pre>
* @author cpw
*
*/
@@ -5,13 +5,15 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.common.asm;
import net.minecraft.launchwrapper.IClassTransformer;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
@@ -19,7 +21,6 @@ import org.objectweb.asm.Type;
import org.objectweb.asm.tree.ClassNode;
import cpw.mods.fml.common.registry.BlockProxy;
import cpw.mods.fml.relauncher.IClassTransformer;
public class ASMTransformer implements IClassTransformer
{
@@ -30,10 +30,13 @@ import java.security.cert.TrustAnchor;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Collections;
import java.util.Locale;
import java.util.Map;
import javax.swing.JOptionPane;
import net.minecraft.launchwrapper.LaunchClassLoader;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.FieldVisitor;
@@ -41,9 +44,10 @@ import org.objectweb.asm.Opcodes;
import cpw.mods.fml.common.CertificateHelper;
import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper;
import cpw.mods.fml.common.patcher.ClassPatchManager;
import cpw.mods.fml.relauncher.FMLLaunchHandler;
import cpw.mods.fml.relauncher.FMLRelaunchLog;
import cpw.mods.fml.relauncher.IFMLCallHook;
import cpw.mods.fml.relauncher.RelaunchClassLoader;
public class FMLSanityChecker implements IFMLCallHook
{
@@ -68,7 +72,7 @@ public class FMLSanityChecker implements IFMLCallHook
}
}
private RelaunchClassLoader cl;
private LaunchClassLoader cl;
@Override
public Void call() throws Exception
@@ -137,8 +141,11 @@ public class FMLSanityChecker implements IFMLCallHook
@Override
public void injectData(Map<String, Object> data)
{
cl = (RelaunchClassLoader) data.get("classLoader");
FMLDeobfuscatingRemapper.INSTANCE.setup((File)data.get("mcLocation"), cl, (String) data.get("deobfuscationFileName"));
cl = (LaunchClassLoader) data.get("classLoader");
File mcDir = (File)data.get("mcLocation");
FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
File binpatches = new File(mcDir,"binpatch");
ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
}
}
@@ -32,6 +32,8 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import net.minecraft.launchwrapper.IClassTransformer;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.ClassNode;
@@ -48,7 +50,7 @@ import com.google.common.io.LineProcessor;
import com.google.common.io.Resources;
import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper;
import cpw.mods.fml.relauncher.IClassTransformer;
import cpw.mods.fml.relauncher.FMLRelaunchLog;
public class AccessTransformer implements IClassTransformer
{
@@ -152,6 +154,7 @@ public class AccessTransformer implements IClassTransformer
return true;
}
});
System.out.printf("Loaded %d rules from AccessTransformer config file %s\n", modifiers.size(), rulesFile);
}
@SuppressWarnings("unchecked")
@@ -163,7 +166,7 @@ public class AccessTransformer implements IClassTransformer
if (DEBUG)
{
System.out.printf("Considering all methods and fields on %s (%s): %b\n", name, transformedName, makeAllPublic);
FMLRelaunchLog.fine("Considering all methods and fields on %s (%s): %b\n", name, transformedName, makeAllPublic);
}
if (!makeAllPublic && !modifiers.containsKey(name)) { return bytes; }
@@ -5,13 +5,16 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.common.asm.transformers;
import net.minecraft.launchwrapper.IClassNameTransformer;
import net.minecraft.launchwrapper.IClassTransformer;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
@@ -20,8 +23,6 @@ import org.objectweb.asm.tree.ClassNode;
import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper;
import cpw.mods.fml.common.asm.transformers.deobf.FMLRemappingAdapter;
import cpw.mods.fml.relauncher.IClassNameTransformer;
import cpw.mods.fml.relauncher.IClassTransformer;
public class DeobfuscationTransformer implements IClassTransformer, IClassNameTransformer {
@@ -58,6 +58,7 @@ public class MCPMerger
private static HashSet<String> copyToServer = new HashSet<String>();
private static HashSet<String> copyToClient = new HashSet<String>();
private static HashSet<String> dontAnnotate = new HashSet<String>();
private static HashSet<String> dontProcess = new HashSet<String>();
private static final boolean DEBUG = false;
public static void main(String[] args)
@@ -71,9 +72,8 @@ public class MCPMerger
File map_file = new File(args[0]);
File client_jar = new File(args[1]);
File server_jar = new File(args[2]);
File client_jar_tmp = new File(args[1] + ".MergeBack");
File server_jar_tmp = new File(args[2] + ".MergeBack");
File client_jar_tmp = new File(args[1] + ".backup_merge");
File server_jar_tmp = new File(args[2] + ".backup_merge");
if (client_jar_tmp.exists() && !client_jar_tmp.delete())
{
@@ -155,7 +155,8 @@ public class MCPMerger
{
case '!': dontAnnotate.add(line); break;
case '<': copyToClient.add(line); break;
case '>': copyToServer.add(line); break;
case '>': copyToServer.add(line); break;
case '^': dontProcess.add(line); break;
}
}
@@ -344,8 +345,20 @@ public class MCPMerger
outFile.putNextEntry(entry);
continue;
}
String entryName = entry.getName();
if (!entryName.endsWith(".class") || entryName.startsWith("."))
boolean filtered = false;
for (String filter : dontProcess)
{
if (entryName.startsWith(filter))
{
filtered = true;
break;
}
}
if (filtered || !entryName.endsWith(".class") || entryName.startsWith("."))
{
ZipEntry newEntry = new ZipEntry(entry.getName());
outFile.putNextEntry(newEntry);
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -26,6 +26,8 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import net.minecraft.launchwrapper.IClassTransformer;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.ClassNode;
@@ -39,8 +41,6 @@ import com.google.common.collect.Lists;
import com.google.common.io.LineProcessor;
import com.google.common.io.Resources;
import cpw.mods.fml.relauncher.IClassTransformer;
public class MarkerTransformer implements IClassTransformer
{
private ListMultimap<String, String> markers = ArrayListMultimap.create();
@@ -0,0 +1,13 @@
package cpw.mods.fml.common.asm.transformers;
import net.minecraft.launchwrapper.IClassTransformer;
import cpw.mods.fml.common.patcher.ClassPatchManager;
public class PatchingTransformer implements IClassTransformer {
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
return ClassPatchManager.INSTANCE.applyPatch(name, transformedName, bytes);
}
}
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -15,6 +15,8 @@ package cpw.mods.fml.common.asm.transformers;
import java.util.Iterator;
import java.util.List;
import net.minecraft.launchwrapper.IClassTransformer;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Type;
@@ -23,13 +25,12 @@ import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.FieldNode;
import org.objectweb.asm.tree.MethodNode;
import cpw.mods.fml.relauncher.FMLRelauncher;
import cpw.mods.fml.relauncher.IClassTransformer;
import cpw.mods.fml.relauncher.FMLLaunchHandler;
import cpw.mods.fml.relauncher.SideOnly;
public class SideTransformer implements IClassTransformer
{
private static String SIDE = FMLRelauncher.side();
private static String SIDE = FMLLaunchHandler.side().name();
private static final boolean DEBUG = false;
@SuppressWarnings("unchecked")
@Override
@@ -13,6 +13,7 @@
package cpw.mods.fml.common.asm.transformers.deobf;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -23,9 +24,12 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import net.minecraft.launchwrapper.LaunchClassLoader;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.commons.Remapper;
@@ -38,6 +42,7 @@ import com.google.common.collect.HashBiMap;
import com.google.common.collect.ImmutableBiMap;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Lists;
@@ -49,7 +54,6 @@ import com.google.common.io.InputSupplier;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.relauncher.FMLRelaunchLog;
import cpw.mods.fml.relauncher.RelaunchClassLoader;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.FieldNode;
@@ -65,7 +69,7 @@ public class FMLDeobfuscatingRemapper extends Remapper {
private Map<String,Map<String,String>> fieldNameMaps;
private Map<String,Map<String,String>> methodNameMaps;
private RelaunchClassLoader classLoader;
private LaunchClassLoader classLoader;
private FMLDeobfuscatingRemapper()
{
@@ -73,17 +77,61 @@ public class FMLDeobfuscatingRemapper extends Remapper {
mcpNameBiMap=ImmutableBiMap.of();
}
public void setup(File mcDir, RelaunchClassLoader classLoader, String deobfFileName)
public void setupLoadOnly(String deobfFileName, boolean loadAll)
{
try
{
File mapData = new File(deobfFileName);
LZMAInputSupplier zis = new LZMAInputSupplier(new FileInputStream(mapData));
InputSupplier<InputStreamReader> srgSupplier = CharStreams.newReaderSupplier(zis,Charsets.UTF_8);
List<String> srgList = CharStreams.readLines(srgSupplier);
rawMethodMaps = Maps.newHashMap();
rawFieldMaps = Maps.newHashMap();
Builder<String, String> builder = ImmutableBiMap.<String,String>builder();
Builder<String, String> mcpBuilder = ImmutableBiMap.<String,String>builder();
Splitter splitter = Splitter.on(CharMatcher.anyOf(": ")).omitEmptyStrings().trimResults();
for (String line : srgList)
{
String[] parts = Iterables.toArray(splitter.split(line),String.class);
String typ = parts[0];
if ("CL".equals(typ))
{
parseClass(builder, parts);
parseMCPClass(mcpBuilder,parts);
}
else if ("MD".equals(typ) && loadAll)
{
parseMethod(parts);
}
else if ("FD".equals(typ) && loadAll)
{
parseField(parts);
}
}
classNameBiMap = builder.build();
// Special case some mappings for modloader mods
mcpBuilder.put("BaseMod","net/minecraft/src/BaseMod");
mcpBuilder.put("ModLoader","net/minecraft/src/ModLoader");
mcpBuilder.put("EntityRendererProxy","net/minecraft/src/EntityRendererProxy");
mcpBuilder.put("MLProp","net/minecraft/src/MLProp");
mcpBuilder.put("TradeEntry","net/minecraft/src/TradeEntry");
mcpNameBiMap = mcpBuilder.build();
}
catch (IOException ioe)
{
Logger.getLogger("FML").log(Level.SEVERE, "An error occurred loading the deobfuscation map data", ioe);
}
methodNameMaps = Maps.newHashMapWithExpectedSize(rawMethodMaps.size());
fieldNameMaps = Maps.newHashMapWithExpectedSize(rawFieldMaps.size());
}
public void setup(File mcDir, LaunchClassLoader classLoader, String deobfFileName)
{
this.classLoader = classLoader;
try
{
File libDir = new File(mcDir, "lib");
File mapData = new File(libDir, deobfFileName);
mapData = mapData.getCanonicalFile();
ZipFile mapZip = new ZipFile(mapData);
ZipEntry classData = mapZip.getEntry("joined.srg");
ZipInputSupplier zis = new ZipInputSupplier(mapZip, classData);
InputStream classData = getClass().getResourceAsStream(deobfFileName);
LZMAInputSupplier zis = new LZMAInputSupplier(classData);
InputSupplier<InputStreamReader> srgSupplier = CharStreams.newReaderSupplier(zis,Charsets.UTF_8);
List<String> srgList = CharStreams.readLines(srgSupplier);
rawMethodMaps = Maps.newHashMap();
@@ -362,4 +410,9 @@ public class FMLDeobfuscatingRemapper extends Remapper {
fieldNameMaps.put(name, ImmutableMap.copyOf(fieldMap));
// System.out.printf("Maps: %s %s\n", name, methodMap);
}
public Set<String> getObfedClasses()
{
return ImmutableSet.copyOf(classNameBiMap.keySet());
}
}
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -17,22 +17,22 @@ import java.io.InputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import LZMA.LzmaInputStream;
import com.google.common.io.InputSupplier;
public class ZipInputSupplier implements InputSupplier<InputStream> {
private ZipFile zipFile;
private ZipEntry zipEntry;
public class LZMAInputSupplier implements InputSupplier<InputStream> {
private InputStream compressedData;
public ZipInputSupplier(ZipFile zip, ZipEntry entry)
public LZMAInputSupplier(InputStream compressedData)
{
this.zipFile = zip;
this.zipEntry = entry;
this.compressedData = compressedData;
}
@Override
public InputStream getInput() throws IOException
{
return zipFile.getInputStream(zipEntry);
return new LzmaInputStream(this.compressedData);
}
}
@@ -27,7 +27,7 @@ import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.LoaderException;
import cpw.mods.fml.common.ModClassLoader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.relauncher.RelaunchLibraryManager;
import cpw.mods.fml.relauncher.CoreModManager;
public class ModDiscoverer
{
@@ -41,7 +41,7 @@ public class ModDiscoverer
public void findClasspathMods(ModClassLoader modClassLoader)
{
List<String> knownLibraries = ImmutableList.<String>builder().addAll(modClassLoader.getDefaultLibraries()).addAll(RelaunchLibraryManager.getLibraries()).build();
List<String> knownLibraries = ImmutableList.<String>builder().addAll(modClassLoader.getDefaultLibraries()).addAll(CoreModManager.getLibraries()).build();
File[] minecraftSources = modClassLoader.getParentSources();
if (minecraftSources.length == 1 && minecraftSources[0].isFile())
{
@@ -0,0 +1,18 @@
package cpw.mods.fml.common.launcher;
import cpw.mods.fml.relauncher.FMLLaunchHandler;
import net.minecraft.launchwrapper.LaunchClassLoader;
public class FMLServerTweaker extends FMLTweaker {
@Override
public String getLaunchTarget()
{
return "net.minecraft.server.MinecraftServer";
}
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader)
{
FMLLaunchHandler.configureForServerLaunch(classLoader, this);
}
}
@@ -0,0 +1,98 @@
package cpw.mods.fml.common.launcher;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.google.common.base.Throwables;
import com.google.common.collect.ObjectArrays;
import cpw.mods.fml.relauncher.FMLLaunchHandler;
import net.minecraft.launchwrapper.ITweaker;
import net.minecraft.launchwrapper.LaunchClassLoader;
public class FMLTweaker implements ITweaker {
private List<String> args;
private File gameDir;
private File assetsDir;
private String profile;
private static URI jarLocation;
private String[] array;
@Override
public void acceptOptions(List<String> args, File gameDir, File assetsDir, String profile)
{
this.args = args;
this.gameDir = (gameDir == null ? new File(".") : gameDir);
this.assetsDir = assetsDir;
this.profile = profile;
try
{
jarLocation = getClass().getProtectionDomain().getCodeSource().getLocation().toURI();
}
catch (URISyntaxException e)
{
Logger.getLogger("FMLTWEAK").log(Level.SEVERE, "Missing URI information for FML tweak");
throw Throwables.propagate(e);
}
}
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader)
{
classLoader.addTransformerExclusion("cpw.mods.fml.repackage.");
classLoader.addTransformerExclusion("cpw.mods.fml.relauncher.");
classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers.");
FMLLaunchHandler.configureForClientLaunch(classLoader, this);
}
@Override
public String getLaunchTarget()
{
return "net.minecraft.client.main.Main";
}
@Override
public String[] getLaunchArguments()
{
String[] array = args.toArray(new String[args.size()]);
if (gameDir != null)
{
array = ObjectArrays.concat(gameDir.getAbsolutePath(),array);
array = ObjectArrays.concat("--gameDir",array);
}
if (assetsDir != null)
{
array = ObjectArrays.concat(assetsDir.getAbsolutePath(),array);
array = ObjectArrays.concat("--assetsDir",array);
}
if (profile != null)
{
array = ObjectArrays.concat(profile,array);
array = ObjectArrays.concat("--version",array);
}
else
{
array = ObjectArrays.concat("UnknownFMLProfile",array);
array = ObjectArrays.concat("--version",array);
}
return array;
}
public File getGameDir()
{
return gameDir;
}
public static URI getJarLocation()
{
return jarLocation;
}
}
@@ -615,4 +615,10 @@ public class ModLoaderModContainer implements ModContainer
{
return null;
}
@Override
public Map<String, String> getCustomModProperties()
{
return EMPTY_PROPERTIES;
}
}
@@ -0,0 +1,23 @@
package cpw.mods.fml.common.patcher;
public class ClassPatch {
public final String name;
public final String sourceClassName;
public final String targetClassName;
public final boolean existsAtTarget;
public final byte[] patch;
public ClassPatch(String name, String sourceClassName, String targetClassName, boolean existsAtTarget, byte[] patch)
{
this.name = name;
this.sourceClassName = sourceClassName;
this.targetClassName = targetClassName;
this.existsAtTarget = existsAtTarget;
this.patch = patch;
}
@Override
public String toString()
{
return String.format("%s : %s => %s (%b) size %d", name, sourceClassName, targetClassName, existsAtTarget, patch.length);
}
}
@@ -0,0 +1,145 @@
package cpw.mods.fml.common.patcher;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.net.URISyntaxException;
import java.security.CodeSource;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.regex.Pattern;
import com.google.common.base.Joiner;
import com.google.common.base.Strings;
import com.google.common.base.Throwables;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteStreams;
import com.google.common.io.Files;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.launcher.FMLTweaker;
import cpw.mods.fml.relauncher.FMLRelaunchLog;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.repackage.com.nothome.delta.GDiffPatcher;
public class ClassPatchManager {
public static final ClassPatchManager INSTANCE = new ClassPatchManager();
private GDiffPatcher patcher = new GDiffPatcher();
private ListMultimap<String, ClassPatch> patches;
private ClassPatchManager()
{
}
public byte[] applyPatch(String name, String mappedName, byte[] inputData)
{
if (patches == null)
{
return inputData;
}
List<ClassPatch> list = patches.get(name);
if (list.isEmpty())
{
return inputData;
}
for (ClassPatch patch: list)
{
if (!patch.targetClassName.equals(mappedName))
{
FMLLog.warning("Binary patch found %s for wrong class %s", patch.targetClassName, mappedName);
}
if (!patch.existsAtTarget && (inputData == null || inputData.length == 0))
{
inputData = new byte[0];
}
else if (!patch.existsAtTarget)
{
FMLLog.warning("Patcher expecting empty class data file for %s, but received non-empty", patch.targetClassName);
}
synchronized (patcher)
{
try
{
inputData = patcher.patch(inputData, patch.patch);
}
catch (IOException e)
{
FMLLog.log(Level.SEVERE, e, "Encountered problem runtime patching class %s", name);
continue;
}
}
}
FMLLog.fine("Successfully applied runtime patches for %s", mappedName);
return inputData;
}
public void setup(Side side)
{
Pattern binpatchMatcher = Pattern.compile(String.format("binpatch/%s/.*.binpatch", side.toString().toLowerCase(Locale.ENGLISH)));
JarFile fmlJar;
try
{
FMLRelaunchLog.fine("FML URI is %s", FMLTweaker.getJarLocation());
File fmlJarFile = new File(FMLTweaker.getJarLocation());
if (!fmlJarFile.exists() || !fmlJarFile.isFile())
{
FMLRelaunchLog.log(Level.INFO, "Not found an FML jar, I assume you're developing FML. Hi cpw or Lex!");
patches = ArrayListMultimap.create();
return;
}
fmlJar = new JarFile(fmlJarFile);
}
catch (Exception e)
{
FMLRelaunchLog.log(Level.SEVERE, e, "Error occurred reading binary patches. Problems may occur");
throw Throwables.propagate(e);
}
patches = ArrayListMultimap.create();
for (JarEntry entry : Collections.list(fmlJar.entries()))
{
if (binpatchMatcher.matcher(entry.getName()).matches())
{
ClassPatch cp = readPatch(entry, fmlJar);
if (cp != null)
{
patches.put(cp.sourceClassName, cp);
}
}
}
FMLLog.fine("Read %d binary patches from %s", patches.size(), fmlJar.getName());
FMLLog.fine("Patch list :\n\t%s", Joiner.on("\t\n").join(patches.asMap().entrySet()));
}
private ClassPatch readPatch(JarEntry patchEntry, JarFile jarFile)
{
FMLLog.finest("Reading patch data from %s in file %s", patchEntry.getName(), jarFile.getName());
ByteArrayDataInput input;
try
{
input = ByteStreams.newDataInput(ByteStreams.toByteArray(jarFile.getInputStream(patchEntry)));
}
catch (IOException e)
{
FMLLog.log(Level.WARNING, e, "Unable to read binpatch file %s - ignoring", patchEntry.getName());
return null;
}
String name = input.readUTF();
String sourceClassName = input.readUTF();
String targetClassName = input.readUTF();
boolean exists = input.readBoolean();
int patchLength = input.readInt();
byte[] patchBytes = new byte[patchLength];
input.readFully(patchBytes);
return new ClassPatch(name, sourceClassName, targetClassName, exists, patchBytes);
}
}
@@ -0,0 +1,5 @@
package cpw.mods.fml.common.patcher;
public class ClassPatchingTransformer {
}
@@ -0,0 +1,95 @@
package cpw.mods.fml.common.patcher;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.google.common.collect.Iterables;
import com.google.common.collect.Iterators;
import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import com.google.common.io.Files;
import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper;
import cpw.mods.fml.repackage.com.nothome.delta.Delta;
public class GenDiffSet {
private static final List<String> RESERVED_NAMES = Arrays.asList("CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9");
public static void main(String[] args) throws IOException
{
String sourceJar = args[0]; //Clean Vanilla jar minecraft.jar or minecraft_server.jar
String targetDir = args[1]; //Directory containing obfed output classes, typically mcp/reobf/minecraft
String deobfData = args[2]; //Path to FML's deobfusication_data.lzma
String outputDir = args[3]; //Path to place generated .binpatch
String killTarget = args[4]; //"true" if we should destroy the target file if it generated a successful .binpatch
Logger.getLogger("GENDIFF").log(Level.INFO, String.format("Creating patches at %s for %s from %s", outputDir, sourceJar, targetDir));
Delta delta = new Delta();
FMLDeobfuscatingRemapper remapper = FMLDeobfuscatingRemapper.INSTANCE;
remapper.setupLoadOnly(deobfData, false);
JarFile sourceZip = new JarFile(sourceJar);
boolean kill = killTarget.equalsIgnoreCase("true");
File f = new File(outputDir);
f.mkdirs();
for (String name : remapper.getObfedClasses())
{
// Logger.getLogger("GENDIFF").info(String.format("Evaluating path for data :%s",name));
String fileName = name;
String jarName = name;
if (RESERVED_NAMES.contains(name.toUpperCase(Locale.ENGLISH)))
{
fileName = "_"+name;
}
File targetFile = new File(targetDir, fileName.replace('/', File.separatorChar) + ".class");
jarName = jarName+".class";
if (targetFile.exists())
{
String sourceClassName = name.replace('/', '.');
String targetClassName = remapper.map(name).replace('/', '.');
JarEntry entry = sourceZip.getJarEntry(jarName);
byte[] vanillaBytes = entry != null ? ByteStreams.toByteArray(sourceZip.getInputStream(entry)) : new byte[0];
byte[] patchedBytes = Files.toByteArray(targetFile);
byte[] diff = delta.compute(vanillaBytes, patchedBytes);
ByteArrayDataOutput diffOut = ByteStreams.newDataOutput(diff.length + 50);
// Original name
diffOut.writeUTF(name);
// Source name
diffOut.writeUTF(sourceClassName);
// Target name
diffOut.writeUTF(targetClassName);
// exists at original
diffOut.writeBoolean(entry != null);
// length of patch
diffOut.writeInt(diff.length);
// patch
diffOut.write(diff);
File target = new File(outputDir, targetClassName+".binpatch");
target.getParentFile().mkdirs();
Files.write(diffOut.toByteArray(), target);
Logger.getLogger("GENDIFF").info(String.format("Wrote patch for %s (%s) at %s",name, targetClassName, target.getAbsolutePath()));
if (kill)
{
targetFile.delete();
Logger.getLogger("GENDIFF").info(String.format(" Deleted target: %s", targetFile.toString()));
}
}
}
sourceZip.close();
}
}
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -28,6 +28,7 @@ import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StringTranslate;
@@ -45,7 +46,7 @@ public class LanguageRegistry
public String getStringLocalization(String key)
{
return getStringLocalization(key, StringTranslate.func_74808_a().func_74811_c());
return getStringLocalization(key, Minecraft.func_71410_x().func_135016_M().func_135041_c().func_135034_a());
}
public String getStringLocalization(String key, String lang)
@@ -93,9 +94,9 @@ public class LanguageRegistry
public static void reloadLanguageTable()
{
// reload language table by forcing lang to null and reloading the properties file
String lang = StringTranslate.func_74808_a().func_74811_c();
StringTranslate.func_74808_a().func_74810_a(lang, true);
// // reload language table by forcing lang to null and reloading the properties file
// String lang = StringTranslate.func_74808_a().func_74811_c();
// StringTranslate.func_74808_a().func_74810_a(lang, true);
}
@@ -120,17 +121,17 @@ public class LanguageRegistry
instance().addNameForObject(objectToName, "en_US", name);
}
public void loadLanguageTable(Properties languagePack, String lang)
public void loadLanguageTable(Map field_135032_a, String lang)
{
Properties usPack=modLanguageData.get("en_US");
if (usPack!=null) {
languagePack.putAll(usPack);
field_135032_a.putAll(usPack);
}
Properties langPack=modLanguageData.get(lang);
if (langPack==null) {
return;
}
languagePack.putAll(langPack);
field_135032_a.putAll(langPack);
}
public void loadLocalization(String localizationFile, String lang, boolean isXML)
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -19,6 +19,7 @@ import java.util.Random;
import java.util.Collection;
import java.util.Collections;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.item.Item;
import net.minecraft.util.Tuple;
@@ -32,6 +33,8 @@ import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
* Registry for villager trading control
@@ -45,8 +48,9 @@ public class VillagerRegistry
private Multimap<Integer, IVillageTradeHandler> tradeHandlers = ArrayListMultimap.create();
private Map<Class<?>, IVillageCreationHandler> villageCreationHandlers = Maps.newHashMap();
private Map<Integer, String> newVillagers = Maps.newHashMap();
private List<Integer> newVillagerIds = Lists.newArrayList();
@SideOnly(Side.CLIENT)
private Map<Integer, ResourceLocation> newVillagers;
/**
* Allow access to the {@link net.minecraft.world.gen.structure.StructureVillagePieces} array controlling new village
@@ -110,21 +114,33 @@ public class VillagerRegistry
return INSTANCE;
}
/**
* Register your villager id
* @param id
*/
public void registerVillagerId(int id)
{
if (newVillagerIds.contains(id))
{
FMLLog.severe("Attempt to register duplicate villager id %d", id);
throw new RuntimeException();
}
newVillagerIds.add(id);
}
/**
* Register a new skin for a villager type
*
* @param villagerId
* @param villagerSkin
*/
public void registerVillagerType(int villagerId, String villagerSkin)
@SideOnly(Side.CLIENT)
public void registerVillagerSkin(int villagerId, ResourceLocation villagerSkin)
{
if (newVillagers.containsKey(villagerId))
if (newVillagers == null)
{
FMLLog.severe("Attempt to register duplicate villager id %d", villagerId);
throw new RuntimeException();
newVillagers = Maps.newHashMap();
}
newVillagers.put(villagerId, villagerSkin);
newVillagerIds.add(villagerId);
}
/**
@@ -154,7 +170,8 @@ public class VillagerRegistry
* @param villagerType
* @param defaultSkin
*/
public static String getVillagerSkin(int villagerType, String defaultSkin)
@SideOnly(Side.CLIENT)
public static ResourceLocation getVillagerSkin(int villagerType, ResourceLocation defaultSkin)
{
if (instance().newVillagers.containsKey(villagerType))
{
@@ -1,23 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
public class ArgsWrapper
{
public ArgsWrapper(String[] args)
{
this.args=args;
}
public String[] args;
}
@@ -37,11 +37,13 @@ import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.logging.Level;
import net.minecraft.launchwrapper.LaunchClassLoader;
import cpw.mods.fml.common.CertificateHelper;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions;
public class RelaunchLibraryManager
public class CoreModManager
{
private static String[] rootPlugins = { "cpw.mods.fml.relauncher.FMLCorePlugin" , "net.minecraftforge.classloading.FMLForgePlugin" };
private static List<String> loadedLibraries = new ArrayList<String>();
@@ -50,12 +52,12 @@ public class RelaunchLibraryManager
private static List<ILibrarySet> libraries;
private static boolean deobfuscatedEnvironment;
public static void handleLaunch(File mcDir, RelaunchClassLoader actualClassLoader)
public static void handleLaunch(File mcDir, LaunchClassLoader classLoader)
{
try
{
// Are we in a 'decompiled' environment?
byte[] bs = actualClassLoader.getClassBytes("net.minecraft.world.World");
byte[] bs = classLoader.getClassBytes("net.minecraft.world.World");
if (bs != null)
{
FMLRelaunchLog.info("Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation");
@@ -72,17 +74,13 @@ public class RelaunchLibraryManager
}
pluginLocations = new HashMap<IFMLLoadingPlugin, File>();
loadPlugins = new ArrayList<IFMLLoadingPlugin>();
libraries = new ArrayList<ILibrarySet>();
for (String s : rootPlugins)
{
try
{
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) Class.forName(s, true, actualClassLoader).newInstance();
FMLRelaunchLog.finest("Adding coremod for loading %s", s);
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) Class.forName(s, true, classLoader).newInstance();
loadPlugins.add(plugin);
for (String libName : plugin.getLibraryRequestClass())
{
libraries.add((ILibrarySet) Class.forName(libName, true, actualClassLoader).newInstance());
}
}
catch (Exception e)
{
@@ -107,14 +105,14 @@ public class RelaunchLibraryManager
FMLRelaunchLog.info("Found a command line coremod : %s", s);
try
{
actualClassLoader.addTransformerExclusion(s);
Class<?> coreModClass = Class.forName(s, true, actualClassLoader);
classLoader.addTransformerExclusion(s);
Class<?> coreModClass = Class.forName(s, true, classLoader);
TransformerExclusions trExclusions = coreModClass.getAnnotation(IFMLLoadingPlugin.TransformerExclusions.class);
if (trExclusions!=null)
{
for (String st : trExclusions.value())
{
actualClassLoader.addTransformerExclusion(st);
classLoader.addTransformerExclusion(st);
}
}
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) coreModClass.newInstance();
@@ -123,7 +121,7 @@ public class RelaunchLibraryManager
{
for (String libName : plugin.getLibraryRequestClass())
{
libraries.add((ILibrarySet) Class.forName(libName, true, actualClassLoader).newInstance());
libraries.add((ILibrarySet) Class.forName(libName, true, classLoader).newInstance());
}
}
}
@@ -133,7 +131,7 @@ public class RelaunchLibraryManager
throw new RuntimeException(e);
}
}
discoverCoreMods(mcDir, actualClassLoader, loadPlugins, libraries);
discoverCoreMods(mcDir, classLoader, loadPlugins, libraries);
List<Throwable> caughtErrors = new ArrayList<Throwable>();
try
@@ -149,6 +147,7 @@ public class RelaunchLibraryManager
return;
}
libraries = new ArrayList<ILibrarySet>();
for (ILibrarySet lib : libraries)
{
for (int i=0; i<lib.getLibraries().length; i++)
@@ -213,7 +212,7 @@ public class RelaunchLibraryManager
try
{
actualClassLoader.addURL(libFile.toURI().toURL());
classLoader.addURL(libFile.toURI().toURL());
loadedLibraries.add(libName);
}
catch (MalformedURLException e)
@@ -268,14 +267,15 @@ public class RelaunchLibraryManager
{
for (String xformClass : plug.getASMTransformerClass())
{
actualClassLoader.registerTransformer(xformClass);
FMLRelaunchLog.finest("Registering transformer %s", xformClass);
classLoader.registerTransformer(xformClass);
}
}
}
// Deobfuscation transformer, always last
if (!deobfuscatedEnvironment)
{
actualClassLoader.registerTransformer("cpw.mods.fml.common.asm.transformers.DeobfuscationTransformer");
classLoader.registerTransformer("cpw.mods.fml.common.asm.transformers.DeobfuscationTransformer");
}
downloadMonitor.updateProgressString("Running coremod plugins");
Map<String,Object> data = new HashMap<String,Object>();
@@ -292,10 +292,10 @@ public class RelaunchLibraryManager
{
try
{
IFMLCallHook call = (IFMLCallHook) Class.forName(setupClass, true, actualClassLoader).newInstance();
IFMLCallHook call = (IFMLCallHook) Class.forName(setupClass, true, classLoader).newInstance();
Map<String,Object> callData = new HashMap<String, Object>();
callData.put("mcLocation", mcDir);
callData.put("classLoader", actualClassLoader);
callData.put("classLoader", classLoader);
callData.put("coremodLocation", pluginLocations.get(plugin));
callData.put("deobfuscationFileName", FMLInjectionData.debfuscationDataName());
call.injectData(callData);
@@ -317,7 +317,7 @@ public class RelaunchLibraryManager
try
{
downloadMonitor.updateProgressString("Validating minecraft");
Class<?> loaderClazz = Class.forName("cpw.mods.fml.common.Loader", true, actualClassLoader);
Class<?> loaderClazz = Class.forName("cpw.mods.fml.common.Loader", true, classLoader);
Method m = loaderClazz.getMethod("injectData", Object[].class);
m.invoke(null, (Object)FMLInjectionData.data());
m = loaderClazz.getMethod("instance");
@@ -333,7 +333,7 @@ public class RelaunchLibraryManager
}
}
private static void discoverCoreMods(File mcDir, RelaunchClassLoader classLoader, List<IFMLLoadingPlugin> loadPlugins, List<ILibrarySet> libraries)
private static void discoverCoreMods(File mcDir, LaunchClassLoader classLoader, List<IFMLLoadingPlugin> loadPlugins, List<ILibrarySet> libraries)
{
downloadMonitor.updateProgressString("Discovering coremods");
File coreMods = setupCoreModDir(mcDir);
@@ -5,13 +5,15 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
import java.util.logging.Level;
public class DummyDownloader implements IDownloadDisplay
{
@@ -46,8 +48,7 @@ public class DummyDownloader implements IDownloadDisplay
@Override
public void updateProgressString(String string, Object... data)
{
// TODO Auto-generated method stub
FMLRelaunchLog.log(Level.FINE, string, data);
}
@Override
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -26,6 +26,7 @@ public class FMLCorePlugin implements IFMLLoadingPlugin
public String[] getASMTransformerClass()
{
return new String[] {
"cpw.mods.fml.common.asm.transformers.PatchingTransformer",
"cpw.mods.fml.common.asm.transformers.AccessTransformer",
"cpw.mods.fml.common.asm.transformers.MarkerTransformer",
"cpw.mods.fml.common.asm.transformers.SideTransformer",
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -20,6 +20,8 @@ import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import net.minecraft.launchwrapper.LaunchClassLoader;
public class FMLInjectionData
{
static File minecraftHome;
@@ -33,7 +35,7 @@ public class FMLInjectionData
public static List<String> containers = new ArrayList<String>();
static void build(File mcHome, RelaunchClassLoader classLoader)
static void build(File mcHome, LaunchClassLoader classLoader)
{
minecraftHome = mcHome;
InputStream stream = classLoader.getResourceAsStream("fmlversion.properties");
@@ -62,7 +64,7 @@ public class FMLInjectionData
static String debfuscationDataName()
{
return "deobfuscation_data_"+mccversion+".zip";
return "/deobfuscation_data-"+mccversion+".lzma";
}
public static Object[] data()
{
@@ -0,0 +1,118 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
import java.applet.Applet;
import java.io.File;
import java.lang.reflect.Method;
import java.net.URLClassLoader;
import java.util.logging.Level;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import com.google.common.base.Throwables;
import cpw.mods.fml.common.launcher.FMLTweaker;
import net.minecraft.launchwrapper.LaunchClassLoader;
public class FMLLaunchHandler
{
private static FMLLaunchHandler INSTANCE;
static Side side;
private LaunchClassLoader classLoader;
private FMLTweaker tweaker;
private File minecraftHome;
public static void configureForClientLaunch(LaunchClassLoader loader, FMLTweaker tweaker)
{
instance(loader, tweaker).setupClient();
}
public static void configureForServerLaunch(LaunchClassLoader loader, FMLTweaker tweaker)
{
instance(loader, tweaker).setupServer();
}
private static FMLLaunchHandler instance(LaunchClassLoader launchLoader, FMLTweaker tweaker)
{
if (INSTANCE == null)
{
INSTANCE = new FMLLaunchHandler(launchLoader, tweaker);
}
return INSTANCE;
}
private FMLLaunchHandler(LaunchClassLoader launchLoader, FMLTweaker tweaker)
{
this.classLoader = launchLoader;
this.tweaker = tweaker;
this.minecraftHome = tweaker.getGameDir();
this.classLoader.addClassLoaderExclusion("cpw.mods.fml.relauncher.");
this.classLoader.addClassLoaderExclusion("net.minecraftforge.classloading.");
this.classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers.deobf.");
this.classLoader.addTransformerExclusion("cpw.mods.fml.common.patcher.");
}
private void showWindow(boolean showIt)
{
if (CoreModManager.downloadMonitor != null) { return; }
CoreModManager.downloadMonitor = new DummyDownloader();
}
private void setupClient()
{
showWindow(true);
FMLRelaunchLog.logFileNamePattern = "ForgeModLoader-client-%g.log";
side = Side.CLIENT;
setupHome();
}
private void setupServer()
{
showWindow(false);
FMLRelaunchLog.logFileNamePattern = "ForgeModLoader-server-%g.log";
side = Side.SERVER;
setupHome();
}
private void setupHome()
{
FMLInjectionData.build(minecraftHome, classLoader);
FMLRelaunchLog.minecraftHome = minecraftHome;
FMLRelaunchLog.info("Forge Mod Loader version %s.%s.%s.%s for Minecraft %s loading", FMLInjectionData.major, FMLInjectionData.minor,
FMLInjectionData.rev, FMLInjectionData.build, FMLInjectionData.mccversion, FMLInjectionData.mcpversion);
FMLRelaunchLog.info("Java is %s, version %s, running on %s:%s:%s, installed at %s", System.getProperty("java.vm.name"), System.getProperty("java.version"), System.getProperty("os.name"), System.getProperty("os.arch"), System.getProperty("os.version"), System.getProperty("java.home"));
FMLRelaunchLog.fine("Java classpath at launch is %s", System.getProperty("java.class.path"));
FMLRelaunchLog.fine("Java library path at launch is %s", System.getProperty("java.library.path"));
try
{
CoreModManager.handleLaunch(minecraftHome, classLoader);
}
catch (Throwable t)
{
t.printStackTrace();
FMLRelaunchLog.log(Level.SEVERE, t, "An error occurred trying to configure the minecraft home at %s for Forge Mod Loader", minecraftHome.getAbsolutePath());
throw Throwables.propagate(t);
}
}
public static Side side()
{
return side;
}
}
@@ -28,6 +28,10 @@ import java.util.logging.LogManager;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import net.minecraft.launchwrapper.LogWrapper;
import com.google.common.base.Throwables;
public class FMLRelaunchLog
{
@@ -146,6 +150,8 @@ public class FMLRelaunchLog
private static FMLLogFormatter formatter;
static String logFileNamePattern;
private FMLRelaunchLog()
{
}
@@ -159,6 +165,7 @@ public class FMLRelaunchLog
globalLogger.setLevel(Level.OFF);
log.myLog = Logger.getLogger("ForgeModLoader");
LogWrapper.retarget(log.myLog);
Logger stdOut = Logger.getLogger("STDOUT");
stdOut.setParent(log.myLog);
@@ -172,7 +179,7 @@ public class FMLRelaunchLog
formatter = new FMLLogFormatter();
try
{
File logPath = new File(minecraftHome, FMLRelauncher.logFileNamePattern);
File logPath = new File(minecraftHome, logFileNamePattern);
fileHandler = new FileHandler(logPath.getPath(), 0, 3)
{
public synchronized void close() throws SecurityException {
@@ -180,8 +187,9 @@ public class FMLRelaunchLog
}
};
}
catch (Exception e)
catch (Throwable t)
{
throw Throwables.propagate(t);
}
resetLoggingHandlers();
@@ -1,335 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
import java.applet.Applet;
import java.io.File;
import java.lang.reflect.Method;
import java.net.URLClassLoader;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
public class FMLRelauncher
{
private static FMLRelauncher INSTANCE;
public static String logFileNamePattern;
private static String side;
private RelaunchClassLoader classLoader;
private Object newApplet;
private Class<? super Object> appletClass;
JDialog popupWindow;
public static void handleClientRelaunch(ArgsWrapper wrap)
{
logFileNamePattern = "ForgeModLoader-client-%g.log";
side = "CLIENT";
instance().relaunchClient(wrap);
}
public static void handleServerRelaunch(ArgsWrapper wrap)
{
logFileNamePattern = "ForgeModLoader-server-%g.log";
side = "SERVER";
instance().relaunchServer(wrap);
}
static FMLRelauncher instance()
{
if (INSTANCE == null)
{
INSTANCE = new FMLRelauncher();
}
return INSTANCE;
}
private FMLRelauncher()
{
URLClassLoader ucl = (URLClassLoader) getClass().getClassLoader();
classLoader = new RelaunchClassLoader(ucl.getURLs());
}
private void showWindow(boolean showIt)
{
if (RelaunchLibraryManager.downloadMonitor != null) { return; }
try
{
if (showIt)
{
RelaunchLibraryManager.downloadMonitor = new Downloader();
popupWindow = (JDialog) RelaunchLibraryManager.downloadMonitor.makeDialog();
}
else
{
RelaunchLibraryManager.downloadMonitor = new DummyDownloader();
}
}
catch (Throwable e)
{
if (RelaunchLibraryManager.downloadMonitor == null)
{
RelaunchLibraryManager.downloadMonitor = new DummyDownloader();
e.printStackTrace();
}
else
{
RelaunchLibraryManager.downloadMonitor.makeHeadless();
}
popupWindow = null;
}
}
private void relaunchClient(ArgsWrapper wrap)
{
showWindow(true);
// Now we re-inject the home into the "new" minecraft under our control
Class<? super Object> client;
try
{
File minecraftHome = computeExistingClientHome();
setupHome(minecraftHome);
client = setupNewClientHome(minecraftHome);
}
finally
{
if (popupWindow != null)
{
popupWindow.setVisible(false);
popupWindow.dispose();
}
}
if (RelaunchLibraryManager.downloadMonitor.shouldStopIt())
{
System.exit(1);
}
try
{
ReflectionHelper.findMethod(client, null, new String[] { "fmlReentry" }, ArgsWrapper.class).invoke(null, wrap);
}
catch (Exception e)
{
e.printStackTrace();
// Hmmm
}
}
private Class<? super Object> setupNewClientHome(File minecraftHome)
{
Class<? super Object> client = ReflectionHelper.getClass(classLoader, "net.minecraft.client.Minecraft");
ReflectionHelper.setPrivateValue(client, null, minecraftHome,
"field_" + "71463_am" /*Separate that so that MCP's updatenames does not replace it*/,
"an", "minecraftDir");
return client;
}
private void relaunchServer(ArgsWrapper wrap)
{
showWindow(false);
// Now we re-inject the home into the "new" minecraft under our control
Class<? super Object> server;
File minecraftHome = new File(".");
setupHome(minecraftHome);
server = ReflectionHelper.getClass(classLoader, "net.minecraft.server.MinecraftServer");
try
{
ReflectionHelper.findMethod(server, null, new String[] { "fmlReentry" }, ArgsWrapper.class).invoke(null, wrap);
}
catch (Exception e)
{
e.printStackTrace();
}
}
private void setupHome(File minecraftHome)
{
FMLInjectionData.build(minecraftHome, classLoader);
FMLRelaunchLog.minecraftHome = minecraftHome;
FMLRelaunchLog.info("Forge Mod Loader version %s.%s.%s.%s for Minecraft %s loading", FMLInjectionData.major, FMLInjectionData.minor,
FMLInjectionData.rev, FMLInjectionData.build, FMLInjectionData.mccversion, FMLInjectionData.mcpversion);
FMLRelaunchLog.info("Java is %s, version %s, running on %s:%s:%s, installed at %s", System.getProperty("java.vm.name"), System.getProperty("java.version"), System.getProperty("os.name"), System.getProperty("os.arch"), System.getProperty("os.version"), System.getProperty("java.home"));
FMLRelaunchLog.fine("Java classpath at launch is %s", System.getProperty("java.class.path"));
FMLRelaunchLog.fine("Java library path at launch is %s", System.getProperty("java.library.path"));
try
{
RelaunchLibraryManager.handleLaunch(minecraftHome, classLoader);
}
catch (Throwable t)
{
if (popupWindow != null)
{
try
{
String logFile = new File(minecraftHome, "ForgeModLoader-client-0.log").getCanonicalPath();
JOptionPane.showMessageDialog(popupWindow, String.format(
"<html><div align=\"center\"><font size=\"+1\">There was a fatal error starting up minecraft and FML</font></div><br/>"
+ "Minecraft cannot launch in it's current configuration<br/>"
+ "Please consult the file <i><a href=\"file:///%s\">%s</a></i> for further information</html>", logFile, logFile),
"Fatal FML error", JOptionPane.ERROR_MESSAGE);
}
catch (Exception ex)
{
// ah well, we tried
}
}
throw new RuntimeException(t);
}
}
/**
* @return the location of the client home
*/
private File computeExistingClientHome()
{
Class<? super Object> mcMaster = ReflectionHelper.getClass(getClass().getClassLoader(), "net.minecraft.client.Minecraft");
// If we get the system property we inject into the old MC, setup the
// dir, then pull the value
String str = System.getProperty("minecraft.applet.TargetDirectory");
if (str != null)
{
str = str.replace('/', File.separatorChar);
ReflectionHelper.setPrivateValue(mcMaster, null, new File(str), "minecraftDir", "an", "minecraftDir");
}
// We force minecraft to setup it's homedir very early on so we can
// inject stuff into it
Method setupHome = ReflectionHelper.findMethod(mcMaster, null, new String[] { "func_71380_b", "getMinecraftDir", "b" });
try
{
setupHome.invoke(null);
}
catch (Exception e)
{
// Hmmm
}
File minecraftHome = ReflectionHelper.getPrivateValue(mcMaster, null, "field_71463_am", "an", "minecraftDir");
return minecraftHome;
}
public static void appletEntry(Applet minecraftApplet)
{
side = "CLIENT";
logFileNamePattern = "ForgeModLoader-client-%g.log";
instance().relaunchApplet(minecraftApplet);
}
private void relaunchApplet(Applet minecraftApplet)
{
showWindow(true);
if (minecraftApplet.getClass().getClassLoader() == classLoader)
{
if (popupWindow != null)
{
popupWindow.setVisible(false);
popupWindow.dispose();
}
try
{
newApplet = minecraftApplet;
appletClass = ReflectionHelper.getClass(classLoader, "net.minecraft.client.MinecraftApplet");
ReflectionHelper.findMethod(appletClass, newApplet, new String[] { "fmlInitReentry" }).invoke(newApplet);
return;
}
catch (Exception e)
{
System.out.println("FMLRelauncher.relaunchApplet");
e.printStackTrace();
throw new RuntimeException(e);
}
}
File mcDir = computeExistingClientHome();
setupHome(mcDir);
setupNewClientHome(mcDir);
Class<? super Object> parentAppletClass = ReflectionHelper.getClass(getClass().getClassLoader(), "java.applet.Applet");
try
{
appletClass = ReflectionHelper.getClass(classLoader, "net.minecraft.client.MinecraftApplet");
newApplet = appletClass.newInstance();
Object appletContainer = ReflectionHelper.getPrivateValue(ReflectionHelper.getClass(getClass().getClassLoader(), "java.awt.Component"),
minecraftApplet, "parent");
String launcherClassName = System.getProperty("minecraft.applet.WrapperClass", "net.minecraft.Launcher");
Class<? super Object> launcherClass = ReflectionHelper.getClass(getClass().getClassLoader(), launcherClassName);
if (launcherClass.isInstance(appletContainer))
{
ReflectionHelper.findMethod(ReflectionHelper.getClass(getClass().getClassLoader(), "java.awt.Container"), minecraftApplet,
new String[] { "removeAll" }).invoke(appletContainer);
ReflectionHelper.findMethod(launcherClass, appletContainer, new String[] { "replace" }, parentAppletClass).invoke(appletContainer, newApplet);
}
else
{
FMLRelaunchLog.severe("Found unknown applet parent %s, unable to inject!\n", appletContainer.getClass().getName());
throw new RuntimeException();
}
}
catch (Exception e)
{
throw new RuntimeException(e);
}
finally
{
if (popupWindow != null)
{
popupWindow.setVisible(false);
popupWindow.dispose();
}
}
}
public static void appletStart(Applet applet)
{
instance().startApplet(applet);
}
private void startApplet(Applet applet)
{
if (applet.getClass().getClassLoader() == classLoader)
{
if (popupWindow != null)
{
popupWindow.setVisible(false);
popupWindow.dispose();
}
if (RelaunchLibraryManager.downloadMonitor.shouldStopIt())
{
System.exit(1);
}
try
{
ReflectionHelper.findMethod(appletClass, newApplet, new String[] { "fmlStartReentry" }).invoke(newApplet);
}
catch (Exception e)
{
System.out.println("FMLRelauncher.startApplet");
e.printStackTrace();
throw new RuntimeException(e);
}
}
return;
}
public static String side()
{
return side;
}
}
@@ -1,19 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
public interface IClassNameTransformer {
public String remapClassName(String name);
public String unmapClassName(String name);
}
@@ -1,18 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
public interface IClassTransformer
{
public byte[] transform(String name, String transformedName, byte[] bytes);
}
@@ -32,6 +32,7 @@ public interface IFMLLoadingPlugin
*
* @return a list of classes that implement the ILibrarySet interface
*/
@Deprecated
String[] getLibraryRequestClass();
/**
* Return a list of classes that implements the IClassTransformer interface
@@ -1,471 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.JarURLConnection;
import java.net.URL;
import java.net.URLClassLoader;
import java.net.URLConnection;
import java.security.CodeSigner;
import java.security.CodeSource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.jar.Attributes.Name;
import java.util.jar.Attributes;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
import java.util.logging.Level;
import cpw.mods.fml.common.FMLLog;
public class RelaunchClassLoader extends URLClassLoader
{
private List<URL> sources;
private ClassLoader parent;
private List<IClassTransformer> transformers;
private Map<String, Class> cachedClasses;
private Set<String> invalidClasses;
private Set<String> classLoaderExceptions = new HashSet<String>();
private Set<String> transformerExceptions = new HashSet<String>();
private Map<Package,Manifest> packageManifests = new HashMap<Package,Manifest>();
private IClassNameTransformer renameTransformer;
private static Manifest EMPTY = new Manifest();
private ThreadLocal<byte[]> loadBuffer = new ThreadLocal<byte[]>();
private static final String[] RESERVED = {"CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9"};
private static final boolean DEBUG_CLASSLOADING = Boolean.parseBoolean(System.getProperty("fml.debugClassLoading", "false"));
private static final boolean DEBUG_CLASSLOADING_FINER = DEBUG_CLASSLOADING && Boolean.parseBoolean(System.getProperty("fml.debugClassLoadingFiner", "false"));
private static final boolean DEBUG_CLASSLOADING_SAVE = DEBUG_CLASSLOADING && Boolean.parseBoolean(System.getProperty("fml.debugClassLoadingSave", "false"));
private static File temp_folder = null;
public RelaunchClassLoader(URL[] sources)
{
super(sources, null);
this.sources = new ArrayList<URL>(Arrays.asList(sources));
this.parent = getClass().getClassLoader();
this.cachedClasses = new HashMap<String,Class>(1000);
this.invalidClasses = new HashSet<String>(1000);
this.transformers = new ArrayList<IClassTransformer>(2);
// ReflectionHelper.setPrivateValue(ClassLoader.class, null, this, "scl");
Thread.currentThread().setContextClassLoader(this);
// standard classloader exclusions
addClassLoaderExclusion("java.");
addClassLoaderExclusion("sun.");
addClassLoaderExclusion("org.lwjgl.");
addClassLoaderExclusion("cpw.mods.fml.relauncher.");
addClassLoaderExclusion("net.minecraftforge.classloading.");
// standard transformer exclusions
addTransformerExclusion("javax.");
addTransformerExclusion("argo.");
addTransformerExclusion("org.objectweb.asm.");
addTransformerExclusion("com.google.common.");
addTransformerExclusion("org.bouncycastle.");
addTransformerExclusion("cpw.mods.fml.common.asm.transformers.deobf.");
if (DEBUG_CLASSLOADING_SAVE)
{
int x = 1;
temp_folder = new File(FMLRelaunchLog.minecraftHome, "CLASSLOADER_TEMP");
while(temp_folder.exists() && x <= 10)
{
temp_folder = new File(FMLRelaunchLog.minecraftHome, "CLASSLOADER_TEMP" + x++);
}
if (temp_folder.exists())
{
FMLRelaunchLog.info("DEBUG_CLASSLOADING_SAVE enabled, but 10 temp directories already exist, clean them and try again.");
temp_folder = null;
}
else
{
FMLRelaunchLog.info("DEBUG_CLASSLOADING_SAVE Enabled, saving all classes to \"%s\"", temp_folder.getAbsolutePath().replace('\\', '/'));
temp_folder.mkdirs();
}
}
}
public void registerTransformer(String transformerClassName)
{
try
{
IClassTransformer transformer = (IClassTransformer) loadClass(transformerClassName).newInstance();
transformers.add(transformer);
if (transformer instanceof IClassNameTransformer && renameTransformer == null)
{
renameTransformer = (IClassNameTransformer) transformer;
}
}
catch (Exception e)
{
FMLRelaunchLog.log(Level.SEVERE, e, "A critical problem occured registering the ASM transformer class %s", transformerClassName);
}
}
@Override
public Class<?> findClass(String name) throws ClassNotFoundException
{
if (invalidClasses.contains(name))
{
throw new ClassNotFoundException(name);
}
for (String st : classLoaderExceptions)
{
if (name.startsWith(st))
{
return parent.loadClass(name);
}
}
if (cachedClasses.containsKey(name))
{
return cachedClasses.get(name);
}
for (String st : transformerExceptions)
{
if (name.startsWith(st))
{
try
{
Class<?> cl = super.findClass(name);
cachedClasses.put(name, cl);
return cl;
}
catch (ClassNotFoundException e)
{
invalidClasses.add(name);
throw e;
}
}
}
try
{
CodeSigner[] signers = null;
String transformedName = transformName(name);
String untransformedName = untransformName(name);
int lastDot = untransformedName.lastIndexOf('.');
String pkgname = lastDot == -1 ? "" : untransformedName.substring(0, lastDot);
String fName = untransformedName.replace('.', '/').concat(".class");
String pkgPath = pkgname.replace('.', '/');
URLConnection urlConnection = findCodeSourceConnectionFor(fName);
if (urlConnection instanceof JarURLConnection && lastDot > -1 && !untransformedName.startsWith("net.minecraft."))
{
JarURLConnection jarUrlConn = (JarURLConnection)urlConnection;
JarFile jf = jarUrlConn.getJarFile();
if (jf != null && jf.getManifest() != null)
{
Manifest mf = jf.getManifest();
JarEntry ent = jf.getJarEntry(fName);
Package pkg = getPackage(pkgname);
getClassBytes(untransformedName);
signers = ent.getCodeSigners();
if (pkg == null)
{
pkg = definePackage(pkgname, mf, jarUrlConn.getJarFileURL());
packageManifests.put(pkg, mf);
}
else
{
if (pkg.isSealed() && !pkg.isSealed(jarUrlConn.getJarFileURL()))
{
FMLLog.severe("The jar file %s is trying to seal already secured path %s", jf.getName(), pkgname);
}
else if (isSealed(pkgname, mf))
{
FMLLog.severe("The jar file %s has a security seal for path %s, but that path is defined and not secure", jf.getName(), pkgname);
}
}
}
}
else if (lastDot > -1 && !untransformedName.startsWith("net.minecraft."))
{
Package pkg = getPackage(pkgname);
if (pkg == null)
{
pkg = definePackage(pkgname, null, null, null, null, null, null, null);
packageManifests.put(pkg, EMPTY);
}
else if (pkg.isSealed())
{
FMLLog.severe("The URL %s is defining elements for sealed path %s", urlConnection.getURL(), pkgname);
}
}
byte[] basicClass = getClassBytes(untransformedName);
byte[] transformedClass = runTransformers(untransformedName, transformedName, basicClass);
saveTransformedClass(transformedClass, transformedName);
Class<?> cl = defineClass(transformedName, transformedClass, 0, transformedClass.length, (urlConnection == null ? null : new CodeSource(urlConnection.getURL(), signers)));
cachedClasses.put(transformedName, cl);
return cl;
}
catch (Throwable e)
{
invalidClasses.add(name);
if (DEBUG_CLASSLOADING)
{
FMLLog.log(Level.FINEST, e, "Exception encountered attempting classloading of %s", name);
}
throw new ClassNotFoundException(name, e);
}
}
private void saveTransformedClass(byte[] data, String transformedName)
{
if (!DEBUG_CLASSLOADING_SAVE || temp_folder == null)
{
return;
}
File outFile = new File(temp_folder, transformedName.replace('.', File.separatorChar) + ".class");
File outDir = outFile.getParentFile();
if (!outDir.exists())
{
outDir.mkdirs();
}
if (outFile.exists())
{
outFile.delete();
}
try
{
FMLRelaunchLog.fine("Saving transformed class \"%s\" to \"%s\"", transformedName, outFile.getAbsolutePath().replace('\\', '/'));
OutputStream output = new FileOutputStream(outFile);
output.write(data);
output.close();
}
catch(IOException ex)
{
FMLRelaunchLog.log(Level.WARNING, ex, "Could not save transformed class \"%s\"", transformedName);
}
}
private String untransformName(String name)
{
if (renameTransformer != null)
{
return renameTransformer.unmapClassName(name);
}
else
{
return name;
}
}
private String transformName(String name)
{
if (renameTransformer != null)
{
return renameTransformer.remapClassName(name);
}
else
{
return name;
}
}
private boolean isSealed(String path, Manifest man)
{
Attributes attr = man.getAttributes(path);
String sealed = null;
if (attr != null) {
sealed = attr.getValue(Name.SEALED);
}
if (sealed == null) {
if ((attr = man.getMainAttributes()) != null) {
sealed = attr.getValue(Name.SEALED);
}
}
return "true".equalsIgnoreCase(sealed);
}
private URLConnection findCodeSourceConnectionFor(String name)
{
URL res = findResource(name);
if (res != null)
{
try
{
return res.openConnection();
}
catch (IOException e)
{
throw new RuntimeException(e);
}
}
else
{
return null;
}
}
private byte[] runTransformers(String name, String transformedName, byte[] basicClass)
{
if (DEBUG_CLASSLOADING_FINER)
{
FMLRelaunchLog.finest("Beginning transform of %s (%s) Start Length: %d", name, transformedName, (basicClass == null ? 0 : basicClass.length));
for (IClassTransformer transformer : transformers)
{
String transName = transformer.getClass().getName();
FMLRelaunchLog.finest("Before Transformer %s: %d", transName, (basicClass == null ? 0 : basicClass.length));
basicClass = transformer.transform(name, transformedName, basicClass);
FMLRelaunchLog.finest("After Transformer %s: %d", transName, (basicClass == null ? 0 : basicClass.length));
}
FMLRelaunchLog.finest("Ending transform of %s (%s) Start Length: %d", name, transformedName, (basicClass == null ? 0 : basicClass.length));
}
else
{
for (IClassTransformer transformer : transformers)
{
basicClass = transformer.transform(name, transformedName, basicClass);
}
}
return basicClass;
}
@Override
public void addURL(URL url)
{
super.addURL(url);
sources.add(url);
}
public List<URL> getSources()
{
return sources;
}
private byte[] readFully(InputStream stream)
{
try
{
byte[] buf = loadBuffer.get();
if (buf == null)
{
loadBuffer.set(new byte[1 << 12]);
buf = loadBuffer.get();
}
int r, totalLength = 0;
while ((r = stream.read(buf, totalLength, buf.length - totalLength)) != -1)
{
totalLength += r;
if (totalLength >= buf.length - 1)
{
byte[] oldbuf = buf;
buf = new byte[ oldbuf.length + (1 << 12 )];
System.arraycopy(oldbuf, 0, buf, 0, oldbuf.length);
}
}
byte[] result = new byte[totalLength];
System.arraycopy(buf, 0, result, 0, totalLength);
return result;
}
catch (Throwable t)
{
FMLRelaunchLog.log(Level.WARNING, t, "Problem loading class");
return new byte[0];
}
}
public List<IClassTransformer> getTransformers()
{
return Collections.unmodifiableList(transformers);
}
private void addClassLoaderExclusion(String toExclude)
{
classLoaderExceptions.add(toExclude);
}
void addTransformerExclusion(String toExclude)
{
transformerExceptions.add(toExclude);
}
public byte[] getClassBytes(String name) throws IOException
{
if (name.indexOf('.') == -1)
{
for (String res : RESERVED)
{
if (name.toUpperCase(Locale.ENGLISH).startsWith(res))
{
byte[] data = getClassBytes("_" + name);
if (data != null)
{
return data;
}
}
}
}
InputStream classStream = null;
try
{
URL classResource = findResource(name.replace('.', '/').concat(".class"));
if (classResource == null)
{
if (DEBUG_CLASSLOADING)
{
FMLLog.finest("Failed to find class resource %s", name.replace('.', '/').concat(".class"));
}
return null;
}
classStream = classResource.openStream();
if (DEBUG_CLASSLOADING)
{
FMLLog.finest("Loading class %s from resource %s", name, classResource.toString());
}
return readFully(classStream);
}
finally
{
if (classStream != null)
{
try
{
classStream.close();
}
catch (IOException e)
{
// Swallow the close exception
}
}
}
}
}
@@ -0,0 +1,32 @@
package cpw.mods.fml.relauncher;
import java.io.File;
import java.net.URLClassLoader;
import java.util.logging.Level;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.launchwrapper.LaunchClassLoader;
import com.google.common.base.Throwables;
public class ServerLaunchWrapper {
/**
* @param args
*/
public static void main(String[] args)
{
new ServerLaunchWrapper().run(args);
}
private ServerLaunchWrapper()
{
}
private void run(String[] args)
{
Launch.main(args);
}
}
+2 -2
View File
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -13,7 +13,7 @@
package cpw.mods.fml.relauncher;
public enum Side {
CLIENT, SERVER, BUKKIT;
CLIENT, SERVER;
/**
* @return If this is the server environment
@@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@@ -17,7 +17,22 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import cpw.mods.fml.common.SidedProxy;
/**
* Marks the associated element as being only available on a certain {@link Side}. This is
* generally meant for internal Forge and FML use only and should only be used on mod classes
* when other more common mechanisms, such as using a {@link SidedProxy} fail to work.
*
* Note, this will <em>only</em> apply to the direct element marked. This code:
* <code> @SideOnly public MyField field = new MyField();</code> will <strong>not</strong> work, as the initializer
* is a separate piece of code to the actual field declaration, and will not be able to find
* it's field on the wrong side.
*
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
public @interface SideOnly
@@ -0,0 +1,97 @@
/*
* ByteArraySeekableSource.java
*
* Created on May 17, 2006, 12:41 PM
* Copyright (c) 2006 Heiko Klein
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
package cpw.mods.fml.repackage.com.nothome.delta;
import java.io.IOException;
import java.nio.ByteBuffer;
/**
* Wraps a byte buffer as a source
*/
public class ByteBufferSeekableSource implements SeekableSource {
private ByteBuffer bb;
private ByteBuffer cur;
/**
* Constructs a new ByteArraySeekableSource.
*/
public ByteBufferSeekableSource(byte[] source) {
this(ByteBuffer.wrap(source));
}
/**
* Constructs a new ByteArraySeekableSource.
*/
public ByteBufferSeekableSource(ByteBuffer bb) {
if (bb == null)
throw new NullPointerException("bb");
this.bb = bb;
bb.rewind();
try {
seek(0);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public void seek(long pos) throws IOException {
cur = bb.slice();
if (pos > cur.limit())
throw new IOException("pos " + pos + " cannot seek " + cur.limit());
cur.position((int) pos);
}
public int read(ByteBuffer dest) throws IOException {
if (!cur.hasRemaining())
return -1;
int c = 0;
while (cur.hasRemaining() && dest.hasRemaining()) {
dest.put(cur.get());
c++;
}
return c;
}
public void close() throws IOException {
bb = null;
cur = null;
}
/**
* Returns a debug <code>String</code>.
*/
@Override
public String toString()
{
return "BBSeekable" +
" bb=" + this.bb.position() + "-" + bb.limit() +
" cur=" + this.cur.position() + "-" + cur.limit() +
"";
}
}
@@ -0,0 +1,162 @@
/*
*
* Copyright (c) 2001 Torgeir Veimo
* Copyright (c) 2002 Nicolas PERIDONT
* Copyright (c) 2006 Heiko Klein
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
package cpw.mods.fml.repackage.com.nothome.delta;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Map;
import com.google.common.collect.Maps;
/**
* Checksum computation class.
*/
public class Checksum {
static final boolean debug = false;
private Map<Long,Integer> checksums = Maps.newHashMap();
private static final char single_hash[] = {
/* Random numbers generated using SLIB's pseudo-random number generator. */
0xbcd1, 0xbb65, 0x42c2, 0xdffe, 0x9666, 0x431b, 0x8504, 0xeb46,
0x6379, 0xd460, 0xcf14, 0x53cf, 0xdb51, 0xdb08, 0x12c8, 0xf602,
0xe766, 0x2394, 0x250d, 0xdcbb, 0xa678, 0x02af, 0xa5c6, 0x7ea6,
0xb645, 0xcb4d, 0xc44b, 0xe5dc, 0x9fe6, 0x5b5c, 0x35f5, 0x701a,
0x220f, 0x6c38, 0x1a56, 0x4ca3, 0xffc6, 0xb152, 0x8d61, 0x7a58,
0x9025, 0x8b3d, 0xbf0f, 0x95a3, 0xe5f4, 0xc127, 0x3bed, 0x320b,
0xb7f3, 0x6054, 0x333c, 0xd383, 0x8154, 0x5242, 0x4e0d, 0x0a94,
0x7028, 0x8689, 0x3a22, 0x0980, 0x1847, 0xb0f1, 0x9b5c, 0x4176,
0xb858, 0xd542, 0x1f6c, 0x2497, 0x6a5a, 0x9fa9, 0x8c5a, 0x7743,
0xa8a9, 0x9a02, 0x4918, 0x438c, 0xc388, 0x9e2b, 0x4cad, 0x01b6,
0xab19, 0xf777, 0x365f, 0x1eb2, 0x091e, 0x7bf8, 0x7a8e, 0x5227,
0xeab1, 0x2074, 0x4523, 0xe781, 0x01a3, 0x163d, 0x3b2e, 0x287d,
0x5e7f, 0xa063, 0xb134, 0x8fae, 0x5e8e, 0xb7b7, 0x4548, 0x1f5a,
0xfa56, 0x7a24, 0x900f, 0x42dc, 0xcc69, 0x02a0, 0x0b22, 0xdb31,
0x71fe, 0x0c7d, 0x1732, 0x1159, 0xcb09, 0xe1d2, 0x1351, 0x52e9,
0xf536, 0x5a4f, 0xc316, 0x6bf9, 0x8994, 0xb774, 0x5f3e, 0xf6d6,
0x3a61, 0xf82c, 0xcc22, 0x9d06, 0x299c, 0x09e5, 0x1eec, 0x514f,
0x8d53, 0xa650, 0x5c6e, 0xc577, 0x7958, 0x71ac, 0x8916, 0x9b4f,
0x2c09, 0x5211, 0xf6d8, 0xcaaa, 0xf7ef, 0x287f, 0x7a94, 0xab49,
0xfa2c, 0x7222, 0xe457, 0xd71a, 0x00c3, 0x1a76, 0xe98c, 0xc037,
0x8208, 0x5c2d, 0xdfda, 0xe5f5, 0x0b45, 0x15ce, 0x8a7e, 0xfcad,
0xaa2d, 0x4b5c, 0xd42e, 0xb251, 0x907e, 0x9a47, 0xc9a6, 0xd93f,
0x085e, 0x35ce, 0xa153, 0x7e7b, 0x9f0b, 0x25aa, 0x5d9f, 0xc04d,
0x8a0e, 0x2875, 0x4a1c, 0x295f, 0x1393, 0xf760, 0x9178, 0x0f5b,
0xfa7d, 0x83b4, 0x2082, 0x721d, 0x6462, 0x0368, 0x67e2, 0x8624,
0x194d, 0x22f6, 0x78fb, 0x6791, 0xb238, 0xb332, 0x7276, 0xf272,
0x47ec, 0x4504, 0xa961, 0x9fc8, 0x3fdc, 0xb413, 0x007a, 0x0806,
0x7458, 0x95c6, 0xccaa, 0x18d6, 0xe2ae, 0x1b06, 0xf3f6, 0x5050,
0xc8e8, 0xf4ac, 0xc04c, 0xf41c, 0x992f, 0xae44, 0x5f1b, 0x1113,
0x1738, 0xd9a8, 0x19ea, 0x2d33, 0x9698, 0x2fe9, 0x323f, 0xcde2,
0x6d71, 0xe37d, 0xb697, 0x2c4f, 0x4373, 0x9102, 0x075d, 0x8e25,
0x1672, 0xec28, 0x6acb, 0x86cc, 0x186e, 0x9414, 0xd674, 0xd1a5
};
/**
* Initialize checksums for source. The checksum for the <code>chunkSize</code> bytes at offset
* <code>chunkSize</code> * i is inserted into a hash map.
*/
public Checksum(SeekableSource source, int chunkSize) throws IOException {
ByteBuffer bb = ByteBuffer.allocate(chunkSize * 2);
int count = 0;
while (true) {
source.read(bb);
bb.flip();
if (bb.remaining() < chunkSize)
break;
while (bb.remaining() >= chunkSize) {
long queryChecksum = queryChecksum0(bb, chunkSize);
checksums.put(queryChecksum, count++);
}
bb.compact();
}
}
/**
* Finds the checksum computed from the buffer.
* Marks, gets, then resets the buffer.
*/
public static long queryChecksum(ByteBuffer bb, int len) {
bb.mark();
long sum = queryChecksum0(bb, len);
bb.reset();
return sum;
}
private static long queryChecksum0(ByteBuffer bb, int len) {
int high = 0; int low = 0;
for (int i = 0; i < len; i++) {
low += single_hash[bb.get()+128];
high += low;
}
return ((high & 0xffff) << 16) | (low & 0xffff);
}
/**
* Increments a checksum.
* @param checksum initial checksum
* @param out byte leaving view
* @param in byte entering view
* @param chunkSize size of chunks
* @return new checksum
*/
public static long incrementChecksum(long checksum, byte out, byte in, int chunkSize) {
char old_c = single_hash[out+128];
char new_c = single_hash[in+128];
int low = ((int)((checksum) & 0xffff) - old_c + new_c) & 0xffff;
int high = ((int)((checksum) >> 16) - (old_c * chunkSize) + low) & 0xffff;
return (high << 16) | (low & 0xffff);
}
/**
* 256 random hash values.
*/
public static char[] getSingleHash() {
return single_hash;
}
/**
* Finds the index of a checksum.
*/
public int findChecksumIndex(long hashf) {
if (!checksums.containsKey(hashf))
return -1;
return checksums.get(hashf);
}
/**
* Returns a debug <code>String</code>.
*/
@Override
public String toString()
{
return super.toString() +
" checksums=" + this.checksums;
}
}
@@ -0,0 +1,75 @@
/*
*
* Copyright (c) 2001 Torgeir Veimo
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
package cpw.mods.fml.repackage.com.nothome.delta;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
/**
* For debugging patch generation.
*/
public class DebugDiffWriter implements DiffWriter {
private ByteArrayOutputStream os = new ByteArrayOutputStream();
/**
* Constructs a new DebugDiffWriter.
*/
public DebugDiffWriter() {}
public void addCopy(long offset, int length) throws IOException {
if (os.size() > 0)
writeBuf();
System.err.println("COPY off: " + offset + ", len: " + length);
}
public void addData(byte b) throws IOException {
os.write(b);
writeBuf();
}
private void writeBuf() {
System.err.print("DATA: ");
byte[] ba = os.toByteArray();
for (int ix = 0; ix < ba.length; ix++) {
if (ba[ix] == '\n')
System.err.print("\\n");
else
System.err.print(String.valueOf((char)((char) ba[ix])));
//System.err.print("0x" + Integer.toHexString(buf[ix]) + " "); // hex output
}
System.err.println("");
os.reset();
}
public void flush() throws IOException {
System.err.println("FLUSH");
}
public void close() throws IOException {
System.err.println("CLOSE");
}
}
@@ -0,0 +1,446 @@
/*
*
* Copyright (c) 2001 Torgeir Veimo
* Copyright (c) 2002 Nicolas PERIDONT
* Bug Fixes: Daniel Morrione dan@morrione.net
* Copyright (c) 2006 Heiko Klein
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* Change Log:
* iiimmddyyn nnnnn Description
* ---------- ----- -------------------------------------------------------
* gls100603a Fixes from Torgeir Veimo and Dan Morrione
* gls110603a Stream not being closed thus preventing a file from
* being subsequently deleted.
* gls031504a Error being written to stderr rather than throwing exception
*/
package cpw.mods.fml.repackage.com.nothome.delta;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel;
/**
* Class for computing deltas against a source.
* The source file is read by blocks and a hash is computed per block.
* Then the target is scanned for matching blocks.
* <p/>
* This class is not thread safe. Use one instance per thread.
* <p/>
* This class should support files over 4GB in length, although you must
* use a larger checksum size, such as 1K, as all checksums use "int" indexing.
* Newer versions may eventually support paging in/out of checksums.
*/
public class Delta {
/**
* Debug flag.
*/
final static boolean debug = false;
/**
* Default size of 16.
* For "Lorem ipsum" text files (see the tests) the ideal size is about 14.
* Any smaller and the patch size becomes actually be larger.
* <p>
* Use a size like 64 or 128 for large files.
*/
public static final int DEFAULT_CHUNK_SIZE = 1<<4;
/**
* Chunk Size.
*/
private int S;
private SourceState source;
private TargetState target;
private DiffWriter output;
/**
* Constructs a new Delta.
* In the future, additional constructor arguments will set the algorithm details.
*/
public Delta() {
setChunkSize(DEFAULT_CHUNK_SIZE);
}
/**
* Sets the chunk size used.
* Larger chunks are faster and use less memory, but create larger patches
* as well.
*
* @param size
*/
public void setChunkSize(int size) {
if (size <= 0)
throw new IllegalArgumentException("Invalid size");
S = size;
}
/**
* Compares the source bytes with target bytes, writing to output.
*/
public void compute(byte source[], byte target[], OutputStream output)
throws IOException {
compute(new ByteBufferSeekableSource(source),
new ByteArrayInputStream(target),
new GDiffWriter(output));
}
/**
* Compares the source bytes with target bytes, returning output.
*/
public byte[] compute(byte source[], byte target[])
throws IOException {
ByteArrayOutputStream os = new ByteArrayOutputStream();
compute(source, target, os);
return os.toByteArray();
}
/**
* Compares the source bytes with target input, writing to output.
*/
public void compute(byte[] sourceBytes, InputStream inputStream,
DiffWriter diffWriter) throws IOException
{
compute(new ByteBufferSeekableSource(sourceBytes),
inputStream, diffWriter);
}
/**
* Compares the source file with a target file, writing to output.
*
* @param output will be closed
*/
public void compute(File sourceFile, File targetFile, DiffWriter output)
throws IOException {
RandomAccessFileSeekableSource source = new RandomAccessFileSeekableSource(new RandomAccessFile(sourceFile, "r"));
InputStream is = new BufferedInputStream(new FileInputStream(targetFile));
try {
compute(source, is, output);
} finally {
source.close();
is.close();
}
}
/**
* Compares the source with a target, writing to output.
*
* @param output will be closed
*/
public void compute(SeekableSource seekSource, InputStream targetIS, DiffWriter output)
throws IOException {
if (debug) {
debug("using match length S = " + S);
}
source = new SourceState(seekSource);
target = new TargetState(targetIS);
this.output = output;
if (debug)
debug("checksums " + source.checksum);
while (!target.eof()) {
debug("!target.eof()");
int index = target.find(source);
if (index != -1) {
if (debug)
debug("found hash " + index);
long offset = (long)index * S;
source.seek(offset);
int match = target.longestMatch(source);
if (match >= S) {
if (debug)
debug("output.addCopy("+offset+","+match+")");
output.addCopy(offset, match);
} else {
// move the position back according to how much we can't copy
target.tbuf.position(target.tbuf.position() - match);
addData();
}
} else {
addData();
}
}
output.close();
}
private void addData() throws IOException {
int i = target.read();
if (debug)
debug("addData " + Integer.toHexString(i));
if (i == -1)
return;
output.addData((byte)i);
}
class SourceState {
private Checksum checksum;
private SeekableSource source;
public SourceState(SeekableSource source) throws IOException {
checksum = new Checksum(source, S);
this.source = source;
source.seek(0);
}
public void seek(long index) throws IOException {
source.seek(index);
}
/**
* Returns a debug <code>String</code>.
*/
@Override
public String toString()
{
return "Source"+
" checksum=" + this.checksum +
" source=" + this.source +
"";
}
}
class TargetState {
private ReadableByteChannel c;
private ByteBuffer tbuf = ByteBuffer.allocate(blocksize());
private ByteBuffer sbuf = ByteBuffer.allocate(blocksize());
private long hash;
private boolean hashReset = true;
private boolean eof;
TargetState(InputStream targetIS) throws IOException {
c = Channels.newChannel(targetIS);
tbuf.limit(0);
}
private int blocksize() {
return Math.min(1024 * 16, S * 4);
}
/**
* Returns the index of the next N bytes of the stream.
*/
public int find(SourceState source) throws IOException {
if (eof)
return -1;
sbuf.clear();
sbuf.limit(0);
if (hashReset) {
debug("hashReset");
while (tbuf.remaining() < S) {
tbuf.compact();
int read = c.read(tbuf);
tbuf.flip();
if (read == -1) {
debug("target ending");
return -1;
}
}
hash = Checksum.queryChecksum(tbuf, S);
hashReset = false;
}
if (debug)
debug("hash " + hash + " " + dump());
return source.checksum.findChecksumIndex(hash);
}
public boolean eof() {
return eof;
}
/**
* Reads a byte.
* @throws IOException
*/
public int read() throws IOException {
if (tbuf.remaining() <= S) {
readMore();
if (!tbuf.hasRemaining()) {
eof = true;
return -1;
}
}
byte b = tbuf.get();
if (tbuf.remaining() >= S) {
byte nchar = tbuf.get( tbuf.position() + S -1 );
hash = Checksum.incrementChecksum(hash, b, nchar, S);
} else {
debug("out of char");
}
return b & 0xFF;
}
/**
* Returns the longest match length at the source location.
*/
public int longestMatch(SourceState source) throws IOException {
debug("longestMatch");
int match = 0;
hashReset = true;
while (true) {
if (!sbuf.hasRemaining()) {
sbuf.clear();
int read = source.source.read(sbuf);
sbuf.flip();
if (read == -1)
return match;
}
if (!tbuf.hasRemaining()) {
readMore();
if (!tbuf.hasRemaining()) {
debug("target ending");
eof = true;
return match;
}
}
if (sbuf.get() != tbuf.get()) {
tbuf.position(tbuf.position() - 1);
return match;
}
match++;
}
}
private void readMore() throws IOException {
if (debug)
debug("readMore " + tbuf);
tbuf.compact();
c.read(tbuf);
tbuf.flip();
}
void hash() {
hash = Checksum.queryChecksum(tbuf, S);
}
/**
* Returns a debug <code>String</code>.
*/
@Override
public String toString()
{
return "Target[" +
" targetBuff=" + dump() + // this.tbuf +
" sourceBuff=" + this.sbuf +
" hashf=" + this.hash +
" eof=" + this.eof +
"]";
}
private String dump() { return dump(tbuf); }
private String dump(ByteBuffer bb) {
return getTextDump(bb);
}
private void append(StringBuffer sb, int value) {
char b1 = (char)((value >> 4) & 0x0F);
char b2 = (char)((value) & 0x0F);
sb.append( Character.forDigit(b1, 16) );
sb.append( Character.forDigit(b2, 16) );
}
public String getTextDump(ByteBuffer bb)
{
StringBuffer sb = new StringBuffer(bb.remaining() * 2);
bb.mark();
while (bb.hasRemaining()) {
int val = bb.get();
if (val > 32 && val < 127)
sb.append(" ").append((char)val);
else
append(sb, val);
}
bb.reset();
return sb.toString();
}
}
/**
* Creates a patch using file names.
*/
public static void main(String argv[]) throws Exception {
if (argv.length != 3) {
System.err.println("usage Delta [-d] source target [output]");
System.err.println("either -d or an output filename must be specified.");
System.err.println("aborting..");
return;
}
DiffWriter output = null;
File sourceFile = null;
File targetFile = null;
if (argv[0].equals("-d")) {
sourceFile = new File(argv[1]);
targetFile = new File(argv[2]);
output = new DebugDiffWriter();
} else {
sourceFile = new File(argv[0]);
targetFile = new File(argv[1]);
output =
new GDiffWriter(
new DataOutputStream(
new BufferedOutputStream(
new FileOutputStream(new File(argv[2])))));
}
if (sourceFile.length() > Integer.MAX_VALUE
|| targetFile.length() > Integer.MAX_VALUE) {
System.err.println(
"source or target is too large, max length is "
+ Integer.MAX_VALUE);
System.err.println("aborting..");
return;
}
Delta d = new Delta();
d.compute(sourceFile, targetFile, output);
output.flush();
output.close();
if (debug) //gls031504a
System.out.println("finished generating delta");
}
private void debug(String s) {
if (debug)
System.err.println(s);
}
}
@@ -0,0 +1,57 @@
/*
*
* Copyright (c) 2001 Torgeir Veimo
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
package cpw.mods.fml.repackage.com.nothome.delta;
import java.io.Closeable;
import java.io.IOException;
/**
* Interface for DIFF writers.
*/
public interface DiffWriter extends Closeable {
/**
* Add a GDIFF copy instruction.
*/
public void addCopy(long offset, int length) throws IOException;
/**
* Add a GDIFF data instruction.
* Implementors should buffer the data.
*/
public void addData(byte b) throws IOException;
/**
* Flushes to output, e.g. any data added.
*/
public void flush() throws IOException;
/**
* Closes this stream.
* Note that {@link Diff} will invoke this method at the end.
*/
public void close() throws IOException;
}
@@ -0,0 +1,245 @@
/*
*
* Copyright (c) 2001 Torgeir Veimo
* Copyright (c) 2006 Heiko Klein
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
package cpw.mods.fml.repackage.com.nothome.delta;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.COPY_INT_INT;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.COPY_INT_UBYTE;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.COPY_INT_USHORT;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.COPY_LONG_INT;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.COPY_USHORT_INT;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.COPY_USHORT_UBYTE;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.COPY_USHORT_USHORT;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.DATA_INT;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.DATA_MAX;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.DATA_USHORT;
import static cpw.mods.fml.repackage.com.nothome.delta.GDiffWriter.EOF;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
/**
* This class patches an input file with a GDIFF patch fil�e.
*
* The patch file follows the GDIFF file specification available at
* {@link http://www.w3.org/TR/NOTE-gdiff-19970901.html}.
*/
public class GDiffPatcher {
private ByteBuffer buf = ByteBuffer.allocate(1024);
private byte buf2[] = buf.array();
/**
* Constructs a new GDiffPatcher.
*/
public GDiffPatcher() {
}
/**
* Patches to an output file.
*/
public void patch(File sourceFile, File patchFile, File outputFile)
throws IOException
{
RandomAccessFileSeekableSource source =new RandomAccessFileSeekableSource(new RandomAccessFile(sourceFile, "r"));
InputStream patch = new FileInputStream(patchFile);
OutputStream output = new FileOutputStream(outputFile);
try {
patch(source, patch, output);
} catch (IOException e) {
throw e;
} finally {
source.close();
patch.close();
output.close();
}
}
/**
* Patches to an output stream.
*/
public void patch(byte[] source, InputStream patch, OutputStream output) throws IOException {
patch(new ByteBufferSeekableSource(source), patch, output);
}
/**
* Patches in memory, returning the patch result.
*/
public byte[] patch(byte[] source, byte[] patch) throws IOException {
ByteArrayOutputStream os = new ByteArrayOutputStream();
patch(source, new ByteArrayInputStream(patch), os);
return os.toByteArray();
}
/**
* Patches to an output stream.
*/
public void patch(SeekableSource source, InputStream patch, OutputStream out) throws IOException {
DataOutputStream outOS = new DataOutputStream(out);
DataInputStream patchIS = new DataInputStream(patch);
// the magic string is 'd1 ff d1 ff' + the version number
if (patchIS.readUnsignedByte() != 0xd1 ||
patchIS.readUnsignedByte() != 0xff ||
patchIS.readUnsignedByte() != 0xd1 ||
patchIS.readUnsignedByte() != 0xff ||
patchIS.readUnsignedByte() != 0x04) {
throw new PatchException("magic string not found, aborting!");
}
while (true) {
int command = patchIS.readUnsignedByte();
if (command == EOF)
break;
int length;
int offset;
if (command <= DATA_MAX) {
append(command, patchIS, outOS);
continue;
}
switch (command) {
case DATA_USHORT: // ushort, n bytes following; append
length = patchIS.readUnsignedShort();
append(length, patchIS, outOS);
break;
case DATA_INT: // int, n bytes following; append
length = patchIS.readInt();
append(length, patchIS, outOS);
break;
case COPY_USHORT_UBYTE:
offset = patchIS.readUnsignedShort();
length = patchIS.readUnsignedByte();
copy(offset, length, source, outOS);
break;
case COPY_USHORT_USHORT:
offset = patchIS.readUnsignedShort();
length = patchIS.readUnsignedShort();
copy(offset, length, source, outOS);
break;
case COPY_USHORT_INT:
offset = patchIS.readUnsignedShort();
length = patchIS.readInt();
copy(offset, length, source, outOS);
break;
case COPY_INT_UBYTE:
offset = patchIS.readInt();
length = patchIS.readUnsignedByte();
copy(offset, length, source, outOS);
break;
case COPY_INT_USHORT:
offset = patchIS.readInt();
length = patchIS.readUnsignedShort();
copy(offset, length, source, outOS);
break;
case COPY_INT_INT:
offset = patchIS.readInt();
length = patchIS.readInt();
copy(offset, length, source, outOS);
break;
case COPY_LONG_INT:
long loffset = patchIS.readLong();
length = patchIS.readInt();
copy(loffset, length, source, outOS);
break;
default:
throw new IllegalStateException("command " + command);
}
}
outOS.flush();
}
private void copy(long offset, int length, SeekableSource source, OutputStream output)
throws IOException
{
source.seek(offset);
while (length > 0) {
int len = Math.min(buf.capacity(), length);
buf.clear().limit(len);
int res = source.read(buf);
if (res == -1)
throw new EOFException("in copy " + offset + " " + length);
output.write(buf.array(), 0, res);
length -= res;
}
}
private void append(int length, InputStream patch, OutputStream output) throws IOException {
while (length > 0) {
int len = Math.min(buf2.length, length);
int res = patch.read(buf2, 0, len);
if (res == -1)
throw new EOFException("cannot read " + length);
output.write(buf2, 0, res);
length -= res;
}
}
/**
* Simple command line tool to patch a file.
*/
public static void main(String argv[]) {
if (argv.length != 3) {
System.err.println("usage GDiffPatch source patch output");
System.err.println("aborting..");
return;
}
try {
File sourceFile = new File(argv[0]);
File patchFile = new File(argv[1]);
File outputFile = new File(argv[2]);
if (sourceFile.length() > Integer.MAX_VALUE ||
patchFile.length() > Integer.MAX_VALUE) {
System.err.println("source or patch is too large, max length is " + Integer.MAX_VALUE);
System.err.println("aborting..");
return;
}
GDiffPatcher patcher = new GDiffPatcher();
patcher.patch(sourceFile, patchFile, outputFile);
System.out.println("finished patching file");
} catch (Exception ioe) { //gls031504a
System.err.println("error while patching: " + ioe);
}
}
}
@@ -0,0 +1,174 @@
/*
*
* Copyright (c) 2001 Torgeir Veimo
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
package cpw.mods.fml.repackage.com.nothome.delta;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
/**
* Outputs a diff following the GDIFF file specification available at
* http://www.w3.org/TR/NOTE-gdiff-19970901.html.
*/
public class GDiffWriter implements DiffWriter {
/**
* Max length of a chunk.
*/
public static final int CHUNK_SIZE = Short.MAX_VALUE;
public static final byte EOF = 0;
/**
* Max length for single length data encode.
*/
public static final int DATA_MAX = 246;
public static final int DATA_USHORT = 247;
public static final int DATA_INT = 248;
public static final int COPY_USHORT_UBYTE = 249;
public static final int COPY_USHORT_USHORT = 250;
public static final int COPY_USHORT_INT = 251;
public static final int COPY_INT_UBYTE = 252;
public static final int COPY_INT_USHORT = 253;
public static final int COPY_INT_INT = 254;
public static final int COPY_LONG_INT = 255;
private ByteArrayOutputStream buf = new ByteArrayOutputStream();
private boolean debug = false;
private DataOutputStream output = null;
/**
* Constructs a new GDiffWriter.
*/
public GDiffWriter(DataOutputStream os) throws IOException {
this.output = os;
// write magic string "d1 ff d1 ff 04"
output.writeByte(0xd1);
output.writeByte(0xff);
output.writeByte(0xd1);
output.writeByte(0xff);
output.writeByte(0x04);
}
/**
* Constructs a new GDiffWriter.
*/
public GDiffWriter(OutputStream output) throws IOException {
this(new DataOutputStream(output));
}
public void addCopy(long offset, int length) throws IOException {
writeBuf();
//output debug data
if (debug)
System.err.println("COPY off: " + offset + ", len: " + length);
// output real data
if (offset > Integer.MAX_VALUE) {
// Actually, we don't support longer files than int.MAX_VALUE at the moment..
output.writeByte(COPY_LONG_INT);
output.writeLong(offset);
output.writeInt(length);
} else if (offset < 65536) {
if (length < 256) {
output.writeByte(COPY_USHORT_UBYTE);
output.writeShort((int)offset);
output.writeByte(length);
} else if (length > 65535) {
output.writeByte(COPY_USHORT_INT);
output.writeShort((int)offset);
output.writeInt(length);
} else {
output.writeByte(COPY_USHORT_USHORT);
output.writeShort((int)offset);
output.writeShort(length);
}
} else {
if (length < 256) {
output.writeByte(COPY_INT_UBYTE);
output.writeInt((int)offset);
output.writeByte(length);
} else if (length > 65535) {
output.writeByte(COPY_INT_INT);
output.writeInt((int)offset);
output.writeInt(length);
} else {
output.writeByte(COPY_INT_USHORT);
output.writeInt((int)offset);
output.writeShort(length);
}
}
}
/**
* Adds a data byte.
*/
public void addData(byte b) throws IOException {
buf.write(b);
if (buf.size() >= CHUNK_SIZE)
writeBuf();
}
private void writeBuf() throws IOException {
if (buf.size() > 0) {
if (buf.size() <= DATA_MAX) {
output.writeByte(buf.size());
} else if (buf.size() <= 65535) {
output.writeByte(DATA_USHORT);
output.writeShort(buf.size());
} else {
output.writeByte(DATA_INT);
output.writeInt(buf.size());
}
buf.writeTo(output);
buf.reset();
}
}
/**
* Flushes accumulated data bytes, if any.
*/
public void flush() throws IOException
{
writeBuf();
output.flush();
}
/**
* Writes the final EOF byte, closes the underlying stream.
*/
public void close() throws IOException {
this.flush();
output.write((byte)EOF);
output.close();
}
}
@@ -0,0 +1,51 @@
/*
* PatchException.java
*
* Created on June 6, 2006, 9:34 PM
* Copyright (c) 2006 Heiko Klein
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
package cpw.mods.fml.repackage.com.nothome.delta;
import java.io.IOException;
/**
* Thrown when a patch is invalid.
*/
public class PatchException extends IOException {
private static final long serialVersionUID = 1;
/**
* Creates a new instance of <code>PatchException</code> without detail message.
*/
public PatchException() {
}
/**
* Constructs an instance of <code>PatchException</code> with the specified detail message.
* @param msg the detail message.
*/
public PatchException(String msg) {
super(msg);
}
}
@@ -0,0 +1,75 @@
/*
* RandomAccessFileSeekableSource.java
*
* Created on May 17, 2006, 1:45 PM
* Copyright (c) 2006 Heiko Klein
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*
*/
package cpw.mods.fml.repackage.com.nothome.delta;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
/**
* Wraps a random access file.
*/
public class RandomAccessFileSeekableSource implements SeekableSource {
private RandomAccessFile raf;
/**
* Constructs a new RandomAccessFileSeekableSource.
* @param raf
*/
public RandomAccessFileSeekableSource(RandomAccessFile raf) {
if (raf == null)
throw new NullPointerException("raf");
this.raf = raf;
}
public void seek(long pos) throws IOException {
raf.seek(pos);
}
public int read(byte[] b, int off, int len) throws IOException {
return raf.read(b, off, len);
}
public long length() throws IOException {
return raf.length();
}
public void close() throws IOException {
raf.close();
}
public int read(ByteBuffer bb) throws IOException {
int c = raf.read(bb.array(), bb.position(), bb.remaining());
if (c == -1)
return -1;
bb.position(bb.position() + c);
return c;
}
}
@@ -0,0 +1,51 @@
/*
* SeekableSource.java
*
* Created on May 17, 2006, 12:33 PM
* Copyright (c) 2006 Heiko Klein
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
package cpw.mods.fml.repackage.com.nothome.delta;
import java.io.Closeable;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
/**
* For sources of random-access data, such as {@link RandomAccessFile}.
*/
public interface SeekableSource extends Closeable {
/**
* Sets the position for the next {@link #read(ByteBuffer)}.
*/
void seek(long pos) throws IOException ;
/**
* Reads up to {@link ByteBuffer#remaining()} bytes from the source,
* returning the number of bytes read, or -1 if no bytes were read
* and EOF was reached.
*/
int read(ByteBuffer bb) throws IOException;
}
+44 -41
View File
@@ -1,73 +1,76 @@
#Main FML Access Transformer configuration file
# TileEntity addMapping
public aqp.a(Ljava/lang/Class;Ljava/lang/String;)V #MD:TileEntity/func_70306_a
public ash.a(Ljava/lang/Class;Ljava/lang/String;)V #MD:TileEntity/func_70306_a
# EntityList addMappings
public mv.a(Ljava/lang/Class;Ljava/lang/String;I)V #MD:EntityList/func_75618_a
public mv.a(Ljava/lang/Class;Ljava/lang/String;III)V #MD:EntityList/func_75614_a
public mv.b #FD:EntityList/field_75625_b #nameToClassMap
public mv.c #FD:EntityList/field_75626_c #classToNameMap
public mv.d #FD:EntityList/field_75623_d #idToClassMap
public np.a(Ljava/lang/Class;Ljava/lang/String;I)V #MD:EntityList/func_75618_a
public np.a(Ljava/lang/Class;Ljava/lang/String;III)V #MD:EntityList/func_75614_a
public np.b #FD:EntityList/field_75625_b #nameToClassMap
public np.c #FD:EntityList/field_75626_c #classToNameMap
public np.d #FD:EntityList/field_75623_d #idToClassMap
# RenderEngine
#public bba.h #FD:RenderEngine/field_78367_h #textureList # -- MISSING MAPPING # -- MISSING MAPPING
public bge.g #FD:RenderEngine/field_78366_k #texturePack
#public bge.g #FD:RenderEngine/field_78366_k #texturePack # -- MISSING MAPPING
# RenderManager
public bgy.q #FD:RenderManager/field_78729_o #renderers
public bfx.q #FD:RenderManager/field_78729_o #renderers
# RenderBlocks - everything
public bgf.* #FD:RenderBlocks/*
public bgf.*() #MD:RenderBlocks/*
public bfd.* #FD:RenderBlocks/*
public bfd.*() #MD:RenderBlocks/*
#RenderPlayer
public-f bht.h #FD:RenderPlayer/field_77110_j #armorlist
#public-f bht.h #FD:RenderPlayer/field_77110_j #armorlist # -- MISSING MAPPING
#RenderBiped
public-f bhg.k #FD:RenderBiped/field_82424_k #armorlist
public-f bgg.l #FD:RenderBiped/field_82424_k #armorlist
#StringTranslate
public bp.b #FD:StringTranslate/field_74815_b
public bp.e #FD:StringTranslate/field_74813_d
#public bp.b #FD:StringTranslate/field_74815_b # -- MISSING MAPPING
#public bp.e #FD:StringTranslate/field_74813_d # -- MISSING MAPPING
# TileEntityRenderer
public bjd.m #FD:TileEntityRenderer/field_76966_m
public bip.m #FD:TileEntityRenderer/field_76966_m
# CraftingManager - make the add recipe methods public
public yk.a(Lwm;[Ljava/lang/Object;)Lyn; #MD:CraftingManager/func_92103_a
public yk.b(Lwm;[Ljava/lang/Object;)V #MD:CraftingManager/func_77596_b
public zz.a(Lxy;[Ljava/lang/Object;)Laac; #MD:CraftingManager/func_92103_a
public zz.b(Lxy;[Ljava/lang/Object;)V #MD:CraftingManager/func_77596_b
# WeightedRandomItem
public lo.a #FD:WeightedRandomItem/field_76292_a #probability
public mf.a #FD:WeightedRandomItem/field_76292_a #probability
# ItemStack
#public+f tv.c #FD:ItemStack/field_77993_c #itemId
# StatBase
public ka.a #FD:StatBase/field_75978_a #statName
public kq.a #FD:StatBase/field_75978_a #statName
# NetLoginHandler
public jf.a(Ljf;Z)Z #MD:NetLoginHandler/func_72531_a #'complete connection'
public jf.g #FD:NetLoginHandler/field_72543_h #userName
public ju.a(Lju;Z)Z #MD:NetLoginHandler/func_72531_a #'complete connection'
public ju.g #FD:NetLoginHandler/field_72543_h #userName
# EntityPlayerMP getNextWindowId
public jc.ct()V #MD:EntityPlayerMP/func_71117_bO
public jc.cu #FD:EntityPlayerMP/field_71139_cq
public jr.bJ()V #MD:EntityPlayerMP/func_71117_bO
public jr.bX #FD:EntityPlayerMP/field_71139_cq
# EntityAITaskEntry
public oo #CL:EntityAITaskEntry
public pq #CL:EntityAITaskEntry
# EntityAITasks
public on.a #FD:EntityAITasks/field_75782_a #taskList
public pp.a #FD:EntityAITasks/field_75782_a #taskList
# BlockChest
public aln.m(Laab;III)Z #MD:BlockChest/func_72292_n #isOcelotBlockingChest
public anc.m(Labq;III)Z #MD:BlockChest/func_72292_n #isOcelotBlockingChest
# EntityLiving
public ng.aU #FD:EntityLiving/field_70736_aM #carryoverDamage
public ng.bo #FD:EntityLiving/field_70714_bg #tasks
public ng.bG #FD:EntityLiving/field_70703_bu #isJumping
#public ng.aU #FD:EntityLiving/field_70736_aM #carryoverDamage # -- MISSING MAPPING
public oc.c #FD:EntityLiving/field_70714_bg #tasks
#public ng.bG #FD:EntityLiving/field_70703_bu #isJumping # -- MISSING MAPPING
# EntityAIOcelotSit
protected pa.a(Laab;III)Z #MD:EntityAIOcelotSit/func_75398_a #nearestSittableBlock
protected pa.f()Z #MD:EntityAIOcelotSit/func_75399_f #isblocksittable
protected qc.a(Labq;III)Z #MD:EntityAIOcelotSit/func_75398_a #nearestSittableBlock
protected qc.f()Z #MD:EntityAIOcelotSit/func_75399_f #isblocksittable
# CallableMinecraftVersion - sanity check the MC version
public c #CL:CallableMinecraftVersion
public c.<init>(Lb;)V #MD:CallableMinecraftVersion/<init>(Lnet/minecraft/src/CrashReport;) #constructor
# EntityAnimal
public qh.d #FD:EntityAnimal/field_70881_d #inLove
public rl.bp #FD:EntityAnimal/field_70881_d #inLove
# WorldType
public aal.<init>(ILjava/lang/String;)V #MD:WorldType/<init>(ILjava/lang/String;)
public aal.<init>(ILjava/lang/String;I)V #MD:WorldType/<init>(ILjava/lang/String;I)
public aca.<init>(ILjava/lang/String;)V #MD:WorldType/<init>(ILjava/lang/String;)
public aca.<init>(ILjava/lang/String;I)V #MD:WorldType/<init>(ILjava/lang/String;I)
# ComponentVillage
public ahp #CL:ComponentVillage
public aje #CL:ComponentVillage
# EntityVillager - minmax lists
public sm.a(Lzr;ILjava/util/Random;F)V #MD:EntityVillager/func_70948_a #addBuy
public sm.b(Lzr;ILjava/util/Random;F)V #MD:EntityVillager/func_70949_b #addSell
public sm.bP #FD:EntityVillager/field_70958_bB
public sm.bQ #FD:EntityVillager/field_70960_bC
public tv.a(Labg;ILjava/util/Random;F)V #MD:EntityVillager/func_70948_a #addBuy
public tv.b(Labg;ILjava/util/Random;F)V #MD:EntityVillager/func_70949_b #addSell
public tv.bB #FD:EntityVillager/field_70958_bB
public tv.bC #FD:EntityVillager/field_70960_bC
# GuiButtonMerchant
public azi #CL:GuiButtonMerchant
public axn #CL:GuiButtonMerchant
protected awk.a #FD:GuiYesNo/field_73942_a #guiScreen
protected aun.a #FD:GuiYesNo/field_73942_a #guiScreen
# Minecraft
public atm.C #FD:Minecraft/field_71425_J #running
public atm.M #FD:Minecraft/field_71446_o # textureManager
+3 -3
View File
@@ -2,11 +2,11 @@
# Only runs at runtime because it's not necessary at compile time
# has deobf and obf mappings so it runs OK in mcp
# entityplayer -> network/player
sq cpw/mods/fml/common/network/Player
tz cpw/mods/fml/common/network/Player
net.minecraft.entity.player.EntityPlayer cpw/mods/fml/common/network/Player
# block -> blockproxy
apa cpw/mods/fml/common/registry/BlockProxy
aqr cpw/mods/fml/common/registry/BlockProxy
net.minecraft.block.Block cpw/mods/fml/common/registry/BlockProxy
# item -> itemproxy
wk cpw/mods/fml/common/registry/ItemProxy
xw cpw/mods/fml/common/registry/ItemProxy
net.minecraft.item.Item cpw/mods/fml/common/registry/ItemProxy
+2124 -1875
View File
File diff suppressed because it is too large. Load diff
+2771 -2266
View File
File diff suppressed because it is too large. Load diff
+18401 -17976
View File
File diff suppressed because it is too large. Load diff
+12 -7
View File
@@ -38,8 +38,8 @@ DirNatives = %(DirJars)s/bin/natives
Client = %(DirJars)s/bin/minecraft.jar
Server = %(DirJars)s/minecraft_server.jar
LWJGL = %(DirJars)s/bin/jinput.jar,%(DirJars)s/bin/lwjgl.jar,%(DirJars)s/bin/lwjgl_util.jar
MD5Client = 6897c3287fb971c9f362eb3ab20f5ddd
MD5Server = c4e1bf89e834bd3670c7bf8f13874bc6
MD5Client = 6a64a2136e3a3fe4d29b0a0df30b25fc
MD5Server = 7c03305c8bf97a8e8f3cdb147fc90607
[RETROGUARD]
Location = %(DirRuntime)s/bin/retroguard.jar
@@ -71,13 +71,15 @@ ClsServerTemp = %(DirTempCls)s/minecraft_server
SrcClientTemp = %(DirTempSrc)s/minecraft
SrcServerTemp = %(DirTempSrc)s/minecraft_server
FFSource = net
FFClientIn = %(DirTemp)s/minecraft_ff_in.jar
FFServerIn = %(DirTemp)s/minecraft_server_ff_in.jar
[OUTPUT]
BinClientTemp = %(DirTempBin)s/minecraft
BinServerTemp = %(DirTempBin)s/minecraft_server
SrcClient = %(DirSrc)s/minecraft
SrcServer = %(DirSrc)s/minecraft_server
TestClient = net/minecraft/client/Minecraft
TestClient = net/minecraft/client/main/Main
TestServer = net/minecraft/server/MinecraftServer
[PATCHES]
@@ -98,7 +100,7 @@ ClassPathClient = %(DirLib)s/,%(DirLib)s/*,%(DirJars)s/bin/minecraft.jar,%(DirJa
ClassPathServer = %(DirLib)s/,%(DirLib)s/*,%(DirJars)s/minecraft_server.jar
ClientFixes = %(DirConf)s/patches
FixStart = Start
IgnorePkg = paulscode,com/jcraft,isom,ibxm,de/matthiasmann/twl,org/xmlpull,javax/xml,com/fasterxml,javax/ws,org/bouncycastle,argo
IgnorePkg = paulscode,com,isom,ibxm,de/matthiasmann/twl,org,javax/xml,javax/ws,argo
[REOBF]
MD5Client = %(DirTemp)s/client.md5
@@ -125,8 +127,8 @@ LogFile = %(DirLogs)s/mcp.log
LogFileErr = %(DirLogs)s/mcperr.log
UpdateUrl =
IgnoreUpdate = %(DirBin)s,%(DirLib)s,%(DirLogs)s,%(DirModSrc)s,%(DirReobf)s,%(DirSrc)s,%(DirTemp)s,%(DirEclipse)s/Client/bin,%(DirEclipse)s/Server/bin,%(DirJars)s/world,%(DirJars)s/saves,%(DirJars)s/resources
RGIndex = 104000
ParamIndex = 23000
RGIndex = 135000
ParamIndex = 35000
[ASTYLE]
AstyleConfig = %(DirConf)s/astyle.cfg
@@ -144,15 +146,18 @@ AStyle_osx = %(DirRuntime)s/bin/astyle-osx
JadRetro = %(DirRuntime)s/bin/jadretro.jar
Fernflower = %(DirRuntime)s/bin/fernflower.jar
Exceptor = %(DirRuntime)s/bin/mcinjector.jar
SpecialSource = %(DirRuntime)s/bin/specialsource.jar
CmdPatch = %s -p1 -u -i {patchfile} -d {srcdir}
CmdJad = %s -b -d {outdir} -dead -o -r -s .java -stat -ff {classes}
CmdAStyle = %s --suffix=none --quiet --options={conffile} {classes}
CmdRG = %s -cp "{classpath}" RetroGuard -searge {conffile}
CmdRGReobf = %s -cp "{classpath}" RetroGuard -notch {conffile}
CmdSS = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -m {mapfile} --kill-source
CmdSSReobf = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -r -m {mapfile} -d {identifier} -e %s
CmdJadretro = %s -jar %s {targetdir}
CmdFernflower = %s -Xmx512M -jar %s -din=0 -rbr=0 -dgs=1 -asc=1 -log=WARN {indir} {outdir}
CmdExceptor = %s -jar %s {input} {output} {conf} {log}
CmdRecomp = %s -encoding UTF-8 -Xlint:-options -deprecation -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
CmdRecompScalac = %s -encoding UTF-8 -deprecation -target:jvm-1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
CmdRecompScala = %s -encoding UTF-8 -deprecation -target:jvm-1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
CmdStartSrv = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" net.minecraft.server.MinecraftServer
CmdStartClt = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} Start
+1580 -1503
View File
File diff suppressed because it is too large. Load diff
-8820
View File
File diff suppressed because it is too large. Load diff
+152 -65
View File
@@ -13,12 +13,13 @@ BlockButtonStone,net/minecraft/block
BlockButtonWood,net/minecraft/block
BlockCactus,net/minecraft/block
BlockCake,net/minecraft/block
BlockCarpet,net/minecraft/block
BlockCarrot,net/minecraft/block
BlockCauldron,net/minecraft/block
BlockChest,net/minecraft/block
BlockClay,net/minecraft/block
BlockCloth,net/minecraft/block
BlockCocoa,net/minecraft/block
BlockColored,net/minecraft/block
BlockCommandBlock,net/minecraft/block
BlockComparator,net/minecraft/block
BlockContainer,net/minecraft/block
@@ -51,6 +52,7 @@ BlockGlowStone,net/minecraft/block
BlockGrass,net/minecraft/block
BlockGravel,net/minecraft/block
BlockHalfSlab,net/minecraft/block
BlockHay,net/minecraft/block
BlockHopper,net/minecraft/block
BlockIce,net/minecraft/block
BlockJukeBox,net/minecraft/block
@@ -93,6 +95,7 @@ BlockRedstoneRepeater,net/minecraft/block
BlockRedstoneTorch,net/minecraft/block
BlockRedstoneWire,net/minecraft/block
BlockReed,net/minecraft/block
BlockRotatedPillar,net/minecraft/block
BlockSand,net/minecraft/block
BlockSandStone,net/minecraft/block
BlockSapling,net/minecraft/block
@@ -141,28 +144,23 @@ CallableClientMemoryStats,net/minecraft/client
CallableClientProfiler,net/minecraft/client
CallableGLInfo,net/minecraft/client
CallableLWJGLVersion,net/minecraft/client
CallableLaunchedVersion,net/minecraft/client
CallableModded,net/minecraft/client
CallableParticleScreenName,net/minecraft/client
CallableTexturePack,net/minecraft/client
CallableTickingScreenName,net/minecraft/client
CallableType2,net/minecraft/client
CallableUpdatingScreenName,net/minecraft/client
CanvasCrashReport,net/minecraft/client
CanvasMinecraftApplet,net/minecraft/client
CanvasMojangLogo,net/minecraft/client
EnumOSHelper,net/minecraft/client
GameWindowListener,net/minecraft/client
MinecraftAppletImpl,net/minecraft/client
MinecraftFakeLauncher,net/minecraft/client
PanelCrashReport,net/minecraft/client
Minecraft,net/minecraft/client
StatStringFormatKeyInv,net/minecraft/client
ThreadClientSleep,net/minecraft/client
ThreadShutdown,net/minecraft/client
CodecMus,net/minecraft/client/audio
MusInputStream,net/minecraft/client/audio
ScheduledSound,net/minecraft/client/audio
SoundManager,net/minecraft/client/audio
SoundManagerINNER1,net/minecraft/client/audio
SoundPool,net/minecraft/client/audio
SoundPoolEntry,net/minecraft/client/audio
SoundPoolProtocolHandler,net/minecraft/client/audio
SoundPoolURLConnection,net/minecraft/client/audio
AbstractClientPlayer,net/minecraft/client/entity
EntityClientPlayerMP,net/minecraft/client/entity
EntityOtherPlayerMP,net/minecraft/client/entity
EntityPlayerSP,net/minecraft/client/entity
@@ -201,9 +199,7 @@ GuiMerchant,net/minecraft/client/gui
GuiMultiplayer,net/minecraft/client/gui
GuiNewChat,net/minecraft/client/gui
GuiOptions,net/minecraft/client/gui
GuiParticle,net/minecraft/client/gui
GuiPlayerInfo,net/minecraft/client/gui
GuiProgress,net/minecraft/client/gui
GuiRenameWorld,net/minecraft/client/gui
GuiRepair,net/minecraft/client/gui
GuiScreen,net/minecraft/client/gui
@@ -211,7 +207,6 @@ GuiScreenAddServer,net/minecraft/client/gui
GuiScreenBook,net/minecraft/client/gui
GuiScreenConfigureWorld,net/minecraft/client/gui
GuiScreenConfirmation,net/minecraft/client/gui
GuiScreenCreateOnlineWorld,net/minecraft/client/gui
GuiScreenDemo,net/minecraft/client/gui
GuiScreenDisconnectedOnline,net/minecraft/client/gui
GuiScreenEditOnlineWorld,net/minecraft/client/gui
@@ -219,7 +214,6 @@ GuiScreenInvite,net/minecraft/client/gui
GuiScreenLongRunningTask,net/minecraft/client/gui
GuiScreenOnlineServers,net/minecraft/client/gui
GuiScreenOnlineServersSubscreen,net/minecraft/client/gui
GuiScreenResetWorld,net/minecraft/client/gui
GuiScreenSelectLocation,net/minecraft/client/gui
GuiScreenServerList,net/minecraft/client/gui
GuiScreenSubscription,net/minecraft/client/gui
@@ -241,7 +235,6 @@ GuiWorldSlot,net/minecraft/client/gui
GuiYesNo,net/minecraft/client/gui
LoadingScreenRenderer,net/minecraft/client/gui
MapItemRenderer,net/minecraft/client/gui
Particle,net/minecraft/client/gui
RunnableTitleScreen,net/minecraft/client/gui
ScaledResolution,net/minecraft/client/gui
ScreenChatOptions,net/minecraft/client/gui
@@ -249,13 +242,10 @@ SelectionListBase,net/minecraft/client/gui
SelectionListInvited,net/minecraft/client/gui
TaskLongRunning,net/minecraft/client/gui
TaskOnlineConnect,net/minecraft/client/gui
TaskResetWorld,net/minecraft/client/gui
TaskWorldCreation,net/minecraft/client/gui
ThreadConnectToOnlineServer,net/minecraft/client/gui
ThreadOnlineConnect,net/minecraft/client/gui
ThreadOnlineScreen,net/minecraft/client/gui
ThreadPollServers,net/minecraft/client/gui
ThreadTitleScreen,net/minecraft/client/gui
GuiAchievement,net/minecraft/client/gui/achievement
GuiAchievements,net/minecraft/client/gui/achievement
GuiSlotStats,net/minecraft/client/gui/achievement
@@ -281,28 +271,50 @@ GuiDispenser,net/minecraft/client/gui/inventory
GuiEditSign,net/minecraft/client/gui/inventory
GuiFurnace,net/minecraft/client/gui/inventory
GuiInventory,net/minecraft/client/gui/inventory
GuiScreenHorseInventory,net/minecraft/client/gui/inventory
SlotCreativeInventory,net/minecraft/client/gui/inventory
GuiScreenBackup,net/minecraft/client/gui/mco
GuiScreenBackupDownloadThread,net/minecraft/client/gui/mco
GuiScreenBackupRestoreTask,net/minecraft/client/gui/mco
GuiScreenBackupSelectionList,net/minecraft/client/gui/mco
GuiScreenCreateOnlineWorld,net/minecraft/client/gui/mco
GuiScreenMcoWorldTemplate,net/minecraft/client/gui/mco
GuiScreenMcoWorldTemplateDownloadThread,net/minecraft/client/gui/mco
GuiScreenMcoWorldTemplateSelectionList,net/minecraft/client/gui/mco
GuiScreenPendingInvitation,net/minecraft/client/gui/mco
GuiScreenPendingInvitationINNER1,net/minecraft/client/gui/mco
GuiScreenPendingInvitationINNER2,net/minecraft/client/gui/mco
GuiScreenPendingInvitationINNER3,net/minecraft/client/gui/mco
GuiScreenPendingInvitationList,net/minecraft/client/gui/mco
GuiScreenResetWorld,net/minecraft/client/gui/mco
ScreenWithCallback,net/minecraft/client/gui/mco
TaskResetWorld,net/minecraft/client/gui/mco
TaskWorldCreation,net/minecraft/client/gui/mco
MainProxyAuthenticator,net/minecraft/client/main
MainShutdownHook,net/minecraft/client/main
Backup,net/minecraft/client/mco
BackupList,net/minecraft/client/mco
ExceptionMcoHttp,net/minecraft/client/mco
ExceptionMcoService,net/minecraft/client/mco
ExceptionRetryCall,net/minecraft/client/mco
McoClient,net/minecraft/client/mco
McoOption,net/minecraft/client/mco
McoOptionNone,net/minecraft/client/mco
McoOptionSome,net/minecraft/client/mco
McoPair,net/minecraft/client/mco
McoServer,net/minecraft/client/mco
McoServerAddress,net/minecraft/client/mco
McoServerList,net/minecraft/client/mco
McoServerListINNER1,net/minecraft/client/mco
McoServerListEmptyAnon,net/minecraft/client/mco
McoServerListUpdateThread,net/minecraft/client/mco
McoServerListUpdateThreadComparer,net/minecraft/client/mco
PendingInvite,net/minecraft/client/mco
PendingInvitesList,net/minecraft/client/mco
Request,net/minecraft/client/mco
RequestDelete,net/minecraft/client/mco
RequestGet,net/minecraft/client/mco
RequestPost,net/minecraft/client/mco
RequestPut,net/minecraft/client/mco
TimerTaskMcoServerListUpdate,net/minecraft/client/mco
TimerTaskMcoServerListUpdateComparator,net/minecraft/client/mco
ValueObjectList,net/minecraft/client/mco
ValueObjectSubscription,net/minecraft/client/mco
WorldTemplate,net/minecraft/client/mco
WorldTemplateList,net/minecraft/client/mco
ModelBase,net/minecraft/client/model
ModelBat,net/minecraft/client/model
ModelBiped,net/minecraft/client/model
@@ -318,8 +330,10 @@ ModelDragon,net/minecraft/client/model
ModelEnderCrystal,net/minecraft/client/model
ModelEnderman,net/minecraft/client/model
ModelGhast,net/minecraft/client/model
ModelHorse,net/minecraft/client/model
ModelIronGolem,net/minecraft/client/model
ModelLargeChest,net/minecraft/client/model
ModelLeashKnot,net/minecraft/client/model
ModelMagmaCube,net/minecraft/client/model
ModelMinecart,net/minecraft/client/model
ModelOcelot,net/minecraft/client/model
@@ -352,7 +366,6 @@ GuiConnecting,net/minecraft/client/multiplayer
LanServer,net/minecraft/client/multiplayer
LanServerList,net/minecraft/client/multiplayer
NetClientHandler,net/minecraft/client/multiplayer
NetClientWebTextures,net/minecraft/client/multiplayer
PlayerControllerMP,net/minecraft/client/multiplayer
ServerAddress,net/minecraft/client/multiplayer
ServerData,net/minecraft/client/multiplayer
@@ -392,10 +405,13 @@ EntitySnowShovelFX,net/minecraft/client/particle
EntitySpellParticleFX,net/minecraft/client/particle
EntitySplashFX,net/minecraft/client/particle
EntitySuspendFX,net/minecraft/client/particle
RenderCaveSpider,net/minecraft/client/renderer/entity
RenderHorse,net/minecraft/client/renderer/entity
RenderLeashKnot,net/minecraft/client/renderer/entity
RendererLivingEntity,net/minecraft/client/renderer/entity
ActiveRenderInfo,net/minecraft/client/renderer
CallableMouseLocation,net/minecraft/client/renderer
CallableParticlePositionInfo,net/minecraft/client/renderer
CallableParticleScreenName,net/minecraft/client/renderer
CallableScreenName,net/minecraft/client/renderer
CallableScreenSize,net/minecraft/client/renderer
ChestItemRenderHelper,net/minecraft/client/renderer
@@ -411,15 +427,14 @@ ItemRenderer,net/minecraft/client/renderer
OpenGlCapsChecker,net/minecraft/client/renderer
OpenGlHelper,net/minecraft/client/renderer
RenderBlocks,net/minecraft/client/renderer
RenderEngine,net/minecraft/client/renderer
RenderGlobal,net/minecraft/client/renderer
RenderHelper,net/minecraft/client/renderer
RenderList,net/minecraft/client/renderer
RenderSorter,net/minecraft/client/renderer
StitcherException,net/minecraft/client/renderer
Tessellator,net/minecraft/client/renderer
ThreadDownloadImage,net/minecraft/client/renderer
ThreadDownloadImageData,net/minecraft/client/renderer
ThreadDownloadImageDataINNER1,net/minecraft/client/renderer
WorldRenderer,net/minecraft/client/renderer
ClippingHelper,net/minecraft/client/renderer/culling
ClippingHelperImpl,net/minecraft/client/renderer/culling
@@ -471,17 +486,24 @@ RenderWither,net/minecraft/client/renderer/entity
RenderWolf,net/minecraft/client/renderer/entity
RenderXPOrb,net/minecraft/client/renderer/entity
RenderZombie,net/minecraft/client/renderer/entity
AbstractTexture,net/minecraft/client/renderer/texture
DynamicTexture,net/minecraft/client/renderer/texture
IconRegister,net/minecraft/client/renderer/texture
Rect2i,net/minecraft/client/renderer/texture
LayeredTexture,net/minecraft/client/renderer/texture
SimpleTexture,net/minecraft/client/renderer/texture
StitchHolder,net/minecraft/client/renderer/texture
StitchSlot,net/minecraft/client/renderer/texture
Stitcher,net/minecraft/client/renderer/texture
Texture,net/minecraft/client/renderer/texture
TextureAtlasSprite,net/minecraft/client/renderer/texture
TextureClock,net/minecraft/client/renderer/texture
TextureCompass,net/minecraft/client/renderer/texture
TextureManager,net/minecraft/client/renderer/texture
TextureManagerINNER1,net/minecraft/client/renderer/texture
TextureMap,net/minecraft/client/renderer/texture
TextureStitched,net/minecraft/client/renderer/texture
TextureObject,net/minecraft/client/renderer/texture
TextureUtil,net/minecraft/client/renderer/texture
Tickable,net/minecraft/client/renderer/texture
TickableTextureObject,net/minecraft/client/renderer/texture
RenderEndPortal,net/minecraft/client/renderer/tileentity
RenderEnderCrystal,net/minecraft/client/renderer/tileentity
RenderItemFrame,net/minecraft/client/renderer/tileentity
@@ -495,20 +517,55 @@ TileEntityRendererPiston,net/minecraft/client/renderer/tileentity
TileEntitySignRenderer,net/minecraft/client/renderer/tileentity
TileEntitySkullRenderer,net/minecraft/client/renderer/tileentity
TileEntitySpecialRenderer,net/minecraft/client/renderer/tileentity
AbstractResourcePack,net/minecraft/client/resources
DefaultResourcePack,net/minecraft/client/resources
FallbackResourceManager,net/minecraft/client/resources
FileResourcePack,net/minecraft/client/resources
FolderResourcePack,net/minecraft/client/resources
FolderResourcePackFilter,net/minecraft/client/resources
FoliageColorReloadListener,net/minecraft/client/resources
GrassColorReloadListener,net/minecraft/client/resources
GuiScreenTemporaryResourcePackSelect,net/minecraft/client/resources
GuiScreenTemporaryResourcePackSelectSelectionList,net/minecraft/client/resources
I18n,net/minecraft/client/resources
Language,net/minecraft/client/resources
LanguageManager,net/minecraft/client/resources
Locale,net/minecraft/client/resources
ReloadableResourceManager,net/minecraft/client/resources
Resource,net/minecraft/client/resources
ResourceLocation,net/minecraft/client/resources
ResourceManager,net/minecraft/client/resources
ResourceManagerReloadListener,net/minecraft/client/resources
ResourcePack,net/minecraft/client/resources
ResourcePackFileNotFoundException,net/minecraft/client/resources
ResourcePackRepository,net/minecraft/client/resources
ResourcePackRepositoryEntry,net/minecraft/client/resources
ResourcePackRepositoryFilter,net/minecraft/client/resources
SimpleReloadableResourceManager,net/minecraft/client/resources
SimpleReloadableResourceManagerINNER1,net/minecraft/client/resources
SimpleResource,net/minecraft/client/resources
AnimationFrame,net/minecraft/client/resources/data
AnimationMetadataSection,net/minecraft/client/resources/data
AnimationMetadataSectionSerializer,net/minecraft/client/resources/data
BaseMetadataSectionSerializer,net/minecraft/client/resources/data
FontMetadataSection,net/minecraft/client/resources/data
FontMetadataSectionSerializer,net/minecraft/client/resources/data
LanguageMetadataSection,net/minecraft/client/resources/data
LanguageMetadataSectionSerializer,net/minecraft/client/resources/data
MetadataSection,net/minecraft/client/resources/data
MetadataSectionSerializer,net/minecraft/client/resources/data
MetadataSerializer,net/minecraft/client/resources/data
MetadataSerializerEmptyAnon,net/minecraft/client/resources/data
MetadataSerializerRegistration,net/minecraft/client/resources/data
PackMetadataSection,net/minecraft/client/resources/data
PackMetadataSectionSerializer,net/minecraft/client/resources/data
TextureMetadataSection,net/minecraft/client/resources/data
TextureMetadataSectionSerializer,net/minecraft/client/resources/data
EnumOptions,net/minecraft/client/settings
EnumOptionsHelper,net/minecraft/client/settings
GameSettings,net/minecraft/client/settings
KeyBinding,net/minecraft/client/settings
StatPlaceholder,net/minecraft/client/stats
GuiTexturePackSlot,net/minecraft/client/texturepacks
GuiTexturePacks,net/minecraft/client/texturepacks
ITexturePack,net/minecraft/client/texturepacks
TexturePackCustom,net/minecraft/client/texturepacks
TexturePackDefault,net/minecraft/client/texturepacks
TexturePackDownloadSuccess,net/minecraft/client/texturepacks
TexturePackFolder,net/minecraft/client/texturepacks
TexturePackImplementation,net/minecraft/client/texturepacks
TexturePackList,net/minecraft/client/texturepacks
CommandBase,net/minecraft/command
CommandClearInventory,net/minecraft/command
CommandDebug,net/minecraft/command
@@ -545,6 +602,8 @@ CommandServerTp,net/minecraft/command
CommandServerWhitelist,net/minecraft/command
CommandSetSpawnpoint,net/minecraft/command
CommandShowSeed,net/minecraft/command
CommandSpreadPlayers,net/minecraft/command
CommandSpreadPlayersPosition,net/minecraft/command
CommandTime,net/minecraft/command
CommandToggleDownfall,net/minecraft/command
CommandWeather,net/minecraft/command
@@ -643,12 +702,6 @@ EnchantmentUntouching,net/minecraft/enchantment
EnchantmentWaterWorker,net/minecraft/enchantment
EnumEnchantmentType,net/minecraft/enchantment
IEnchantmentModifier,net/minecraft/enchantment
CallableEffectAmplifier,net/minecraft/entity
CallableEffectDuration,net/minecraft/entity
CallableEffectID,net/minecraft/entity
CallableEffectIsAmbient,net/minecraft/entity
CallableEffectIsSplash,net/minecraft/entity
CallableEffectName,net/minecraft/entity
CallableEntityName,net/minecraft/entity
CallableEntityTracker,net/minecraft/entity
CallableEntityType,net/minecraft/entity
@@ -660,8 +713,12 @@ EntityCreature,net/minecraft/entity
EntityEggInfo,net/minecraft/entity
EntityFlying,net/minecraft/entity
EntityHanging,net/minecraft/entity
EntityLeashKnot,net/minecraft/entity
EntityList,net/minecraft/entity
EntityLiving,net/minecraft/entity
EntityLivingBase,net/minecraft/entity
EntityLivingData,net/minecraft/entity
EntityOwnable,net/minecraft/entity
EntitySelectorArmoredMob,net/minecraft/entity
EntityTracker,net/minecraft/entity
EntityTrackerEntry,net/minecraft/entity
@@ -675,6 +732,8 @@ INpc,net/minecraft/entity
IProjectile,net/minecraft/entity
IRangedAttackMob,net/minecraft/entity
NpcMerchant,net/minecraft/entity
SharedMonsterAttributes,net/minecraft/entity
SpiderEffectsGroupData,net/minecraft/entity
WatchableObject,net/minecraft/entity
EntityAIArrowAttack,net/minecraft/entity/ai
EntityAIAttackOnCollide,net/minecraft/entity/ai
@@ -703,6 +762,7 @@ EntityAIMoveThroughVillage,net/minecraft/entity/ai
EntityAIMoveTowardsTarget,net/minecraft/entity/ai
EntityAIMoveTwardsRestriction,net/minecraft/entity/ai
EntityAINearestAttackableTarget,net/minecraft/entity/ai
EntityAINearestAttackableTargetSelector,net/minecraft/entity/ai
EntityAINearestAttackableTargetSorter,net/minecraft/entity/ai
EntityAIOcelotAttack,net/minecraft/entity/ai
EntityAIOcelotSit,net/minecraft/entity/ai
@@ -713,6 +773,7 @@ EntityAIPanic,net/minecraft/entity/ai
EntityAIPlay,net/minecraft/entity/ai
EntityAIRestrictOpenDoor,net/minecraft/entity/ai
EntityAIRestrictSun,net/minecraft/entity/ai
EntityAIRunAroundLikeCrazy,net/minecraft/entity/ai
EntityAISit,net/minecraft/entity/ai
EntityAISwimming,net/minecraft/entity/ai
EntityAITarget,net/minecraft/entity/ai
@@ -732,6 +793,16 @@ EntityMinecartMobSpawnerLogic,net/minecraft/entity/ai
EntityMoveHelper,net/minecraft/entity/ai
EntitySenses,net/minecraft/entity/ai
RandomPositionGenerator,net/minecraft/entity/ai
Attribute,net/minecraft/entity/ai/attributes
AttributeInstance,net/minecraft/entity/ai/attributes
AttributeModifier,net/minecraft/entity/ai/attributes
BaseAttribute,net/minecraft/entity/ai/attributes
BaseAttributeMap,net/minecraft/entity/ai/attributes
ClientsideAttributeMap,net/minecraft/entity/ai/attributes
ModifiableAttributeInstance,net/minecraft/entity/ai/attributes
RangedAttribute,net/minecraft/entity/ai/attributes
ReadonlyAttributeInstance,net/minecraft/entity/ai/attributes
ServersideAttributeMap,net/minecraft/entity/ai/attributes
BossStatus,net/minecraft/entity/boss
EntityDragon,net/minecraft/entity/boss
EntityDragonPart,net/minecraft/entity/boss
@@ -786,6 +857,9 @@ EntityAnimal,net/minecraft/entity/passive
EntityBat,net/minecraft/entity/passive
EntityChicken,net/minecraft/entity/passive
EntityCow,net/minecraft/entity/passive
EntityHorse,net/minecraft/entity/passive
EntityHorseBredSelector,net/minecraft/entity/passive
EntityHorseGroupData,net/minecraft/entity/passive
EntityMooshroom,net/minecraft/entity/passive
EntityOcelot,net/minecraft/entity/passive
EntityPig,net/minecraft/entity/passive
@@ -823,6 +897,8 @@ ContainerHopper,net/minecraft/inventory
ContainerMerchant,net/minecraft/inventory
ContainerPlayer,net/minecraft/inventory
ContainerRepair,net/minecraft/inventory
ContainerRepairINNER1,net/minecraft/inventory
ContainerRepairINNER2,net/minecraft/inventory
ContainerWorkbench,net/minecraft/inventory
ICrafting,net/minecraft/inventory
IInvBasic,net/minecraft/inventory
@@ -834,7 +910,6 @@ InventoryCrafting,net/minecraft/inventory
InventoryEnderChest,net/minecraft/inventory
InventoryLargeChest,net/minecraft/inventory
InventoryMerchant,net/minecraft/inventory
InventoryRepair,net/minecraft/inventory
Slot,net/minecraft/inventory
SlotArmor,net/minecraft/inventory
SlotBeacon,net/minecraft/inventory
@@ -845,7 +920,10 @@ SlotEnchantment,net/minecraft/inventory
SlotEnchantmentTable,net/minecraft/inventory
SlotFurnace,net/minecraft/inventory
SlotMerchantResult,net/minecraft/inventory
SlotRepair,net/minecraft/inventory
AnimalChest,net/minecraft/inventory
ContainerHorseInventory,net/minecraft/inventory
ContainerHorseInventorySlotArmor,net/minecraft/inventory
ContainerHorseInventorySlotSaddle,net/minecraft/inventory
BehaviorDispenseArmor,net/minecraft/item
BehaviorDispenseMinecart,net/minecraft/item
EnumAction,net/minecraft/item
@@ -888,6 +966,7 @@ ItemGlassBottle,net/minecraft/item
ItemHangingEntity,net/minecraft/item
ItemHoe,net/minecraft/item
ItemInWorldManager,net/minecraft/item
ItemLeash,net/minecraft/item
ItemLeaves,net/minecraft/item
ItemLilyPad,net/minecraft/item
ItemMap,net/minecraft/item
@@ -895,6 +974,7 @@ ItemMapBase,net/minecraft/item
ItemMinecart,net/minecraft/item
ItemMonsterPlacer,net/minecraft/item
ItemMultiTextureTile,net/minecraft/item
ItemNameTag,net/minecraft/item
ItemPickaxe,net/minecraft/item
ItemPiston,net/minecraft/item
ItemPotion,net/minecraft/item
@@ -936,7 +1016,7 @@ ShapedRecipes,net/minecraft/item/crafting
ShapelessRecipes,net/minecraft/item/crafting
ILogAgent,net/minecraft/logging
LogAgent,net/minecraft/logging
LogAgentINNER1,net/minecraft/logging
LogAgentEmptyAnon,net/minecraft/logging
LogFormatter,net/minecraft/logging
CallableTagCompound1,net/minecraft/nbt
CallableTagCompound2,net/minecraft/nbt
@@ -954,6 +1034,7 @@ NBTTagList,net/minecraft/nbt
NBTTagLong,net/minecraft/nbt
NBTTagShort,net/minecraft/nbt
NBTTagString,net/minecraft/nbt
CallableConnectionName,net/minecraft/network
CallablePacketClass,net/minecraft/network
CallablePacketID,net/minecraft/network
INetworkManager,net/minecraft/network
@@ -1014,6 +1095,7 @@ Packet254ServerPing,net/minecraft/network/packet
Packet255KickDisconnect,net/minecraft/network/packet
Packet25EntityPainting,net/minecraft/network/packet
Packet26EntityExpOrb,net/minecraft/network/packet
Packet27PlayerInput,net/minecraft/network/packet
Packet28EntityVelocity,net/minecraft/network/packet
Packet29DestroyEntity,net/minecraft/network/packet
Packet2ClientProtocol,net/minecraft/network/packet
@@ -1030,6 +1112,7 @@ Packet40EntityMetadata,net/minecraft/network/packet
Packet41EntityEffect,net/minecraft/network/packet
Packet42RemoveEntityEffect,net/minecraft/network/packet
Packet43Experience,net/minecraft/network/packet
Packet44UpdateAttributes,net/minecraft/network/packet
Packet4UpdateTime,net/minecraft/network/packet
Packet51MapChunk,net/minecraft/network/packet
Packet51MapChunkData,net/minecraft/network/packet
@@ -1065,8 +1148,11 @@ PathFinder,net/minecraft/pathfinding
PathNavigate,net/minecraft/pathfinding
PathPoint,net/minecraft/pathfinding
Potion,net/minecraft/potion
PotionAbsoption,net/minecraft/potion
PotionAttackDamage,net/minecraft/potion
PotionEffect,net/minecraft/potion
PotionHealth,net/minecraft/potion
PotionHealthBoost,net/minecraft/potion
PotionHelper,net/minecraft/potion
IPlayerUsage,net/minecraft/profiler
PlayerUsageSnooper,net/minecraft/profiler
@@ -1100,16 +1186,16 @@ DedicatedServerCommandThread,net/minecraft/server/dedicated
DedicatedServerListenThread,net/minecraft/server/dedicated
DedicatedServerSleepThread,net/minecraft/server/dedicated
PropertyManager,net/minecraft/server/dedicated
GuiLogFormatter,net/minecraft/server/gui
GuiLogOutputHandler,net/minecraft/server/gui
GuiStatsComponent,net/minecraft/server/gui
GuiStatsListener,net/minecraft/server/gui
IUpdatePlayerListBox,net/minecraft/server/gui
PlayerListBox,net/minecraft/server/gui
ServerGUI,net/minecraft/server/gui
ServerGuiCommandListener,net/minecraft/server/gui
ServerGuiFocusAdapter,net/minecraft/server/gui
ServerWindowAdapter,net/minecraft/server/gui
MinecraftServerGui,net/minecraft/server/gui
MinecraftServerGuiINNER1,net/minecraft/server/gui
MinecraftServerGuiINNER2,net/minecraft/server/gui
MinecraftServerGuiINNER3,net/minecraft/server/gui
PlayerListComponent,net/minecraft/server/gui
StatsComponent,net/minecraft/server/gui
StatsComponentINNER1,net/minecraft/server/gui
TextAreaLogHandler,net/minecraft/server/gui
TextAreaLogHandlerINNER1,net/minecraft/server/gui
CallableIsModded,net/minecraft/server/integrated
CallableType3,net/minecraft/server/integrated
IntegratedPlayerList,net/minecraft/server/integrated
@@ -1133,6 +1219,7 @@ StatCrafting,net/minecraft/stats
StatFileWriter,net/minecraft/stats
StatList,net/minecraft/stats
StatTypeDistance,net/minecraft/stats
StatTypeFloat,net/minecraft/stats
StatTypeSimple,net/minecraft/stats
StatTypeTime,net/minecraft/stats
StatsSyncher,net/minecraft/stats
@@ -1169,6 +1256,7 @@ AABBLocalPool,net/minecraft/util
AABBPool,net/minecraft/util
AxisAlignedBB,net/minecraft/util
ChatAllowedCharacters,net/minecraft/util
ChatMessageComponent,net/minecraft/util
ChunkCoordinates,net/minecraft/util
CombatEntry,net/minecraft/util
CombatTracker,net/minecraft/util
@@ -1186,8 +1274,6 @@ EnumOS,net/minecraft/util
Facing,net/minecraft/util
FoodStats,net/minecraft/util
HttpUtil,net/minecraft/util
HttpUtilRunnable,net/minecraft/util
IDownloadSuccess,net/minecraft/util
IProgressUpdate,net/minecraft/util
Icon,net/minecraft/util
IntHashMap,net/minecraft/util
@@ -1196,6 +1282,7 @@ LongHashMap,net/minecraft/util
LongHashMapEntry,net/minecraft/util
MD5String,net/minecraft/util
MathHelper,net/minecraft/util
MessageComponentSerializer,net/minecraft/util
MinecraftError,net/minecraft/util
MouseFilter,net/minecraft/util
MouseHelper,net/minecraft/util
@@ -1208,9 +1295,9 @@ Session,net/minecraft/util
StatCollector,net/minecraft/util
StringTranslate,net/minecraft/util
StringUtils,net/minecraft/util
ThreadDownloadResources,net/minecraft/util
Timer,net/minecraft/util
Tuple,net/minecraft/util
Util,net/minecraft/util
ValueObject,net/minecraft/util
Vec3,net/minecraft/util
Vec3Pool,net/minecraft/util
1 class package
13 BlockButtonWood net/minecraft/block
14 BlockCactus net/minecraft/block
15 BlockCake net/minecraft/block
16 BlockCarpet net/minecraft/block
17 BlockCarrot net/minecraft/block
18 BlockCauldron net/minecraft/block
19 BlockChest net/minecraft/block
20 BlockClay net/minecraft/block
BlockCloth net/minecraft/block
21 BlockCocoa net/minecraft/block
22 BlockColored net/minecraft/block
23 BlockCommandBlock net/minecraft/block
24 BlockComparator net/minecraft/block
25 BlockContainer net/minecraft/block
52 BlockGrass net/minecraft/block
53 BlockGravel net/minecraft/block
54 BlockHalfSlab net/minecraft/block
55 BlockHay net/minecraft/block
56 BlockHopper net/minecraft/block
57 BlockIce net/minecraft/block
58 BlockJukeBox net/minecraft/block
95 BlockRedstoneTorch net/minecraft/block
96 BlockRedstoneWire net/minecraft/block
97 BlockReed net/minecraft/block
98 BlockRotatedPillar net/minecraft/block
99 BlockSand net/minecraft/block
100 BlockSandStone net/minecraft/block
101 BlockSapling net/minecraft/block
144 CallableClientProfiler net/minecraft/client
145 CallableGLInfo net/minecraft/client
146 CallableLWJGLVersion net/minecraft/client
147 CallableLaunchedVersion net/minecraft/client
148 CallableModded net/minecraft/client
149 CallableParticleScreenName net/minecraft/client
150 CallableTexturePack net/minecraft/client
CallableTickingScreenName net/minecraft/client
151 CallableType2 net/minecraft/client
152 CallableUpdatingScreenName net/minecraft/client
153 CanvasCrashReport Minecraft net/minecraft/client
CanvasMinecraftApplet net/minecraft/client
CanvasMojangLogo net/minecraft/client
EnumOSHelper net/minecraft/client
GameWindowListener net/minecraft/client
MinecraftAppletImpl net/minecraft/client
MinecraftFakeLauncher net/minecraft/client
PanelCrashReport net/minecraft/client
154 StatStringFormatKeyInv net/minecraft/client
155 ThreadClientSleep net/minecraft/client
ThreadShutdown net/minecraft/client
CodecMus net/minecraft/client/audio
MusInputStream net/minecraft/client/audio
156 ScheduledSound net/minecraft/client/audio
157 SoundManager net/minecraft/client/audio
158 SoundManagerINNER1 net/minecraft/client/audio
159 SoundPool net/minecraft/client/audio
160 SoundPoolEntry net/minecraft/client/audio
161 SoundPoolProtocolHandler net/minecraft/client/audio
162 SoundPoolURLConnection net/minecraft/client/audio
163 AbstractClientPlayer net/minecraft/client/entity
164 EntityClientPlayerMP net/minecraft/client/entity
165 EntityOtherPlayerMP net/minecraft/client/entity
166 EntityPlayerSP net/minecraft/client/entity
199 GuiMultiplayer net/minecraft/client/gui
200 GuiNewChat net/minecraft/client/gui
201 GuiOptions net/minecraft/client/gui
GuiParticle net/minecraft/client/gui
202 GuiPlayerInfo net/minecraft/client/gui
GuiProgress net/minecraft/client/gui
203 GuiRenameWorld net/minecraft/client/gui
204 GuiRepair net/minecraft/client/gui
205 GuiScreen net/minecraft/client/gui
207 GuiScreenBook net/minecraft/client/gui
208 GuiScreenConfigureWorld net/minecraft/client/gui
209 GuiScreenConfirmation net/minecraft/client/gui
GuiScreenCreateOnlineWorld net/minecraft/client/gui
210 GuiScreenDemo net/minecraft/client/gui
211 GuiScreenDisconnectedOnline net/minecraft/client/gui
212 GuiScreenEditOnlineWorld net/minecraft/client/gui
214 GuiScreenLongRunningTask net/minecraft/client/gui
215 GuiScreenOnlineServers net/minecraft/client/gui
216 GuiScreenOnlineServersSubscreen net/minecraft/client/gui
GuiScreenResetWorld net/minecraft/client/gui
217 GuiScreenSelectLocation net/minecraft/client/gui
218 GuiScreenServerList net/minecraft/client/gui
219 GuiScreenSubscription net/minecraft/client/gui
235 GuiYesNo net/minecraft/client/gui
236 LoadingScreenRenderer net/minecraft/client/gui
237 MapItemRenderer net/minecraft/client/gui
Particle net/minecraft/client/gui
238 RunnableTitleScreen net/minecraft/client/gui
239 ScaledResolution net/minecraft/client/gui
240 ScreenChatOptions net/minecraft/client/gui
242 SelectionListInvited net/minecraft/client/gui
243 TaskLongRunning net/minecraft/client/gui
244 TaskOnlineConnect net/minecraft/client/gui
TaskResetWorld net/minecraft/client/gui
TaskWorldCreation net/minecraft/client/gui
245 ThreadConnectToOnlineServer net/minecraft/client/gui
246 ThreadOnlineConnect net/minecraft/client/gui
247 ThreadOnlineScreen net/minecraft/client/gui
248 ThreadPollServers net/minecraft/client/gui
ThreadTitleScreen net/minecraft/client/gui
249 GuiAchievement net/minecraft/client/gui/achievement
250 GuiAchievements net/minecraft/client/gui/achievement
251 GuiSlotStats net/minecraft/client/gui/achievement
271 GuiEditSign net/minecraft/client/gui/inventory
272 GuiFurnace net/minecraft/client/gui/inventory
273 GuiInventory net/minecraft/client/gui/inventory
274 GuiScreenHorseInventory net/minecraft/client/gui/inventory
275 SlotCreativeInventory net/minecraft/client/gui/inventory
276 GuiScreenBackup net/minecraft/client/gui/mco
277 GuiScreenBackupDownloadThread net/minecraft/client/gui/mco
278 GuiScreenBackupRestoreTask net/minecraft/client/gui/mco
279 GuiScreenBackupSelectionList net/minecraft/client/gui/mco
280 GuiScreenCreateOnlineWorld net/minecraft/client/gui/mco
281 GuiScreenMcoWorldTemplate net/minecraft/client/gui/mco
282 GuiScreenMcoWorldTemplateDownloadThread net/minecraft/client/gui/mco
283 GuiScreenMcoWorldTemplateSelectionList net/minecraft/client/gui/mco
284 GuiScreenPendingInvitation net/minecraft/client/gui/mco
285 GuiScreenPendingInvitationINNER1 net/minecraft/client/gui/mco
286 GuiScreenPendingInvitationINNER2 net/minecraft/client/gui/mco
287 GuiScreenPendingInvitationINNER3 net/minecraft/client/gui/mco
288 GuiScreenPendingInvitationList net/minecraft/client/gui/mco
289 GuiScreenResetWorld net/minecraft/client/gui/mco
290 ScreenWithCallback net/minecraft/client/gui/mco
291 TaskResetWorld net/minecraft/client/gui/mco
292 TaskWorldCreation net/minecraft/client/gui/mco
293 MainProxyAuthenticator net/minecraft/client/main
294 MainShutdownHook net/minecraft/client/main
295 Backup net/minecraft/client/mco
296 BackupList net/minecraft/client/mco
297 ExceptionMcoHttp net/minecraft/client/mco
298 ExceptionMcoService net/minecraft/client/mco
299 ExceptionRetryCall net/minecraft/client/mco
300 McoClient net/minecraft/client/mco
McoOption net/minecraft/client/mco
McoOptionNone net/minecraft/client/mco
McoOptionSome net/minecraft/client/mco
McoPair net/minecraft/client/mco
301 McoServer net/minecraft/client/mco
302 McoServerAddress net/minecraft/client/mco
303 McoServerList net/minecraft/client/mco
304 McoServerListINNER1 McoServerListEmptyAnon net/minecraft/client/mco
305 McoServerListUpdateThread net/minecraft/client/mco
306 McoServerListUpdateThreadComparer net/minecraft/client/mco
307 PendingInvite net/minecraft/client/mco
308 PendingInvitesList net/minecraft/client/mco
309 Request net/minecraft/client/mco
310 RequestDelete net/minecraft/client/mco
311 RequestGet net/minecraft/client/mco
312 RequestPost net/minecraft/client/mco
313 RequestPut net/minecraft/client/mco
TimerTaskMcoServerListUpdate net/minecraft/client/mco
TimerTaskMcoServerListUpdateComparator net/minecraft/client/mco
314 ValueObjectList net/minecraft/client/mco
315 ValueObjectSubscription net/minecraft/client/mco
316 WorldTemplate net/minecraft/client/mco
317 WorldTemplateList net/minecraft/client/mco
318 ModelBase net/minecraft/client/model
319 ModelBat net/minecraft/client/model
320 ModelBiped net/minecraft/client/model
330 ModelEnderCrystal net/minecraft/client/model
331 ModelEnderman net/minecraft/client/model
332 ModelGhast net/minecraft/client/model
333 ModelHorse net/minecraft/client/model
334 ModelIronGolem net/minecraft/client/model
335 ModelLargeChest net/minecraft/client/model
336 ModelLeashKnot net/minecraft/client/model
337 ModelMagmaCube net/minecraft/client/model
338 ModelMinecart net/minecraft/client/model
339 ModelOcelot net/minecraft/client/model
366 LanServer net/minecraft/client/multiplayer
367 LanServerList net/minecraft/client/multiplayer
368 NetClientHandler net/minecraft/client/multiplayer
NetClientWebTextures net/minecraft/client/multiplayer
369 PlayerControllerMP net/minecraft/client/multiplayer
370 ServerAddress net/minecraft/client/multiplayer
371 ServerData net/minecraft/client/multiplayer
405 EntitySpellParticleFX net/minecraft/client/particle
406 EntitySplashFX net/minecraft/client/particle
407 EntitySuspendFX net/minecraft/client/particle
408 RenderCaveSpider net/minecraft/client/renderer/entity
409 RenderHorse net/minecraft/client/renderer/entity
410 RenderLeashKnot net/minecraft/client/renderer/entity
411 RendererLivingEntity net/minecraft/client/renderer/entity
412 ActiveRenderInfo net/minecraft/client/renderer
413 CallableMouseLocation net/minecraft/client/renderer
414 CallableParticlePositionInfo net/minecraft/client/renderer
CallableParticleScreenName net/minecraft/client/renderer
415 CallableScreenName net/minecraft/client/renderer
416 CallableScreenSize net/minecraft/client/renderer
417 ChestItemRenderHelper net/minecraft/client/renderer
427 OpenGlCapsChecker net/minecraft/client/renderer
428 OpenGlHelper net/minecraft/client/renderer
429 RenderBlocks net/minecraft/client/renderer
RenderEngine net/minecraft/client/renderer
430 RenderGlobal net/minecraft/client/renderer
431 RenderHelper net/minecraft/client/renderer
432 RenderList net/minecraft/client/renderer
433 RenderSorter net/minecraft/client/renderer
434 StitcherException net/minecraft/client/renderer
435 Tessellator net/minecraft/client/renderer
ThreadDownloadImage net/minecraft/client/renderer
436 ThreadDownloadImageData net/minecraft/client/renderer
437 ThreadDownloadImageDataINNER1 net/minecraft/client/renderer
438 WorldRenderer net/minecraft/client/renderer
439 ClippingHelper net/minecraft/client/renderer/culling
440 ClippingHelperImpl net/minecraft/client/renderer/culling
486 RenderWolf net/minecraft/client/renderer/entity
487 RenderXPOrb net/minecraft/client/renderer/entity
488 RenderZombie net/minecraft/client/renderer/entity
489 AbstractTexture net/minecraft/client/renderer/texture
490 DynamicTexture net/minecraft/client/renderer/texture
491 IconRegister net/minecraft/client/renderer/texture
492 Rect2i LayeredTexture net/minecraft/client/renderer/texture
493 SimpleTexture net/minecraft/client/renderer/texture
494 StitchHolder net/minecraft/client/renderer/texture
495 StitchSlot net/minecraft/client/renderer/texture
496 Stitcher net/minecraft/client/renderer/texture
497 Texture TextureAtlasSprite net/minecraft/client/renderer/texture
498 TextureClock net/minecraft/client/renderer/texture
499 TextureCompass net/minecraft/client/renderer/texture
500 TextureManager net/minecraft/client/renderer/texture
501 TextureManagerINNER1 net/minecraft/client/renderer/texture
502 TextureMap net/minecraft/client/renderer/texture
503 TextureStitched TextureObject net/minecraft/client/renderer/texture
504 TextureUtil net/minecraft/client/renderer/texture
505 Tickable net/minecraft/client/renderer/texture
506 TickableTextureObject net/minecraft/client/renderer/texture
507 RenderEndPortal net/minecraft/client/renderer/tileentity
508 RenderEnderCrystal net/minecraft/client/renderer/tileentity
509 RenderItemFrame net/minecraft/client/renderer/tileentity
517 TileEntitySignRenderer net/minecraft/client/renderer/tileentity
518 TileEntitySkullRenderer net/minecraft/client/renderer/tileentity
519 TileEntitySpecialRenderer net/minecraft/client/renderer/tileentity
520 AbstractResourcePack net/minecraft/client/resources
521 DefaultResourcePack net/minecraft/client/resources
522 FallbackResourceManager net/minecraft/client/resources
523 FileResourcePack net/minecraft/client/resources
524 FolderResourcePack net/minecraft/client/resources
525 FolderResourcePackFilter net/minecraft/client/resources
526 FoliageColorReloadListener net/minecraft/client/resources
527 GrassColorReloadListener net/minecraft/client/resources
528 GuiScreenTemporaryResourcePackSelect net/minecraft/client/resources
529 GuiScreenTemporaryResourcePackSelectSelectionList net/minecraft/client/resources
530 I18n net/minecraft/client/resources
531 Language net/minecraft/client/resources
532 LanguageManager net/minecraft/client/resources
533 Locale net/minecraft/client/resources
534 ReloadableResourceManager net/minecraft/client/resources
535 Resource net/minecraft/client/resources
536 ResourceLocation net/minecraft/client/resources
537 ResourceManager net/minecraft/client/resources
538 ResourceManagerReloadListener net/minecraft/client/resources
539 ResourcePack net/minecraft/client/resources
540 ResourcePackFileNotFoundException net/minecraft/client/resources
541 ResourcePackRepository net/minecraft/client/resources
542 ResourcePackRepositoryEntry net/minecraft/client/resources
543 ResourcePackRepositoryFilter net/minecraft/client/resources
544 SimpleReloadableResourceManager net/minecraft/client/resources
545 SimpleReloadableResourceManagerINNER1 net/minecraft/client/resources
546 SimpleResource net/minecraft/client/resources
547 AnimationFrame net/minecraft/client/resources/data
548 AnimationMetadataSection net/minecraft/client/resources/data
549 AnimationMetadataSectionSerializer net/minecraft/client/resources/data
550 BaseMetadataSectionSerializer net/minecraft/client/resources/data
551 FontMetadataSection net/minecraft/client/resources/data
552 FontMetadataSectionSerializer net/minecraft/client/resources/data
553 LanguageMetadataSection net/minecraft/client/resources/data
554 LanguageMetadataSectionSerializer net/minecraft/client/resources/data
555 MetadataSection net/minecraft/client/resources/data
556 MetadataSectionSerializer net/minecraft/client/resources/data
557 MetadataSerializer net/minecraft/client/resources/data
558 MetadataSerializerEmptyAnon net/minecraft/client/resources/data
559 MetadataSerializerRegistration net/minecraft/client/resources/data
560 PackMetadataSection net/minecraft/client/resources/data
561 PackMetadataSectionSerializer net/minecraft/client/resources/data
562 TextureMetadataSection net/minecraft/client/resources/data
563 TextureMetadataSectionSerializer net/minecraft/client/resources/data
564 EnumOptions net/minecraft/client/settings
565 EnumOptionsHelper net/minecraft/client/settings
566 GameSettings net/minecraft/client/settings
567 KeyBinding net/minecraft/client/settings
568 StatPlaceholder net/minecraft/client/stats
GuiTexturePackSlot net/minecraft/client/texturepacks
GuiTexturePacks net/minecraft/client/texturepacks
ITexturePack net/minecraft/client/texturepacks
TexturePackCustom net/minecraft/client/texturepacks
TexturePackDefault net/minecraft/client/texturepacks
TexturePackDownloadSuccess net/minecraft/client/texturepacks
TexturePackFolder net/minecraft/client/texturepacks
TexturePackImplementation net/minecraft/client/texturepacks
TexturePackList net/minecraft/client/texturepacks
569 CommandBase net/minecraft/command
570 CommandClearInventory net/minecraft/command
571 CommandDebug net/minecraft/command
602 CommandServerWhitelist net/minecraft/command
603 CommandSetSpawnpoint net/minecraft/command
604 CommandShowSeed net/minecraft/command
605 CommandSpreadPlayers net/minecraft/command
606 CommandSpreadPlayersPosition net/minecraft/command
607 CommandTime net/minecraft/command
608 CommandToggleDownfall net/minecraft/command
609 CommandWeather net/minecraft/command
702 EnchantmentWaterWorker net/minecraft/enchantment
703 EnumEnchantmentType net/minecraft/enchantment
704 IEnchantmentModifier net/minecraft/enchantment
CallableEffectAmplifier net/minecraft/entity
CallableEffectDuration net/minecraft/entity
CallableEffectID net/minecraft/entity
CallableEffectIsAmbient net/minecraft/entity
CallableEffectIsSplash net/minecraft/entity
CallableEffectName net/minecraft/entity
705 CallableEntityName net/minecraft/entity
706 CallableEntityTracker net/minecraft/entity
707 CallableEntityType net/minecraft/entity
713 EntityEggInfo net/minecraft/entity
714 EntityFlying net/minecraft/entity
715 EntityHanging net/minecraft/entity
716 EntityLeashKnot net/minecraft/entity
717 EntityList net/minecraft/entity
718 EntityLiving net/minecraft/entity
719 EntityLivingBase net/minecraft/entity
720 EntityLivingData net/minecraft/entity
721 EntityOwnable net/minecraft/entity
722 EntitySelectorArmoredMob net/minecraft/entity
723 EntityTracker net/minecraft/entity
724 EntityTrackerEntry net/minecraft/entity
732 IProjectile net/minecraft/entity
733 IRangedAttackMob net/minecraft/entity
734 NpcMerchant net/minecraft/entity
735 SharedMonsterAttributes net/minecraft/entity
736 SpiderEffectsGroupData net/minecraft/entity
737 WatchableObject net/minecraft/entity
738 EntityAIArrowAttack net/minecraft/entity/ai
739 EntityAIAttackOnCollide net/minecraft/entity/ai
762 EntityAIMoveTowardsTarget net/minecraft/entity/ai
763 EntityAIMoveTwardsRestriction net/minecraft/entity/ai
764 EntityAINearestAttackableTarget net/minecraft/entity/ai
765 EntityAINearestAttackableTargetSelector net/minecraft/entity/ai
766 EntityAINearestAttackableTargetSorter net/minecraft/entity/ai
767 EntityAIOcelotAttack net/minecraft/entity/ai
768 EntityAIOcelotSit net/minecraft/entity/ai
773 EntityAIPlay net/minecraft/entity/ai
774 EntityAIRestrictOpenDoor net/minecraft/entity/ai
775 EntityAIRestrictSun net/minecraft/entity/ai
776 EntityAIRunAroundLikeCrazy net/minecraft/entity/ai
777 EntityAISit net/minecraft/entity/ai
778 EntityAISwimming net/minecraft/entity/ai
779 EntityAITarget net/minecraft/entity/ai
793 EntityMoveHelper net/minecraft/entity/ai
794 EntitySenses net/minecraft/entity/ai
795 RandomPositionGenerator net/minecraft/entity/ai
796 Attribute net/minecraft/entity/ai/attributes
797 AttributeInstance net/minecraft/entity/ai/attributes
798 AttributeModifier net/minecraft/entity/ai/attributes
799 BaseAttribute net/minecraft/entity/ai/attributes
800 BaseAttributeMap net/minecraft/entity/ai/attributes
801 ClientsideAttributeMap net/minecraft/entity/ai/attributes
802 ModifiableAttributeInstance net/minecraft/entity/ai/attributes
803 RangedAttribute net/minecraft/entity/ai/attributes
804 ReadonlyAttributeInstance net/minecraft/entity/ai/attributes
805 ServersideAttributeMap net/minecraft/entity/ai/attributes
806 BossStatus net/minecraft/entity/boss
807 EntityDragon net/minecraft/entity/boss
808 EntityDragonPart net/minecraft/entity/boss
857 EntityBat net/minecraft/entity/passive
858 EntityChicken net/minecraft/entity/passive
859 EntityCow net/minecraft/entity/passive
860 EntityHorse net/minecraft/entity/passive
861 EntityHorseBredSelector net/minecraft/entity/passive
862 EntityHorseGroupData net/minecraft/entity/passive
863 EntityMooshroom net/minecraft/entity/passive
864 EntityOcelot net/minecraft/entity/passive
865 EntityPig net/minecraft/entity/passive
897 ContainerMerchant net/minecraft/inventory
898 ContainerPlayer net/minecraft/inventory
899 ContainerRepair net/minecraft/inventory
900 ContainerRepairINNER1 net/minecraft/inventory
901 ContainerRepairINNER2 net/minecraft/inventory
902 ContainerWorkbench net/minecraft/inventory
903 ICrafting net/minecraft/inventory
904 IInvBasic net/minecraft/inventory
910 InventoryEnderChest net/minecraft/inventory
911 InventoryLargeChest net/minecraft/inventory
912 InventoryMerchant net/minecraft/inventory
InventoryRepair net/minecraft/inventory
913 Slot net/minecraft/inventory
914 SlotArmor net/minecraft/inventory
915 SlotBeacon net/minecraft/inventory
920 SlotEnchantmentTable net/minecraft/inventory
921 SlotFurnace net/minecraft/inventory
922 SlotMerchantResult net/minecraft/inventory
923 SlotRepair AnimalChest net/minecraft/inventory
924 ContainerHorseInventory net/minecraft/inventory
925 ContainerHorseInventorySlotArmor net/minecraft/inventory
926 ContainerHorseInventorySlotSaddle net/minecraft/inventory
927 BehaviorDispenseArmor net/minecraft/item
928 BehaviorDispenseMinecart net/minecraft/item
929 EnumAction net/minecraft/item
966 ItemHangingEntity net/minecraft/item
967 ItemHoe net/minecraft/item
968 ItemInWorldManager net/minecraft/item
969 ItemLeash net/minecraft/item
970 ItemLeaves net/minecraft/item
971 ItemLilyPad net/minecraft/item
972 ItemMap net/minecraft/item
974 ItemMinecart net/minecraft/item
975 ItemMonsterPlacer net/minecraft/item
976 ItemMultiTextureTile net/minecraft/item
977 ItemNameTag net/minecraft/item
978 ItemPickaxe net/minecraft/item
979 ItemPiston net/minecraft/item
980 ItemPotion net/minecraft/item
1016 ShapelessRecipes net/minecraft/item/crafting
1017 ILogAgent net/minecraft/logging
1018 LogAgent net/minecraft/logging
1019 LogAgentINNER1 LogAgentEmptyAnon net/minecraft/logging
1020 LogFormatter net/minecraft/logging
1021 CallableTagCompound1 net/minecraft/nbt
1022 CallableTagCompound2 net/minecraft/nbt
1034 NBTTagLong net/minecraft/nbt
1035 NBTTagShort net/minecraft/nbt
1036 NBTTagString net/minecraft/nbt
1037 CallableConnectionName net/minecraft/network
1038 CallablePacketClass net/minecraft/network
1039 CallablePacketID net/minecraft/network
1040 INetworkManager net/minecraft/network
1095 Packet255KickDisconnect net/minecraft/network/packet
1096 Packet25EntityPainting net/minecraft/network/packet
1097 Packet26EntityExpOrb net/minecraft/network/packet
1098 Packet27PlayerInput net/minecraft/network/packet
1099 Packet28EntityVelocity net/minecraft/network/packet
1100 Packet29DestroyEntity net/minecraft/network/packet
1101 Packet2ClientProtocol net/minecraft/network/packet
1112 Packet41EntityEffect net/minecraft/network/packet
1113 Packet42RemoveEntityEffect net/minecraft/network/packet
1114 Packet43Experience net/minecraft/network/packet
1115 Packet44UpdateAttributes net/minecraft/network/packet
1116 Packet4UpdateTime net/minecraft/network/packet
1117 Packet51MapChunk net/minecraft/network/packet
1118 Packet51MapChunkData net/minecraft/network/packet
1148 PathNavigate net/minecraft/pathfinding
1149 PathPoint net/minecraft/pathfinding
1150 Potion net/minecraft/potion
1151 PotionAbsoption net/minecraft/potion
1152 PotionAttackDamage net/minecraft/potion
1153 PotionEffect net/minecraft/potion
1154 PotionHealth net/minecraft/potion
1155 PotionHealthBoost net/minecraft/potion
1156 PotionHelper net/minecraft/potion
1157 IPlayerUsage net/minecraft/profiler
1158 PlayerUsageSnooper net/minecraft/profiler
1186 DedicatedServerListenThread net/minecraft/server/dedicated
1187 DedicatedServerSleepThread net/minecraft/server/dedicated
1188 PropertyManager net/minecraft/server/dedicated
GuiLogFormatter net/minecraft/server/gui
GuiLogOutputHandler net/minecraft/server/gui
GuiStatsComponent net/minecraft/server/gui
GuiStatsListener net/minecraft/server/gui
1189 IUpdatePlayerListBox net/minecraft/server/gui
1190 PlayerListBox MinecraftServerGui net/minecraft/server/gui
1191 ServerGUI MinecraftServerGuiINNER1 net/minecraft/server/gui
1192 ServerGuiCommandListener MinecraftServerGuiINNER2 net/minecraft/server/gui
1193 ServerGuiFocusAdapter MinecraftServerGuiINNER3 net/minecraft/server/gui
1194 ServerWindowAdapter PlayerListComponent net/minecraft/server/gui
1195 StatsComponent net/minecraft/server/gui
1196 StatsComponentINNER1 net/minecraft/server/gui
1197 TextAreaLogHandler net/minecraft/server/gui
1198 TextAreaLogHandlerINNER1 net/minecraft/server/gui
1199 CallableIsModded net/minecraft/server/integrated
1200 CallableType3 net/minecraft/server/integrated
1201 IntegratedPlayerList net/minecraft/server/integrated
1219 StatFileWriter net/minecraft/stats
1220 StatList net/minecraft/stats
1221 StatTypeDistance net/minecraft/stats
1222 StatTypeFloat net/minecraft/stats
1223 StatTypeSimple net/minecraft/stats
1224 StatTypeTime net/minecraft/stats
1225 StatsSyncher net/minecraft/stats
1256 AABBPool net/minecraft/util
1257 AxisAlignedBB net/minecraft/util
1258 ChatAllowedCharacters net/minecraft/util
1259 ChatMessageComponent net/minecraft/util
1260 ChunkCoordinates net/minecraft/util
1261 CombatEntry net/minecraft/util
1262 CombatTracker net/minecraft/util
1274 Facing net/minecraft/util
1275 FoodStats net/minecraft/util
1276 HttpUtil net/minecraft/util
HttpUtilRunnable net/minecraft/util
IDownloadSuccess net/minecraft/util
1277 IProgressUpdate net/minecraft/util
1278 Icon net/minecraft/util
1279 IntHashMap net/minecraft/util
1282 LongHashMapEntry net/minecraft/util
1283 MD5String net/minecraft/util
1284 MathHelper net/minecraft/util
1285 MessageComponentSerializer net/minecraft/util
1286 MinecraftError net/minecraft/util
1287 MouseFilter net/minecraft/util
1288 MouseHelper net/minecraft/util
1295 StatCollector net/minecraft/util
1296 StringTranslate net/minecraft/util
1297 StringUtils net/minecraft/util
ThreadDownloadResources net/minecraft/util
1298 Timer net/minecraft/util
1299 Tuple net/minecraft/util
1300 Util net/minecraft/util
1301 ValueObject net/minecraft/util
1302 Vec3 net/minecraft/util
1303 Vec3Pool net/minecraft/util
+4096 -3741
View File
File diff suppressed because it is too large. Load diff
+84 -49
View File
@@ -5,75 +5,110 @@ import java.lang.reflect.Field;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.Arrays;
import joptsimple.ArgumentAcceptingOptionSpec;
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import net.minecraft.client.Minecraft;
import net.minecraft.client.main.Main;
public class Start
{
public static void main(String[] args)
public static void main(String[] args) throws Exception
{
int userIndex = -1;
int passIndex = -1;
int sessIndex = -1;
int versIndex = -1;
for( int x = 0; x < args.length; x++)
{
if (args[x].equals("--username")) userIndex = x + 1;
else if (args[x].equals("--password")) passIndex = x + 1;
else if (args[x].equals("--session")) sessIndex = x + 1;
else if (args[x].equals("--version")) versIndex = x + 1;
}
if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
{
String[] session = getSession(args[userIndex], args[passIndex]);
if (session != null)
{
args[userIndex] = session[0];
args = concat(args, new String[]{"--session", session[1]});
}
}
//Kill the password if its there so it isn't printed to the console.
if (passIndex != -1)
{
args[passIndex-1] = "no_password_for_joo";
args[passIndex] = "no_password_for_joo";
}
if (versIndex == -1)
{
args = concat(args, new String[]{ "--version", "fml_mcp" });
}
Main.main(args);
}
private static String[] getSession(String username, String password) throws UnsupportedEncodingException
{
String parameters = "http://login.minecraft.net/?user=" + URLEncoder.encode(username, "UTF-8") +
"&password=" + URLEncoder.encode(password, "UTF-8") +
"&version=" + 13;
String result = openUrl(parameters);
if (result == null)
{
System.out.println("Can't connect to minecraft.net");
return null;
}
if (!result.contains(":"))
{
System.out.println("Login Failed: " + result);
return null;
}
String[] values = result.split(":");
return new String[]{ values[2].trim(), values[3].trim() };
}
private static String openUrl(String addr)
{
try
{
Field f = Minecraft.class.getDeclaredField("field_71463_am");
Field.setAccessible(new Field[] { f }, true);
f.set(null, new File("."));
}
catch (Exception e)
{
e.printStackTrace();
return;
}
if (args.length != 2)
{
Minecraft.main(args);
}
else
{
try {
String parameters = "http://login.minecraft.net/?user=" + URLEncoder.encode(args[0], "UTF-8") +
"&password=" + URLEncoder.encode(args[1], "UTF-8") +
"&version=" + 13;
String result = openUrl(parameters);
if (result == null)
{
System.out.println("Can't connect to minecraft.net");
return;
}
if (!result.contains(":"))
{
System.out.println("Login Failed: " + result);
return;
}
//latestVersion, downloadTicket, userName, sessionId
String[] values = result.split(":");
Minecraft.main(new String[]{values[2].trim(), values[3].trim()});
} catch (Exception e) {
e.printStackTrace();
}
}
}
private static String openUrl(String addr)
{
try {
URL url = new URL(addr);
java.io.InputStream is;
is = url.openConnection().getInputStream();
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(is));
String buf = "";
String line = null;
while((line = reader.readLine() ) != null)
while ((line = reader.readLine()) != null)
{
buf += "\n" + line;
buf += "\n" + line;
}
reader.close();
return buf;
} catch (IOException e) {
}
catch (IOException e)
{
e.printStackTrace();
}
return null;
}
private static <T> T[] concat(T[] first, T[] second)
{
T[] result = Arrays.copyOf(first, first.length + second.length);
System.arraycopy(second, 0, result, first.length, second.length);
return result;
}
}
+186 -110
View File
@@ -1,94 +1,50 @@
diff -r -U 3 minecraft\net\minecraft\client\Minecraft.java minecraft_patched\net\minecraft\client\Minecraft.java
--- minecraft\net\minecraft\client\Minecraft.java Sat Apr 27 01:53:03 2013
+++ minecraft_patched\net\minecraft\client\Minecraft.java Sat Apr 27 01:55:19 2013
@@ -532,9 +532,8 @@
return;
}
- while(true) {
try {
- if(this.field_71425_J) {
+ while(this.field_71425_J) {
if(this.field_71434_R && this.field_71433_S != null) {
this.func_71377_b(this.field_71433_S);
return;
@@ -552,7 +551,6 @@
this.func_71373_a(new GuiMemoryErrorScreen());
System.gc();
}
- continue;
}
} catch (MinecraftError var12) {
;
@@ -570,8 +568,6 @@
this.func_71405_e();
}
- return;
- }
}
private void func_71411_J() {
diff -r -U 3 minecraft\net\minecraft\src\CallableSuspiciousClasses.java minecraft_patched\net\minecraft\src\CallableSuspiciousClasses.java
--- minecraft\net\minecraft\src\CallableSuspiciousClasses.java Sat Apr 27 01:53:04 2013
+++ minecraft_patched\net\minecraft\src\CallableSuspiciousClasses.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\CallableSuspiciousClasses.java Sun Jun 30 12:35:15 2013
+++ minecraft_patched\net\minecraft\src\CallableSuspiciousClasses.java Sun Jun 30 12:57:28 2013
@@ -21,9 +21,14 @@
public String func_85085_a() {
public String func_85085_a() throws SecurityException, NoSuchFieldException, IllegalAccessException, IllegalArgumentException {
StringBuilder var1 = new StringBuilder();
- Field var2 = ClassLoader.class.getDeclaredField("classes");
- var2.setAccessible(true);
+ ArrayList var3;
+ try {
Field var2 = ClassLoader.class.getDeclaredField("classes");
var2.setAccessible(true);
- ArrayList var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ ArrayList var3;
+ try {
+ Field var2 = ClassLoader.class.getDeclaredField("classes");
+ var2.setAccessible(true);
+ var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ } catch(Exception ex) {
+ return "";
+ }
+ var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ } catch(Exception ex) {
+ return "";
+ }
boolean var4 = true;
boolean var5 = !CrashReport.class.getCanonicalName().equals("net.minecraft.CrashReport");
HashMap var6 = new HashMap();
diff -r -U 3 minecraft\net\minecraft\src\CodecMus.java minecraft_patched\net\minecraft\src\CodecMus.java
--- minecraft\net\minecraft\src\CodecMus.java Sat Apr 27 01:53:04 2013
+++ minecraft_patched\net\minecraft\src\CodecMus.java Sat Apr 27 01:55:19 2013
@@ -1,5 +1,6 @@
package net.minecraft.src;
@@ -98,6 +103,10 @@
+import java.io.IOException;
import java.io.InputStream;
import net.minecraft.src.MusInputStream;
import paulscode.sound.codecs.CodecJOrbis;
@@ -7,6 +8,10 @@
public class CodecMus extends CodecJOrbis {
protected InputStream openInputStream() {
- return new MusInputStream(this, this.url, this.urlConnection.getInputStream());
+ try {
+ return new MusInputStream(this, this.url, this.urlConnection.getInputStream());
+ } catch (IOException e) {
+ return null;
+ }
// $FF: synthetic method
public Object call() {
+ try {
return this.func_85085_a();
+ } catch(Exception ex) {
+ return null;
+ }
}
}
diff -r -U 3 minecraft\net\minecraft\src\ComponentStrongholdRightTurn.java minecraft_patched\net\minecraft\src\ComponentStrongholdRightTurn.java
--- minecraft\net\minecraft\src\ComponentStrongholdRightTurn.java Sat Apr 27 01:53:04 2013
+++ minecraft_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\ComponentStrongholdRightTurn.java Sun Jun 30 12:35:16 2013
+++ minecraft_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Sun Jun 30 12:58:25 2013
@@ -11,6 +11,10 @@
public class ComponentStrongholdRightTurn extends ComponentStrongholdLeftTurn {
+ public ComponentStrongholdRightTurn(int p_i3843_1_, Random p_i3843_2_, StructureBoundingBox p_i3843_3_, int p_i3843_4_) {
+ super(p_i3843_1_, p_i3843_2_, p_i3843_3_, p_i3843_4_);
+ public ComponentStrongholdRightTurn(int p_i2074_1_, Random p_i2074_2_, StructureBoundingBox p_i2074_3_, int p_i2074_4_) {
+ super(p_i2074_1_, p_i2074_2_, p_i2074_3_, p_i2074_4_);
+ }
+
public void func_74861_a(StructureComponent p_74861_1_, List p_74861_2_, Random p_74861_3_) {
if(this.field_74885_f != 2 && this.field_74885_f != 3) {
this.func_74989_b((ComponentStrongholdStairs2)p_74861_1_, p_74861_2_, p_74861_3_, 1, 1);
diff -r -U 3 minecraft\net\minecraft\src\DedicatedServer.java minecraft_patched\net\minecraft\src\DedicatedServer.java
--- minecraft\net\minecraft\src\DedicatedServer.java Sat Apr 27 01:53:04 2013
+++ minecraft_patched\net\minecraft\src\DedicatedServer.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\DedicatedServer.java Sun Jun 30 12:35:16 2013
+++ minecraft_patched\net\minecraft\src\DedicatedServer.java Sun Jun 30 12:59:50 2013
@@ -207,7 +207,7 @@
System.exit(0);
}
@@ -98,22 +54,79 @@ diff -r -U 3 minecraft\net\minecraft\src\DedicatedServer.java minecraft_patched\
super.func_71190_q();
this.func_71333_ah();
}
diff -r -U 3 minecraft\net\minecraft\src\EntityDragon.java minecraft_patched\net\minecraft\src\EntityDragon.java
--- minecraft\net\minecraft\src\EntityDragon.java Sun Jun 30 12:35:16 2013
+++ minecraft_patched\net\minecraft\src\EntityDragon.java Sun Jun 30 13:01:34 2013
@@ -551,4 +551,14 @@
protected float func_70599_aP() {
return 5.0F;
}
+
+ @Override
+ public float func_70667_aM() {
+ return 0.0f;
+ }
+
+ @Override
+ public float func_110183_aJ() {
+ return 0.0f;
+ }
}
diff -r -U 3 minecraft\net\minecraft\src\EntityWither.java minecraft_patched\net\minecraft\src\EntityWither.java
--- minecraft\net\minecraft\src\EntityWither.java Sun Jun 30 12:35:16 2013
+++ minecraft_patched\net\minecraft\src\EntityWither.java Sun Jun 30 13:02:20 2013
@@ -458,4 +458,13 @@
this.field_70154_o = null;
}
+ @Override
+ public float func_70667_aM() {
+ return 0.0f;
+ }
+
+ @Override
+ public float func_110183_aJ() {
+ return 0.0f;
+ }
}
diff -r -U 3 minecraft\net\minecraft\src\EnumChatFormatting.java minecraft_patched\net\minecraft\src\EnumChatFormatting.java
--- minecraft\net\minecraft\src\EnumChatFormatting.java Sat Apr 27 01:53:05 2013
+++ minecraft_patched\net\minecraft\src\EnumChatFormatting.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\EnumChatFormatting.java Sun Jun 30 12:35:16 2013
+++ minecraft_patched\net\minecraft\src\EnumChatFormatting.java Sun Jun 30 13:02:35 2013
@@ -38,7 +38,7 @@
private final String field_96304_B;
private EnumChatFormatting(char p_i10000_3_) {
- this(p_i10000_1_, p_i10000_2_, p_i10000_3_, false);
+ this(p_i10000_3_, false);
private EnumChatFormatting(char p_i1336_3_) {
- this(p_i1336_1_, p_i1336_2_, p_i1336_3_, false);
+ this(p_i1336_3_, false);
}
private EnumChatFormatting(char p_i10001_3_, boolean p_i10001_4_) {
private EnumChatFormatting(char p_i1337_3_, boolean p_i1337_4_) {
diff -r -U 3 minecraft\net\minecraft\src\FileResourcePack.java minecraft_patched\net\minecraft\src\FileResourcePack.java
--- minecraft\net\minecraft\src\FileResourcePack.java Sun Jun 30 12:35:17 2013
+++ minecraft_patched\net\minecraft\src\FileResourcePack.java Sun Jun 30 13:04:31 2013
@@ -84,12 +84,18 @@
protected void finalize() {
this.close();
+ try {
super.finalize();
+ } catch(Throwable t) {
+ }
}
public void close() {
if(this.field_110600_d != null) {
+ try {
this.field_110600_d.close();
+ } catch(Exception ex) {
+ }
this.field_110600_d = null;
}
diff -r -U 3 minecraft\net\minecraft\src\FontRenderer.java minecraft_patched\net\minecraft\src\FontRenderer.java
--- minecraft\net\minecraft\src\FontRenderer.java Sat Apr 27 01:53:05 2013
+++ minecraft_patched\net\minecraft\src\FontRenderer.java Sat Apr 27 01:55:19 2013
@@ -621,8 +621,6 @@
--- minecraft\net\minecraft\src\FontRenderer.java Sun Jun 30 12:35:17 2013
+++ minecraft_patched\net\minecraft\src\FontRenderer.java Sun Jun 30 13:05:19 2013
@@ -625,8 +625,6 @@
case 10:
--var5;
break;
@@ -122,19 +135,19 @@ diff -r -U 3 minecraft\net\minecraft\src\FontRenderer.java minecraft_patched\net
case 167:
if(var5 < var3 - 1) {
++var5;
@@ -636,6 +634,8 @@
@@ -640,6 +638,8 @@
}
}
break;
+ case 32:
+ var6 = var5;
+ var6 = var5;
default:
var4 += this.func_78263_a(var8);
if(var7) {
diff -r -U 3 minecraft\net\minecraft\src\IntegratedServer.java minecraft_patched\net\minecraft\src\IntegratedServer.java
--- minecraft\net\minecraft\src\IntegratedServer.java Sat Apr 27 01:53:05 2013
+++ minecraft_patched\net\minecraft\src\IntegratedServer.java Sat Apr 27 01:55:19 2013
@@ -101,7 +101,7 @@
--- minecraft\net\minecraft\src\IntegratedServer.java Sun Jun 30 12:35:17 2013
+++ minecraft_patched\net\minecraft\src\IntegratedServer.java Sun Jun 30 13:05:37 2013
@@ -103,7 +103,7 @@
return true;
}
@@ -143,9 +156,60 @@ diff -r -U 3 minecraft\net\minecraft\src\IntegratedServer.java minecraft_patched
boolean var1 = this.field_71348_o;
this.field_71348_o = this.field_71347_n.func_71752_f();
if(!var1 && this.field_71348_o) {
diff -r -U 3 minecraft\net\minecraft\src\Minecraft.java minecraft_patched\net\minecraft\src\Minecraft.java
--- minecraft\net\minecraft\src\Minecraft.java Sun Jun 30 12:35:17 2013
+++ minecraft_patched\net\minecraft\src\Minecraft.java Sun Jun 30 13:28:05 2013
@@ -599,8 +599,8 @@
return;
}
- while(true) {
- try {
+ try {
+ while(this.field_71425_J) {
if(this.field_71425_J) {
if(this.field_71434_R && this.field_71433_S != null) {
this.func_71377_b(this.field_71433_S);
@@ -621,23 +621,20 @@
}
continue;
}
- } catch (MinecraftError var12) {
- ;
- } catch (ReportedException var13) {
- this.func_71396_d(var13.func_71575_a());
- this.func_71398_f();
- var13.printStackTrace();
- this.func_71377_b(var13.func_71575_a());
- } catch (Throwable var14) {
- var2 = this.func_71396_d(new CrashReport("Unexpected error", var14));
- this.func_71398_f();
- var14.printStackTrace();
- this.func_71377_b(var2);
- } finally {
- this.func_71405_e();
}
-
- return;
+ } catch (MinecraftError var12) {
+ } catch (ReportedException var13) {
+ this.func_71396_d(var13.func_71575_a());
+ this.func_71398_f();
+ var13.printStackTrace();
+ this.func_71377_b(var13.func_71575_a());
+ } catch (Throwable var14) {
+ var2 = this.func_71396_d(new CrashReport("Unexpected error", var14));
+ this.func_71398_f();
+ var14.printStackTrace();
+ this.func_71377_b(var2);
+ } finally {
+ this.func_71405_e();
}
}
diff -r -U 3 minecraft\net\minecraft\src\RConThreadClient.java minecraft_patched\net\minecraft\src\RConThreadClient.java
--- minecraft\net\minecraft\src\RConThreadClient.java Sat Apr 27 01:53:07 2013
+++ minecraft_patched\net\minecraft\src\RConThreadClient.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\RConThreadClient.java Sun Jun 30 12:35:18 2013
+++ minecraft_patched\net\minecraft\src\RConThreadClient.java Sun Jun 30 13:07:31 2013
@@ -32,8 +32,8 @@
}
@@ -173,22 +237,21 @@ diff -r -U 3 minecraft\net\minecraft\src\RConThreadClient.java minecraft_patched
}
-
- return;
- }
+ } catch (SocketTimeoutException var17) {
+ } catch (IOException var18) {
+ } catch (Exception var19) {
+ System.out.println(var19);
+ } finally {
+ this.func_72653_g();
}
-
+ } catch (SocketTimeoutException var17) {
+ } catch (IOException var18) {
+ } catch (Exception var19) {
+ System.out.println(var19);
+ } finally {
+ this.func_72653_g();
+ }
}
private void func_72654_a(int p_72654_1_, int p_72654_2_, String p_72654_3_) throws IOException {
diff -r -U 3 minecraft\net\minecraft\src\RenderBlocks.java minecraft_patched\net\minecraft\src\RenderBlocks.java
--- minecraft\net\minecraft\src\RenderBlocks.java Sat Apr 27 01:53:07 2013
+++ minecraft_patched\net\minecraft\src\RenderBlocks.java Sat Apr 27 01:55:19 2013
@@ -1951,16 +1951,16 @@
--- minecraft\net\minecraft\src\RenderBlocks.java Sun Jun 30 12:35:18 2013
+++ minecraft_patched\net\minecraft\src\RenderBlocks.java Sun Jun 30 13:09:31 2013
@@ -1960,16 +1960,16 @@
float var25 = (float)(p_78589_2_ + 1);
float var26 = (float)(p_78589_4_ + 0);
float var27 = (float)(p_78589_4_ + 1);
@@ -209,7 +272,7 @@ diff -r -U 3 minecraft\net\minecraft\src\RenderBlocks.java minecraft_patched\net
int var29 = 0;
int var30 = 0;
int var31 = 16;
@@ -2006,7 +2006,7 @@
@@ -2016,7 +2016,7 @@
var5.func_78374_a((double)var25, (double)p_78589_3_ + 0.015625D, (double)var26, (double)var9.func_94214_a((double)var31), (double)var9.func_94207_b((double)var30));
var5.func_78374_a((double)var24, (double)p_78589_3_ + 0.015625D, (double)var26, (double)var9.func_94214_a((double)var29), (double)var9.func_94207_b((double)var30));
var5.func_78374_a((double)var24, (double)p_78589_3_ + 0.015625D, (double)var27, (double)var9.func_94214_a((double)var29), (double)var9.func_94207_b((double)var32));
@@ -219,9 +282,9 @@ diff -r -U 3 minecraft\net\minecraft\src\RenderBlocks.java minecraft_patched\net
var5.func_78374_a((double)var25, (double)p_78589_3_ + 0.015625D, (double)var26, (double)var8.func_94212_f(), (double)var8.func_94206_g());
var5.func_78374_a((double)var24, (double)p_78589_3_ + 0.015625D, (double)var26, (double)var8.func_94209_e(), (double)var8.func_94206_g());
diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net\minecraft\src\RenderGlobal.java
--- minecraft\net\minecraft\src\RenderGlobal.java Sat Apr 27 01:53:07 2013
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Sat Apr 27 01:55:19 2013
@@ -1449,7 +1449,7 @@
--- minecraft\net\minecraft\src\RenderGlobal.java Sun Jun 30 12:35:18 2013
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Sun Jun 30 13:09:31 2013
@@ -1435,7 +1435,7 @@
double var15 = this.field_72777_q.field_71451_h.field_70165_t - p_72726_2_;
double var17 = this.field_72777_q.field_71451_h.field_70163_u - p_72726_4_;
double var19 = this.field_72777_q.field_71451_h.field_70161_v - p_72726_6_;
@@ -230,11 +293,26 @@ diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net
if(p_72726_1_.equals("hugeexplosion")) {
this.field_72777_q.field_71452_i.func_78873_a(var21 = new EntityHugeExplodeFX(this.field_72769_h, p_72726_2_, p_72726_4_, p_72726_6_, p_72726_8_, p_72726_10_, p_72726_12_));
} else if(p_72726_1_.equals("largeexplode")) {
diff -r -U 3 minecraft\net\minecraft\src\SoundPoolURLConnection.java minecraft_patched\net\minecraft\src\SoundPoolURLConnection.java
--- minecraft\net\minecraft\src\SoundPoolURLConnection.java Sun Jun 30 12:35:18 2013
+++ minecraft_patched\net\minecraft\src\SoundPoolURLConnection.java Sun Jun 30 13:10:50 2013
@@ -22,7 +22,11 @@
public void connect() {}
public InputStream getInputStream() {
+ try {
return SoundPool.func_110655_a(this.field_110660_a).func_110536_a(this.field_110659_b).func_110527_b();
+ } catch(Exception ex) {
+ return null;
+ }
}
// $FF: synthetic method
diff -r -U 3 minecraft\net\minecraft\src\TcpMasterThread.java minecraft_patched\net\minecraft\src\TcpMasterThread.java
--- minecraft\net\minecraft\src\TcpMasterThread.java Sat Apr 27 01:53:07 2013
+++ minecraft_patched\net\minecraft\src\TcpMasterThread.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\TcpMasterThread.java Sun Jun 30 12:35:19 2013
+++ minecraft_patched\net\minecraft\src\TcpMasterThread.java Sun Jun 30 13:10:50 2013
@@ -11,6 +11,7 @@
this.field_74504_a = p_i3285_1_;
this.field_74504_a = p_i1395_1_;
}
+ @SuppressWarnings("deprecation")
@@ -242,15 +320,13 @@ diff -r -U 3 minecraft\net\minecraft\src\TcpMasterThread.java minecraft_patched\
try {
Thread.sleep(5000L);
diff -r -U 3 minecraft\net\minecraft\src\ThreadedFileIOBase.java minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java
--- minecraft\net\minecraft\src\ThreadedFileIOBase.java Sat Apr 27 01:53:07 2013
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Sat Apr 27 01:55:19 2013
@@ -20,7 +20,8 @@
--- minecraft\net\minecraft\src\ThreadedFileIOBase.java Sun Jun 30 12:35:19 2013
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Sun Jun 30 13:11:10 2013
@@ -20,6 +20,7 @@
}
public void run() {
- this.func_75736_b();
+ while(true)
+ this.func_75736_b();
+ while(true)
this.func_75736_b();
}
private void func_75736_b() {
+62 -65
View File
@@ -1,41 +1,51 @@
diff -r -U 3 minecraft_server\net\minecraft\src\CallableSuspiciousClasses.java minecraft_server_patched\net\minecraft\src\CallableSuspiciousClasses.java
--- minecraft_server\net\minecraft\src\CallableSuspiciousClasses.java Sat Apr 27 01:54:18 2013
+++ minecraft_server_patched\net\minecraft\src\CallableSuspiciousClasses.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\CallableSuspiciousClasses.java Sun Jun 30 12:36:32 2013
+++ minecraft_server_patched\net\minecraft\src\CallableSuspiciousClasses.java Sun Jun 30 12:48:42 2013
@@ -21,9 +21,14 @@
public String func_85085_a() {
public String func_85085_a() throws SecurityException, NoSuchFieldException, IllegalAccessException, IllegalArgumentException {
StringBuilder var1 = new StringBuilder();
- Field var2 = ClassLoader.class.getDeclaredField("classes");
- var2.setAccessible(true);
+ ArrayList var3;
+ try {
Field var2 = ClassLoader.class.getDeclaredField("classes");
var2.setAccessible(true);
- ArrayList var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ ArrayList var3;
+ try {
+ Field var2 = ClassLoader.class.getDeclaredField("classes");
+ var2.setAccessible(true);
+ var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ } catch(Exception ex) {
+ return "";
+ }
+ var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ } catch(Exception ex) {
+ return "";
+ }
boolean var4 = true;
boolean var5 = !CrashReport.class.getCanonicalName().equals("net.minecraft.CrashReport");
HashMap var6 = new HashMap();
@@ -98,6 +103,10 @@
// $FF: synthetic method
public Object call() {
- return this.func_85085_a();
+ try {
+ return this.func_85085_a();
+ } catch(Exception ex) {
+ return null;
+ }
}
}
diff -r -U 3 minecraft_server\net\minecraft\src\ComponentStrongholdRightTurn.java minecraft_server_patched\net\minecraft\src\ComponentStrongholdRightTurn.java
--- minecraft_server\net\minecraft\src\ComponentStrongholdRightTurn.java Sat Apr 27 01:54:19 2013
+++ minecraft_server_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\ComponentStrongholdRightTurn.java Sun Jun 30 12:36:32 2013
+++ minecraft_server_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Sun Jun 30 12:41:20 2013
@@ -11,6 +11,10 @@
public class ComponentStrongholdRightTurn extends ComponentStrongholdLeftTurn {
+ public ComponentStrongholdRightTurn(int p_i3843_1_, Random p_i3843_2_, StructureBoundingBox p_i3843_3_, int p_i3843_4_) {
+ super(p_i3843_1_, p_i3843_2_, p_i3843_3_, p_i3843_4_);
+ public ComponentStrongholdRightTurn(int p_i2074_1_, Random p_i2074_2_, StructureBoundingBox p_i2074_3_, int p_i2074_4_) {
+ super(p_i2074_1_, p_i2074_2_, p_i2074_3_, p_i2074_4_);
+ }
+
public void func_74861_a(StructureComponent p_74861_1_, List p_74861_2_, Random p_74861_3_) {
if(this.field_74885_f != 2 && this.field_74885_f != 3) {
this.func_74989_b((ComponentStrongholdStairs2)p_74861_1_, p_74861_2_, p_74861_3_, 1, 1);
diff -r -U 3 minecraft_server\net\minecraft\src\DedicatedServer.java minecraft_server_patched\net\minecraft\src\DedicatedServer.java
--- minecraft_server\net\minecraft\src\DedicatedServer.java Sat Apr 27 01:54:19 2013
+++ minecraft_server_patched\net\minecraft\src\DedicatedServer.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\DedicatedServer.java Sun Jun 30 12:36:32 2013
+++ minecraft_server_patched\net\minecraft\src\DedicatedServer.java Sun Jun 30 12:41:48 2013
@@ -208,7 +208,7 @@
System.exit(0);
}
@@ -46,53 +56,43 @@ diff -r -U 3 minecraft_server\net\minecraft\src\DedicatedServer.java minecraft_s
this.func_71333_ah();
}
diff -r -U 3 minecraft_server\net\minecraft\src\EnumChatFormatting.java minecraft_server_patched\net\minecraft\src\EnumChatFormatting.java
--- minecraft_server\net\minecraft\src\EnumChatFormatting.java Sat Apr 27 01:54:20 2013
+++ minecraft_server_patched\net\minecraft\src\EnumChatFormatting.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\EnumChatFormatting.java Sun Jun 30 12:36:33 2013
+++ minecraft_server_patched\net\minecraft\src\EnumChatFormatting.java Sun Jun 30 12:42:08 2013
@@ -38,7 +38,7 @@
private final String field_96304_B;
private EnumChatFormatting(char p_i10000_3_) {
- this(p_i10000_1_, p_i10000_2_, p_i10000_3_, false);
+ this(p_i10000_3_, false);
private EnumChatFormatting(char p_i1336_3_) {
- this(p_i1336_1_, p_i1336_2_, p_i1336_3_, false);
+ this(p_i1336_3_, false);
}
private EnumChatFormatting(char p_i10001_3_, boolean p_i10001_4_) {
private EnumChatFormatting(char p_i1337_3_, boolean p_i1337_4_) {
diff -r -U 3 minecraft_server\net\minecraft\src\MemoryConnection.java minecraft_server_patched\net\minecraft\src\MemoryConnection.java
--- minecraft_server\net\minecraft\src\MemoryConnection.java Sat Apr 27 01:54:20 2013
+++ minecraft_server_patched\net\minecraft\src\MemoryConnection.java Sat Apr 27 01:56:15 2013
@@ -2,6 +2,8 @@
import java.net.InetSocketAddress;
import java.net.SocketAddress;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import net.minecraft.src.ILogAgent;
import net.minecraft.src.INetworkManager;
@@ -11,7 +13,7 @@
--- minecraft_server\net\minecraft\src\MemoryConnection.java Sun Jun 30 12:36:33 2013
+++ minecraft_server_patched\net\minecraft\src\MemoryConnection.java Sun Jun 30 12:46:26 2013
@@ -11,13 +11,18 @@
public class MemoryConnection implements INetworkManager {
private static final SocketAddress field_74444_a = new InetSocketAddress("127.0.0.1", 0);
- private final List field_74442_b;
+ private final List field_74442_b = Collections.synchronizedList(new ArrayList());
+ private final List field_74442_b = java.util.Collections.synchronizedList(new java.util.ArrayList());
private final ILogAgent field_98214_c;
private MemoryConnection field_74443_c;
private NetHandler field_74440_d;
@@ -19,6 +21,11 @@
private boolean field_74441_e;
private String field_74438_f;
private Object[] field_74439_g;
+ public MemoryConnection(ILogAgent p_i11025_1_, NetHandler p_i11025_2_) {
+ this.field_74440_d = p_i11025_2_;
+ this.field_98214_c = p_i11025_1_;
+
+ public MemoryConnection(ILogAgent p_i1392_1_, NetHandler p_i1392_2_) {
+ this.field_74440_d = p_i1392_2_;
+ this.field_98214_c = p_i1392_1_;
+ }
+
public void func_74425_a(NetHandler p_74425_1_) {
this.field_74440_d = p_74425_1_;
}
diff -r -U 3 minecraft_server\net\minecraft\src\RConThreadClient.java minecraft_server_patched\net\minecraft\src\RConThreadClient.java
--- minecraft_server\net\minecraft\src\RConThreadClient.java Sat Apr 27 01:54:20 2013
+++ minecraft_server_patched\net\minecraft\src\RConThreadClient.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\RConThreadClient.java Sun Jun 30 12:36:33 2013
+++ minecraft_server_patched\net\minecraft\src\RConThreadClient.java Sun Jun 30 12:51:57 2013
@@ -32,8 +32,8 @@
}
@@ -120,23 +120,22 @@ diff -r -U 3 minecraft_server\net\minecraft\src\RConThreadClient.java minecraft_
}
-
- return;
- }
+ } catch (SocketTimeoutException var17) {
+ } catch (IOException var18) {
+ } catch (Exception var19) {
+ System.out.println(var19);
+ } finally {
+ this.func_72653_g();
}
-
+ } catch (SocketTimeoutException var17) {
+ } catch (IOException var18) {
+ } catch (Exception var19) {
+ System.out.println(var19);
+ } finally {
+ this.func_72653_g();
+ }
}
private void func_72654_a(int p_72654_1_, int p_72654_2_, String p_72654_3_) throws IOException {
diff -r -U 3 minecraft_server\net\minecraft\src\TcpMasterThread.java minecraft_server_patched\net\minecraft\src\TcpMasterThread.java
--- minecraft_server\net\minecraft\src\TcpMasterThread.java Sat Apr 27 01:54:21 2013
+++ minecraft_server_patched\net\minecraft\src\TcpMasterThread.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\TcpMasterThread.java Sun Jun 30 12:36:34 2013
+++ minecraft_server_patched\net\minecraft\src\TcpMasterThread.java Sun Jun 30 12:52:29 2013
@@ -11,6 +11,7 @@
this.field_74504_a = p_i3285_1_;
this.field_74504_a = p_i1395_1_;
}
+ @SuppressWarnings("deprecation")
@@ -144,15 +143,13 @@ diff -r -U 3 minecraft_server\net\minecraft\src\TcpMasterThread.java minecraft_s
try {
Thread.sleep(5000L);
diff -r -U 3 minecraft_server\net\minecraft\src\ThreadedFileIOBase.java minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java
--- minecraft_server\net\minecraft\src\ThreadedFileIOBase.java Sat Apr 27 01:54:21 2013
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Sat Apr 27 01:56:15 2013
@@ -20,7 +20,8 @@
--- minecraft_server\net\minecraft\src\ThreadedFileIOBase.java Sun Jun 30 12:36:34 2013
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Sun Jun 30 12:52:53 2013
@@ -20,6 +20,7 @@
}
public void run() {
- this.func_75736_b();
+ while(true)
+ this.func_75736_b();
+ while(true)
this.func_75736_b();
}
private void func_75736_b() {
+3 -3
View File
@@ -1,4 +1,4 @@
[VERSION]
MCPVersion = 7.51
ClientVersion = 1.5.2
ServerVersion = 1.5.2
MCPVersion = 8.01
ClientVersion = 1.6
ServerVersion = 1.6
+14 -10
View File
@@ -2,19 +2,23 @@ import urllib
import zipfile
import sys
import os
from optparse import OptionParser
if __name__ == '__main__':
if not len(sys.argv) >= 3:
print 'Invalid arguments, must supply mcp folder and fml folder: decompile.py <MCPFolder> <FMLFolder>'
parser = OptionParser()
parser.add_option('-g', '--gen-conf', action="store_true", dest='gen_conf', help='Generate merged MCP conf folder', default=False)
parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to download/extract MCP to', default=None )
parser.add_option('-f', '--fml-dir', action='store', dest='fml_dir', help='Path to FML install folder', default=None )
options, _ = parser.parse_args()
if options.fml_dir is None or options.mcp_dir is None:
print 'Invalid arguments, must supply mcp folder and fml folder: decompile.py --mcp-dir <MCPFolder> --fml-dir <FMLFolder>'
else:
mcp_dir = os.path.abspath(sys.argv[1])
fml_dir = os.path.abspath(sys.argv[2])
dont_gen_conf = '-no_gen_conf' in sys.argv
sys.path.append(os.path.join(options.fml_dir, 'install'))
sys.path.append(os.path.join(fml_dir, 'install'))
from fml import decompile_minecraft, setup_mcp, download_mcp
from fml import setup_fml, setup_mcp
setup_mcp(fml_dir, mcp_dir, dont_gen_conf)
setup_fml(fml_dir, mcp_dir)
download_mcp(fml_dir=options.fml_dir, mcp_dir=options.mcp_dir)
setup_mcp(options.fml_dir, options.mcp_dir, gen_conf=options.gen_conf)
decompile_minecraft(options.fml_dir, options.mcp_dir)
Binary file not shown.
+5 -2
View File
@@ -7,10 +7,10 @@ minecraft servers, minecraft bukkit servers, and minecraft clients.
The code is authored by cpw.
It implements API defined by the client side ModLoader, authored by Risugami.
It (partially) implements API defined by the client side ModLoader, authored by Risugami.
http://www.minecraftforum.net/topic/75440-
It also contains suggestions and hints from LexManos, author of MinecraftForge.
It also contains suggestions and hints and generous helpings of code from LexManos, author of MinecraftForge.
http://www.minecraftforge.net/
Additionally, it contains an implementation of topological sort based on that
@@ -19,6 +19,9 @@ published at http://keithschwarz.com/interesting/code/?dir=topological-sort
It also contains code from the Maven project for performing versioned dependency
resolution. http://maven.apache.org/
It also contains a partial repackaging of the javaxdelta library from http://sourceforge.net/projects/javaxdelta/
with credit to it's authors.
Forge Mod Loader downloads components from the Minecraft Coder Pack
(http://mcp.ocean-labs.de/index.php/Main_Page) with kind permission from the MCP team.
+10 -13
View File
@@ -40,8 +40,8 @@ contributors through github.
Notable integrations
====================
Optifine, with the Cx series have started performing the actions necessary for
FML compatibility. This means optifine will work well alongside an FML or
Optifine has FML compatibility. It varies from Optifine release to release, however
in general it will work well alongside an FML or
Minecraft Forge installation. FML will detect and ensure the good operation of
Optifine (you can see it in your client as an additional data line on the
bottom left).
@@ -49,9 +49,8 @@ bottom left).
Client notes
============
FML does provide a standard pattern for mods to provide HD textures. This is why
optifine needed integration code. FML supports very very basic HD texture packs
up to 128x resolution (some 256x resolution packs work but not all). For full
featured HD optifine is recommended.
optifine needed integration code. FML supports HD texture packs
up to 128x resolution.
Mod information
===============
@@ -68,15 +67,13 @@ or server):
Installation
============
To install this on it's own into a minecraft environment, simply copy the
contents of the fml zip file into the minecraft jar file, using your preferred
zip management tool (I recommend 7 zip on windows).
To install on a server, simply execute the FML or Forge jar file, with a copy of
minecraft_server.jar placed in the same directory. FML will launch it's patched
copy.
For servers: the minecraft jar file is minecraft_server.jar.
For clients: the minecraft jar file is minecraft.jar. You will additionally need
to delete the "META-INF" folder in the minecraft.jar file.
For bukkit: the mcportcentral custom builds of craftbukkit contain all you need
already. Please refer to mcportcentral.co.za for more information.
To install on a client, FIRST delete META-INF from the minecraft.jar file, then
copy the contents of the FML or Forge jar file into it. FML and Forge provide
their own META-INF data which should *not* be deleted.
Forge Installation
==================
+32 -22
View File
@@ -1,27 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="jars/bin/jinput.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/jars/bin/natives"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/bin/lwjgl_util.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/jars/bin/natives"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/bin/lwjgl.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/jars/bin/natives"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/bin/minecraft.jar"/>
<classpathentry kind="lib" path="lib/argo-3.2-src.jar" sourcepath="lib/argo-3.2-src.jar"/>
<classpathentry kind="lib" path="lib/bcprov-debug-jdk15on-148.jar" sourcepath="lib/bcprov-jdk15on-148-src.zip"/>
<classpathentry kind="lib" path="lib/asm-debug-all-4.1.jar" sourcepath="lib/asm-4.1-bin.zip"/>
<classpathentry kind="lib" path="lib/guava-14.0-rc3.jar" sourcepath="lib/guava-14.0-rc3-sources.jar"/>
<classpathentry kind="lib" path="lib/scala-library.jar" sourcepath="lib/scala-library.jar"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="jars/libraries/org/ow2/asm/asm-all/4.1/asm-all-4.1.jar" sourcepath="jars/libraries/org/ow2/asm/asm-all/4.1/asm-all-4.1-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/minecraft/launchwrapper/1.3/launchwrapper-1.3.jar"/>
<classpathentry kind="lib" path="jars/versions/1.6/1.6.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar" sourcepath="jars/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar"/>
<classpathentry kind="lib" path="jars/libraries/argo/argo/2.25_fixed/argo-2.25_fixed.jar" sourcepath="jars/libraries/net/sourceforge/argo/argo/2.25/argo-2.25-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/org/bouncycastle/bcprov-jdk15on/1.47/bcprov-jdk15on-1.47.jar" sourcepath="jars/libraries/org/bouncycastle/bcprov-jdk15on/1.47/bcprov-jdk15on-1.47-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/google/guava/guava/14.0/guava-14.0.jar" sourcepath="jars/libraries/com/google/guava/guava/14.0/guava-14.0-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar" sourcepath="jars/libraries/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/commons-io/commons-io/2.4/commons-io-2.4.jar" sourcepath="jars/libraries/commons-io/commons-io/2.4/commons-io-2.4-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar" sourcepath="jars/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/google/code/gson/gson/2.2.2/gson-2.2.2.jar" sourcepath="jars/libraries/com/google/code/gson/gson/2.2.2/gson-2.2.2-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar" sourcepath="jars/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5-sources.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/natives"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/libraries/org/lwjgl/lwjgl/lwjgl/2.9.0/lwjgl-2.9.0.jar" sourcepath="jars/libraries/org/lwjgl/lwjgl/lwjgl/2.9.0/lwjgl-2.9.0-sources.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/natives"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.0/lwjgl_util-2.9.0.jar" sourcepath="jars/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.0/lwjgl_util-2.9.0-sources.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/natives"/>
</attributes>
</classpathentry>
</classpath>
+28 -5
View File
@@ -30,21 +30,44 @@
<type>2</type>
<locationURI>MCP_LOC/lib</locationURI>
</link>
<link>
<name>natives</name>
<type>2</type>
<locationURI>MCP_LOC/jars/libraries/natives</locationURI>
</link>
</linkedResources>
<filteredResources>
<filter>
<id>1307293455427</id>
<id>1372126392133</id>
<name>jars</name>
<type>13</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-bin</arguments>
<arguments>1.0-name-matches-false-false-libraries</arguments>
</matcher>
</filter>
<filter>
<id>1307293504507</id>
<name>jars/bin</name>
<type>5</type>
<id>1372126392135</id>
<name>jars</name>
<type>13</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-versions</arguments>
</matcher>
</filter>
<filter>
<id>1372126392137</id>
<name>jars</name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-natives</arguments>
</matcher>
</filter>
<filter>
<id>1372126425043</id>
<name>jars/libraries</name>
<type>21</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-*.jar</arguments>
+1017 -683
View File
File diff suppressed because it is too large. Load diff
+19 -10
View File
@@ -1,18 +1,24 @@
import os, os.path, sys
from optparse import OptionParser
from fml import setup_fml, finish_setup_fml, apply_fml_patches, setup_mcp
from fml import setup_fml, finish_setup_fml, apply_fml_patches, setup_mcp, download_mcp
def fml_main(fml_dir, mcp_dir, dont_gen_conf=True, disable_patches=False, disable_at=False, disable_merge=False, enable_server=False, disable_client=False,
disable_rename=False):
def fml_main(fml_dir, mcp_dir, gen_conf=True, disable_patches=False, disable_at=False, disable_merge=False, enable_server=False,
disable_client=False, disable_rename=False, disable_assets=False, decompile=False):
print '================ Forge ModLoader Setup Start ==================='
setup_mcp(fml_dir, mcp_dir, dont_gen_conf)
setup_fml(fml_dir, mcp_dir, disable_at=disable_at, disable_merge=disable_merge, enable_server=enable_server, disable_client=disable_client)
if disable_patches:
print 'Patching disabled'
download_mcp(fml_dir, mcp_dir)
setup_mcp(fml_dir, mcp_dir, gen_conf)
if decompile:
decompile_minecraft(fml_dir, mcp_dir, disable_at=disable_at, disable_merge=disable_merge,
enable_server=enable_server, disable_client=disable_client,
disable_assets=disable_assets)
if disable_patches:
print 'Patching disabled'
else:
apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src'))
finish_setup_fml(fml_dir, mcp_dir, enable_server=enable_server, disable_client=disable_client, disable_rename=disable_rename)
else:
apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src'))
finish_setup_fml(fml_dir, mcp_dir, enable_server=enable_server, disable_client=disable_client, disable_rename=disable_rename)
print 'Decompile free install is on the to-do!'
print '================ Forge ModLoader Setup End ==================='
if __name__ == '__main__':
@@ -24,6 +30,8 @@ if __name__ == '__main__':
parser.add_option('-c', '--no-client', action="store_true", dest='no_client', help='Disable decompilation of server', default=False)
parser.add_option('-e', '--no-merge', action="store_true", dest='no_merge', help='Disable merging server code into client', default=False)
parser.add_option('-n', '--no-rename', action="store_true", dest='no_rename', help='Disable running updatenames', default=False)
parser.add_option('-a', '--no-assets', action="store_true", dest='no_assets', help='Disable downloading of assets folder', default=False)
parser.add_option('-d', '--decompile', action="store_true", dest='decompile', help='Decompile minecraft and apply patches', default=True)
options, _ = parser.parse_args()
fml_dir = os.path.dirname(os.path.abspath(__file__))
@@ -43,4 +51,5 @@ if __name__ == '__main__':
fml_main(fml_dir, mcp_dir, disable_patches=options.no_patch,
disable_at=options.no_access, disable_merge=options.no_merge,
enable_server=options.enable_server, disable_client=options.no_client,
disable_rename=options.no_rename)
disable_rename=options.no_rename, disable_assets=options.assets,
decompile=options.decompile, gen_conf=False)
+125
View File
@@ -0,0 +1,125 @@
{
"id": "FML{version}",
"time": "{timestamp}",
"releaseTime": "{timestamp}",
"type": "release",
"processArguments": "username_session_version",
"minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minimumLauncherVersion": 2,
"libraries": [
{
"name": "net.minecraft:launchwrapper:1.3",
"comment" : "Important for FML, we add this"
},
{
"name": "org.ow2.asm:asm-all:4.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "lzma:lzma:0.0.1"
},
{
"name": "com.paulscode:codecjorbis:20101023"
},
{
"name": "com.paulscode:codecwav:20101023"
},
{
"name": "com.paulscode:libraryjavasound:20101123"
},
{
"name": "com.paulscode:librarylwjglopenal:20100824"
},
{
"name": "com.paulscode:soundsystem:20120107"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "net.sourceforge.argo:argo:2.25",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "grumble grumble grumble, y u no use proper version/artifact id grumble"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.guava:guava:14.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.apache.commons:commons-lang3:3.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "commons-io:commons-io:2.4",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "net.java.jinput:jinput:2.0.5",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "net.java.jutils:jutils:1.0.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.code.gson:gson:2.2.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.client.main.Main"
}
+93
View File
@@ -0,0 +1,93 @@
{
"id": "FML{version}",
"time": "{timestamp}",
"releaseTime": "{timestamp}",
"type": "release",
"processArguments": "username_session_version",
"minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minimumLauncherVersion": 2,
"libraries": [
{
"name": "cpw.mods:fml:{version}",
"devdl" : "false"
},
{
"name": "net.minecraft:launchwrapper:1.3"
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5"
},
{
"name": "com.paulscode:codecjorbis:20101023"
},
{
"name": "com.paulscode:codecwav:20101023"
},
{
"name": "com.paulscode:libraryjavasound:20101123"
},
{
"name": "com.paulscode:librarylwjglopenal:20100824"
},
{
"name": "com.paulscode:soundsystem:20120107"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0"
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47"
},
{
"name": "com.google.guava:guava:14.0"
},
{
"name": "org.apache.commons:commons-lang3:3.1"
},
{
"name": "commons-io:commons-io:2.4"
},
{
"name": "net.java.jinput:jinput:2.0.5"
},
{
"name": "net.java.jutils:jutils:1.0.0"
},
{
"name": "com.google.code.gson:gson:2.2.2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.client.main.Main"
}
Loaded 100 of 151 files, more files were not shown because too many files have changed in this diff. Show more