mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 09:05:17 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95afc95b24 | ||
|
|
34493b0d99 | ||
|
|
e77d2547ad | ||
|
|
40a34af431 | ||
|
|
352117fd78 | ||
|
|
81328b6684 | ||
|
|
b5af446d71 | ||
|
|
d0c6e92900 | ||
|
|
2a9c485edc | ||
|
|
a13598b17e | ||
|
|
40b54013b4 | ||
|
|
1c9a853868 | ||
|
|
da70cdd35a | ||
|
|
b993cf4a98 | ||
|
|
ac065ff5f7 | ||
|
|
913f6f6d36 | ||
|
|
9468e41bbf | ||
|
|
ffdd056a18 | ||
|
|
f157e7a6ec | ||
|
|
4a9d0f9bd5 | ||
|
|
0398916666 | ||
|
|
dec9a3924d | ||
|
|
2470120680 | ||
|
|
ba90b61607 | ||
|
|
9a5e24e338 | ||
|
|
29ef3d5ab4 | ||
|
|
f46a538b41 | ||
|
|
182aa9c0cb | ||
|
|
1857064afa | ||
|
|
cb05c8c4aa | ||
|
|
f275a24b43 | ||
|
|
1d84e8063e | ||
|
|
57befa89bb | ||
|
|
10b16d32da | ||
|
|
3f21a2c1b4 | ||
|
|
b2958c9066 | ||
|
|
9520978b81 | ||
|
|
4981aa3421 | ||
|
|
c48b48ee15 | ||
|
|
9947ba8503 | ||
|
|
a3f48734ff | ||
|
|
0378355c37 | ||
|
|
c625ef3009 | ||
|
|
d4b30422b6 | ||
|
|
6de36d78f5 | ||
|
|
7348929819 | ||
|
|
b9f4b02cb0 | ||
|
|
20e93a412e | ||
|
|
e44e8b3112 | ||
|
|
bab4d87ce7 | ||
|
|
bc9d1fe657 | ||
|
|
d4d522c597 | ||
|
|
97269a5e3d | ||
|
|
c913258ca3 | ||
|
|
c7ab872c85 | ||
|
|
e91431fb70 | ||
|
|
dfa3a2665d | ||
|
|
4fa375683f | ||
|
|
0db4624b27 | ||
|
|
c997f2adbc | ||
|
|
26e5f4b4ff | ||
|
|
2336002f20 | ||
|
|
e88a0cd13f | ||
|
|
dbf5fe38ce | ||
|
|
c47d08c89d | ||
|
|
7af5c21d74 | ||
|
|
6f96d89e2b | ||
|
|
111b0216fd |
No files matched your search
@@ -151,6 +151,8 @@
|
||||
<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.home}/jars/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar"/>
|
||||
<pathelement path="${mcp.home}/jars/libraries/org/scala-lang/scala-library/2.10.2/scala-library-2.10.2.jar"/>
|
||||
<pathelement path="${mcp.home}/jars/libraries/org/scala-lang/scala-compiler/2.10.2/scala-compiler-2.10.2.jar"/>
|
||||
<pathelement path="${mcp.home}/jars/minecraft_server.${version.minecraft}.jar"/>
|
||||
</path>
|
||||
<manifestclasspath property="server.jar.classpath" jarfile="${mcp.home}/jars/minecraft_server.jar">
|
||||
@@ -170,7 +172,7 @@
|
||||
<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="${client.src.dir}" includes="mcplogo.png" />
|
||||
<zipfileset dir="${basedir}" includes="install/CREDITS-fml.txt" fullpath="CREDITS-fml.txt" />
|
||||
<zipfileset dir="${common.src.dir}" includes="*.cfg" />
|
||||
<mappedresources>
|
||||
@@ -198,10 +200,10 @@
|
||||
<tstamp>
|
||||
<format property="current.time" pattern="yyyy-MM-dd'T'HH:mm:ssZ" />
|
||||
</tstamp>
|
||||
|
||||
|
||||
<delete file="${basedir}/installer_base.jar" />
|
||||
<delete file="${basedir}/install_profile.json" />
|
||||
<get src="http://files.minecraftforge.net/installer/forge-installer-1.0.jar" dest="${basedir}/installer_base.jar" />
|
||||
<get src="http://files.minecraftforge.net/installer/forge-installer-1.3-shrunk.jar" dest="${basedir}/installer_base.jar" />
|
||||
<copy file="${basedir}/jsons/${version.minecraft}-rel.json" tofile="${basedir}/install_profile.json" />
|
||||
<copy file="${basedir}/installer_base.jar" tofile="${basedir}/target/${modname}-installer-${version.fullname}.jar" />
|
||||
<replace file="${basedir}/install_profile.json">
|
||||
@@ -432,7 +434,7 @@
|
||||
<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/org/ow2/asm/asm-debug-all/4.1/asm-debug-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>
|
||||
|
||||
@@ -32,7 +32,9 @@ import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.resources.FileResourcePack;
|
||||
import net.minecraft.client.resources.FolderResourcePack;
|
||||
import net.minecraft.client.resources.ReloadableResourceManager;
|
||||
import net.minecraft.client.resources.ResourcePack;
|
||||
import net.minecraft.client.resources.SimpleReloadableResourceManager;
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
@@ -49,6 +51,7 @@ import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.MapDifference;
|
||||
import com.google.common.collect.MapDifference.ValueDifference;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import cpw.mods.fml.client.modloader.ModLoaderClientHelper;
|
||||
import cpw.mods.fml.client.registry.KeyBindingRegistry;
|
||||
@@ -121,7 +124,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
|
||||
private ModSortingException modSorting;
|
||||
|
||||
private boolean loading;
|
||||
private boolean loading = true;
|
||||
|
||||
private WrongMinecraftVersionException wrongMC;
|
||||
|
||||
@@ -133,16 +136,23 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
|
||||
private List<ResourcePack> resourcePackList;
|
||||
|
||||
private ReloadableResourceManager resourceManager;
|
||||
|
||||
private Map<String, ResourcePack> resourcePackMap;
|
||||
|
||||
/**
|
||||
* Called to start the whole game off
|
||||
*
|
||||
* @param minecraft The minecraft instance being launched
|
||||
* @param resourcePackList The resource pack list we will populate with mods
|
||||
* @param resourceManager The resource manager
|
||||
*/
|
||||
public void beginMinecraftLoading(Minecraft minecraft, List resourcePackList)
|
||||
public void beginMinecraftLoading(Minecraft minecraft, List resourcePackList, ReloadableResourceManager resourceManager)
|
||||
{
|
||||
client = minecraft;
|
||||
this.resourcePackList = resourcePackList;
|
||||
this.resourceManager = resourceManager;
|
||||
this.resourcePackMap = Maps.newHashMap();
|
||||
if (minecraft.func_71355_q())
|
||||
{
|
||||
FMLLog.severe("DEMO MODE DETECTED, FML will not work. Finishing now.");
|
||||
@@ -150,7 +160,6 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
return;
|
||||
}
|
||||
|
||||
loading = true;
|
||||
// TextureFXManager.instance().setClient(client);
|
||||
FMLCommonHandler.instance().beginLoading(this);
|
||||
new ModLoaderClientHelper(client);
|
||||
@@ -572,6 +581,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
{
|
||||
ResourcePack pack = (ResourcePack) resourcePackType.getConstructor(ModContainer.class).newInstance(container);
|
||||
resourcePackList.add(pack);
|
||||
resourcePackMap.put(container.getModId(), pack);
|
||||
}
|
||||
catch (NoSuchMethodException e)
|
||||
{
|
||||
@@ -585,4 +595,21 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateResourcePackList()
|
||||
{
|
||||
client.func_110436_a();
|
||||
}
|
||||
|
||||
public ResourcePack getResourcePackFor(String modId)
|
||||
{
|
||||
return resourcePackMap.get(modId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentLanguage()
|
||||
{
|
||||
return client.func_135016_M().func_135041_c().func_135034_a();
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,14 @@
|
||||
package cpw.mods.fml.client;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
@@ -50,4 +53,10 @@ public class FMLFileResourcePack extends FileResourcePack {
|
||||
else throw ioe;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BufferedImage func_110586_a() throws IOException
|
||||
{
|
||||
return ImageIO.read(func_110591_a(container.getMetadata().logoFile));
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
package cpw.mods.fml.client;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import net.minecraft.client.resources.FolderResourcePack;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
@@ -49,4 +52,11 @@ public class FMLFolderResourcePack extends FolderResourcePack {
|
||||
else throw ioe;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BufferedImage func_110586_a() throws IOException
|
||||
{
|
||||
return ImageIO.read(func_110591_a(container.getMetadata().logoFile));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,15 +15,26 @@
|
||||
package cpw.mods.fml.client;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
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.renderer.texture.DynamicTexture;
|
||||
import net.minecraft.client.renderer.texture.SimpleTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureObject;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.resources.ResourcePack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StringTranslate;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -120,28 +131,53 @@ public class GuiModList extends GuiScreen
|
||||
if (!logoFile.isEmpty())
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
// 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;
|
||||
double scale = 1.0;
|
||||
if (scaleX > 1 || scaleY > 1)
|
||||
TextureManager tm = field_73882_e.func_110434_K();
|
||||
ResourcePack pack = FMLClientHandler.instance().getResourcePackFor(selectedMod.getModId());
|
||||
try
|
||||
{
|
||||
scale = 1.0 / Math.max(scaleX, scaleY);
|
||||
}
|
||||
dim.width *= scale;
|
||||
dim.height *= scale;
|
||||
int top = 32;
|
||||
Tessellator tess = Tessellator.field_78398_a;
|
||||
tess.func_78382_b();
|
||||
tess.func_78374_a(offset, top + dim.height, field_73735_i, 0, 1);
|
||||
tess.func_78374_a(offset + dim.width, top + dim.height, field_73735_i, 1, 1);
|
||||
tess.func_78374_a(offset + dim.width, top, field_73735_i, 1, 0);
|
||||
tess.func_78374_a(offset, top, field_73735_i, 0, 0);
|
||||
tess.func_78381_a();
|
||||
BufferedImage logo = null;
|
||||
if (pack!=null)
|
||||
{
|
||||
logo = pack.func_110586_a();
|
||||
}
|
||||
else
|
||||
{
|
||||
InputStream logoResource = getClass().getResourceAsStream(logoFile);
|
||||
if (logoResource != null)
|
||||
{
|
||||
logo = ImageIO.read(logoResource);
|
||||
}
|
||||
}
|
||||
if (logo != null)
|
||||
{
|
||||
ResourceLocation rl = tm.func_110578_a("modlogo", new DynamicTexture(logo));
|
||||
this.field_73882_e.field_71446_o.func_110577_a(rl);
|
||||
Dimension dim = new Dimension(logo.getWidth(), logo.getHeight());
|
||||
double scaleX = dim.width / 200.0;
|
||||
double scaleY = dim.height / 65.0;
|
||||
double scale = 1.0;
|
||||
if (scaleX > 1 || scaleY > 1)
|
||||
{
|
||||
scale = 1.0 / Math.max(scaleX, scaleY);
|
||||
}
|
||||
dim.width *= scale;
|
||||
dim.height *= scale;
|
||||
int top = 32;
|
||||
Tessellator tess = Tessellator.field_78398_a;
|
||||
tess.func_78382_b();
|
||||
tess.func_78374_a(offset, top + dim.height, field_73735_i, 0, 1);
|
||||
tess.func_78374_a(offset + dim.width, top + dim.height, field_73735_i, 1, 1);
|
||||
tess.func_78374_a(offset + dim.width, top, field_73735_i, 1, 0);
|
||||
tess.func_78374_a(offset, top, field_73735_i, 0, 0);
|
||||
tess.func_78381_a();
|
||||
|
||||
shifty += 65;
|
||||
shifty += 65;
|
||||
}
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
this.field_73886_k.func_78261_a(selectedMod.getMetadata().name, offset, shifty, 0xFFFFFF);
|
||||
shifty += 12;
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
@@ -172,6 +172,10 @@ public class KeyBindingRegistry
|
||||
|
||||
private Set<KeyHandler> keyHandlers = Sets.newLinkedHashSet();
|
||||
|
||||
/**
|
||||
* Deprecated as it should not be used by client code
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public static KeyBindingRegistry instance()
|
||||
{
|
||||
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
@@ -448,6 +448,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseModPr
|
||||
return null;
|
||||
}
|
||||
|
||||
@SideOnly(CLIENT)
|
||||
public void clientCustomPayload(NetClientHandler handler, Packet250CustomPayload packet)
|
||||
{
|
||||
|
||||
|
||||
+64
-6
@@ -1,5 +1,16 @@
|
||||
--- commands.py
|
||||
+++ commands.py
|
||||
@@ -126,8 +126,8 @@
|
||||
|
||||
|
||||
def truncate(text, length):
|
||||
- if len(text) > length:
|
||||
- return text[:length] + '...'
|
||||
+ #if len(text) > length:
|
||||
+ # return text[:length] + '...'
|
||||
return text
|
||||
|
||||
|
||||
@@ -139,6 +139,8 @@
|
||||
fieldnames = csvreader.fieldnames
|
||||
return set(fieldnames)
|
||||
@@ -18,7 +29,7 @@
|
||||
if not os.path.exists(os.path.join(binlk[side], os.path.normpath(testlk[side] + '.class'))):
|
||||
return False
|
||||
return True
|
||||
@@ -1281,6 +1285,9 @@
|
||||
@@ -1281,23 +1285,34 @@
|
||||
pathbinlk = {CLIENT: self.binclient, SERVER: self.binserver}
|
||||
pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver}
|
||||
pathlog = {CLIENT: self.clientrecomplog, SERVER: self.serverrecomplog}
|
||||
@@ -28,8 +39,55 @@
|
||||
|
||||
if not os.path.exists(pathbinlk[side]):
|
||||
os.makedirs(pathbinlk[side])
|
||||
@@ -1338,7 +1345,7 @@
|
||||
|
||||
# HINT: We create the list of source directories based on the list of packages
|
||||
# on windows we just pass wildcards, otherwise we pass the full file list
|
||||
- if self.osname == 'win':
|
||||
+ if self.osname == 'win' and False == True: #FML: Disable for windows we write to file now
|
||||
all_files = False
|
||||
append_pattern = True
|
||||
else:
|
||||
all_files = True
|
||||
append_pattern = False
|
||||
pkglist = filterdirs(pathsrclk[side], '*.java', append_pattern=append_pattern, all_files=all_files)
|
||||
+ from tempfile import NamedTemporaryFile
|
||||
if self.cmdrecompscala: # 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)
|
||||
+ f = NamedTemporaryFile(mode='wb', suffix='.txt', prefix ='scala_src_path_', delete=False) #FML: We write to a temporary file just in case the command is to long
|
||||
+ for line in pkglistscala:
|
||||
+ if os.sep == '\\':
|
||||
+ f.write('"%s"\n' % os.path.abspath(line).replace(os.sep, os.sep + os.sep))
|
||||
+ else:
|
||||
+ f.write('"%s"\n' % os.path.abspath(line))
|
||||
+ f.close()
|
||||
+ dirs = '@"%s"' % f.name
|
||||
classpath = os.pathsep.join(cplk[side])
|
||||
forkcmd = self.cmdrecompscala.format(classpath=classpath, sourcepath=pathsrclk[side], outpath=pathbinlk[side], pkgs=dirs)
|
||||
try:
|
||||
@@ -1317,7 +1332,15 @@
|
||||
self.logger.error('================================')
|
||||
self.logger.error('')
|
||||
raise
|
||||
- dirs = ' '.join(pkglist)
|
||||
+ os.unlink(f.name)
|
||||
+ f = NamedTemporaryFile(mode='wb', suffix='.txt', prefix ='java_src_path_', delete=False) #FML: We write to a temporary file just in case the command is to long
|
||||
+ for line in pkglist:
|
||||
+ if os.sep == '\\':
|
||||
+ f.write('"%s"\n' % os.path.abspath(line).replace('\\', '\\\\'))
|
||||
+ else:
|
||||
+ f.write('"%s"\n' % os.path.abspath(line))
|
||||
+ f.close()
|
||||
+ dirs = '@"%s"' % f.name
|
||||
classpath = os.pathsep.join(cplk[side])
|
||||
forkcmd = self.cmdrecomp.format(classpath=classpath, sourcepath=pathsrclk[side], outpath=pathbinlk[side],
|
||||
pkgs=dirs)
|
||||
@@ -1336,9 +1359,10 @@
|
||||
self.logger.error('==================')
|
||||
self.logger.error('')
|
||||
raise
|
||||
+ os.unlink(f.name)
|
||||
|
||||
def startserver(self, mainclass, extraargs):
|
||||
- classpath = [self.binserver] + self.cpathserver
|
||||
@@ -37,7 +95,7 @@
|
||||
classpath = [os.path.join('..', p) for p in classpath]
|
||||
classpath = os.pathsep.join(classpath)
|
||||
os.chdir(self.dirjars)
|
||||
@@ -1703,7 +1710,7 @@
|
||||
@@ -1703,7 +1727,7 @@
|
||||
self.runcmd(forkcmd)
|
||||
return True
|
||||
|
||||
@@ -46,7 +104,7 @@
|
||||
if not reobf:
|
||||
md5lk = {CLIENT: self.md5client, SERVER: self.md5server}
|
||||
else:
|
||||
@@ -1718,6 +1725,9 @@
|
||||
@@ -1718,6 +1742,9 @@
|
||||
class_path = ''
|
||||
else:
|
||||
class_path += '/'
|
||||
@@ -56,7 +114,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))
|
||||
@@ -1890,6 +1900,9 @@
|
||||
@@ -1890,6 +1917,9 @@
|
||||
sys.exit(1)
|
||||
|
||||
for entry in newfiles:
|
||||
@@ -66,7 +124,7 @@
|
||||
if entry[3] == 'U':
|
||||
self.logger.info('Retrieving file from server : %s', entry[0])
|
||||
cur_file = os.path.normpath(entry[0])
|
||||
@@ -1910,6 +1923,9 @@
|
||||
@@ -1910,6 +1940,9 @@
|
||||
md5reoblk = {CLIENT: self.md5reobfclient, SERVER: self.md5reobfserver}
|
||||
outpathlk = {CLIENT: self.srcmodclient, SERVER: self.srcmodserver}
|
||||
src = {CLIENT: self.srcclient, SERVER: self.srcserver}
|
||||
|
||||
@@ -491,4 +491,15 @@ public class FMLCommonHandler
|
||||
{
|
||||
sidedDelegate.addModAsResource(container);
|
||||
}
|
||||
|
||||
public void updateResourcePackList()
|
||||
{
|
||||
sidedDelegate.updateResourcePackList();
|
||||
}
|
||||
|
||||
public String getCurrentLanguage()
|
||||
{
|
||||
|
||||
return sidedDelegate.getCurrentLanguage();
|
||||
}
|
||||
}
|
||||
@@ -5,13 +5,14 @@
|
||||
* 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;
|
||||
|
||||
import java.io.File;
|
||||
import java.security.cert.Certificate;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
@@ -26,6 +27,9 @@ import net.minecraft.world.storage.WorldInfo;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
|
||||
import cpw.mods.fml.client.FMLFileResourcePack;
|
||||
import cpw.mods.fml.client.FMLFolderResourcePack;
|
||||
import cpw.mods.fml.common.asm.FMLSanityChecker;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.ItemData;
|
||||
@@ -123,4 +127,15 @@ public class FMLDummyContainer extends DummyModContainer implements WorldAccessC
|
||||
Certificate[] certificates = getClass().getProtectionDomain().getCodeSource().getCertificates();
|
||||
return certificates != null ? certificates[0] : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getSource()
|
||||
{
|
||||
return FMLSanityChecker.fmlLocation;
|
||||
}
|
||||
@Override
|
||||
public Class<?> getCustomResourcePackClass()
|
||||
{
|
||||
return getSource().isDirectory() ? FMLFolderResourcePack.class : FMLFileResourcePack.class;
|
||||
}
|
||||
}
|
||||
@@ -64,4 +64,8 @@ public interface IFMLSidedHandler
|
||||
void disconnectIDMismatch(MapDifference<Integer, ItemData> s, NetHandler toKill, INetworkManager mgr);
|
||||
|
||||
void addModAsResource(ModContainer container);
|
||||
|
||||
void updateResourcePackList();
|
||||
|
||||
String getCurrentLanguage();
|
||||
}
|
||||
@@ -30,7 +30,7 @@ public class InjectedModContainer implements ModContainer
|
||||
|
||||
public InjectedModContainer(ModContainer mc, File source)
|
||||
{
|
||||
this.source = source;
|
||||
this.source = source != null ? source : new File("minecraft.jar");
|
||||
this.wrappedContainer = mc;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ public class LoadController
|
||||
}
|
||||
|
||||
eventChannels = eventBus.build();
|
||||
FMLCommonHandler.instance().updateResourcePackList();
|
||||
}
|
||||
|
||||
public void distributeStateMessage(LoaderState state, Object... eventData)
|
||||
|
||||
@@ -322,7 +322,6 @@ public class Loader
|
||||
FMLLog.fine("Building injected Mod Containers %s", injectedContainers);
|
||||
// Add in the MCP mod container
|
||||
mods.add(new InjectedModContainer(mcp,new File("minecraft.jar")));
|
||||
File coremod = new File(minecraftDir,"coremods");
|
||||
for (String cont : injectedContainers)
|
||||
{
|
||||
ModContainer mc;
|
||||
@@ -335,7 +334,7 @@ public class Loader
|
||||
FMLLog.log(Level.SEVERE, e, "A problem occured instantiating the injected mod container %s", cont);
|
||||
throw new LoaderException(e);
|
||||
}
|
||||
mods.add(new InjectedModContainer(mc,coremod));
|
||||
mods.add(new InjectedModContainer(mc,mc.getSource()));
|
||||
}
|
||||
ModDiscoverer discoverer = new ModDiscoverer();
|
||||
FMLLog.fine("Attempting to load mods contained in the minecraft jar file and associated classes");
|
||||
|
||||
@@ -424,7 +424,7 @@ public @interface Mod
|
||||
*
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface InstanceFactory {
|
||||
}
|
||||
}
|
||||
@@ -14,10 +14,13 @@ package cpw.mods.fml.common.asm;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.ObjectInputStream.GetField;
|
||||
import java.io.StringReader;
|
||||
import java.net.JarURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.Charset;
|
||||
import java.security.CodeSource;
|
||||
import java.security.cert.CertPath;
|
||||
@@ -32,6 +35,10 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.logging.Level;
|
||||
import java.util.zip.ZipEntry;
|
||||
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
@@ -42,17 +49,22 @@ import org.objectweb.asm.ClassVisitor;
|
||||
import org.objectweb.asm.FieldVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.io.ByteStreams;
|
||||
|
||||
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.Side;
|
||||
|
||||
public class FMLSanityChecker implements IFMLCallHook
|
||||
{
|
||||
private static final String FMLFINGERPRINT = "51:0A:FB:4C:AF:A4:A0:F2:F5:CF:C5:0E:B4:CC:3C:30:24:4A:E3:8E".toLowerCase().replace(":","");
|
||||
private static final String FORGEFINGERPRINT = "DE:4C:F8:A3:F3:BC:15:63:58:10:04:4C:39:24:0B:F9:68:04:EA:7D".toLowerCase().replace(":", "");
|
||||
private static final String FMLFINGERPRINT = "51:0A:FB:4C:AF:A4:A0:F2:F5:CF:C5:0E:B4:CC:3C:30:24:4A:E3:8E".toLowerCase().replace(":", "");
|
||||
private static final String FORGEFINGERPRINT = "E3:C3:D5:0C:7C:98:6D:F7:4C:64:5C:0A:C5:46:39:74:1C:90:A5:57".toLowerCase().replace(":", "");
|
||||
private static final String MCFINGERPRINT = "CD:99:95:96:56:F7:53:DC:28:D8:63:B4:67:69:F7:F8:FB:AE:FC:FC".toLowerCase().replace(":", "");
|
||||
static class MLDetectorClassVisitor extends ClassVisitor
|
||||
{
|
||||
private boolean foundMarker = false;
|
||||
@@ -73,14 +85,17 @@ public class FMLSanityChecker implements IFMLCallHook
|
||||
}
|
||||
|
||||
private LaunchClassLoader cl;
|
||||
public static File fmlLocation;
|
||||
|
||||
@Override
|
||||
public Void call() throws Exception
|
||||
{
|
||||
CodeSource codeSource = getClass().getProtectionDomain().getCodeSource();
|
||||
boolean goodFML = false;
|
||||
boolean fmlIsJar = false;
|
||||
if (codeSource.getLocation().getProtocol().equals("jar"))
|
||||
{
|
||||
fmlIsJar = true;
|
||||
Certificate[] certificates = codeSource.getCertificates();
|
||||
if (certificates!=null)
|
||||
{
|
||||
@@ -109,6 +124,88 @@ public class FMLSanityChecker implements IFMLCallHook
|
||||
{
|
||||
goodFML = true;
|
||||
}
|
||||
|
||||
boolean goodMC = FMLLaunchHandler.side() == Side.SERVER; //Server is not signed, so assume it's good.
|
||||
int certCount = 0;
|
||||
try
|
||||
{
|
||||
Class cbr = Class.forName("net.minecraft.client.ClientBrandRetriever",false, cl);
|
||||
codeSource = cbr.getProtectionDomain().getCodeSource();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Probably a development environment, or the server (the server is not signed)
|
||||
goodMC = true;
|
||||
}
|
||||
JarFile mcJarFile = null;
|
||||
if (fmlIsJar && !goodMC && codeSource.getLocation().getProtocol().equals("jar"))
|
||||
{
|
||||
try
|
||||
{
|
||||
String mcPath = codeSource.getLocation().getPath().substring(5);
|
||||
mcPath = mcPath.substring(0, mcPath.lastIndexOf('!'));
|
||||
mcPath = URLDecoder.decode(mcPath, Charsets.UTF_8.name());
|
||||
mcJarFile = new JarFile(mcPath,true);
|
||||
mcJarFile.getManifest();
|
||||
JarEntry cbrEntry = mcJarFile.getJarEntry("net/minecraft/client/ClientBrandRetriever.class");
|
||||
ByteStreams.toByteArray(mcJarFile.getInputStream(cbrEntry));
|
||||
Certificate[] certificates = cbrEntry.getCertificates();
|
||||
certCount = certificates != null ? certificates.length : 0;
|
||||
if (certificates!=null)
|
||||
{
|
||||
|
||||
for (Certificate cert : certificates)
|
||||
{
|
||||
String fingerprint = CertificateHelper.getFingerprint(cert);
|
||||
if (fingerprint.equals(MCFINGERPRINT))
|
||||
{
|
||||
FMLRelaunchLog.info("Found valid fingerprint for Minecraft. Certificate fingerprint %s", fingerprint);
|
||||
goodMC = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, e, "A critical error occurred trying to read the minecraft jar file");
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (mcJarFile != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
mcJarFile.close();
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
// Noise
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
goodMC = true;
|
||||
}
|
||||
if (!goodMC)
|
||||
{
|
||||
FMLRelaunchLog.severe("The minecraft jar %s appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!",codeSource.getLocation().getFile());
|
||||
if (!Boolean.parseBoolean(System.getProperty("fml.ignoreInvalidMinecraftCertificates","false")))
|
||||
{
|
||||
FMLRelaunchLog.severe("For your safety, FML will not launch minecraft. You will need to fetch a clean version of the minecraft jar file");
|
||||
FMLRelaunchLog.severe("Technical information: The class net.minecraft.client.ClientBrandRetriever should have been associated with the minecraft jar file, " +
|
||||
"and should have returned us a valid, intact minecraft jar location. This did not work. Either you have modified the minecraft jar file (if so " +
|
||||
"run the forge installer again), or you are using a base editing jar that is changing this class (and likely others too). If you REALLY " +
|
||||
"want to run minecraft in this configuration, add the flag -Dfml.ignoreInvalidMinecraftCertificates=true to the 'JVM settings' in your launcher profile.");
|
||||
System.exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLRelaunchLog.severe("FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!");
|
||||
FMLRelaunchLog.severe("Technical information: ClientBrandRetriever was at %s, there were %d certificates for it", codeSource.getLocation(), certCount);
|
||||
}
|
||||
}
|
||||
if (!goodFML)
|
||||
{
|
||||
FMLRelaunchLog.severe("FML appears to be missing any signature data. This is not a good thing");
|
||||
@@ -143,8 +240,8 @@ public class FMLSanityChecker implements IFMLCallHook
|
||||
{
|
||||
cl = (LaunchClassLoader) data.get("classLoader");
|
||||
File mcDir = (File)data.get("mcLocation");
|
||||
fmlLocation = (File)data.get("coremodLocation");
|
||||
FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
|
||||
File binpatches = new File(mcDir,"binpatch");
|
||||
ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,6 @@ public class AccessTransformer implements IClassTransformer
|
||||
System.out.printf("Loaded %d rules from AccessTransformer config file %s\n", modifiers.size(), rulesFile);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public byte[] transform(String name, String transformedName, byte[] bytes)
|
||||
{
|
||||
@@ -212,7 +211,7 @@ public class AccessTransformer implements IClassTransformer
|
||||
}
|
||||
if (m.desc.isEmpty())
|
||||
{
|
||||
for (FieldNode n : (List<FieldNode>) classNode.fields)
|
||||
for (FieldNode n : classNode.fields)
|
||||
{
|
||||
if (n.name.equals(m.name) || m.name.equals("*"))
|
||||
{
|
||||
@@ -231,7 +230,7 @@ public class AccessTransformer implements IClassTransformer
|
||||
}
|
||||
else
|
||||
{
|
||||
for (MethodNode n : (List<MethodNode>) classNode.methods)
|
||||
for (MethodNode n : classNode.methods)
|
||||
{
|
||||
if ((n.name.equals(m.name) && n.desc.equals(m.desc)) || m.name.equals("*"))
|
||||
{
|
||||
|
||||
@@ -334,11 +334,10 @@ public class MCPMerger
|
||||
return ann;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static Hashtable<String, ZipEntry> getClassEntries(ZipFile inFile, ZipOutputStream outFile) throws IOException
|
||||
{
|
||||
Hashtable<String, ZipEntry> ret = new Hashtable<String, ZipEntry>();
|
||||
for (ZipEntry entry : Collections.list((Enumeration<ZipEntry>)inFile.entries()))
|
||||
for (ZipEntry entry : Collections.list(inFile.entries()))
|
||||
{
|
||||
if (entry.isDirectory())
|
||||
{
|
||||
@@ -423,7 +422,6 @@ public class MCPMerger
|
||||
return classNode;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static void processFields(ClassNode cClass, ClassNode sClass, ClassInfo info)
|
||||
{
|
||||
List<FieldNode> cFields = cClass.fields;
|
||||
@@ -537,7 +535,6 @@ public class MCPMerger
|
||||
return Objects.toStringHelper(this).add("name", node.name).add("desc",node.desc).add("server",server).add("client",client).toString();
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
private static void processMethods(ClassNode cClass, ClassNode sClass, ClassInfo info)
|
||||
{
|
||||
List<MethodNode> cMethods = (List<MethodNode>)cClass.methods;
|
||||
|
||||
@@ -97,7 +97,6 @@ public class MarkerTransformer implements IClassTransformer
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public byte[] transform(String name, String transformedName, byte[] bytes)
|
||||
{
|
||||
|
||||
@@ -32,7 +32,6 @@ public class SideTransformer implements IClassTransformer
|
||||
{
|
||||
private static String SIDE = FMLLaunchHandler.side().name();
|
||||
private static final boolean DEBUG = false;
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public byte[] transform(String name, String transformedName, byte[] bytes)
|
||||
{
|
||||
|
||||
@@ -40,9 +40,9 @@ public class JarDiscoverer implements ITypeDiscoverer
|
||||
{
|
||||
jar = new JarFile(candidate.getModContainer());
|
||||
|
||||
if (jar.getManifest()!=null && jar.getManifest().getMainAttributes().get("FMLCorePlugin") != null)
|
||||
if (jar.getManifest()!=null && (jar.getManifest().getMainAttributes().get("FMLCorePlugin") != null || jar.getManifest().getMainAttributes().get("TweakClass") != null))
|
||||
{
|
||||
FMLLog.finest("Ignoring coremod %s", candidate.getModContainer());
|
||||
FMLLog.finest("Ignoring coremod or tweak system %s", candidate.getModContainer());
|
||||
return foundMods;
|
||||
}
|
||||
ZipEntry modInfo = jar.getEntry("mcmod.info");
|
||||
|
||||
@@ -42,8 +42,12 @@ public class ModDiscoverer
|
||||
public void findClasspathMods(ModClassLoader modClassLoader)
|
||||
{
|
||||
List<String> knownLibraries = ImmutableList.<String>builder()
|
||||
// skip default libs
|
||||
.addAll(modClassLoader.getDefaultLibraries())
|
||||
// skip loaded coremods
|
||||
.addAll(CoreModManager.getLoadedCoremods())
|
||||
// skip reparse coremods here
|
||||
.addAll(CoreModManager.getReparseableCoremods())
|
||||
.build();
|
||||
File[] minecraftSources = modClassLoader.getParentSources();
|
||||
if (minecraftSources.length == 1 && minecraftSources[0].isFile())
|
||||
@@ -85,7 +89,12 @@ public class ModDiscoverer
|
||||
|
||||
for (File modFile : modList)
|
||||
{
|
||||
if (modFile.isDirectory())
|
||||
// skip loaded coremods
|
||||
if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
|
||||
{
|
||||
FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
|
||||
}
|
||||
else if (modFile.isDirectory())
|
||||
{
|
||||
FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
|
||||
candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
|
||||
|
||||
@@ -13,12 +13,11 @@ public class FMLServerTweaker extends FMLTweaker {
|
||||
@Override
|
||||
public void injectIntoClassLoader(LaunchClassLoader classLoader)
|
||||
{
|
||||
computeCascadedTweaks(classLoader);
|
||||
classLoader.addTransformerExclusion("cpw.mods.fml.repackage.");
|
||||
classLoader.addTransformerExclusion("cpw.mods.fml.relauncher.");
|
||||
classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers.");
|
||||
classLoader.addClassLoaderExclusion("LZMA.");
|
||||
FMLLaunchHandler.configureForServerLaunch(classLoader, this);
|
||||
runAdditionalTweaks(classLoader);
|
||||
FMLLaunchHandler.appendCoreMods();
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package cpw.mods.fml.common.launcher;
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -14,12 +15,14 @@ import joptsimple.OptionSet;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Throwables;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.ObjectArrays;
|
||||
|
||||
import cpw.mods.fml.relauncher.FMLLaunchHandler;
|
||||
|
||||
import net.minecraft.launchwrapper.ITweaker;
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
|
||||
public class FMLTweaker implements ITweaker {
|
||||
@@ -28,11 +31,6 @@ public class FMLTweaker implements ITweaker {
|
||||
private File assetsDir;
|
||||
private String profile;
|
||||
private static URI jarLocation;
|
||||
private String[] array;
|
||||
private List<ITweaker> cascadedTweaks;
|
||||
private String profileName;
|
||||
private OptionSet parsedOptions;
|
||||
private ArgumentAcceptingOptionSpec<String> cascadedTweaksOption;
|
||||
|
||||
@Override
|
||||
public void acceptOptions(List<String> args, File gameDir, File assetsDir, String profile)
|
||||
@@ -40,6 +38,7 @@ public class FMLTweaker implements ITweaker {
|
||||
this.gameDir = (gameDir == null ? new File(".") : gameDir);
|
||||
this.assetsDir = assetsDir;
|
||||
this.profile = profile;
|
||||
this.args = args;
|
||||
try
|
||||
{
|
||||
jarLocation = getClass().getProtectionDomain().getCodeSource().getLocation().toURI();
|
||||
@@ -49,64 +48,17 @@ public class FMLTweaker implements ITweaker {
|
||||
Logger.getLogger("FMLTWEAK").log(Level.SEVERE, "Missing URI information for FML tweak");
|
||||
throw Throwables.propagate(e);
|
||||
}
|
||||
|
||||
OptionParser optionParser = new OptionParser();
|
||||
cascadedTweaksOption = optionParser.accepts("cascadedTweaks", "Additional tweaks to be called by FML, implementing ITweaker").withRequiredArg().ofType(String.class).withValuesSeparatedBy(',');
|
||||
ArgumentAcceptingOptionSpec<String> profileNameOption = optionParser.accepts("profileName", "A profile name, parsed by FML to control mod loading and such").withRequiredArg().ofType(String.class);
|
||||
optionParser.allowsUnrecognizedOptions();
|
||||
NonOptionArgumentSpec<String> nonOptions = optionParser.nonOptions();
|
||||
|
||||
parsedOptions = optionParser.parse(args.toArray(new String[args.size()]));
|
||||
if (parsedOptions.has(profileNameOption))
|
||||
{
|
||||
profileName = profileNameOption.value(parsedOptions);
|
||||
}
|
||||
this.args = parsedOptions.valuesOf(nonOptions);
|
||||
this.cascadedTweaks = Lists.newArrayList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectIntoClassLoader(LaunchClassLoader classLoader)
|
||||
{
|
||||
computeCascadedTweaks(classLoader);
|
||||
classLoader.addTransformerExclusion("cpw.mods.fml.repackage.");
|
||||
classLoader.addTransformerExclusion("cpw.mods.fml.relauncher.");
|
||||
classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers.");
|
||||
classLoader.addClassLoaderExclusion("LZMA.");
|
||||
FMLLaunchHandler.configureForClientLaunch(classLoader, this);
|
||||
runAdditionalTweaks(classLoader);
|
||||
}
|
||||
|
||||
void computeCascadedTweaks(LaunchClassLoader classLoader)
|
||||
{
|
||||
if (parsedOptions.has(cascadedTweaksOption))
|
||||
{
|
||||
for (String tweaker : cascadedTweaksOption.values(parsedOptions))
|
||||
{
|
||||
try
|
||||
{
|
||||
classLoader.addClassLoaderExclusion(tweaker.substring(0,tweaker.lastIndexOf('.')));
|
||||
Class<? extends ITweaker> tweakClass = (Class<? extends ITweaker>) Class.forName(tweaker,true,classLoader);
|
||||
ITweaker additionalTweak = tweakClass.newInstance();
|
||||
cascadedTweaks.add(additionalTweak);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.getLogger("FMLTWEAK").log(Level.INFO, "Missing additional tweak class "+tweaker);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void runAdditionalTweaks(LaunchClassLoader classLoader)
|
||||
{
|
||||
List<String> fmlArgs = Lists.newArrayList(args);
|
||||
fmlArgs.add("--fmlIsPresent");
|
||||
for (ITweaker tweak : cascadedTweaks)
|
||||
{
|
||||
tweak.acceptOptions(fmlArgs, gameDir, assetsDir, profile);
|
||||
tweak.injectIntoClassLoader(classLoader);
|
||||
}
|
||||
FMLLaunchHandler.appendCoreMods();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -118,34 +70,27 @@ public class FMLTweaker implements ITweaker {
|
||||
@Override
|
||||
public String[] getLaunchArguments()
|
||||
{
|
||||
String[] array = args.toArray(new String[args.size()]);
|
||||
List<String> blackboardArgs = (List<String>) Launch.blackboard.get("ArgumentList");
|
||||
|
||||
if (gameDir != null)
|
||||
String[] launchArgsArray = args.toArray(new String[args.size()]);
|
||||
|
||||
if (gameDir != null && !blackboardArgs.contains("--gameDir"))
|
||||
{
|
||||
array = ObjectArrays.concat(gameDir.getAbsolutePath(),array);
|
||||
array = ObjectArrays.concat("--gameDir",array);
|
||||
launchArgsArray = ObjectArrays.concat(gameDir.getAbsolutePath(),launchArgsArray);
|
||||
launchArgsArray = ObjectArrays.concat("--gameDir",launchArgsArray);
|
||||
}
|
||||
|
||||
if (assetsDir != null)
|
||||
if (assetsDir != null && !blackboardArgs.contains("--assetsDir"))
|
||||
{
|
||||
array = ObjectArrays.concat(assetsDir.getAbsolutePath(),array);
|
||||
array = ObjectArrays.concat("--assetsDir",array);
|
||||
launchArgsArray = ObjectArrays.concat(assetsDir.getAbsolutePath(),launchArgsArray);
|
||||
launchArgsArray = ObjectArrays.concat("--assetsDir",launchArgsArray);
|
||||
}
|
||||
if (profile != null)
|
||||
if (!blackboardArgs.contains("--version"))
|
||||
{
|
||||
array = ObjectArrays.concat(profile,array);
|
||||
array = ObjectArrays.concat("--version",array);
|
||||
launchArgsArray = ObjectArrays.concat(profile != null ? profile : "UnknownFMLProfile",launchArgsArray);
|
||||
launchArgsArray = ObjectArrays.concat("--version",launchArgsArray);
|
||||
}
|
||||
else
|
||||
{
|
||||
array = ObjectArrays.concat("UnknownFMLProfile",array);
|
||||
array = ObjectArrays.concat("--version",array);
|
||||
}
|
||||
for (ITweaker tweak: cascadedTweaks)
|
||||
{
|
||||
array = ObjectArrays.concat(tweak.getLaunchArguments(), array, String.class);
|
||||
}
|
||||
return array;
|
||||
return launchArgsArray;
|
||||
}
|
||||
|
||||
public File getGameDir()
|
||||
@@ -158,4 +103,10 @@ public class FMLTweaker implements ITweaker {
|
||||
return jarLocation;
|
||||
}
|
||||
|
||||
public void injectCascadingTweak(String tweakClassName)
|
||||
{
|
||||
List<String> tweakClasses = (List<String>) Launch.blackboard.get("TweakClasses");
|
||||
tweakClasses.add(tweakClassName);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,12 +6,14 @@ public class ClassPatch {
|
||||
public final String targetClassName;
|
||||
public final boolean existsAtTarget;
|
||||
public final byte[] patch;
|
||||
public ClassPatch(String name, String sourceClassName, String targetClassName, boolean existsAtTarget, byte[] patch)
|
||||
public final int inputChecksum;
|
||||
public ClassPatch(String name, String sourceClassName, String targetClassName, boolean existsAtTarget, int inputChecksum, byte[] patch)
|
||||
{
|
||||
this.name = name;
|
||||
this.sourceClassName = sourceClassName;
|
||||
this.targetClassName = targetClassName;
|
||||
this.existsAtTarget = existsAtTarget;
|
||||
this.inputChecksum = inputChecksum;
|
||||
this.patch = patch;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,11 +26,11 @@ 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.hash.Hashing;
|
||||
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;
|
||||
@@ -39,11 +39,19 @@ import cpw.mods.fml.repackage.com.nothome.delta.GDiffPatcher;
|
||||
public class ClassPatchManager {
|
||||
public static final ClassPatchManager INSTANCE = new ClassPatchManager();
|
||||
|
||||
public static final boolean dumpPatched = Boolean.parseBoolean(System.getProperty("fml.dumpPatchedClasses", "false"));
|
||||
|
||||
private GDiffPatcher patcher = new GDiffPatcher();
|
||||
private ListMultimap<String, ClassPatch> patches;
|
||||
|
||||
private File tempDir;
|
||||
private ClassPatchManager()
|
||||
{
|
||||
|
||||
if (dumpPatched)
|
||||
{
|
||||
tempDir = Files.createTempDir();
|
||||
FMLRelaunchLog.info("Dumping patched classes to %s",tempDir.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] applyPatch(String name, String mappedName, byte[] inputData)
|
||||
@@ -57,11 +65,13 @@ public class ClassPatchManager {
|
||||
{
|
||||
return inputData;
|
||||
}
|
||||
boolean ignoredError = false;
|
||||
FMLRelaunchLog.fine("Runtime patching class %s (input size %d), found %d patch%s", mappedName, (inputData == null ? 0 : inputData.length), list.size(), list.size()!=1 ? "es" : "");
|
||||
for (ClassPatch patch: list)
|
||||
{
|
||||
if (!patch.targetClassName.equals(mappedName))
|
||||
{
|
||||
FMLLog.warning("Binary patch found %s for wrong class %s", patch.targetClassName, mappedName);
|
||||
FMLRelaunchLog.warning("Binary patch found %s for wrong class %s", patch.targetClassName, mappedName);
|
||||
}
|
||||
if (!patch.existsAtTarget && (inputData == null || inputData.length == 0))
|
||||
{
|
||||
@@ -69,7 +79,26 @@ public class ClassPatchManager {
|
||||
}
|
||||
else if (!patch.existsAtTarget)
|
||||
{
|
||||
FMLLog.warning("Patcher expecting empty class data file for %s, but received non-empty", patch.targetClassName);
|
||||
FMLRelaunchLog.warning("Patcher expecting empty class data file for %s, but received non-empty", patch.targetClassName);
|
||||
}
|
||||
else
|
||||
{
|
||||
int inputChecksum = Hashing.adler32().hashBytes(inputData).asInt();
|
||||
if (patch.inputChecksum != inputChecksum)
|
||||
{
|
||||
FMLRelaunchLog.severe("There is a binary discrepency between the expected input class %s (%s) and the actual class. Checksum on disk is %x, in patch %x. Things are probably about to go very wrong. Did you put something into the jar file?", mappedName, name, inputChecksum, patch.inputChecksum);
|
||||
if (!Boolean.parseBoolean(System.getProperty("fml.ignorePatchDiscrepancies","false")))
|
||||
{
|
||||
FMLRelaunchLog.severe("The game is going to exit, because this is a critical error, and it is very improbable that the modded game will work, please obtain clean jar files.");
|
||||
System.exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLRelaunchLog.severe("FML is going to ignore this error, note that the patch will not be applied, and there is likely to be a malfunctioning behaviour, including not running at all");
|
||||
ignoredError = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
synchronized (patcher)
|
||||
{
|
||||
@@ -79,12 +108,26 @@ public class ClassPatchManager {
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
FMLLog.log(Level.SEVERE, e, "Encountered problem runtime patching class %s", name);
|
||||
FMLRelaunchLog.log(Level.SEVERE, e, "Encountered problem runtime patching class %s", name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
FMLLog.fine("Successfully applied runtime patches for %s", mappedName);
|
||||
if (!ignoredError)
|
||||
{
|
||||
FMLRelaunchLog.fine("Successfully applied runtime patches for %s (new size %d)", mappedName, inputData.length);
|
||||
}
|
||||
if (dumpPatched)
|
||||
{
|
||||
try
|
||||
{
|
||||
Files.write(inputData, new File(tempDir,mappedName));
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, e, "Failed to write %s to %s", mappedName, tempDir.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
return inputData;
|
||||
}
|
||||
|
||||
@@ -97,7 +140,7 @@ public class ClassPatchManager {
|
||||
InputStream binpatchesCompressed = getClass().getResourceAsStream("/binpatches.pack.lzma");
|
||||
if (binpatchesCompressed==null)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, "The binary patch set is missing. Things are probably about to go very wrong.");
|
||||
FMLRelaunchLog.log(Level.SEVERE, "The binary patch set is missing. Either you are in a development environment, or things are not going to work!");
|
||||
return;
|
||||
}
|
||||
LzmaInputStream binpatchesDecompressed = new LzmaInputStream(binpatchesCompressed);
|
||||
@@ -108,7 +151,7 @@ public class ClassPatchManager {
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, e, "Error occurred reading binary patches. Problems may occur");
|
||||
FMLRelaunchLog.log(Level.SEVERE, e, "Error occurred reading binary patches. Expect severe problems!");
|
||||
throw Throwables.propagate(e);
|
||||
}
|
||||
|
||||
@@ -140,13 +183,13 @@ public class ClassPatchManager {
|
||||
{
|
||||
}
|
||||
} while (true);
|
||||
FMLLog.fine("Read %d binary patches", patches.size());
|
||||
FMLLog.fine("Patch list :\n\t%s", Joiner.on("\t\n").join(patches.asMap().entrySet()));
|
||||
FMLRelaunchLog.fine("Read %d binary patches", patches.size());
|
||||
FMLRelaunchLog.fine("Patch list :\n\t%s", Joiner.on("\t\n").join(patches.asMap().entrySet()));
|
||||
}
|
||||
|
||||
private ClassPatch readPatch(JarEntry patchEntry, JarInputStream jis)
|
||||
{
|
||||
FMLLog.finest("Reading patch data from %s", patchEntry.getName());
|
||||
FMLRelaunchLog.finest("Reading patch data from %s", patchEntry.getName());
|
||||
ByteArrayDataInput input;
|
||||
try
|
||||
{
|
||||
@@ -154,17 +197,22 @@ public class ClassPatchManager {
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
FMLLog.log(Level.WARNING, e, "Unable to read binpatch file %s - ignoring", patchEntry.getName());
|
||||
FMLRelaunchLog.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 inputChecksum = 0;
|
||||
if (exists)
|
||||
{
|
||||
inputChecksum = input.readInt();
|
||||
}
|
||||
int patchLength = input.readInt();
|
||||
byte[] patchBytes = new byte[patchLength];
|
||||
input.readFully(patchBytes);
|
||||
|
||||
return new ClassPatch(name, sourceClassName, targetClassName, exists, patchBytes);
|
||||
return new ClassPatch(name, sourceClassName, targetClassName, exists, inputChecksum, patchBytes);
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import java.util.logging.Logger;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Iterators;
|
||||
import com.google.common.hash.Hashing;
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
import com.google.common.io.ByteStreams;
|
||||
import com.google.common.io.Files;
|
||||
@@ -64,6 +65,7 @@ public class GenDiffSet {
|
||||
|
||||
byte[] diff = delta.compute(vanillaBytes, patchedBytes);
|
||||
|
||||
|
||||
ByteArrayDataOutput diffOut = ByteStreams.newDataOutput(diff.length + 50);
|
||||
// Original name
|
||||
diffOut.writeUTF(name);
|
||||
@@ -73,6 +75,10 @@ public class GenDiffSet {
|
||||
diffOut.writeUTF(targetClassName);
|
||||
// exists at original
|
||||
diffOut.writeBoolean(entry != null);
|
||||
if (entry != null)
|
||||
{
|
||||
diffOut.writeInt(Hashing.adler32().hashBytes(vanillaBytes).asInt());
|
||||
}
|
||||
// length of patch
|
||||
diffOut.writeInt(diff.length);
|
||||
// patch
|
||||
|
||||
@@ -52,6 +52,7 @@ import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.LoaderState;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
|
||||
public class GameData {
|
||||
private static Map<Integer, ItemData> idMap = Maps.newHashMap();
|
||||
@@ -362,4 +363,28 @@ public class GameData {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static UniqueIdentifier getUniqueName(Block block)
|
||||
{
|
||||
if (block == null) return null;
|
||||
ItemData itemData = idMap.get(block.field_71990_ca);
|
||||
if (itemData == null || !itemData.isOveridden() || customItemStacks.contains(itemData.getModId(), itemData.getItemType()))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new UniqueIdentifier(itemData.getModId(), itemData.getItemType());
|
||||
}
|
||||
|
||||
static UniqueIdentifier getUniqueName(Item item)
|
||||
{
|
||||
if (item == null) return null;
|
||||
ItemData itemData = idMap.get(item.field_77779_bT);
|
||||
if (itemData == null || !itemData.isOveridden() || customItemStacks.contains(itemData.getModId(), itemData.getItemType()))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new UniqueIdentifier(itemData.getModId(), itemData.getItemType());
|
||||
}
|
||||
}
|
||||
@@ -95,10 +95,11 @@ public class GameRegistry
|
||||
Random fmlRandom = new Random(worldSeed);
|
||||
long xSeed = fmlRandom.nextLong() >> 2 + 1L;
|
||||
long zSeed = fmlRandom.nextLong() >> 2 + 1L;
|
||||
fmlRandom.setSeed((xSeed * chunkX + zSeed * chunkZ) ^ worldSeed);
|
||||
long chunkSeed = (xSeed * chunkX + zSeed * chunkZ) ^ worldSeed;
|
||||
|
||||
for (IWorldGenerator generator : worldGenerators)
|
||||
{
|
||||
fmlRandom.setSeed(chunkSeed);
|
||||
generator.generate(fmlRandom, chunkX, chunkZ, world, chunkGenerator, chunkProvider);
|
||||
}
|
||||
}
|
||||
@@ -350,26 +351,55 @@ public class GameRegistry
|
||||
|
||||
public static void onPlayerLogin(EntityPlayer player)
|
||||
{
|
||||
for(IPlayerTracker tracker : playerTrackers)
|
||||
tracker.onPlayerLogin(player);
|
||||
for (IPlayerTracker tracker : playerTrackers)
|
||||
try
|
||||
{
|
||||
tracker.onPlayerLogin(player);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.log(Level.SEVERE, e, "A critical error occured handling the onPlayerLogin event with player tracker %s", tracker.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
public static void onPlayerLogout(EntityPlayer player)
|
||||
{
|
||||
for(IPlayerTracker tracker : playerTrackers)
|
||||
tracker.onPlayerLogout(player);
|
||||
for (IPlayerTracker tracker : playerTrackers)
|
||||
try
|
||||
{
|
||||
tracker.onPlayerLogout(player);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.log(Level.SEVERE, e, "A critical error occured handling the onPlayerLogout event with player tracker %s", tracker.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
public static void onPlayerChangedDimension(EntityPlayer player)
|
||||
{
|
||||
for(IPlayerTracker tracker : playerTrackers)
|
||||
tracker.onPlayerChangedDimension(player);
|
||||
for (IPlayerTracker tracker : playerTrackers)
|
||||
try
|
||||
{
|
||||
tracker.onPlayerChangedDimension(player);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.log(Level.SEVERE, e, "A critical error occured handling the onPlayerChangedDimension event with player tracker %s", tracker.getClass()
|
||||
.getName());
|
||||
}
|
||||
}
|
||||
|
||||
public static void onPlayerRespawn(EntityPlayer player)
|
||||
{
|
||||
for(IPlayerTracker tracker : playerTrackers)
|
||||
tracker.onPlayerRespawn(player);
|
||||
for (IPlayerTracker tracker : playerTrackers)
|
||||
try
|
||||
{
|
||||
tracker.onPlayerRespawn(player);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.log(Level.SEVERE, e, "A critical error occured handling the onPlayerRespawn event with player tracker %s", tracker.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -430,4 +460,46 @@ public class GameRegistry
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class UniqueIdentifier
|
||||
{
|
||||
public final String modId;
|
||||
public final String name;
|
||||
UniqueIdentifier(String modId, String name)
|
||||
{
|
||||
this.modId = modId;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Look up the mod identifier data for a block.
|
||||
* Returns null if there is no mod specified mod identifier data, or it is part of a
|
||||
* custom itemstack definition {@link #registerCustomItemStack}
|
||||
*
|
||||
* Note: uniqueness and persistence is only guaranteed by mods using the game registry
|
||||
* correctly.
|
||||
*
|
||||
* @param block to lookup
|
||||
* @return a {@link UniqueIdentifier} for the block or null
|
||||
*/
|
||||
public static UniqueIdentifier findUniqueIdentifierFor(net.minecraft.block.Block block)
|
||||
{
|
||||
return GameData.getUniqueName(block);
|
||||
}
|
||||
/**
|
||||
* Look up the mod identifier data for an item.
|
||||
* Returns null if there is no mod specified mod identifier data, or it is part of a
|
||||
* custom itemstack definition {@link #registerCustomItemStack}
|
||||
*
|
||||
* Note: uniqueness and persistence is only guaranteed by mods using the game registry
|
||||
* correctly.
|
||||
*
|
||||
* @param item to lookup
|
||||
* @return a {@link UniqueIdentifier} for the item or null
|
||||
*/
|
||||
public static UniqueIdentifier findUniqueIdentifierFor(net.minecraft.item.Item item)
|
||||
{
|
||||
return GameData.getUniqueName(item);
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import java.util.logging.Level;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
@@ -46,7 +47,7 @@ public class LanguageRegistry
|
||||
|
||||
public String getStringLocalization(String key)
|
||||
{
|
||||
return getStringLocalization(key, Minecraft.func_71410_x().func_135016_M().func_135041_c().func_135034_a());
|
||||
return getStringLocalization(key, FMLCommonHandler.instance().getCurrentLanguage());
|
||||
}
|
||||
|
||||
public String getStringLocalization(String key, String lang)
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
package cpw.mods.fml.common.registry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
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.ResourceLocation;
|
||||
import net.minecraft.util.Tuple;
|
||||
import net.minecraft.village.MerchantRecipeList;
|
||||
import net.minecraft.world.gen.structure.ComponentVillageStartPiece;
|
||||
@@ -173,7 +173,7 @@ public class VillagerRegistry
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static ResourceLocation getVillagerSkin(int villagerType, ResourceLocation defaultSkin)
|
||||
{
|
||||
if (instance().newVillagers.containsKey(villagerType))
|
||||
if (instance().newVillagers != null && instance().newVillagers.containsKey(villagerType))
|
||||
{
|
||||
return instance().newVillagers.get(villagerType);
|
||||
}
|
||||
|
||||
@@ -13,21 +13,10 @@
|
||||
package cpw.mods.fml.relauncher;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.MappedByteBuffer;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.channels.FileChannel.MapMode;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
@@ -37,24 +26,61 @@ import java.util.jar.Attributes;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.google.common.collect.ObjectArrays;
|
||||
|
||||
import net.minecraft.launchwrapper.ITweaker;
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
|
||||
import cpw.mods.fml.common.CertificateHelper;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.base.Throwables;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.ObjectArrays;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.launcher.FMLTweaker;
|
||||
import cpw.mods.fml.common.toposort.TopologicalSort;
|
||||
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.DependsOn;
|
||||
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
|
||||
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.Name;
|
||||
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions;
|
||||
|
||||
public class CoreModManager
|
||||
{
|
||||
private static final Attributes.Name COREMODCONTAINSFMLMOD = new Attributes.Name("FMLCorePluginContainsFMLMod");
|
||||
private static String[] rootPlugins = { "cpw.mods.fml.relauncher.FMLCorePlugin" , "net.minecraftforge.classloading.FMLForgePlugin" };
|
||||
private static List<String> loadedCoremods = new ArrayList<String>();
|
||||
private static Map<IFMLLoadingPlugin, File> pluginLocations;
|
||||
private static List<IFMLLoadingPlugin> loadPlugins;
|
||||
private static List<String> loadedCoremods = Lists.newArrayList();
|
||||
private static List<FMLPluginWrapper> loadPlugins;
|
||||
private static boolean deobfuscatedEnvironment;
|
||||
private static FMLTweaker tweaker;
|
||||
private static File mcDir;
|
||||
private static List<String> reparsedCoremods = Lists.newArrayList();
|
||||
|
||||
public static void handleLaunch(File mcDir, LaunchClassLoader classLoader)
|
||||
private static class FMLPluginWrapper
|
||||
{
|
||||
public final String name;
|
||||
public final IFMLLoadingPlugin coreModInstance;
|
||||
public final List<String> predepends;
|
||||
public final File location;
|
||||
|
||||
public FMLPluginWrapper(String name, IFMLLoadingPlugin coreModInstance, File location, String... predepends)
|
||||
{
|
||||
super();
|
||||
this.name = name;
|
||||
this.coreModInstance = coreModInstance;
|
||||
this.location = location;
|
||||
this.predepends = Lists.newArrayList(predepends);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("%s {%s}", this.name, this.predepends);
|
||||
}
|
||||
}
|
||||
|
||||
public static void handleLaunch(File mcDir, LaunchClassLoader classLoader, FMLTweaker tweaker)
|
||||
{
|
||||
CoreModManager.mcDir = mcDir;
|
||||
CoreModManager.tweaker = tweaker;
|
||||
try
|
||||
{
|
||||
// Are we in a 'decompiled' environment?
|
||||
@@ -73,20 +99,21 @@ public class CoreModManager
|
||||
{
|
||||
FMLRelaunchLog.fine("Enabling runtime deobfuscation");
|
||||
}
|
||||
pluginLocations = new HashMap<IFMLLoadingPlugin, File>();
|
||||
loadPlugins = new ArrayList<IFMLLoadingPlugin>();
|
||||
for (String s : rootPlugins)
|
||||
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
FMLRelaunchLog.finest("Adding coremod for loading %s", s);
|
||||
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) Class.forName(s, true, classLoader).newInstance();
|
||||
loadPlugins.add(plugin);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// HMMM
|
||||
}
|
||||
classLoader.registerTransformer("cpw.mods.fml.common.asm.transformers.PatchingTransformer");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, e, "The patch transformer failed to load! This is critical, loading cannot continue!");
|
||||
throw Throwables.propagate(e);
|
||||
}
|
||||
|
||||
loadPlugins = new ArrayList<FMLPluginWrapper>();
|
||||
for (String rootPluginName : rootPlugins)
|
||||
{
|
||||
loadCoreMod(classLoader, rootPluginName, new File(FMLTweaker.getJarLocation()));
|
||||
}
|
||||
|
||||
if (loadPlugins.isEmpty())
|
||||
@@ -94,111 +121,23 @@ public class CoreModManager
|
||||
throw new RuntimeException("A fatal error has occured - no valid fml load plugin was found - this is a completely corrupt FML installation.");
|
||||
}
|
||||
|
||||
FMLRelaunchLog.fine("All core mods are successfully located");
|
||||
FMLRelaunchLog.fine("All fundamental core mods are successfully located");
|
||||
// Now that we have the root plugins loaded - lets see what else might be around
|
||||
String commandLineCoremods = System.getProperty("fml.coreMods.load","");
|
||||
for (String s : commandLineCoremods.split(","))
|
||||
for (String coreModClassName : commandLineCoremods.split(","))
|
||||
{
|
||||
if (s.isEmpty())
|
||||
if (coreModClassName.isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
FMLRelaunchLog.info("Found a command line coremod : %s", s);
|
||||
try
|
||||
{
|
||||
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())
|
||||
{
|
||||
classLoader.addTransformerExclusion(st);
|
||||
}
|
||||
}
|
||||
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) coreModClass.newInstance();
|
||||
loadPlugins.add(plugin);
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE,e,"Exception occured trying to load coremod %s",s);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
FMLRelaunchLog.info("Found a command line coremod : %s", coreModClassName);
|
||||
loadCoreMod(classLoader, coreModClassName, null);
|
||||
}
|
||||
discoverCoreMods(mcDir, classLoader, loadPlugins);
|
||||
discoverCoreMods(mcDir, classLoader);
|
||||
|
||||
for (IFMLLoadingPlugin plug : loadPlugins)
|
||||
{
|
||||
if (plug.getASMTransformerClass()!=null)
|
||||
{
|
||||
for (String xformClass : plug.getASMTransformerClass())
|
||||
{
|
||||
FMLRelaunchLog.finest("Registering transformer %s", xformClass);
|
||||
classLoader.registerTransformer(xformClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Deobfuscation transformer, always last
|
||||
if (!deobfuscatedEnvironment)
|
||||
{
|
||||
classLoader.registerTransformer("cpw.mods.fml.common.asm.transformers.DeobfuscationTransformer");
|
||||
}
|
||||
FMLRelaunchLog.fine("Running coremod plugins");
|
||||
Map<String,Object> data = new HashMap<String,Object>();
|
||||
data.put("mcLocation", mcDir);
|
||||
data.put("coremodList", loadPlugins);
|
||||
data.put("runtimeDeobfuscationEnabled", !deobfuscatedEnvironment);
|
||||
for (IFMLLoadingPlugin plugin : loadPlugins)
|
||||
{
|
||||
FMLRelaunchLog.fine("Running coremod plugin %s", plugin.getClass().getSimpleName());
|
||||
data.put("coremodLocation", pluginLocations.get(plugin));
|
||||
plugin.injectData(data);
|
||||
String setupClass = plugin.getSetupClass();
|
||||
if (setupClass != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
IFMLCallHook call = (IFMLCallHook) Class.forName(setupClass, true, classLoader).newInstance();
|
||||
Map<String,Object> callData = new HashMap<String, Object>();
|
||||
callData.put("mcLocation", mcDir);
|
||||
callData.put("classLoader", classLoader);
|
||||
callData.put("coremodLocation", pluginLocations.get(plugin));
|
||||
callData.put("deobfuscationFileName", FMLInjectionData.debfuscationDataName());
|
||||
call.injectData(callData);
|
||||
call.call();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
FMLRelaunchLog.fine("Coremod plugin %s run successfully", plugin.getClass().getSimpleName());
|
||||
|
||||
String modContainer = plugin.getModContainerClass();
|
||||
if (modContainer != null)
|
||||
{
|
||||
FMLInjectionData.containers.add(modContainer);
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
FMLRelaunchLog.fine("Validating minecraft");
|
||||
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");
|
||||
m.invoke(null);
|
||||
FMLRelaunchLog.fine("Minecraft validated, launching...");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Load in the Loader, make sure he's ready to roll - this will initialize most of the rest of minecraft here
|
||||
System.out.println("A CRITICAL PROBLEM OCCURED INITIALIZING MINECRAFT - LIKELY YOU HAVE AN INCORRECT VERSION FOR THIS FML");
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void discoverCoreMods(File mcDir, LaunchClassLoader classLoader, List<IFMLLoadingPlugin> loadPlugins)
|
||||
private static void discoverCoreMods(File mcDir, LaunchClassLoader classLoader)
|
||||
{
|
||||
FMLRelaunchLog.fine("Discovering coremods");
|
||||
File coreMods = setupCoreModDir(mcDir);
|
||||
@@ -223,7 +162,7 @@ public class CoreModManager
|
||||
for (File coreMod : coreModList)
|
||||
{
|
||||
FMLRelaunchLog.fine("Examining for coremod candidacy %s", coreMod.getName());
|
||||
JarFile jar;
|
||||
JarFile jar = null;
|
||||
Attributes mfAttributes;
|
||||
try
|
||||
{
|
||||
@@ -240,77 +179,70 @@ public class CoreModManager
|
||||
FMLRelaunchLog.log(Level.SEVERE, ioe, "Unable to read the jar file %s - ignoring", coreMod.getName());
|
||||
continue;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (jar!=null)
|
||||
{
|
||||
try
|
||||
{
|
||||
jar.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
// Noise
|
||||
}
|
||||
}
|
||||
}
|
||||
String cascadedTweaker = mfAttributes.getValue("TweakClass");
|
||||
if (cascadedTweaker != null)
|
||||
{
|
||||
FMLRelaunchLog.info("Loading tweaker %s from %s", cascadedTweaker, coreMod.getName());
|
||||
handleCascadingTweak(coreMod, jar, cascadedTweaker, classLoader);
|
||||
loadedCoremods.add(coreMod.getName());
|
||||
continue;
|
||||
}
|
||||
|
||||
String fmlCorePlugin = mfAttributes.getValue("FMLCorePlugin");
|
||||
if (fmlCorePlugin == null)
|
||||
{
|
||||
// Not a coremod
|
||||
FMLRelaunchLog.fine("Not found coremod data in %s", coreMod.getName());
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
classLoader.addURL(coreMod.toURI().toURL());
|
||||
loadedCoremods.add(coreMod.getName());
|
||||
if (!mfAttributes.containsKey(COREMODCONTAINSFMLMOD))
|
||||
{
|
||||
FMLRelaunchLog.finest("Adding %s to the list of known coremods, it will not be examined again", coreMod.getName());
|
||||
loadedCoremods.add(coreMod.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLRelaunchLog.finest("Found FMLCorePluginContainsFMLMod marker in %s, it will be examined later for regular @Mod instances", coreMod.getName());
|
||||
reparsedCoremods.add(coreMod.getName());
|
||||
}
|
||||
}
|
||||
catch (MalformedURLException e)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, e, "Unable to convert file into a URL. weird");
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
FMLRelaunchLog.fine("Loading coremod %s", coreMod.getName());
|
||||
classLoader.addTransformerExclusion(fmlCorePlugin);
|
||||
Class<?> coreModClass = Class.forName(fmlCorePlugin, true, classLoader);
|
||||
MCVersion requiredMCVersion = coreModClass.getAnnotation(IFMLLoadingPlugin.MCVersion.class);
|
||||
String version = "";
|
||||
if (requiredMCVersion == null)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.WARNING, "The coremod %s does not have a MCVersion annotation, it may cause issues with this version of Minecraft", fmlCorePlugin);
|
||||
}
|
||||
else
|
||||
{
|
||||
version = requiredMCVersion.value();
|
||||
}
|
||||
if (!"".equals(version) && !FMLInjectionData.mccversion.equals(version))
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, "The coremod %s is requesting minecraft version %s and minecraft is %s. It will be ignored.", fmlCorePlugin, version, FMLInjectionData.mccversion);
|
||||
continue;
|
||||
}
|
||||
else if (!"".equals(version))
|
||||
{
|
||||
FMLRelaunchLog.log(Level.FINE, "The coremod %s requested minecraft version %s and minecraft is %s. It will be loaded.", fmlCorePlugin, version, FMLInjectionData.mccversion);
|
||||
}
|
||||
TransformerExclusions trExclusions = coreModClass.getAnnotation(IFMLLoadingPlugin.TransformerExclusions.class);
|
||||
if (trExclusions!=null)
|
||||
{
|
||||
for (String st : trExclusions.value())
|
||||
{
|
||||
classLoader.addTransformerExclusion(st);
|
||||
}
|
||||
}
|
||||
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) coreModClass.newInstance();
|
||||
loadPlugins.add(plugin);
|
||||
pluginLocations .put(plugin, coreMod);
|
||||
FMLRelaunchLog.fine("Loaded coremod %s", coreMod.getName());
|
||||
}
|
||||
catch (ClassNotFoundException cnfe)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, cnfe, "Coremod %s: Unable to class load the plugin %s", coreMod.getName(), fmlCorePlugin);
|
||||
}
|
||||
catch (ClassCastException cce)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, cce, "Coremod %s: The plugin %s is not an implementor of IFMLLoadingPlugin", coreMod.getName(), fmlCorePlugin);
|
||||
}
|
||||
catch (InstantiationException ie)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, ie, "Coremod %s: The plugin class %s was not instantiable", coreMod.getName(), fmlCorePlugin);
|
||||
}
|
||||
catch (IllegalAccessException iae)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, iae, "Coremod %s: The plugin class %s was not accessible", coreMod.getName(), fmlCorePlugin);
|
||||
}
|
||||
loadCoreMod(classLoader, fmlCorePlugin, coreMod);
|
||||
}
|
||||
}
|
||||
|
||||
private static void handleCascadingTweak(File coreMod, JarFile jar, String cascadedTweaker, LaunchClassLoader classLoader)
|
||||
{
|
||||
try
|
||||
{
|
||||
classLoader.addURL(coreMod.toURI().toURL());
|
||||
CoreModManager.tweaker.injectCascadingTweak(cascadedTweaker);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.INFO, e, "There was a problem trying to load the mod dir tweaker %s", coreMod.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,4 +276,189 @@ public class CoreModManager
|
||||
{
|
||||
return loadedCoremods;
|
||||
}
|
||||
|
||||
public static List<String> getReparseableCoremods()
|
||||
{
|
||||
return reparsedCoremods;
|
||||
}
|
||||
|
||||
private static FMLPluginWrapper loadCoreMod(LaunchClassLoader classLoader, String coreModClass, File location)
|
||||
{
|
||||
String coreModName = coreModClass.substring(coreModClass.lastIndexOf('.')+1);
|
||||
try
|
||||
{
|
||||
FMLRelaunchLog.fine("Instantiating coremod class %s", coreModName);
|
||||
classLoader.addTransformerExclusion(coreModClass);
|
||||
Class<?> coreModClazz = Class.forName(coreModClass, true, classLoader);
|
||||
Name coreModNameAnn = coreModClazz.getAnnotation(IFMLLoadingPlugin.Name.class);
|
||||
if (coreModNameAnn!=null && !Strings.isNullOrEmpty(coreModNameAnn.value()))
|
||||
{
|
||||
coreModName = coreModNameAnn.value();
|
||||
FMLRelaunchLog.finest("coremod named %s is loading", coreModName);
|
||||
}
|
||||
MCVersion requiredMCVersion = coreModClazz.getAnnotation(IFMLLoadingPlugin.MCVersion.class);
|
||||
if (!Arrays.asList(rootPlugins).contains(coreModClass) && (requiredMCVersion == null || Strings.isNullOrEmpty(requiredMCVersion.value())))
|
||||
{
|
||||
FMLRelaunchLog.log(Level.WARNING, "The coremod %s does not have a MCVersion annotation, it may cause issues with this version of Minecraft", coreModClass);
|
||||
}
|
||||
else if (requiredMCVersion!=null && !FMLInjectionData.mccversion.equals(requiredMCVersion.value()))
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, "The coremod %s is requesting minecraft version %s and minecraft is %s. It will be ignored.", coreModClass, requiredMCVersion.value(), FMLInjectionData.mccversion);
|
||||
return null;
|
||||
}
|
||||
else if (requiredMCVersion!=null)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.FINE, "The coremod %s requested minecraft version %s and minecraft is %s. It will be loaded.", coreModClass, requiredMCVersion.value(), FMLInjectionData.mccversion);
|
||||
}
|
||||
TransformerExclusions trExclusions = coreModClazz.getAnnotation(IFMLLoadingPlugin.TransformerExclusions.class);
|
||||
if (trExclusions!=null)
|
||||
{
|
||||
for (String st : trExclusions.value())
|
||||
{
|
||||
classLoader.addTransformerExclusion(st);
|
||||
}
|
||||
}
|
||||
DependsOn deplist = coreModClazz.getAnnotation(IFMLLoadingPlugin.DependsOn.class);
|
||||
String[] dependencies = new String[0];
|
||||
if (deplist != null)
|
||||
{
|
||||
dependencies = deplist.value();
|
||||
}
|
||||
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) coreModClazz.newInstance();
|
||||
FMLPluginWrapper wrap = new FMLPluginWrapper(coreModName, plugin, location, dependencies);
|
||||
|
||||
loadPlugins.add(wrap);
|
||||
FMLRelaunchLog.fine("Loaded coremod %s", coreModName);
|
||||
return wrap;
|
||||
}
|
||||
catch (ClassNotFoundException cnfe)
|
||||
{
|
||||
if (!Lists.newArrayList(rootPlugins).contains(coreModClass))
|
||||
FMLRelaunchLog.log(Level.SEVERE, cnfe, "Coremod %s: Unable to class load the plugin %s", coreModName, coreModClass);
|
||||
else
|
||||
FMLRelaunchLog.fine("Skipping root plugin %s", coreModClass);
|
||||
}
|
||||
catch (ClassCastException cce)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, cce, "Coremod %s: The plugin %s is not an implementor of IFMLLoadingPlugin", coreModName, coreModClass);
|
||||
}
|
||||
catch (InstantiationException ie)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, ie, "Coremod %s: The plugin class %s was not instantiable", coreModName, coreModClass);
|
||||
}
|
||||
catch (IllegalAccessException iae)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, iae, "Coremod %s: The plugin class %s was not accessible", coreModName, coreModClass);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void sortCoreMods()
|
||||
{
|
||||
TopologicalSort.DirectedGraph<FMLPluginWrapper> sortGraph = new TopologicalSort.DirectedGraph<FMLPluginWrapper>();
|
||||
Map<String, FMLPluginWrapper> pluginMap = Maps.newHashMap();
|
||||
for (FMLPluginWrapper plug : loadPlugins)
|
||||
{
|
||||
sortGraph.addNode(plug);
|
||||
pluginMap.put(plug.name, plug);
|
||||
}
|
||||
|
||||
for (FMLPluginWrapper plug : loadPlugins)
|
||||
{
|
||||
for (String dep : plug.predepends)
|
||||
{
|
||||
if (!pluginMap.containsKey(dep))
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, "Missing coremod dependency - the coremod %s depends on coremod %s which isn't present.", plug.name, dep);
|
||||
throw new RuntimeException();
|
||||
}
|
||||
sortGraph.addEdge(plug, pluginMap.get(dep));
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
loadPlugins = TopologicalSort.topologicalSort(sortGraph);
|
||||
FMLRelaunchLog.fine("Sorted coremod list %s", loadPlugins);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.log(Level.SEVERE, e, "There was a problem performing the coremod sort");
|
||||
throw Throwables.propagate(e);
|
||||
}
|
||||
}
|
||||
public static void injectTransformers(LaunchClassLoader classLoader)
|
||||
{
|
||||
|
||||
for (FMLPluginWrapper wrap : loadPlugins)
|
||||
{
|
||||
IFMLLoadingPlugin plug = wrap.coreModInstance;
|
||||
if (plug.getASMTransformerClass()!=null)
|
||||
{
|
||||
for (String xformClass : plug.getASMTransformerClass())
|
||||
{
|
||||
FMLRelaunchLog.finest("Registering transformer %s", xformClass);
|
||||
classLoader.registerTransformer(xformClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
FMLRelaunchLog.fine("Running coremod plugins");
|
||||
Map<String,Object> data = new HashMap<String,Object>();
|
||||
data.put("mcLocation", mcDir);
|
||||
data.put("coremodList", loadPlugins);
|
||||
data.put("runtimeDeobfuscationEnabled", !deobfuscatedEnvironment);
|
||||
for (FMLPluginWrapper pluginWrapper : loadPlugins)
|
||||
{
|
||||
IFMLLoadingPlugin plugin = pluginWrapper.coreModInstance;
|
||||
FMLRelaunchLog.fine("Running coremod plugin %s", pluginWrapper.name);
|
||||
data.put("coremodLocation", pluginWrapper.location);
|
||||
plugin.injectData(data);
|
||||
String setupClass = plugin.getSetupClass();
|
||||
if (setupClass != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
IFMLCallHook call = (IFMLCallHook) Class.forName(setupClass, true, classLoader).newInstance();
|
||||
Map<String,Object> callData = new HashMap<String, Object>();
|
||||
callData.put("mcLocation", mcDir);
|
||||
callData.put("classLoader", classLoader);
|
||||
callData.put("coremodLocation", pluginWrapper.location);
|
||||
callData.put("deobfuscationFileName", FMLInjectionData.debfuscationDataName());
|
||||
call.injectData(callData);
|
||||
call.call();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
FMLRelaunchLog.fine("Coremod plugin %s run successfully", plugin.getClass().getSimpleName());
|
||||
|
||||
String modContainer = plugin.getModContainerClass();
|
||||
if (modContainer != null)
|
||||
{
|
||||
FMLInjectionData.containers.add(modContainer);
|
||||
}
|
||||
}
|
||||
// Deobfuscation transformer, always last
|
||||
if (!deobfuscatedEnvironment)
|
||||
{
|
||||
classLoader.registerTransformer("cpw.mods.fml.common.asm.transformers.DeobfuscationTransformer");
|
||||
}
|
||||
try
|
||||
{
|
||||
FMLRelaunchLog.fine("Validating minecraft");
|
||||
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");
|
||||
m.invoke(null);
|
||||
FMLRelaunchLog.fine("Minecraft validated, launching...");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Load in the Loader, make sure he's ready to roll - this will initialize most of the rest of minecraft here
|
||||
System.out.println("A CRITICAL PROBLEM OCCURED INITIALIZING MINECRAFT - LIKELY YOU HAVE AN INCORRECT VERSION FOR THIS FML");
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,6 @@ 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",
|
||||
|
||||
@@ -87,7 +87,7 @@ public class FMLLaunchHandler
|
||||
|
||||
try
|
||||
{
|
||||
CoreModManager.handleLaunch(minecraftHome, classLoader);
|
||||
CoreModManager.handleLaunch(minecraftHome, classLoader, tweaker);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
@@ -101,4 +101,15 @@ public class FMLLaunchHandler
|
||||
{
|
||||
return side;
|
||||
}
|
||||
|
||||
|
||||
private void injectPostfixTransformers()
|
||||
{
|
||||
CoreModManager.injectTransformers(classLoader);
|
||||
}
|
||||
|
||||
public static void appendCoreMods()
|
||||
{
|
||||
INSTANCE.injectPostfixTransformers();
|
||||
}
|
||||
}
|
||||
@@ -102,4 +102,24 @@ public interface IFMLLoadingPlugin
|
||||
{
|
||||
public String value() default "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Name this coremod something other than the "short class name"
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface Name
|
||||
{
|
||||
public String value() default "";
|
||||
}
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface DependsOn
|
||||
{
|
||||
public String[] value() default {};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,7 +12,18 @@
|
||||
*/
|
||||
package cpw.mods.fml.server;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.MapDifference;
|
||||
@@ -23,8 +34,10 @@ import net.minecraft.network.packet.NetHandler;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.packet.Packet131MapData;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.StringTranslate;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.IFMLSidedHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
@@ -193,6 +206,63 @@ public class FMLServerHandler implements IFMLSidedHandler
|
||||
@Override
|
||||
public void addModAsResource(ModContainer container)
|
||||
{
|
||||
// NOOP on server
|
||||
File source = container.getSource();
|
||||
try
|
||||
{
|
||||
if (source.isDirectory())
|
||||
{
|
||||
searchDirForENUSLanguage(source,"");
|
||||
}
|
||||
else
|
||||
{
|
||||
searchZipForENUSLanguage(source);
|
||||
}
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
private static final Pattern assetENUSLang = Pattern.compile("assets/(.*)/lang/en_US.lang");
|
||||
private void searchZipForENUSLanguage(File source) throws IOException
|
||||
{
|
||||
ZipFile zf = new ZipFile(source);
|
||||
for (ZipEntry ze : Collections.list(zf.entries()))
|
||||
{
|
||||
Matcher matcher = assetENUSLang.matcher(ze.getName());
|
||||
if (matcher.matches())
|
||||
{
|
||||
FMLLog.fine("Injecting found translation data in zip file %s at %s into language system", source.getName(), ze.getName());
|
||||
StringTranslate.inject(zf.getInputStream(ze));
|
||||
}
|
||||
}
|
||||
zf.close();
|
||||
}
|
||||
private void searchDirForENUSLanguage(File source, String path) throws IOException
|
||||
{
|
||||
for (File file : source.listFiles())
|
||||
{
|
||||
String currPath = path+file.getName();
|
||||
if (file.isDirectory())
|
||||
{
|
||||
searchDirForENUSLanguage(file, currPath+'/');
|
||||
}
|
||||
Matcher matcher = assetENUSLang.matcher(currPath);
|
||||
if (matcher.matches())
|
||||
{
|
||||
FMLLog.fine("Injecting found translation data at %s into language system", currPath);
|
||||
StringTranslate.inject(new FileInputStream(file));
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void updateResourcePackList()
|
||||
{
|
||||
|
||||
}
|
||||
@Override
|
||||
public String getCurrentLanguage()
|
||||
{
|
||||
return "en_US";
|
||||
}
|
||||
}
|
||||
+39
-37
@@ -1,76 +1,78 @@
|
||||
#Main FML Access Transformer configuration file
|
||||
# TileEntity addMapping
|
||||
public asm.a(Ljava/lang/Class;Ljava/lang/String;)V #MD:TileEntity/func_70306_a
|
||||
public asp.a(Ljava/lang/Class;Ljava/lang/String;)V #MD:TileEntity/func_70306_a
|
||||
# EntityList addMappings
|
||||
public ns.a(Ljava/lang/Class;Ljava/lang/String;I)V #MD:EntityList/func_75618_a
|
||||
public ns.a(Ljava/lang/Class;Ljava/lang/String;III)V #MD:EntityList/func_75614_a
|
||||
public ns.b #FD:EntityList/field_75625_b #nameToClassMap
|
||||
public ns.c #FD:EntityList/field_75626_c #classToNameMap
|
||||
public ns.d #FD:EntityList/field_75623_d #idToClassMap
|
||||
public nt.a(Ljava/lang/Class;Ljava/lang/String;I)V #MD:EntityList/func_75618_a
|
||||
public nt.a(Ljava/lang/Class;Ljava/lang/String;III)V #MD:EntityList/func_75614_a
|
||||
public nt.b #FD:EntityList/field_75625_b #nameToClassMap
|
||||
public nt.c #FD:EntityList/field_75626_c #classToNameMap
|
||||
public nt.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 # -- MISSING MAPPING
|
||||
# RenderManager
|
||||
public bgi.q #FD:RenderManager/field_78729_o #renderers
|
||||
public bgl.q #FD:RenderManager/field_78729_o #renderers
|
||||
# RenderBlocks - everything
|
||||
public bfo.* #FD:RenderBlocks/*
|
||||
public bfo.*() #MD:RenderBlocks/*
|
||||
public bfr.* #FD:RenderBlocks/*
|
||||
public bfr.*() #MD:RenderBlocks/*
|
||||
#RenderPlayer
|
||||
#public-f bht.h #FD:RenderPlayer/field_77110_j #armorlist # -- MISSING MAPPING
|
||||
#RenderBiped
|
||||
public-f bgr.l #FD:RenderBiped/field_82424_k #armorlist
|
||||
public-f bgu.l #FD:RenderBiped/field_82424_k #armorlist
|
||||
#StringTranslate
|
||||
#public bp.b #FD:StringTranslate/field_74815_b # -- MISSING MAPPING
|
||||
#public bp.e #FD:StringTranslate/field_74813_d # -- MISSING MAPPING
|
||||
# TileEntityRenderer
|
||||
public bja.m #FD:TileEntityRenderer/field_76966_m
|
||||
public bje.m #FD:TileEntityRenderer/field_76966_m
|
||||
# CraftingManager - make the add recipe methods public
|
||||
public aae.a(Lyd;[Ljava/lang/Object;)Laah; #MD:CraftingManager/func_92103_a
|
||||
public aae.b(Lyd;[Ljava/lang/Object;)V #MD:CraftingManager/func_77596_b
|
||||
public aaf.a(Lye;[Ljava/lang/Object;)Laai; #MD:CraftingManager/func_92103_a
|
||||
public aaf.b(Lye;[Ljava/lang/Object;)V #MD:CraftingManager/func_77596_b
|
||||
# WeightedRandomItem
|
||||
public mi.a #FD:WeightedRandomItem/field_76292_a #probability
|
||||
public mj.a #FD:WeightedRandomItem/field_76292_a #probability
|
||||
# ItemStack
|
||||
#public+f tv.c #FD:ItemStack/field_77993_c #itemId
|
||||
# StatBase
|
||||
public kt.a #FD:StatBase/field_75978_a #statName
|
||||
public ku.a #FD:StatBase/field_75978_a #statName
|
||||
# NetLoginHandler
|
||||
public jx.a(Ljx;Z)Z #MD:NetLoginHandler/func_72531_a #'complete connection'
|
||||
public jx.g #FD:NetLoginHandler/field_72543_h #userName
|
||||
public jy.a(Ljy;Z)Z #MD:NetLoginHandler/func_72531_a #'complete connection'
|
||||
public jy.g #FD:NetLoginHandler/field_72543_h #userName
|
||||
# EntityPlayerMP getNextWindowId
|
||||
public ju.bM()V #MD:EntityPlayerMP/func_71117_bO
|
||||
public ju.bX #FD:EntityPlayerMP/field_71139_cq
|
||||
public jv.bN()V #MD:EntityPlayerMP/func_71117_bO
|
||||
public jv.bY #FD:EntityPlayerMP/field_71139_cq
|
||||
# EntityAITaskEntry
|
||||
public pt #CL:EntityAITaskEntry
|
||||
public pu #CL:EntityAITaskEntry
|
||||
# EntityAITasks
|
||||
public ps.a #FD:EntityAITasks/field_75782_a #taskList
|
||||
public pt.a #FD:EntityAITasks/field_75782_a #taskList
|
||||
# BlockChest
|
||||
public anh.m(Labv;III)Z #MD:BlockChest/func_72292_n #isOcelotBlockingChest
|
||||
public ank.m(Labw;III)Z #MD:BlockChest/func_72292_n #isOcelotBlockingChest
|
||||
# EntityLiving
|
||||
#public ng.aU #FD:EntityLiving/field_70736_aM #carryoverDamage # -- MISSING MAPPING
|
||||
public of.c #FD:EntityLiving/field_70714_bg #tasks
|
||||
public og.c #FD:EntityLiving/field_70714_bg #tasks
|
||||
#public ng.bG #FD:EntityLiving/field_70703_bu #isJumping # -- MISSING MAPPING
|
||||
# EntityAIOcelotSit
|
||||
protected qf.a(Labv;III)Z #MD:EntityAIOcelotSit/func_75398_a #nearestSittableBlock
|
||||
protected qf.f()Z #MD:EntityAIOcelotSit/func_75399_f #isblocksittable
|
||||
protected qg.a(Labw;III)Z #MD:EntityAIOcelotSit/func_75398_a #nearestSittableBlock
|
||||
protected qg.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 ro.bp #FD:EntityAnimal/field_70881_d #inLove
|
||||
public rp.bp #FD:EntityAnimal/field_70881_d #inLove
|
||||
# WorldType
|
||||
public acf.<init>(ILjava/lang/String;)V #MD:WorldType/<init>(ILjava/lang/String;)
|
||||
public acf.<init>(ILjava/lang/String;I)V #MD:WorldType/<init>(ILjava/lang/String;I)
|
||||
public acg.<init>(ILjava/lang/String;)V #MD:WorldType/<init>(ILjava/lang/String;)
|
||||
public acg.<init>(ILjava/lang/String;I)V #MD:WorldType/<init>(ILjava/lang/String;I)
|
||||
# ComponentVillage
|
||||
public ajj #CL:ComponentVillage
|
||||
public ajm #CL:ComponentVillage
|
||||
# StructureStart
|
||||
public aiv.a #FD:StructureStart/field_75075_a
|
||||
# EntityVillager - minmax lists
|
||||
public ua.a(Labl;ILjava/util/Random;F)V #MD:EntityVillager/func_70948_a #addBuy
|
||||
public ua.b(Labl;ILjava/util/Random;F)V #MD:EntityVillager/func_70949_b #addSell
|
||||
public ua.bB #FD:EntityVillager/field_70958_bB
|
||||
public ua.bC #FD:EntityVillager/field_70960_bC
|
||||
public ub.a(Labm;ILjava/util/Random;F)V #MD:EntityVillager/func_70948_a #addBuy
|
||||
public ub.b(Labm;ILjava/util/Random;F)V #MD:EntityVillager/func_70949_b #addSell
|
||||
public ub.bB #FD:EntityVillager/field_70958_bB
|
||||
public ub.bC #FD:EntityVillager/field_70960_bC
|
||||
# GuiButtonMerchant
|
||||
public axu #CL:GuiButtonMerchant
|
||||
public axx #CL:GuiButtonMerchant
|
||||
|
||||
protected auu.a #FD:GuiYesNo/field_73942_a #guiScreen
|
||||
protected aux.a #FD:GuiYesNo/field_73942_a #guiScreen
|
||||
# Minecraft
|
||||
public ats.D #FD:Minecraft/field_71425_J #running
|
||||
public ats.N #FD:Minecraft/field_71446_o # textureManager
|
||||
public atv.D #FD:Minecraft/field_71425_J #running
|
||||
public atv.N #FD:Minecraft/field_71446_o # textureManager
|
||||
@@ -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
|
||||
ue cpw/mods/fml/common/network/Player
|
||||
uf cpw/mods/fml/common/network/Player
|
||||
net.minecraft.entity.player.EntityPlayer cpw/mods/fml/common/network/Player
|
||||
# block -> blockproxy
|
||||
aqw cpw/mods/fml/common/registry/BlockProxy
|
||||
aqz cpw/mods/fml/common/registry/BlockProxy
|
||||
net.minecraft.block.Block cpw/mods/fml/common/registry/BlockProxy
|
||||
# item -> itemproxy
|
||||
yb cpw/mods/fml/common/registry/ItemProxy
|
||||
yc cpw/mods/fml/common/registry/ItemProxy
|
||||
net.minecraft.item.Item cpw/mods/fml/common/registry/ItemProxy
|
||||
+3
-3
@@ -3,9 +3,9 @@
|
||||
"modid": "mcp",
|
||||
"name": "Minecraft Coder Pack",
|
||||
"description": "Modding toolkit to decompile and deobfuscate the Minecraft client and server files.",
|
||||
"version": "8.04",
|
||||
"mcversion": "1.6.2",
|
||||
"logoFile": "/mcp.png",
|
||||
"version": "8.09",
|
||||
"mcversion": "1.6.3",
|
||||
"logoFile": "/mcplogo.png",
|
||||
"url": "http://mcp.ocean-labs.de/",
|
||||
"updateUrl": "",
|
||||
"authors": ["Searge", "ProfMobius", "IngisKahn", "Fesh0r", "ZeuX", "R4wk", "Others"],
|
||||
|
||||
+490
-742
File diff suppressed because it is too large.
Load diff
+454
-188
File diff suppressed because it is too large.
Load diff
+18330
-18228
File diff suppressed because it is too large.
Load diff
+4
-4
@@ -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 = 9356f3ad44925a684e918b9270b63a6c
|
||||
MD5Server = 39df9f29e6904ea7b351ffb4fe949881
|
||||
MD5Client = 233effe2110d40a0519cf1489e4ccb1c
|
||||
MD5Server = 8ed981ab6030412f586bfe38ff0aaa82
|
||||
|
||||
[RETROGUARD]
|
||||
Location = %(DirRuntime)s/bin/retroguard.jar
|
||||
@@ -127,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 = 142000
|
||||
ParamIndex = 42000
|
||||
RGIndex = 143000
|
||||
ParamIndex = 43000
|
||||
|
||||
[ASTYLE]
|
||||
AstyleConfig = %(DirConf)s/astyle.cfg
|
||||
|
||||
+465
-407
File diff suppressed because it is too large.
Load diff
+5
-1
@@ -537,7 +537,6 @@ 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
|
||||
@@ -605,6 +604,7 @@ CommandServerSay,net/minecraft/command
|
||||
CommandServerStop,net/minecraft/command
|
||||
CommandServerTp,net/minecraft/command
|
||||
CommandServerWhitelist,net/minecraft/command
|
||||
CommandSetPlayerTimeout,net/minecraft/command
|
||||
CommandSetSpawnpoint,net/minecraft/command
|
||||
CommandShowSeed,net/minecraft/command
|
||||
CommandSpreadPlayers,net/minecraft/command
|
||||
@@ -1298,6 +1298,7 @@ MovementInput,net/minecraft/util
|
||||
MovementInputFromOptions,net/minecraft/util
|
||||
MovingObjectPosition,net/minecraft/util
|
||||
ReportedException,net/minecraft/util
|
||||
ResourceLocation,net/minecraft/util
|
||||
ScreenShotHelper,net/minecraft/util
|
||||
Session,net/minecraft/util
|
||||
StatCollector,net/minecraft/util
|
||||
@@ -1482,6 +1483,7 @@ ComponentNetherBridgeThrone,net/minecraft/world/gen/structure
|
||||
ComponentScatteredFeature,net/minecraft/world/gen/structure
|
||||
ComponentScatteredFeatureDesertPyramid,net/minecraft/world/gen/structure
|
||||
ComponentScatteredFeatureJunglePyramid,net/minecraft/world/gen/structure
|
||||
ComponentScatteredFeaturePieces,net/minecraft/world/gen/structure
|
||||
ComponentScatteredFeaturePieces2,net/minecraft/world/gen/structure
|
||||
ComponentScatteredFeatureSwampHut,net/minecraft/world/gen/structure
|
||||
ComponentStronghold,net/minecraft/world/gen/structure
|
||||
@@ -1519,6 +1521,8 @@ MapGenMineshaft,net/minecraft/world/gen/structure
|
||||
MapGenNetherBridge,net/minecraft/world/gen/structure
|
||||
MapGenStronghold,net/minecraft/world/gen/structure
|
||||
MapGenStructure,net/minecraft/world/gen/structure
|
||||
MapGenStructureData,net/minecraft/world/gen/structure
|
||||
MapGenStructureIO,net/minecraft/world/gen/structure
|
||||
MapGenVillage,net/minecraft/world/gen/structure
|
||||
StructureBoundingBox,net/minecraft/world/gen/structure
|
||||
StructureComponent,net/minecraft/world/gen/structure
|
||||
|
||||
|
@@ -739,6 +739,7 @@ p_130129_1_,par1Session,2
|
||||
p_130220_1_,par1AbstractClientPlayer,2
|
||||
p_130220_2_,par2,2
|
||||
p_130220_3_,par3,2
|
||||
p_130225_1_,par1,2
|
||||
p_135011_0_,par0GuiLanguage,2
|
||||
p_135020_1_,par1JsonElement,2
|
||||
p_135020_2_,par2Type,2
|
||||
@@ -831,6 +832,43 @@ p_142038_2_,par2,2
|
||||
p_142038_3_,par3,2
|
||||
p_142053_1_,par1Str,2
|
||||
p_142054_1_,par1Team,2
|
||||
p_143006_1_,par1,2
|
||||
p_143009_1_,par1World,2
|
||||
p_143009_2_,par2NBTTagCompound,2
|
||||
p_143011_1_,par1NBTTagCompound,2
|
||||
p_143012_1_,par1NBTTagCompound,2
|
||||
p_143017_1_,par1NBTTagCompound,2
|
||||
p_143020_1_,par1World,2
|
||||
p_143020_2_,par2NBTTagCompound,2
|
||||
p_143021_1_,par1,2
|
||||
p_143021_2_,par2,2
|
||||
p_143022_1_,par1NBTTagCompound,2
|
||||
p_143026_1_,par1,2
|
||||
p_143026_2_,par2,2
|
||||
p_143026_3_,par3StructureStart,2
|
||||
p_143027_1_,par1World,2
|
||||
p_143028_1_,par1,2
|
||||
p_143028_2_,par2,2
|
||||
p_143028_3_,par3,2
|
||||
p_143030_1_,par1,2
|
||||
p_143030_2_,par2,2
|
||||
p_143030_3_,par3,2
|
||||
p_143031_0_,par0Class,2
|
||||
p_143031_1_,par1Str,2
|
||||
p_143032_0_,par0NBTTagCompound,2
|
||||
p_143032_1_,par1World,2
|
||||
p_143033_0_,par0StructureStart,2
|
||||
p_143034_0_,par0Class,2
|
||||
p_143034_1_,par1Str,2
|
||||
p_143035_0_,par0NBTTagCompound,2
|
||||
p_143035_1_,par1World,2
|
||||
p_143036_0_,par0StructureComponent,2
|
||||
p_143042_1_,par1,2
|
||||
p_143042_2_,par2,2
|
||||
p_143043_1_,par1NBTTagCompound,2
|
||||
p_143043_2_,par2,2
|
||||
p_143043_3_,par3,2
|
||||
p_143047_1_,par1Str,2
|
||||
p_70000_1_,par1PlayerUsageSnooper,2
|
||||
p_70001_1_,par1PlayerUsageSnooper,2
|
||||
p_70003_1_,par1,2
|
||||
@@ -11683,6 +11721,10 @@ p_i2367_1_,par1MinecraftServer,2
|
||||
p_i2368_1_,par1StatsComponent,2
|
||||
p_i2369_1_,par1JTextArea,2
|
||||
p_i2370_1_,par1TextAreaLogHandler,2
|
||||
p_i43000_1_,par1ArrayOfInteger,2
|
||||
p_i43001_1_,par1Str,2
|
||||
p_i43002_1_,par1,2
|
||||
p_i43002_2_,par2,2
|
||||
p_main_0_,par0ArrayOfStr,2
|
||||
p_openConnection_1_,par1URL,2
|
||||
p_paint_1_,par1Graphics,2
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
diff -r -U 3 minecraft\net\minecraft\src\CallableSuspiciousClasses.java minecraft_patched\net\minecraft\src\CallableSuspiciousClasses.java
|
||||
--- minecraft\net\minecraft\src\CallableSuspiciousClasses.java Sun Jul 07 12:38:55 2013
|
||||
+++ minecraft_patched\net\minecraft\src\CallableSuspiciousClasses.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\CallableSuspiciousClasses.java Tue Sep 17 13:58:48 2013
|
||||
+++ minecraft_patched\net\minecraft\src\CallableSuspiciousClasses.java Tue Sep 17 14:01:01 2013
|
||||
@@ -21,9 +21,14 @@
|
||||
|
||||
public String func_85085_a() throws SecurityException, NoSuchFieldException, IllegalAccessException, IllegalArgumentException {
|
||||
@@ -29,8 +29,8 @@ diff -r -U 3 minecraft\net\minecraft\src\CallableSuspiciousClasses.java minecraf
|
||||
}
|
||||
}
|
||||
diff -r -U 3 minecraft\net\minecraft\src\ComponentStrongholdRightTurn.java minecraft_patched\net\minecraft\src\ComponentStrongholdRightTurn.java
|
||||
--- minecraft\net\minecraft\src\ComponentStrongholdRightTurn.java Sun Jul 07 12:38:55 2013
|
||||
+++ minecraft_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\ComponentStrongholdRightTurn.java Tue Sep 17 13:58:48 2013
|
||||
+++ minecraft_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Tue Sep 17 14:01:01 2013
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
public class ComponentStrongholdRightTurn extends ComponentStrongholdLeftTurn {
|
||||
@@ -43,9 +43,9 @@ diff -r -U 3 minecraft\net\minecraft\src\ComponentStrongholdRightTurn.java minec
|
||||
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 Sun Jul 07 12:38:56 2013
|
||||
+++ minecraft_patched\net\minecraft\src\DedicatedServer.java Sun Jul 07 12:40:48 2013
|
||||
@@ -207,7 +207,7 @@
|
||||
--- minecraft\net\minecraft\src\DedicatedServer.java Tue Sep 17 13:58:48 2013
|
||||
+++ minecraft_patched\net\minecraft\src\DedicatedServer.java Tue Sep 17 14:01:01 2013
|
||||
@@ -208,7 +208,7 @@
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
@@ -55,8 +55,8 @@ diff -r -U 3 minecraft\net\minecraft\src\DedicatedServer.java minecraft_patched\
|
||||
this.func_71333_ah();
|
||||
}
|
||||
diff -r -U 3 minecraft\net\minecraft\src\EnumChatFormatting.java minecraft_patched\net\minecraft\src\EnumChatFormatting.java
|
||||
--- minecraft\net\minecraft\src\EnumChatFormatting.java Sun Jul 07 12:38:56 2013
|
||||
+++ minecraft_patched\net\minecraft\src\EnumChatFormatting.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\EnumChatFormatting.java Tue Sep 17 13:58:49 2013
|
||||
+++ minecraft_patched\net\minecraft\src\EnumChatFormatting.java Tue Sep 17 14:01:01 2013
|
||||
@@ -38,7 +38,7 @@
|
||||
private final String field_96304_B;
|
||||
|
||||
@@ -67,8 +67,8 @@ diff -r -U 3 minecraft\net\minecraft\src\EnumChatFormatting.java minecraft_patch
|
||||
|
||||
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 Jul 07 12:38:56 2013
|
||||
+++ minecraft_patched\net\minecraft\src\FileResourcePack.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\FileResourcePack.java Tue Sep 17 13:58:49 2013
|
||||
+++ minecraft_patched\net\minecraft\src\FileResourcePack.java Tue Sep 17 14:01:01 2013
|
||||
@@ -84,12 +84,18 @@
|
||||
|
||||
protected void finalize() {
|
||||
@@ -89,8 +89,8 @@ diff -r -U 3 minecraft\net\minecraft\src\FileResourcePack.java minecraft_patched
|
||||
}
|
||||
|
||||
diff -r -U 3 minecraft\net\minecraft\src\FolderResourcePack.java minecraft_patched\net\minecraft\src\FolderResourcePack.java
|
||||
--- minecraft\net\minecraft\src\FolderResourcePack.java Sun Jul 07 12:38:56 2013
|
||||
+++ minecraft_patched\net\minecraft\src\FolderResourcePack.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\FolderResourcePack.java Tue Sep 17 13:58:49 2013
|
||||
+++ minecraft_patched\net\minecraft\src\FolderResourcePack.java Tue Sep 17 14:01:01 2013
|
||||
@@ -29,7 +29,7 @@
|
||||
HashSet var1 = Sets.newHashSet();
|
||||
File var2 = new File(this.field_110597_b, "assets/");
|
||||
@@ -101,8 +101,8 @@ diff -r -U 3 minecraft\net\minecraft\src\FolderResourcePack.java minecraft_patch
|
||||
|
||||
for(int var5 = 0; var5 < var4; ++var5) {
|
||||
diff -r -U 3 minecraft\net\minecraft\src\FontRenderer.java minecraft_patched\net\minecraft\src\FontRenderer.java
|
||||
--- minecraft\net\minecraft\src\FontRenderer.java Sun Jul 07 12:38:56 2013
|
||||
+++ minecraft_patched\net\minecraft\src\FontRenderer.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\FontRenderer.java Tue Sep 17 13:58:49 2013
|
||||
+++ minecraft_patched\net\minecraft\src\FontRenderer.java Tue Sep 17 14:01:01 2013
|
||||
@@ -630,8 +630,6 @@
|
||||
case 10:
|
||||
--var5;
|
||||
@@ -122,8 +122,8 @@ diff -r -U 3 minecraft\net\minecraft\src\FontRenderer.java minecraft_patched\net
|
||||
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 Sun Jul 07 12:38:57 2013
|
||||
+++ minecraft_patched\net\minecraft\src\IntegratedServer.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\IntegratedServer.java Tue Sep 17 13:58:50 2013
|
||||
+++ minecraft_patched\net\minecraft\src\IntegratedServer.java Tue Sep 17 14:01:01 2013
|
||||
@@ -103,7 +103,7 @@
|
||||
return true;
|
||||
}
|
||||
@@ -134,8 +134,8 @@ diff -r -U 3 minecraft\net\minecraft\src\IntegratedServer.java minecraft_patched
|
||||
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 Jul 07 12:38:57 2013
|
||||
+++ minecraft_patched\net\minecraft\src\Minecraft.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\Minecraft.java Tue Sep 17 13:58:50 2013
|
||||
+++ minecraft_patched\net\minecraft\src\Minecraft.java Tue Sep 17 14:01:01 2013
|
||||
@@ -604,8 +604,8 @@
|
||||
return;
|
||||
}
|
||||
@@ -185,8 +185,8 @@ diff -r -U 3 minecraft\net\minecraft\src\Minecraft.java minecraft_patched\net\mi
|
||||
}
|
||||
|
||||
diff -r -U 3 minecraft\net\minecraft\src\RConThreadClient.java minecraft_patched\net\minecraft\src\RConThreadClient.java
|
||||
--- minecraft\net\minecraft\src\RConThreadClient.java Sun Jul 07 12:38:58 2013
|
||||
+++ minecraft_patched\net\minecraft\src\RConThreadClient.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\RConThreadClient.java Tue Sep 17 13:58:51 2013
|
||||
+++ minecraft_patched\net\minecraft\src\RConThreadClient.java Tue Sep 17 14:01:01 2013
|
||||
@@ -32,8 +32,8 @@
|
||||
}
|
||||
|
||||
@@ -226,8 +226,8 @@ diff -r -U 3 minecraft\net\minecraft\src\RConThreadClient.java minecraft_patched
|
||||
|
||||
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 Sun Jul 07 12:38:58 2013
|
||||
+++ minecraft_patched\net\minecraft\src\RenderBlocks.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\RenderBlocks.java Tue Sep 17 13:58:51 2013
|
||||
+++ minecraft_patched\net\minecraft\src\RenderBlocks.java Tue Sep 17 14:01:01 2013
|
||||
@@ -1960,16 +1960,16 @@
|
||||
float var25 = (float)(p_78589_2_ + 1);
|
||||
float var26 = (float)(p_78589_4_ + 0);
|
||||
@@ -259,8 +259,8 @@ 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 Sun Jul 07 12:38:58 2013
|
||||
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\RenderGlobal.java Tue Sep 17 13:58:51 2013
|
||||
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Tue Sep 17 14:01:01 2013
|
||||
@@ -1445,7 +1445,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_;
|
||||
@@ -271,8 +271,8 @@ diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net
|
||||
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 Jul 07 12:38:58 2013
|
||||
+++ minecraft_patched\net\minecraft\src\SoundPoolURLConnection.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\SoundPoolURLConnection.java Tue Sep 17 13:58:51 2013
|
||||
+++ minecraft_patched\net\minecraft\src\SoundPoolURLConnection.java Tue Sep 17 14:01:01 2013
|
||||
@@ -22,7 +22,11 @@
|
||||
public void connect() {}
|
||||
|
||||
@@ -286,8 +286,8 @@ diff -r -U 3 minecraft\net\minecraft\src\SoundPoolURLConnection.java minecraft_p
|
||||
|
||||
// $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 Sun Jul 07 12:38:58 2013
|
||||
+++ minecraft_patched\net\minecraft\src\TcpMasterThread.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\TcpMasterThread.java Tue Sep 17 13:58:51 2013
|
||||
+++ minecraft_patched\net\minecraft\src\TcpMasterThread.java Tue Sep 17 14:01:01 2013
|
||||
@@ -11,6 +11,7 @@
|
||||
this.field_74504_a = p_i1395_1_;
|
||||
}
|
||||
@@ -297,8 +297,8 @@ 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 Sun Jul 07 12:38:58 2013
|
||||
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Sun Jul 07 12:40:48 2013
|
||||
--- minecraft\net\minecraft\src\ThreadedFileIOBase.java Tue Sep 17 13:58:52 2013
|
||||
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Tue Sep 17 14:01:01 2013
|
||||
@@ -20,6 +20,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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 Sun Jul 07 12:40:12 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\CallableSuspiciousClasses.java Sun Jul 07 12:40:42 2013
|
||||
--- minecraft_server\net\minecraft\src\CallableSuspiciousClasses.java Tue Sep 17 14:00:13 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\CallableSuspiciousClasses.java Tue Sep 17 14:01:07 2013
|
||||
@@ -21,9 +21,14 @@
|
||||
|
||||
public String func_85085_a() throws SecurityException, NoSuchFieldException, IllegalAccessException, IllegalArgumentException {
|
||||
@@ -30,8 +30,8 @@ diff -r -U 3 minecraft_server\net\minecraft\src\CallableSuspiciousClasses.java m
|
||||
}
|
||||
}
|
||||
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 Sun Jul 07 12:40:12 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Sun Jul 07 12:40:42 2013
|
||||
--- minecraft_server\net\minecraft\src\ComponentStrongholdRightTurn.java Tue Sep 17 14:00:14 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Tue Sep 17 14:01:07 2013
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
public class ComponentStrongholdRightTurn extends ComponentStrongholdLeftTurn {
|
||||
@@ -44,9 +44,9 @@ diff -r -U 3 minecraft_server\net\minecraft\src\ComponentStrongholdRightTurn.jav
|
||||
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 Sun Jul 07 12:40:13 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\DedicatedServer.java Sun Jul 07 12:40:42 2013
|
||||
@@ -208,7 +208,7 @@
|
||||
--- minecraft_server\net\minecraft\src\DedicatedServer.java Tue Sep 17 14:00:14 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\DedicatedServer.java Tue Sep 17 14:01:07 2013
|
||||
@@ -209,7 +209,7 @@
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ 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 Sun Jul 07 12:40:13 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\EnumChatFormatting.java Sun Jul 07 12:40:42 2013
|
||||
--- minecraft_server\net\minecraft\src\EnumChatFormatting.java Tue Sep 17 14:00:14 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\EnumChatFormatting.java Tue Sep 17 14:01:07 2013
|
||||
@@ -38,7 +38,7 @@
|
||||
private final String field_96304_B;
|
||||
|
||||
@@ -68,8 +68,8 @@ diff -r -U 3 minecraft_server\net\minecraft\src\EnumChatFormatting.java minecraf
|
||||
|
||||
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 Sun Jul 07 12:40:14 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\MemoryConnection.java Sun Jul 07 12:40:42 2013
|
||||
--- minecraft_server\net\minecraft\src\MemoryConnection.java Tue Sep 17 14:00:15 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\MemoryConnection.java Tue Sep 17 14:01:07 2013
|
||||
@@ -11,13 +11,18 @@
|
||||
public class MemoryConnection implements INetworkManager {
|
||||
|
||||
@@ -91,8 +91,8 @@ diff -r -U 3 minecraft_server\net\minecraft\src\MemoryConnection.java minecraft_
|
||||
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 Sun Jul 07 12:40:14 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\RConThreadClient.java Sun Jul 07 12:40:42 2013
|
||||
--- minecraft_server\net\minecraft\src\RConThreadClient.java Tue Sep 17 14:00:15 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\RConThreadClient.java Tue Sep 17 14:01:07 2013
|
||||
@@ -32,8 +32,8 @@
|
||||
}
|
||||
|
||||
@@ -132,8 +132,8 @@ diff -r -U 3 minecraft_server\net\minecraft\src\RConThreadClient.java minecraft_
|
||||
|
||||
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 Sun Jul 07 12:40:14 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\TcpMasterThread.java Sun Jul 07 12:40:42 2013
|
||||
--- minecraft_server\net\minecraft\src\TcpMasterThread.java Tue Sep 17 14:00:16 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\TcpMasterThread.java Tue Sep 17 14:01:07 2013
|
||||
@@ -11,6 +11,7 @@
|
||||
this.field_74504_a = p_i1395_1_;
|
||||
}
|
||||
@@ -143,8 +143,8 @@ 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 Sun Jul 07 12:40:14 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Sun Jul 07 12:40:42 2013
|
||||
--- minecraft_server\net\minecraft\src\ThreadedFileIOBase.java Tue Sep 17 14:00:16 2013
|
||||
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Tue Sep 17 14:01:07 2013
|
||||
@@ -20,6 +20,7 @@
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
[VERSION]
|
||||
MCPVersion = 8.04
|
||||
ClientVersion = 1.6.2
|
||||
ServerVersion = 1.6.2
|
||||
MCPVersion = 8.09
|
||||
ClientVersion = 1.6.3
|
||||
ServerVersion = 1.6.3
|
||||
Binary file not shown.
@@ -3,9 +3,13 @@
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<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/org/ow2/asm/asm-debug-all/4.1/asm-debug-all-4.1.jar" sourcepath="jars/libraries/org/ow2/asm/asm-debug-all/4.1/asm-debug-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/1.6.1.jar"/>
|
||||
<classpathentry kind="lib" path="jars/versions/1.6.2/1.6.2.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/jars/versions/1.6.2/1.6.2-natives"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="jars/libraries/lzma/lzma/0.0.1/lzma-0.0.1.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"/>
|
||||
@@ -20,19 +24,7 @@
|
||||
<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/jars/versions/1.6.1/1.6.1-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/jars/versions/1.6.1/1.6.1-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/jars/versions/1.6.1/1.6.1-natives"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
</classpath>
|
||||
+3
-3
@@ -75,7 +75,7 @@ def read_mc_versions(fml_dir, version=None, work_dir=None):
|
||||
mc_info['version'] = version
|
||||
if not 'client_url' in mc_info.keys():
|
||||
mc_info['new_launcher'] = True
|
||||
base_url = 'https://s3.amazonaws.com/Minecraft.Download/versions/%s' % version
|
||||
base_url = 'http://s3.amazonaws.com/Minecraft.Download/versions/%s' % version
|
||||
mc_info['client_url'] = '%s/%s.jar' % (base_url, version)
|
||||
mc_info['json_url'] = '%s/%s.json' % (base_url, version)
|
||||
mc_info['server_url'] = '%s/minecraft_server.%s.jar' % (base_url, version)
|
||||
@@ -1146,7 +1146,7 @@ def download_libraries(mcp_dir, libraries, natives_dir):
|
||||
# This list should be in the format of the new launcher's version.json file
|
||||
# Under the entry 'libraries'
|
||||
lib_dir = os.path.join(mcp_dir, 'jars', 'libraries')
|
||||
default_url = 'https://s3.amazonaws.com/Minecraft.Download/libraries'
|
||||
default_url = 'http://s3.amazonaws.com/Minecraft.Download/libraries'
|
||||
|
||||
downloads = []
|
||||
failed = False
|
||||
@@ -1239,7 +1239,7 @@ def download_list(list, natives_dir):
|
||||
def download_assets(mcp_dir):
|
||||
from xml.dom.minidom import parse
|
||||
asset_dir = os.path.join(mcp_dir, 'jars', 'assets')
|
||||
base_url = 'https://s3.amazonaws.com/Minecraft.Resources'
|
||||
base_url = 'http://s3.amazonaws.com/Minecraft.Resources'
|
||||
|
||||
print('Gathering assets list from %s' % base_url)
|
||||
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
python install.py
|
||||
python install.py "$@"
|
||||
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"id": "FML{version}",
|
||||
"time": "{timestamp}",
|
||||
"releaseTime": "{timestamp}",
|
||||
"type": "release",
|
||||
"processArguments": "username_session_version",
|
||||
"minecraftArguments": "--version FML_DEV --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-debug-all:4.1",
|
||||
"children" : ["sources"],
|
||||
"url" : "http://repo.maven.apache.org/maven2",
|
||||
"comment" : "Important for FML, we add this"
|
||||
},
|
||||
{
|
||||
"name": "org.scala-lang:scala-library:2.10.2",
|
||||
"children" : ["sources"],
|
||||
"url" : "http://repo.maven.apache.org/maven2",
|
||||
"comment" : "Important for FML, we add this"
|
||||
},
|
||||
{
|
||||
"name": "org.scala-lang:scala-compiler:2.10.2",
|
||||
"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.launchwrapper.Launch"
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
{
|
||||
"install": {
|
||||
"profileName": "FML",
|
||||
"target":"@minecraft_version@-FML@version@",
|
||||
"path":"cpw.mods:fml:@version@",
|
||||
"version":"FML @version@",
|
||||
"filePath":"@universal_jar@",
|
||||
"welcome":"Welcome to the simple FML installer.",
|
||||
"minecraft":"@minecraft_version@",
|
||||
"mirrorList" : "http://files.minecraftforge.net/mirror-brand.list",
|
||||
"logo":"/big_logo.png"
|
||||
},
|
||||
"versionInfo": {
|
||||
"id": "@minecraft_version@-FML@version@",
|
||||
"time": "@timestamp@",
|
||||
"releaseTime": "1960-01-01T00:00:00-0700",
|
||||
"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": 4,
|
||||
"libraries": [
|
||||
{
|
||||
"name": "cpw.mods:fml:@version@",
|
||||
"url": "http://files.minecraftforge.net/maven/"
|
||||
},
|
||||
{
|
||||
"name": "net.minecraft:launchwrapper:1.3",
|
||||
"serverreq":true
|
||||
},
|
||||
{
|
||||
"name": "org.ow2.asm:asm-all:4.1",
|
||||
"serverreq":true
|
||||
},
|
||||
{
|
||||
"name": "org.scala-lang:scala-library:2.10.2",
|
||||
"url" : "http://files.minecraftforge.net/maven/",
|
||||
"checksums" : [ "6ba65d12cd09d441083262d6f73d2257fec7c663", "dffc88e804861c9eaba39283757000b6558ea573" ],
|
||||
"comment" : "Important for FML, we add this",
|
||||
"serverreq":true,
|
||||
"clientreq":true
|
||||
},
|
||||
{
|
||||
"name": "org.scala-lang:scala-compiler:2.10.2",
|
||||
"url" : "http://files.minecraftforge.net/maven/",
|
||||
"checksums" : [ "64c8b1380cc53d6850823d6e4e7ae984aa44ef9c", "40281b3ffc69fb385953522c843363ccaf71ba89" ],
|
||||
"comment" : "Important for FML, we add this",
|
||||
"serverreq":true,
|
||||
"clientreq":true
|
||||
},
|
||||
{
|
||||
"name": "net.sf.jopt-simple:jopt-simple:4.5",
|
||||
"serverreq":true
|
||||
},
|
||||
{
|
||||
"name": "lzma:lzma:0.0.1",
|
||||
"serverreq":true
|
||||
},
|
||||
{
|
||||
"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:2.9.0",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow"
|
||||
},
|
||||
{
|
||||
"action": "disallow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow"
|
||||
},
|
||||
{
|
||||
"action": "disallow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow"
|
||||
},
|
||||
{
|
||||
"action": "disallow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
],
|
||||
"natives": {
|
||||
"linux": "natives-linux",
|
||||
"windows": "natives-windows",
|
||||
"osx": "natives-osx"
|
||||
},
|
||||
"extract": {
|
||||
"exclude": [
|
||||
"META-INF/"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "org.lwjgl.lwjgl:lwjgl:2.9.1-nightly-20130708-debug3",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1-nightly-20130708-debug3",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.1-nightly-20130708-debug3",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"id": "FML{version}",
|
||||
"time": "{timestamp}",
|
||||
"releaseTime": "{timestamp}",
|
||||
"type": "release",
|
||||
"processArguments": "username_session_version",
|
||||
"minecraftArguments": "--version FML_DEV --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
|
||||
"minimumLauncherVersion": 4,
|
||||
"libraries": [
|
||||
{
|
||||
"name": "net.minecraft:launchwrapper:1.7",
|
||||
"comment" : "Important for FML, we add this"
|
||||
},
|
||||
{
|
||||
"name": "org.ow2.asm:asm-debug-all:4.1",
|
||||
"children" : ["sources"],
|
||||
"url" : "http://repo.maven.apache.org/maven2",
|
||||
"comment" : "Important for FML, we add this"
|
||||
},
|
||||
{
|
||||
"name": "org.scala-lang:scala-library:2.10.2",
|
||||
"children" : ["sources"],
|
||||
"url" : "http://repo.maven.apache.org/maven2",
|
||||
"comment" : "Important for FML, we add this"
|
||||
},
|
||||
{
|
||||
"name": "org.scala-lang:scala-compiler:2.10.2",
|
||||
"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.launchwrapper.Launch"
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
{
|
||||
"install": {
|
||||
"profileName": "FML",
|
||||
"target":"@minecraft_version@-FML@version@",
|
||||
"path":"cpw.mods:fml:@version@",
|
||||
"version":"FML @version@",
|
||||
"filePath":"@universal_jar@",
|
||||
"welcome":"Welcome to the simple FML installer.",
|
||||
"minecraft":"@minecraft_version@",
|
||||
"mirrorList" : "http://files.minecraftforge.net/mirror-brand.list",
|
||||
"logo":"/big_logo.png"
|
||||
},
|
||||
"versionInfo": {
|
||||
"id": "@minecraft_version@-FML@version@",
|
||||
"time": "@timestamp@",
|
||||
"releaseTime": "1960-01-01T00:00:00-0700",
|
||||
"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": 4,
|
||||
"libraries": [
|
||||
{
|
||||
"name": "cpw.mods:fml:@version@",
|
||||
"url": "http://files.minecraftforge.net/maven/"
|
||||
},
|
||||
{
|
||||
"name": "net.minecraft:launchwrapper:1.7",
|
||||
"serverreq":true
|
||||
},
|
||||
{
|
||||
"name": "org.ow2.asm:asm-all:4.1",
|
||||
"serverreq":true
|
||||
},
|
||||
{
|
||||
"name": "org.scala-lang:scala-library:2.10.2",
|
||||
"url" : "http://files.minecraftforge.net/maven/",
|
||||
"checksums" : [ "6ba65d12cd09d441083262d6f73d2257fec7c663", "dffc88e804861c9eaba39283757000b6558ea573" ],
|
||||
"comment" : "Important for FML, we add this",
|
||||
"serverreq":true,
|
||||
"clientreq":true
|
||||
},
|
||||
{
|
||||
"name": "org.scala-lang:scala-compiler:2.10.2",
|
||||
"url" : "http://files.minecraftforge.net/maven/",
|
||||
"checksums" : [ "64c8b1380cc53d6850823d6e4e7ae984aa44ef9c", "40281b3ffc69fb385953522c843363ccaf71ba89" ],
|
||||
"comment" : "Important for FML, we add this",
|
||||
"serverreq":true,
|
||||
"clientreq":true
|
||||
},
|
||||
{
|
||||
"name": "lzma:lzma:0.0.1",
|
||||
"serverreq":true
|
||||
},
|
||||
{
|
||||
"name": "net.sf.jopt-simple:jopt-simple:4.5",
|
||||
"serverreq":true
|
||||
},
|
||||
{
|
||||
"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": "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:2.9.0",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow"
|
||||
},
|
||||
{
|
||||
"action": "disallow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow"
|
||||
},
|
||||
{
|
||||
"action": "disallow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow"
|
||||
},
|
||||
{
|
||||
"action": "disallow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
],
|
||||
"natives": {
|
||||
"linux": "natives-linux",
|
||||
"windows": "natives-windows",
|
||||
"osx": "natives-osx"
|
||||
},
|
||||
"extract": {
|
||||
"exclude": [
|
||||
"META-INF/"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "org.lwjgl.lwjgl:lwjgl:2.9.1-nightly-20130708-debug3",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1-nightly-20130708-debug3",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.1-nightly-20130708-debug3",
|
||||
"rules": [
|
||||
{
|
||||
"action": "allow",
|
||||
"os": {
|
||||
"name": "osx",
|
||||
"version": "^10\\.5\\.\\d$"
|
||||
}
|
||||
}
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
+9
-2
@@ -1,5 +1,5 @@
|
||||
[default]
|
||||
current_ver = 1.6.2
|
||||
current_ver = 1.6.3
|
||||
base_url = http://s3.amazonaws.com/MinecraftDownload/
|
||||
libraries = lwjgl.jar lwjgl_util.jar jinput.jar
|
||||
natives = windows_natives.jar macosx_natives.jar linux_natives.jar
|
||||
@@ -109,8 +109,15 @@ mcp_url = http://mcp.ocean-labs.de/files/archive/mcp803.zip
|
||||
mcp_md5 = 7810c2fba33e15889685b21ac8dc66cf
|
||||
|
||||
[1.6.2]
|
||||
client_md5 = 9356f3ad44925a684e918b9270b63a6c
|
||||
client_md5 = 1d43cdba8b9752d7f557ab7d3e365964
|
||||
server_md5 = 39df9f29e6904ea7b351ffb4fe949881
|
||||
mcp_ver = 8.04
|
||||
mcp_url = http://mcp.ocean-labs.de/files/archive/mcp804.zip
|
||||
mcp_md5 = ebcecfa00aae07548e67787044410a11
|
||||
|
||||
[1.6.3]
|
||||
client_md5 = 233effe2110d40a0519cf1489e4ccb1c
|
||||
server_md5 = 8ed981ab6030412f586bfe38ff0aaa82
|
||||
mcp_ver = 8.09
|
||||
mcp_url =
|
||||
mcp_md5 =
|
||||
@@ -25,13 +25,13 @@
|
||||
this.func_71357_I();
|
||||
this.field_71466_p = new FontRenderer(this.field_71474_y, new ResourceLocation("textures/font/ascii.png"), this.field_71446_o, false);
|
||||
|
||||
+ FMLClientHandler.instance().beginMinecraftLoading(this, this.field_110449_ao);
|
||||
+ FMLClientHandler.instance().beginMinecraftLoading(this, this.field_110449_ao, this.field_110451_am);
|
||||
+
|
||||
if (this.field_71474_y.field_74363_ab != null)
|
||||
{
|
||||
this.field_71466_p.func_78264_a(this.field_135017_as.func_135042_a());
|
||||
@@ -400,6 +409,7 @@
|
||||
this.field_71446_o.func_130088_a(TextureMap.field_110576_c, new TextureMap(1, "textures/items/"));
|
||||
this.field_71446_o.func_130088_a(TextureMap.field_110576_c, new TextureMap(1, "textures/items"));
|
||||
GL11.glViewport(0, 0, this.field_71443_c, this.field_71440_d);
|
||||
this.field_71452_i = new EffectRenderer(this.field_71441_e, this.field_71446_o);
|
||||
+ FMLClientHandler.instance().finishMinecraftLoading();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{
|
||||
this.func_72527_a("Took too long to log in");
|
||||
}
|
||||
@@ -148,11 +152,18 @@
|
||||
@@ -155,11 +159,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
if (s != null)
|
||||
{
|
||||
@@ -275,4 +286,22 @@
|
||||
@@ -282,4 +293,22 @@
|
||||
{
|
||||
return p_72531_0_.field_72544_i = p_72531_1_;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import net.minecraft.network.packet.Packet13PlayerLookMove;
|
||||
import net.minecraft.network.packet.Packet14BlockDig;
|
||||
import net.minecraft.network.packet.Packet15Place;
|
||||
@@ -615,6 +618,7 @@
|
||||
@@ -618,6 +621,7 @@
|
||||
|
||||
public void func_72481_a(Packet3Chat p_72481_1_)
|
||||
{
|
||||
@@ -25,7 +25,7 @@
|
||||
if (this.field_72574_e.func_71126_v() == 2)
|
||||
{
|
||||
this.func_72567_b(new Packet3Chat(ChatMessageComponent.func_111077_e("chat.cannotSend").func_111059_a(EnumChatFormatting.RED)));
|
||||
@@ -997,6 +1001,11 @@
|
||||
@@ -1013,6 +1017,11 @@
|
||||
}
|
||||
|
||||
public void func_72501_a(Packet250CustomPayload p_72501_1_)
|
||||
@@ -37,7 +37,7 @@
|
||||
{
|
||||
DataInputStream datainputstream;
|
||||
ItemStack itemstack;
|
||||
@@ -1166,4 +1175,18 @@
|
||||
@@ -1182,4 +1191,18 @@
|
||||
{
|
||||
return this.field_72576_c;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
@@ -366,7 +367,11 @@
|
||||
@@ -368,7 +369,11 @@
|
||||
{
|
||||
if (this.func_71197_b())
|
||||
{
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
for (long j = 0L; this.field_71317_u; this.field_71296_Q = true)
|
||||
{
|
||||
@@ -405,6 +410,7 @@
|
||||
@@ -407,6 +412,7 @@
|
||||
|
||||
Thread.sleep(1L);
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -413,6 +419,10 @@
|
||||
@@ -415,6 +421,10 @@
|
||||
}
|
||||
catch (Throwable throwable)
|
||||
{
|
||||
@@ -38,7 +38,7 @@
|
||||
throwable.printStackTrace();
|
||||
this.func_98033_al().func_98234_c("Encountered an unexpected exception " + throwable.getClass().getSimpleName(), throwable);
|
||||
CrashReport crashreport = null;
|
||||
@@ -443,6 +453,10 @@
|
||||
@@ -445,6 +455,10 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -49,7 +49,7 @@
|
||||
this.func_71260_j();
|
||||
this.field_71316_v = true;
|
||||
}
|
||||
@@ -452,6 +466,8 @@
|
||||
@@ -454,6 +468,8 @@
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -58,7 +58,7 @@
|
||||
this.func_71240_o();
|
||||
}
|
||||
}
|
||||
@@ -468,8 +484,10 @@
|
||||
@@ -470,8 +486,10 @@
|
||||
|
||||
public void func_71217_p()
|
||||
{
|
||||
@@ -69,7 +69,7 @@
|
||||
++this.field_71315_w;
|
||||
|
||||
if (this.field_71295_T)
|
||||
@@ -515,6 +533,7 @@
|
||||
@@ -517,6 +535,7 @@
|
||||
|
||||
this.field_71304_b.func_76319_b();
|
||||
this.field_71304_b.func_76319_b();
|
||||
@@ -77,7 +77,7 @@
|
||||
}
|
||||
|
||||
public void func_71190_q()
|
||||
@@ -542,6 +561,7 @@
|
||||
@@ -544,6 +563,7 @@
|
||||
}
|
||||
|
||||
this.field_71304_b.func_76320_a("tick");
|
||||
@@ -85,7 +85,7 @@
|
||||
CrashReport crashreport;
|
||||
|
||||
try
|
||||
@@ -566,6 +586,7 @@
|
||||
@@ -568,6 +588,7 @@
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
this.field_71304_b.func_76319_b();
|
||||
this.field_71304_b.func_76320_a("tracker");
|
||||
worldserver.func_73039_n().func_72788_a();
|
||||
@@ -693,7 +714,7 @@
|
||||
@@ -695,7 +716,7 @@
|
||||
|
||||
public String getServerModName()
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
this.func_98033_al().func_98233_a("Loading properties");
|
||||
this.field_71340_o = new PropertyManager(new File("server.properties"), this.func_98033_al());
|
||||
|
||||
@@ -131,6 +134,8 @@
|
||||
@@ -132,6 +135,8 @@
|
||||
this.func_98033_al().func_98236_b("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
||||
this.func_98033_al().func_98236_b("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
this.func_71210_a(new DedicatedPlayerList(this));
|
||||
long j = System.nanoTime();
|
||||
@@ -173,6 +178,7 @@
|
||||
@@ -174,6 +179,7 @@
|
||||
this.func_71191_d((this.func_71207_Z() + 8) / 16 * 16);
|
||||
this.func_71191_d(MathHelper.func_76125_a(this.func_71207_Z(), 64, 256));
|
||||
this.field_71340_o.func_73667_a("max-build-height", Integer.valueOf(this.func_71207_Z()));
|
||||
@@ -33,7 +33,7 @@
|
||||
this.func_98033_al().func_98233_a("Preparing level \"" + this.func_71270_I() + "\"");
|
||||
this.func_71247_a(this.func_71270_I(), this.func_71270_I(), k, worldtype, s2);
|
||||
long i1 = System.nanoTime() - j;
|
||||
@@ -193,7 +199,7 @@
|
||||
@@ -194,7 +200,7 @@
|
||||
this.field_71339_n.func_72602_a();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,3 +45,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -131,7 +146,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @SideOnly(Side.CLIENT)
|
||||
public double func_70318_a(double p_70318_1_, double p_70318_3_, double p_70318_5_)
|
||||
{
|
||||
double d3 = (double)this.field_70329_l + 0.5D - p_70318_1_;
|
||||
@@ -0,0 +1,13 @@
|
||||
--- ../src-base/minecraft/net/minecraft/util/ResourceLocation.java
|
||||
+++ ../src-work/minecraft/net/minecraft/util/ResourceLocation.java
|
||||
@@ -1,10 +1,7 @@
|
||||
package net.minecraft.util;
|
||||
|
||||
-import cpw.mods.fml.relauncher.Side;
|
||||
-import cpw.mods.fml.relauncher.SideOnly;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
-@SideOnly(Side.CLIENT)
|
||||
public class ResourceLocation
|
||||
{
|
||||
private final String field_110626_a;
|
||||
@@ -9,7 +9,28 @@
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.io.IOException;
|
||||
@@ -45,7 +47,7 @@
|
||||
@@ -23,9 +25,19 @@
|
||||
|
||||
public StringTranslate()
|
||||
{
|
||||
+ InputStream inputstream = StringTranslate.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang");
|
||||
+ localInject(inputstream);
|
||||
+ }
|
||||
+
|
||||
+ public static void inject(InputStream inputstream)
|
||||
+ {
|
||||
+ field_74817_a.localInject(inputstream);
|
||||
+ }
|
||||
+
|
||||
+ private void localInject(InputStream inputstream)
|
||||
+ {
|
||||
try
|
||||
{
|
||||
- InputStream inputstream = StringTranslate.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang");
|
||||
Iterator iterator = IOUtils.readLines(inputstream, Charsets.UTF_8).iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
@@ -45,7 +57,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class StructureVillagePieces
|
||||
@@ -20,6 +22,8 @@
|
||||
@@ -37,6 +39,8 @@
|
||||
arraylist.add(new StructureVillagePieceWeight(ComponentVillageField2.class, 3, MathHelper.func_76136_a(p_75084_0_, 2 + p_75084_1_, 4 + p_75084_1_ * 2)));
|
||||
arraylist.add(new StructureVillagePieceWeight(ComponentVillageHouse2.class, 15, MathHelper.func_76136_a(p_75084_0_, 0, 1 + p_75084_1_)));
|
||||
arraylist.add(new StructureVillagePieceWeight(ComponentVillageHouse3.class, 8, MathHelper.func_76136_a(p_75084_0_, 0 + p_75084_1_, 3 + p_75084_1_ * 2)));
|
||||
@@ -18,7 +18,7 @@
|
||||
Iterator iterator = arraylist.iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
@@ -92,6 +96,10 @@
|
||||
@@ -109,6 +113,10 @@
|
||||
else if (oclass == ComponentVillageHouse3.class)
|
||||
{
|
||||
object = ComponentVillageHouse3.func_74921_a(p_75083_0_, p_75083_2_, p_75083_3_, p_75083_4_, p_75083_5_, p_75083_6_, p_75083_7_, p_75083_8_);
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Created on Fri Apr 8 16:54:36 2011
|
||||
|
||||
@author: ProfMobius
|
||||
@version: v1.1-cpw
|
||||
Modified to fix temporary obfuscation issue
|
||||
"""
|
||||
|
||||
import sys
|
||||
import logging
|
||||
from optparse import OptionParser
|
||||
|
||||
from commands import Commands, CLIENT, SERVER
|
||||
from mcp import reobfuscate_side
|
||||
|
||||
|
||||
def main():
|
||||
parser = OptionParser(version='MCP %s' % Commands.fullversion())
|
||||
parser.add_option('--client', dest='only_client', action='store_true', help='only process client', default=False)
|
||||
parser.add_option('--server', dest='only_server', action='store_true', help='only process server', default=False)
|
||||
parser.add_option('-a', '--all', action='store_true', dest='reobf_all', help='output all classes', default=False)
|
||||
parser.add_option('-n', '--nolvt', dest='keep_lvt', action='store_false', help='strip local variable table',
|
||||
default=True)
|
||||
parser.add_option('-g', '--generics', dest='keep_generics', action='store_true',
|
||||
help='preserve generics as well as local variables', default=False)
|
||||
parser.add_option('-c', '--config', dest='config', help='additional configuration file')
|
||||
parser.add_option('--srgnames', dest='srg_names', action='store_true', help='Obfusicate to MCP unique names', default=False)
|
||||
options, _ = parser.parse_args()
|
||||
reobfuscate(options.config, options.reobf_all, options.keep_lvt, options.keep_generics, options.only_client,
|
||||
options.only_server, options.srg_names)
|
||||
|
||||
|
||||
def reobfuscate(conffile, reobf_all, keep_lvt, keep_generics, only_client, only_server, srg_names):
|
||||
try:
|
||||
commands = Commands(conffile, verify=True)
|
||||
|
||||
if keep_generics:
|
||||
keep_lvt = True
|
||||
|
||||
# client or server
|
||||
process_client = True
|
||||
process_server = True
|
||||
if only_client and not only_server:
|
||||
process_server = False
|
||||
if only_server and not only_client:
|
||||
process_client = False
|
||||
|
||||
if srg_names:
|
||||
commands.logger.info('> Creating Retroguard maping files')
|
||||
commands.createreobfsrg()
|
||||
|
||||
commands.logger.info('> Creating Retroguard config files')
|
||||
commands.creatergcfg(reobf=True, keep_lvt=keep_lvt, keep_generics=keep_generics, srg_names=srg_names)
|
||||
|
||||
if process_client:
|
||||
reobfuscate_side(commands, CLIENT, reobf_all=reobf_all, srg_names=srg_names, force_rg=True)
|
||||
if process_server:
|
||||
reobfuscate_side(commands, SERVER, reobf_all=reobf_all, srg_names=srg_names, force_rg=True)
|
||||
except Exception: # pylint: disable-msg=W0703
|
||||
logging.exception('FATAL ERROR')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in new issue
Block a user