Merge branch 'repackage'

Conflicts:
	build.xml
	client/cpw/mods/fml/client/FMLClientHandler.java
	client/cpw/mods/fml/client/GuiIdMismatchScreen.java
	common/cpw/mods/fml/common/FMLCommonHandler.java
	common/cpw/mods/fml/common/IFMLSidedHandler.java
	common/cpw/mods/fml/common/network/ModIdMapPacket.java
	common/cpw/mods/fml/common/network/ModListResponsePacket.java
	common/cpw/mods/fml/common/registry/GameData.java
	common/cpw/mods/fml/common/registry/GameRegistry.java
	common/cpw/mods/fml/common/registry/ItemData.java
	common/cpw/mods/fml/common/registry/LanguageRegistry.java
	common/cpw/mods/fml/server/FMLServerHandler.java
	install/fml.py
	patches/minecraft/net/minecraft/client/Minecraft.java.patch
	patches/minecraft/net/minecraft/server/MinecraftServer.java.patch
	patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch
This commit is contained in:
Christian 2012-12-11 14:58:38 -05:00
commit 64226c3d7e
160 changed files with 2583 additions and 1123 deletions

View file

@ -38,7 +38,6 @@
<property name="mcp.obfoutput" location="${mcp.home}/reobf" />
<property name="client.mcp.obfoutput" location="${mcp.obfoutput}/minecraft" />
<property name="mcp.srcdir" location="${mcp.home}/src" />
<property name="common.mcp.srcdir" location="${mcp.srcdir}/common" />
<property name="client.mcp.srcdir" location="${mcp.srcdir}/minecraft" />
<property name="clean.mcp.srcdir" location="${mcp.home}/src-base" />
<property name="patch.mcp.srcdir" location="${mcp.home}/src-work" />
@ -122,7 +121,7 @@
</target>
<target name="merge-common">
<copy todir="${common.mcp.srcdir}" overwrite="true" verbose="true">
<copy todir="${client.mcp.srcdir}" overwrite="true" verbose="true">
<fileset dir="${common.src.dir}" includes="**/*.java" />
</copy>
</target>
@ -316,7 +315,7 @@
<echo>
Extracting fresh eclipse workspace to ${basedir}/eclipse
</echo>
<unzip src="${basedir}/eclipse-workspace.zip" dest="${basedir}"/>
<unzip src="${basedir}/eclipse-workspace-dev.zip" dest="${basedir}"/>
</target>
<target name="makerenamedsource" depends="buildenvsetup,repatch,merge-client,merge-common,reobfuscate">

View file

@ -1,10 +1,10 @@
package cpw.mods.fml.client;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiErrorScreen;
import cpw.mods.fml.common.IFMLHandledException;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.src.FontRenderer;
import net.minecraft.src.GuiErrorScreen;
/**
* If a mod throws this exception during loading, it will be called back to render

View file

@ -21,22 +21,22 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.multiplayer.GuiConnecting;
import net.minecraft.client.multiplayer.NetClientHandler;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.crash.CrashReport;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
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.src.CrashReport;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityLiving;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.GuiConnecting;
import net.minecraft.src.GuiScreen;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.NetClientHandler;
import net.minecraft.src.NetHandler;
import net.minecraft.src.Packet;
import net.minecraft.src.Packet131MapData;
import net.minecraft.src.Render;
import net.minecraft.src.RenderManager;
import net.minecraft.src.World;
import net.minecraft.src.WorldClient;
import net.minecraft.world.World;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;

View file

@ -18,9 +18,10 @@ import java.awt.Dimension;
import java.util.List;
import java.util.logging.Logger;
import net.minecraft.src.RenderEngine;
import net.minecraft.src.TextureFX;
import net.minecraft.src.ITexturePack;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.texturefx.TextureFX;
import net.minecraft.client.texturepacks.ITexturePack;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;

View file

@ -1,8 +1,8 @@
package cpw.mods.fml.client;
import net.minecraft.client.gui.GuiErrorScreen;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.WrongMinecraftVersionException;
import net.minecraft.src.GuiErrorScreen;
public class GuiCustomModLoadingErrorScreen extends GuiErrorScreen
{

View file

@ -3,11 +3,12 @@ package cpw.mods.fml.client;
import java.io.File;
import java.util.Map.Entry;
import net.minecraft.client.gui.GuiErrorScreen;
import cpw.mods.fml.common.DuplicateModsFoundException;
import cpw.mods.fml.common.MissingModsException;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.versioning.ArtifactVersion;
import net.minecraft.src.GuiErrorScreen;
public class GuiDupesFound extends GuiErrorScreen
{

View file

@ -3,15 +3,16 @@ package cpw.mods.fml.client;
import java.util.List;
import java.util.Map.Entry;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiYesNo;
import net.minecraft.util.StringTranslate;
import com.google.common.collect.Lists;
import com.google.common.collect.MapDifference;
import com.google.common.collect.MapDifference.ValueDifference;
import cpw.mods.fml.common.registry.ItemData;
import cpw.mods.fml.common.versioning.ArtifactVersion;
import net.minecraft.src.GuiButton;
import net.minecraft.src.GuiYesNo;
import net.minecraft.src.StringTranslate;
public class GuiIdMismatchScreen extends GuiYesNo {
private List<String> missingIds = Lists.newArrayList();

View file

@ -18,12 +18,12 @@ import java.awt.Dimension;
import java.util.ArrayList;
import net.minecraft.client.Minecraft;
import net.minecraft.src.FontRenderer;
import net.minecraft.src.GuiButton;
import net.minecraft.src.GuiScreen;
import net.minecraft.src.GuiSmallButton;
import net.minecraft.src.StringTranslate;
import net.minecraft.src.Tessellator;
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.util.StringTranslate;
import org.lwjgl.opengl.GL11;

View file

@ -1,8 +1,8 @@
package cpw.mods.fml.client;
import net.minecraft.client.gui.GuiErrorScreen;
import cpw.mods.fml.common.MissingModsException;
import cpw.mods.fml.common.versioning.ArtifactVersion;
import net.minecraft.src.GuiErrorScreen;
public class GuiModsMissing extends GuiErrorScreen
{

View file

@ -1,9 +1,9 @@
package cpw.mods.fml.client;
import net.minecraft.src.GuiButton;
import net.minecraft.src.GuiScreen;
import net.minecraft.src.GuiSmallButton;
import net.minecraft.src.StringTranslate;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiSmallButton;
import net.minecraft.util.StringTranslate;
import cpw.mods.fml.common.network.ModMissingPacket;
import cpw.mods.fml.common.versioning.ArtifactVersion;

View file

@ -3,8 +3,8 @@ package cpw.mods.fml.client;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.src.GuiButton;
import net.minecraft.src.Tessellator;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.Tessellator;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;

View file

@ -16,7 +16,8 @@ package cpw.mods.fml.client;
import java.util.ArrayList;
import net.minecraft.src.Tessellator;
import net.minecraft.client.renderer.Tessellator;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.LoaderState.ModState;
import cpw.mods.fml.common.ModContainer;

View file

@ -1,10 +1,9 @@
package cpw.mods.fml.client;
import net.minecraft.client.gui.GuiErrorScreen;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.WrongMinecraftVersionException;
import cpw.mods.fml.common.versioning.ArtifactVersion;
import net.minecraft.src.GuiErrorScreen;
import net.minecraft.src.GuiScreen;
public class GuiWrongMinecraft extends GuiErrorScreen
{

View file

@ -16,8 +16,8 @@ package cpw.mods.fml.client;
import java.awt.Dimension;
import net.minecraft.src.RenderEngine;
import net.minecraft.src.ITexturePack;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.texturepacks.ITexturePack;
public interface ITextureFX
{

View file

@ -14,7 +14,7 @@
package cpw.mods.fml.client;
import net.minecraft.src.TextureFX;
import net.minecraft.client.renderer.texturefx.TextureFX;
class OverrideInfo
{

View file

@ -19,10 +19,10 @@ import java.util.Map;
import javax.imageio.ImageIO;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.texturefx.TextureFX;
import net.minecraft.client.texturepacks.ITexturePack;
import net.minecraft.src.ModTextureStatic;
import net.minecraft.src.RenderEngine;
import net.minecraft.src.TextureFX;
import net.minecraft.src.ITexturePack;
import org.lwjgl.opengl.GL11;

View file

@ -14,10 +14,10 @@
package cpw.mods.fml.client.modloader;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.src.BaseMod;
import net.minecraft.src.Block;
import net.minecraft.src.IBlockAccess;
import net.minecraft.src.RenderBlocks;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
/**

View file

@ -7,17 +7,18 @@ import java.util.Map.Entry;
import java.util.logging.Level;
import net.minecraft.client.Minecraft;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.src.BaseMod;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityClientPlayerMP;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.KeyBinding;
import net.minecraft.src.NetClientHandler;
import net.minecraft.src.NetHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.src.Render;
import net.minecraft.src.RenderManager;
import net.minecraft.client.*;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.multiplayer.NetClientHandler;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import com.google.common.base.Equivalences;
import com.google.common.base.Supplier;

View file

@ -23,7 +23,7 @@ import org.lwjgl.input.Mouse;
import com.google.common.collect.ObjectArrays;
import com.google.common.primitives.Booleans;
import net.minecraft.src.KeyBinding;
import net.minecraft.client.settings.KeyBinding;
import cpw.mods.fml.client.registry.KeyBindingRegistry;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.common.modloader.ModLoaderModContainer;

View file

@ -1,9 +1,9 @@
package cpw.mods.fml.client.registry;
import net.minecraft.src.TileEntity;
import net.minecraft.src.TileEntityRenderer;
import net.minecraft.src.TileEntitySpecialRenderer;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
public class ClientRegistry
{

View file

@ -1,8 +1,8 @@
package cpw.mods.fml.client.registry;
import net.minecraft.src.Block;
import net.minecraft.src.IBlockAccess;
import net.minecraft.src.RenderBlocks;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
public interface ISimpleBlockRenderingHandler
{

View file

@ -4,8 +4,8 @@ import java.util.ArrayList;
import java.util.EnumSet;
import java.util.Set;
import net.minecraft.src.GameSettings;
import net.minecraft.src.KeyBinding;
import net.minecraft.client.settings.GameSettings;
import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;

View file

@ -3,14 +3,11 @@ package cpw.mods.fml.client.registry;
import java.util.List;
import java.util.Map;
import net.minecraft.src.Block;
import net.minecraft.src.Entity;
import net.minecraft.src.IBlockAccess;
import net.minecraft.src.Render;
import net.minecraft.src.RenderBiped;
import net.minecraft.src.RenderBlocks;
import net.minecraft.src.RenderManager;
import net.minecraft.src.RenderPlayer;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.entity.*;
import net.minecraft.entity.Entity;
import net.minecraft.world.IBlockAccess;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

View file

@ -17,8 +17,26 @@ import static cpw.mods.fml.common.Side.CLIENT;
import java.util.Map;
import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.block.Block;
import net.minecraft.client.*;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.multiplayer.NetClientHandler;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.NetServerHandler;
import net.minecraft.network.packet.NetHandler;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.TickType;

View file

@ -15,6 +15,7 @@
package net.minecraft.src;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.EntityRenderer;
public class EntityRendererProxy extends EntityRenderer
{

View file

@ -19,6 +19,13 @@ import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.texturefx.TextureFX;
import net.minecraft.client.texturepacks.ITexturePack;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.TextureFXManager;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLLog;

View file

@ -20,8 +20,41 @@ import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import net.minecraft.client.Minecraft;
import net.minecraft.server.MinecraftServer;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDispenser;
import net.minecraft.client.*;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.multiplayer.NetClientHandler;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texturefx.TextureFX;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.command.ICommand;
import net.minecraft.dispenser.IBehaviorDispenseItem;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.network.NetServerHandler;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet1Login;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.server.*;
import net.minecraft.stats.Achievement;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.IChunkProvider;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.SpriteHelper;
import cpw.mods.fml.client.TextureFXManager;

View file

@ -18,6 +18,8 @@ import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObserver;
import net.minecraft.client.renderer.RenderEngine;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.FMLClientHandler;

View file

@ -20,6 +20,8 @@ import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObserver;
import net.minecraft.client.renderer.RenderEngine;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.FMLClientHandler;

View file

@ -9,26 +9,7 @@
if not sys.platform.startswith('win'):
if os.path.exists(path):
shutil.rmtree(path)
@@ -584,6 +586,9 @@
self.has_astyle_cfg = False
if os.path.isfile(self.astyleconf):
self.has_astyle_cfg = True
+
+ #FML Entries
+ self.srcshared = os.path.normpath(os.path.join(self.dirsrc, 'common'))
def creatergcfg(self, reobf=False, keep_lvt=False, keep_generics=False, rg_update=False):
"""Create the files necessary for RetroGuard"""
@@ -781,13 +786,16 @@
testlk = {CLIENT: self.testclient, SERVER: self.testserver}
if not os.path.exists(os.path.join(srclk[side], os.path.normpath(testlk[side] + '.java'))):
- return False
+ if not os.path.exists(os.path.join(self.srcshared, os.path.normpath(testlk[side] + '.java'))):
+ return False
return True
def checkbins(self, side):
@@ -788,6 +790,8 @@
binlk = {CLIENT: self.binclient, SERVER: self.binserver}
testlk = {CLIENT: self.testclient, SERVER: self.testserver}
@ -37,7 +18,7 @@
if not os.path.exists(os.path.join(binlk[side], os.path.normpath(testlk[side] + '.class'))):
return False
return True
@@ -1029,6 +1037,10 @@
@@ -1029,6 +1033,10 @@
pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver}
pathlog = {CLIENT: self.clientrecomplog, SERVER: self.serverrecomplog}
@ -48,33 +29,16 @@
if not os.path.exists(pathbinlk[side]):
os.makedirs(pathbinlk[side])
@@ -1041,6 +1053,7 @@
all_files = True
append_pattern = False
pkglist = filterdirs(pathsrclk[side], '*.java', append_pattern=append_pattern, all_files=all_files)
+ pkglist = pkglist + filterdirs(self.srcshared, '*.java', append_pattern=append_pattern, all_files=all_files) #FML, Add Common folder
dirs = ' '.join(pkglist)
classpath = os.pathsep.join(cplk[side])
forkcmd = self.cmdrecomp.format(classpath=classpath, sourcepath=pathsrclk[side], outpath=pathbinlk[side],
@@ -1062,7 +1075,7 @@
@@ -1062,7 +1070,7 @@
raise
def startserver(self):
- classpath = [self.binserver] + self.cpathserver
+ classpath = [self.binclient, self.srcshared] + self.cpathserver
+ classpath = [self.binclient] + self.cpathserver
classpath = [os.path.join('..', p) for p in classpath]
classpath = os.pathsep.join(classpath)
os.chdir(self.dirjars)
@@ -1070,7 +1083,7 @@
self.runmc(forkcmd)
def startclient(self):
- classpath = [self.binclient] + self.cpathclient
+ classpath = [self.binclient, self.srcshared] + self.cpathclient
classpath = [os.path.join('..', p) for p in classpath]
classpath = os.pathsep.join(classpath)
natives = os.path.join('..', self.dirnatives)
@@ -1197,20 +1210,20 @@
@@ -1197,20 +1205,20 @@
with open(self.csvmethods, 'rb') as fh:
methodsreader = csv.DictReader(fh)
for row in methodsreader:
@ -98,56 +62,7 @@
names['params'][row['param']] = row['name']
regexps = {
@@ -1240,6 +1253,11 @@
# HINT: We pathwalk the sources
for path, _, filelist in os.walk(pathsrclk[side], followlinks=True):
+ for cur_file in fnmatch.filter(filelist, '*.java'):
+ updatefile(os.path.normpath(os.path.join(path, cur_file)))
+
+ # FML, copy of the above, for the common folder
+ for path, _, filelist in os.walk(self.srcshared, followlinks=True):
for cur_file in fnmatch.filter(filelist, '*.java'):
updatefile(os.path.normpath(os.path.join(path, cur_file)))
return True
@@ -1322,12 +1340,14 @@
pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver}
strip_comments(pathsrclk[side])
+ strip_comments(self.srcshared)
def process_cleanup(self, side):
"""Do lots of random cleanups including stripping comments, trailing whitespace and extra blank lines"""
pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver}
src_cleanup(pathsrclk[side], fix_imports=True, fix_unicode=True, fix_charval=True, fix_pi=True, fix_round=False)
+ src_cleanup(self.srcshared, fix_imports=True, fix_unicode=True, fix_charval=True, fix_pi=True, fix_round=False)
def process_javadoc(self, side):
"""Add CSV descriptions to methods and fields as javadoc"""
@@ -1336,6 +1356,21 @@
if not self.has_doc_csv:
self.logger.warning('!! javadoc disabled due to no csvs !!')
return False
+
+ #FML Recall this function on the common folder
+ #Potential bug: If this is called without a subsiquent rename call, will cause double comments
+ if pathsrclk[side] != self.srcshared:
+ if side == CLIENT:
+ tmp = self.srcclient
+ self.srcclient = self.srcshared
+ self.process_javadoc(side)
+ self.srcclient = tmp
+ else:
+ tmp = self.srcserver
+ self.srcserver = self.srcshared
+ self.process_javadoc(side)
+ self.srcserver = tmp
+
#HINT: We read the relevant CSVs
methodsreader = csv.DictReader(open(self.csvmethods, 'r'))
@@ -1344,13 +1379,13 @@
@@ -1344,13 +1352,13 @@
methods = {}
for row in methodsreader:
#HINT: Only include methods that have a non-empty description
@ -163,13 +78,7 @@
fields[row['searge']] = row['desc'].replace('*/', '* /')
regexps = {
@@ -1422,12 +1457,13 @@
# HINT: We create the list of source directories based on the list of packages
pkglist = filterdirs(pathsrclk[side], '*.java', append_pattern=True)
+ pkglist = pkglist + filterdirs(self.srcshared, '*.java', append_pattern=True) #FML, Add Common folder
dirs = ' '.join(pkglist)
forkcmd = self.cmdastyle.format(classes=dirs, conffile=self.astyleconf)
@@ -1427,7 +1435,7 @@
self.runcmd(forkcmd)
return True
@ -178,7 +87,7 @@
if not reobf:
md5lk = {CLIENT: self.md5client, SERVER: self.md5server}
else:
@@ -1442,6 +1478,9 @@
@@ -1442,6 +1450,9 @@
class_path = ''
else:
class_path += '/'
@ -188,7 +97,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))
@@ -1594,6 +1633,9 @@
@@ -1594,6 +1605,9 @@
sys.exit(1)
for entry in newfiles:
@ -198,7 +107,7 @@
if entry[3] == 'U':
self.logger.info('Retrieving file from server : %s', entry[0])
cur_file = os.path.normpath(entry[0])
@@ -1614,6 +1656,9 @@
@@ -1614,6 +1628,9 @@
md5reoblk = {CLIENT: self.md5reobfclient, SERVER: self.md5reobfserver}
outpathlk = {CLIENT: self.srcmodclient, SERVER: self.srcmodserver}
src = {CLIENT: self.srcclient, SERVER: self.srcserver}
@ -208,28 +117,10 @@
# HINT: We need a table for the old md5 and the new ones
md5table = {}
@@ -1646,6 +1691,7 @@
# HINT: We extract the source files for the modified class files
for in_class in trgclasses:
src_file = os.path.normpath(os.path.join(src[side], in_class + '.java'))
+ cmn_file = os.path.normpath(os.path.join(self.srcshared, in_class + '.java'))
dest_file = os.path.normpath(os.path.join(outpathlk[side], in_class + '.java'))
if os.path.isfile(src_file):
if not os.path.exists(os.path.dirname(dest_file)):
@@ -1655,4 +1701,15 @@
self.logger.info('> Outputted %s to %s', in_class.ljust(35), outpathlk[side])
@@ -1656,3 +1673,6 @@
except IOError:
self.logger.error('* File %s copy failed', in_class)
-
+ elif os.path.isfile(cmn_file):
+ if not os.path.exists(os.path.dirname(dest_file)):
+ os.makedirs(os.path.dirname(dest_file))
+ try:
+ shutil.copyfile(cmn_file, dest_file)
+ self.logger.info('> Outputted %s to %s', in_class.ljust(35), outpathlk[side])
+ except IOError:
+ self.logger.error('* File %s copy failed', in_class)
+
+def commands_sanity_check():
+ print 'Commands patch applied successfully'
+

View file

@ -20,23 +20,21 @@ import java.util.Properties;
import java.util.Set;
import java.util.logging.Logger;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.CrashReport;
import net.minecraft.src.CrashReportCategory;
import net.minecraft.src.DedicatedServer;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EntityPlayerMP;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.NBTBase;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.NetHandler;
import net.minecraft.src.Packet131MapData;
import net.minecraft.src.SaveHandler;
import net.minecraft.src.ServerListenThread;
import net.minecraft.src.ThreadMinecraftServer;
import net.minecraft.src.World;
import net.minecraft.src.WorldInfo;
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
import net.minecraft.network.packet.Packet131MapData;
import net.minecraft.server.*;
import net.minecraft.server.dedicated.DedicatedServer;
import net.minecraft.world.World;
import net.minecraft.world.storage.SaveHandler;
import net.minecraft.world.storage.WorldInfo;
import com.google.common.base.Objects;
import com.google.common.base.Strings;

View file

@ -17,17 +17,13 @@ package cpw.mods.fml.common;
import java.util.Arrays;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import net.minecraft.src.NBTBase;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.NBTTagList;
import net.minecraft.src.NBTTagString;
import net.minecraft.src.SaveHandler;
import net.minecraft.src.WorldInfo;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.world.storage.SaveHandler;
import net.minecraft.world.storage.WorldInfo;
import com.google.common.collect.MapMaker;
import com.google.common.collect.Sets;
import com.google.common.eventbus.EventBus;
import cpw.mods.fml.common.registry.GameData;

View file

@ -13,9 +13,9 @@
*/
package cpw.mods.fml.common;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.IInventory;
import net.minecraft.src.ItemStack;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
/**
* Return a crafting handler for the mod container to call

View file

@ -14,8 +14,8 @@ package cpw.mods.fml.common;
import java.util.Random;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
/**

View file

@ -2,8 +2,8 @@ package cpw.mods.fml.common;
import java.util.Random;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
/**
*

View file

@ -4,12 +4,12 @@ import java.util.List;
import com.google.common.collect.MapDifference;
import net.minecraft.entity.Entity;
import net.minecraft.network.INetworkManager;
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.src.Entity;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.NetHandler;
import net.minecraft.src.Packet;
import net.minecraft.src.Packet131MapData;
import cpw.mods.fml.common.network.EntitySpawnAdjustmentPacket;
import cpw.mods.fml.common.network.EntitySpawnPacket;
import cpw.mods.fml.common.network.ModMissingPacket;

View file

@ -1,6 +1,6 @@
package cpw.mods.fml.common;
import net.minecraft.src.ItemStack;
import net.minecraft.item.ItemStack;
public interface IFuelHandler
{

View file

@ -13,8 +13,8 @@
*/
package cpw.mods.fml.common;
import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityPlayer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
public interface IPickupNotifier
{

View file

@ -14,7 +14,7 @@
package cpw.mods.fml.common;
import net.minecraft.src.EntityPlayer;
import net.minecraft.entity.player.EntityPlayer;
/**
* @author cpw

View file

@ -15,8 +15,9 @@ package cpw.mods.fml.common;
import java.util.Random;
import net.minecraft.src.IChunkProvider;
import net.minecraft.src.World;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
/**
* This is called back during world generation.

View file

@ -26,7 +26,7 @@ import java.util.Set;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import net.minecraft.src.CallableMinecraftVersion;
import net.minecraft.crash.CallableMinecraftVersion;
import com.google.common.base.CharMatcher;
import com.google.common.base.Function;

View file

@ -18,11 +18,11 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import net.minecraft.item.ItemBlock;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
import net.minecraft.src.ItemBlock;
/**
* The new mod style in FML 1.3
*

View file

@ -2,10 +2,9 @@ package cpw.mods.fml.common;
import java.util.Map;
import net.minecraft.src.NBTBase;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.SaveHandler;
import net.minecraft.src.WorldInfo;
import net.minecraft.nbt.*;
import net.minecraft.world.storage.*;
public interface WorldAccessContainer
{

View file

@ -1,8 +1,8 @@
package cpw.mods.fml.common.event;
import net.minecraft.command.CommandHandler;
import net.minecraft.command.ICommand;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.CommandHandler;
import net.minecraft.src.ICommand;
import cpw.mods.fml.common.LoaderState.ModState;
public class FMLServerStartingEvent extends FMLStateEvent

View file

@ -16,18 +16,15 @@ package cpw.mods.fml.common.modloader;
import java.util.Random;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.GuiScreen;
import net.minecraft.src.IInventory;
import net.minecraft.src.ItemStack;
import net.minecraft.src.NetClientHandler;
import net.minecraft.src.NetHandler;
import net.minecraft.src.NetServerHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.src.World;
import net.minecraft.src.WorldClient;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.NetServerHandler;
import net.minecraft.network.packet.NetHandler;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.world.World;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.common.asm.SideOnly;

View file

@ -1,12 +1,12 @@
package cpw.mods.fml.common.modloader;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.EntitySpawnPacket;
import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.NetHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet250CustomPayload;
public interface IModLoaderSidedHelper
{

View file

@ -1,8 +1,7 @@
package cpw.mods.fml.common.modloader;
import net.minecraft.src.NetHandler;
import net.minecraft.src.NetServerHandler;
import net.minecraft.src.Packet3Chat;
import net.minecraft.network.NetServerHandler;
import net.minecraft.network.packet.*;
import cpw.mods.fml.common.network.IChatListener;
public class ModLoaderChatListener implements IChatListener

View file

@ -1,11 +1,11 @@
package cpw.mods.fml.common.modloader;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.NetLoginHandler;
import net.minecraft.network.packet.NetHandler;
import net.minecraft.network.packet.Packet1Login;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.NetHandler;
import net.minecraft.src.NetLoginHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet1Login;
import cpw.mods.fml.common.network.IConnectionHandler;
import cpw.mods.fml.common.network.Player;

View file

@ -1,8 +1,8 @@
package cpw.mods.fml.common.modloader;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.IInventory;
import net.minecraft.src.ItemStack;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.ICraftingHandler;
public class ModLoaderCraftingHelper implements ICraftingHandler

View file

@ -2,8 +2,9 @@ package cpw.mods.fml.common.modloader;
import java.util.Random;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import cpw.mods.fml.common.IDispenseHandler;
import cpw.mods.fml.common.IDispenserHandler;

View file

@ -2,14 +2,14 @@ package cpw.mods.fml.common.modloader;
import java.util.concurrent.Callable;
import net.minecraft.entity.Entity;
import com.google.common.base.Function;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.network.EntitySpawnPacket;
import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration;
import net.minecraft.src.Entity;
public class ModLoaderEntitySpawnCallback implements Function<EntitySpawnPacket, Entity>
{

View file

@ -1,6 +1,6 @@
package cpw.mods.fml.common.modloader;
import net.minecraft.src.ItemStack;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.IFuelHandler;
public class ModLoaderFuelHelper implements IFuelHandler

View file

@ -1,8 +1,8 @@
package cpw.mods.fml.common.modloader;
import net.minecraft.src.Container;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.World;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
public class ModLoaderGuiHelper implements IGuiHandler

View file

@ -23,13 +23,13 @@ import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Maps;
import net.minecraft.command.ICommand;
import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.src.BaseMod;
import net.minecraft.src.Container;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityDragon;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.IAnimals;
import net.minecraft.src.ICommand;
import net.minecraft.src.TradeEntry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;

View file

@ -28,7 +28,7 @@ import java.util.Properties;
import java.util.Set;
import java.util.logging.Level;
import net.minecraft.src.ICommand;
import net.minecraft.command.ICommand;
import com.google.common.base.Strings;
import com.google.common.base.Throwables;

View file

@ -1,9 +1,8 @@
package cpw.mods.fml.common.modloader;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EntityPlayerMP;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;

View file

@ -1,7 +1,7 @@
package cpw.mods.fml.common.modloader;
import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityPlayer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import cpw.mods.fml.common.IPickupNotifier;
public class ModLoaderPickupNotifier implements IPickupNotifier

View file

@ -5,10 +5,10 @@ import java.util.Random;
import com.google.common.collect.Lists;
import net.minecraft.src.EntityVillager;
import net.minecraft.src.Item;
import net.minecraft.src.MerchantRecipeList;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.item.Item;
import net.minecraft.src.TradeEntry;
import net.minecraft.village.MerchantRecipeList;
import cpw.mods.fml.common.registry.VillagerRegistry;
import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler;

View file

@ -2,10 +2,11 @@ package cpw.mods.fml.common.modloader;
import java.util.Random;
import net.minecraft.src.ChunkProviderGenerate;
import net.minecraft.src.ChunkProviderHell;
import net.minecraft.src.IChunkProvider;
import net.minecraft.src.World;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.ChunkProviderGenerate;
import net.minecraft.world.gen.ChunkProviderHell;
import cpw.mods.fml.common.IWorldGenerator;
public class ModLoaderWorldGenerator implements IWorldGenerator

View file

@ -1,7 +1,7 @@
package cpw.mods.fml.common.network;
import net.minecraft.src.NetHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;

View file

@ -8,12 +8,10 @@ import java.io.IOException;
import java.util.List;
import java.util.logging.Level;
import net.minecraft.src.DataWatcher;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityLiving;
import net.minecraft.src.MathHelper;
import net.minecraft.src.NetHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.entity.*;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
import net.minecraft.util.MathHelper;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;

View file

@ -11,24 +11,17 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.network.*;
import net.minecraft.network.packet.*;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EntityPlayerMP;
import net.minecraft.src.EnumGameType;
import net.minecraft.src.Item;
import net.minecraft.src.NetHandler;
import net.minecraft.src.NetLoginHandler;
import net.minecraft.src.NetServerHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet;
import net.minecraft.src.Packet131MapData;
import net.minecraft.src.Packet1Login;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.src.Packet3Chat;
import net.minecraft.src.ServerConfigurationManager;
import net.minecraft.src.World;
import net.minecraft.src.WorldType;
import net.minecraft.server.management.ServerConfigurationManager;
import net.minecraft.world.EnumGameType;
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

View file

@ -4,8 +4,8 @@ import java.util.Arrays;
import java.util.concurrent.ConcurrentMap;
import java.util.logging.Level;
import net.minecraft.src.NetHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
import com.google.common.base.Throwables;
import com.google.common.collect.MapMaker;

View file

@ -1,8 +1,6 @@
package cpw.mods.fml.common.network;
import net.minecraft.src.NetHandler;
import net.minecraft.src.NetServerHandler;
import net.minecraft.src.Packet3Chat;
import net.minecraft.network.packet.*;
public interface IChatListener
{

View file

@ -1,10 +1,10 @@
package cpw.mods.fml.common.network;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.NetLoginHandler;
import net.minecraft.network.packet.NetHandler;
import net.minecraft.network.packet.Packet1Login;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.NetHandler;
import net.minecraft.src.NetLoginHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet1Login;
public interface IConnectionHandler
{

View file

@ -1,7 +1,7 @@
package cpw.mods.fml.common.network;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.World;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
public interface IGuiHandler
{

View file

@ -1,7 +1,7 @@
package cpw.mods.fml.common.network;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
public interface IPacketHandler
{

View file

@ -1,7 +1,6 @@
package cpw.mods.fml.common.network;
import net.minecraft.src.NetHandler;
import net.minecraft.src.Packet131MapData;
import net.minecraft.network.packet.*;
public interface ITinyPacketHandler
{

View file

@ -5,6 +5,10 @@ import java.util.BitSet;
import java.util.Set;
import java.util.logging.Level;
import net.minecraft.nbt.*;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
import com.google.common.collect.MapDifference;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteStreams;
@ -18,12 +22,6 @@ import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.registry.GameData;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.ItemData;
import net.minecraft.src.CompressedStreamTools;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.NBTTagList;
import net.minecraft.src.NetHandler;
import net.minecraft.src.WorldClient;
import static cpw.mods.fml.common.network.FMLPacket.Type.MOD_IDMAP;
public class ModIdMapPacket extends FMLPacket {

View file

@ -6,8 +6,8 @@ import java.util.Collection;
import java.util.Map;
import java.util.Map.Entry;
import net.minecraft.src.NetHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
import com.google.common.collect.Maps;
import com.google.common.io.ByteArrayDataInput;

View file

@ -8,9 +8,8 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import net.minecraft.src.NetHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

View file

@ -10,11 +10,9 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.Logger;
import net.minecraft.src.NBTTagList;
import net.minecraft.src.NetHandler;
import net.minecraft.src.NetLoginHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.*;
import net.minecraft.network.packet.*;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

View file

@ -16,8 +16,8 @@ import cpw.mods.fml.common.versioning.ArtifactVersion;
import cpw.mods.fml.common.versioning.DefaultArtifactVersion;
import cpw.mods.fml.common.versioning.VersionRange;
import net.minecraft.src.NetHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
public class ModMissingPacket extends FMLPacket
{

View file

@ -5,8 +5,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import net.minecraft.src.Packet131MapData;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface NetworkMod

View file

@ -4,7 +4,7 @@ import java.lang.reflect.Method;
import java.util.Set;
import java.util.logging.Level;
import net.minecraft.src.Item;
import net.minecraft.item.Item;
import com.google.common.base.Strings;

View file

@ -6,19 +6,13 @@ import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.Container;
import net.minecraft.network.*;
import net.minecraft.network.packet.*;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.Container;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EntityPlayerMP;
import net.minecraft.src.NetHandler;
import net.minecraft.src.NetLoginHandler;
import net.minecraft.src.NetServerHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet131MapData;
import net.minecraft.src.Packet1Login;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.src.Packet3Chat;
import net.minecraft.src.World;
import net.minecraft.world.World;
import com.google.common.base.Charsets;
import com.google.common.base.Joiner;

View file

@ -1,8 +1,8 @@
package cpw.mods.fml.common.network;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.NetHandler;
import net.minecraft.src.INetworkManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.NetHandler;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;

View file

@ -1,10 +1,10 @@
package cpw.mods.fml.common.network;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet131MapData;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.EntityPlayerMP;
import net.minecraft.src.Packet;
import net.minecraft.src.Packet131MapData;
import net.minecraft.src.Packet250CustomPayload;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;

View file

@ -2,7 +2,7 @@ package cpw.mods.fml.common.registry;
import java.util.BitSet;
import net.minecraft.src.Block;
import net.minecraft.block.Block;
class BlockTracker
{

View file

@ -7,13 +7,13 @@ import java.util.Map;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import net.minecraft.src.BiomeGenBase;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityList;
import net.minecraft.src.EntityLiving;
import net.minecraft.src.EntityTracker;
import net.minecraft.src.EnumCreatureType;
import net.minecraft.src.SpawnListEntry;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityTracker;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import com.google.common.base.Function;
import com.google.common.collect.ArrayListMultimap;

View file

@ -4,9 +4,9 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import net.minecraft.src.Item;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.NBTTagList;
import net.minecraft.item.Item;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import com.google.common.base.Function;
import com.google.common.collect.MapDifference;

View file

@ -7,23 +7,22 @@ import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.logging.Level;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.BiomeGenBase;
import net.minecraft.src.CraftingManager;
import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.FurnaceRecipes;
import net.minecraft.src.IChunkProvider;
import net.minecraft.src.IInventory;
import net.minecraft.src.IRecipe;
import net.minecraft.src.Item;
import net.minecraft.src.ItemBlock;
import net.minecraft.src.ItemStack;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.NBTTagList;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
import net.minecraft.src.WorldType;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.IChunkProvider;
import com.google.common.base.Function;
import com.google.common.collect.ArrayListMultimap;
@ -139,7 +138,7 @@ public class GameRegistry
public static Object buildBlock(ModContainer container, Class<?> type, Block annotation) throws Exception
{
Object o = type.getConstructor(int.class).newInstance(findSpareBlockId());
registerBlock((net.minecraft.src.Block) o);
registerBlock((net.minecraft.block.Block) o);
return o;
}
@ -157,7 +156,7 @@ public class GameRegistry
* Register a block with the world
*
*/
public static void registerBlock(net.minecraft.src.Block block)
public static void registerBlock(net.minecraft.block.Block block)
{
registerBlock(block, ItemBlock.class);
}
@ -168,7 +167,7 @@ public class GameRegistry
* @param block
* @param itemclass
*/
public static void registerBlock(net.minecraft.src.Block block, Class<? extends ItemBlock> itemclass)
public static void registerBlock(net.minecraft.block.Block block, Class<? extends ItemBlock> itemclass)
{
if (Loader.instance().isInState(LoaderState.CONSTRUCTING))
{

View file

@ -1,6 +1,6 @@
package cpw.mods.fml.common.registry;
import net.minecraft.src.Entity;
import net.minecraft.entity.Entity;
/**
* This interface should be implemented by an Entity that can be 'thrown', like snowballs.

View file

@ -2,6 +2,9 @@ package cpw.mods.fml.common.registry;
import java.util.Map;
import net.minecraft.item.Item;
import net.minecraft.nbt.NBTTagCompound;
import com.google.common.base.Objects;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.Maps;
@ -9,9 +12,6 @@ import com.google.common.collect.Multiset;
import cpw.mods.fml.common.ModContainer;
import net.minecraft.src.Item;
import net.minecraft.src.NBTTagCompound;
public class ItemData {
private static Map<String, Multiset<String>> modOrdinals = Maps.newHashMap();

View file

@ -7,12 +7,10 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.src.Block;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.StringTranslate;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StringTranslate;
public class LanguageRegistry
{

View file

@ -5,14 +5,12 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
import net.minecraft.src.ComponentVillageStartPiece;
import net.minecraft.src.EntityVillager;
import net.minecraft.src.Item;
import net.minecraft.src.MapGenVillage;
import net.minecraft.src.MerchantRecipeList;
import net.minecraft.src.StructureVillagePieceWeight;
import net.minecraft.src.StructureVillagePieces;
import net.minecraft.src.Tuple;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.item.Item;
import net.minecraft.util.Tuple;
import net.minecraft.village.MerchantRecipeList;
import net.minecraft.world.gen.structure.ComponentVillageStartPiece;
import net.minecraft.world.gen.structure.StructureVillagePieceWeight;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Lists;

View file

@ -17,14 +17,13 @@ import java.util.List;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.MapDifference;
import net.minecraft.entity.Entity;
import net.minecraft.network.INetworkManager;
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.src.Entity;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.NetClientHandler;
import net.minecraft.src.NetHandler;
import net.minecraft.src.Packet;
import net.minecraft.src.Packet131MapData;
import net.minecraft.src.World;
import net.minecraft.world.World;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.IFMLSidedHandler;
import cpw.mods.fml.common.Loader;
@ -43,7 +42,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
* Handles primary communication from hooked code into the system
*
* The FML entry point is {@link #beginServerLoading(MinecraftServer)} called from
* {@link net.minecraft.src.DedicatedServer}
* {@link net.minecraft.shared.DedicatedServer}
*
* Obfuscated code should focus on this class and other members of the "server"
* (or "client") code

View file

@ -3,10 +3,10 @@
# has deobf and obf mappings so it runs OK in mcp
# entityplayer -> network/player
qx cpw/mods/fml/common/network/Player
net.minecraft.src.EntityPlayer cpw/mods/fml/common/network/Player
net.minecraft.entity.player.EntityPlayer cpw/mods/fml/common/network/Player
# block -> blockproxy
amj cpw/mods/fml/common/registry/BlockProxy
net.minecraft.src.Block cpw/mods/fml/common/registry/BlockProxy
net.minecraft.block.Block cpw/mods/fml/common/registry/BlockProxy
# item -> itemproxy
uk cpw/mods/fml/common/registry/ItemProxy
net.minecraft.src.Item cpw/mods/fml/common/registry/ItemProxy
net.minecraft.item.Item cpw/mods/fml/common/registry/ItemProxy

View file

@ -22,8 +22,8 @@ Params = %(DirConf)s/params.csv
NewIds = %(DirConf)s/newids.csv
[SRGS]
ConfClient = %(DirConf)s/joined.srg
ConfServer = %(DirConf)s/joined.srg
ConfClient = %(DirConf)s/packaged.srg
ConfServer = %(DirConf)s/packaged.srg
Client = %(DirTemp)s/client_rg.srg
Server = %(DirTemp)s/server_rg.srg
DeobfClient = %(DirTemp)s/client_deobf.srg
@ -56,8 +56,8 @@ ServerDeobLog = %(DirLogs)s/server_deob.log
NullPkg = net/minecraft/src
[EXCEPTOR]
XClientCfg = %(DirConf)s/joined.exc
XServerCfg = %(DirConf)s/joined.exc
XClientCfg = %(DirConf)s/packaged.exc
XServerCfg = %(DirConf)s/packaged.exc
XClientOut = %(DirTemp)s/minecraft_exc.jar
XServerOut = %(DirTemp)s/minecraft_server_exc.jar
XClientLog = %(DirLogs)s/client_exc.log

1327
fml/conf/packages.csv Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

View file

@ -22,7 +22,7 @@ def download_deps(mcp_path):
if not os.path.isfile(target):
try:
urllib.urlretrieve('http://files.minecraftforge.net/fmllibs/' + lib, target)
print 'Downloaded %s successfully' % lib
print 'Downloaded %s' % lib
except:
print 'Download %s failed, download manually from http://files.minecraftforge.net/fmllibs/%s or http://files.minecraftforge.net/fmllibs/fml_libs_dev.zip and place in MCP/lib' % (lib, lib)
ret = False
@ -54,7 +54,7 @@ def download_file(url, target, md5=None):
print 'Download of %s failed md5 check, deleting' % name
os.remove(target)
return False
print 'Downloaded %s successfully' % name
print 'Downloaded %s' % name
except Exception as e:
print e
print 'Download of %s failed, download it manually from \'%s\' to \'%s\'' % (target, url, target)
@ -328,8 +328,6 @@ def setup_fml(fml_dir, mcp_dir):
#cleanup_source
cleanup_source(src_dir)
merge_client_server(mcp_dir)
os.chdir(mcp_dir)
commands = Commands(verify=True)
updatemd5_side(mcp_dir, commands, CLIENT)
@ -385,57 +383,12 @@ def get_joined_srg(mcp_dir):
values[pts[0]][pts[1]] = pts[2]
return values
def merge_client_server(mcp_dir):
client = os.path.join(mcp_dir, 'src', 'minecraft')
shared = os.path.join(mcp_dir, 'src', 'common')
client_jar = os.path.join(mcp_dir, 'jars', 'bin', 'minecraft.jar')
server_jar = os.path.join(mcp_dir, 'jars', 'minecraft_server.jar')
joined_srg = get_joined_srg(mcp_dir)['CL:']
if not os.path.isfile(client_jar) or not os.path.isfile(server_jar):
return
if not os.path.isdir(shared):
os.makedirs(shared)
server_classes = []
zip = ZipFile(server_jar)
for i in zip.filelist:
if i.filename.endswith('.class'):
server_classes.append(i.filename[:-6])
for cls in server_classes:
if cls in joined_srg.keys():
cls = joined_srg[cls]
cls += '.java'
f_client = os.path.normpath(os.path.join(client, cls.replace('/', os.path.sep))).replace(os.path.sep, '/')
f_shared = os.path.normpath(os.path.join(shared, cls.replace('/', os.path.sep))).replace(os.path.sep, '/')
if not os.path.isfile(f_client):
print 'Issue Merging File Not Found: ' + cls
continue
if not cls.rfind('/') == -1:
new_dir = os.path.join(shared, cls.rsplit('/', 1)[0])
if not os.path.isdir(new_dir):
os.makedirs(new_dir)
shutil.move(f_client, f_shared)
cleanDirs(client)
def apply_fml_patches(fml_dir, mcp_dir, src_dir, copy_files=True):
#Delete /common/cpw to get rid of the Side/SideOnly classes used in decompilation
#Delete /minecraft/cpw to get rid of the Side/SideOnly classes used in decompilation
cpw_mc_dir = os.path.join(src_dir, 'minecraft', 'cpw')
cpw_com_dir = os.path.join(src_dir, 'common', 'cpw')
if os.path.isdir(cpw_mc_dir):
shutil.rmtree(cpw_mc_dir)
if os.path.isdir(cpw_com_dir):
shutil.rmtree(cpw_com_dir)
#patch files
print 'Applying Forge ModLoader patches'
@ -445,15 +398,12 @@ def apply_fml_patches(fml_dir, mcp_dir, src_dir, copy_files=True):
apply_patches(mcp_dir, os.path.join(fml_dir, 'patches', 'minecraft'), src_dir)
if copy_files and os.path.isdir(os.path.join(fml_dir, 'client')):
copytree(os.path.join(fml_dir, 'client'), os.path.join(src_dir, 'minecraft'))
if copy_files and os.path.isdir(os.path.join(fml_dir, 'common')):
copytree(os.path.join(fml_dir, 'common'), os.path.join(src_dir, 'minecraft'))
#delete argo
if os.path.isdir(os.path.join(src_dir, 'minecraft', 'argo')):
shutil.rmtree(os.path.join(src_dir, 'minecraft', 'argo'))
if os.path.isdir(os.path.join(fml_dir, 'patches', 'common')):
apply_patches(mcp_dir, os.path.join(fml_dir, 'patches', 'common'), src_dir)
if copy_files and os.path.isdir(os.path.join(fml_dir, 'common')):
copytree(os.path.join(fml_dir, 'common'), os.path.join(src_dir, 'common'))
def finish_setup_fml(fml_dir, mcp_dir):
sys.path.append(mcp_dir)
@ -654,6 +604,10 @@ def download_mcp(mcp_dir, fml_dir, version=None):
zf.extractall(mcp_dir)
zf.close()
eclipse_dir = os.path.join(mcp_dir, 'eclipse')
if os.path.isdir(eclipse_dir):
shutil.rmtree(eclipse_dir)
return True
def setup_mcp(fml_dir, mcp_dir, dont_gen_conf=True):
@ -668,12 +622,12 @@ def setup_mcp(fml_dir, mcp_dir, dont_gen_conf=True):
print 'Setting up MCP'
if os.path.isfile(backup):
print '> Restoring commands.py backup'
print 'Restoring commands.py backup'
if os.path.exists(runtime):
os.remove(runtime)
shutil.copy(backup, runtime)
else:
print '> Backing up commands.py'
print 'Backing up commands.py'
shutil.copy(runtime, backup)
if not os.path.isfile(patch):
@ -683,8 +637,7 @@ def setup_mcp(fml_dir, mcp_dir, dont_gen_conf=True):
temp = os.path.abspath('temp.patch')
cmd = 'patch -i "%s" ' % temp
windows = os.name == 'nt'
if windows:
if os.name == 'nt':
applydiff = os.path.abspath(os.path.join(mcp_dir, 'runtime', 'bin', 'applydiff.exe'))
cmd = '"%s" -uf -i "%s"' % (applydiff, temp)
@ -692,8 +645,6 @@ def setup_mcp(fml_dir, mcp_dir, dont_gen_conf=True):
cmd = cmd.replace('\\', '\\\\')
cmd = shlex.split(cmd)
if windows:
print 'Patching file %s' % os.path.normpath(runtime)
fix_patch(patch, temp)
process = subprocess.Popen(cmd, cwd=os.path.join(mcp_dir, 'runtime'), bufsize=-1)
process.communicate()
@ -731,6 +682,8 @@ def setup_mcp(fml_dir, mcp_dir, dont_gen_conf=True):
print 'Copying FML conf'
shutil.copytree(fml_conf, mcp_conf)
gen_renamed_conf(mcp_dir, fml_dir)
#update workspace
if not os.path.isfile(os.path.join(fml_dir, 'fmlbuild.properties-sample')):
mcp_eclipse = os.path.join(mcp_dir, 'eclipse')
@ -881,3 +834,106 @@ def gen_merged_csv(common_map, in_file, out_file, main_key='searge'):
writer.writeheader()
for row in sorted(common, key=lambda row: row[main_key]):
writer.writerow(row)
def repackage_class(pkgs, cls):
if cls.startswith('net/minecraft/src/'):
tmp = cls[18:]
if tmp in pkgs.keys():
return '%s/%s' % (pkgs[tmp], tmp)
return cls
typere = re.compile('([\[ZBCSIJFDV]|L([\w\/]+);)')
def repackage_signature(pkgs, sig):
global typere
sig1 = sig
params = sig.rsplit(')', 1)[0][1:]
ret = sig.rsplit(')', 1)[1]
sig = '('
for arg in typere.findall(params):
if len(arg[1]) > 0:
sig += 'L%s;' % repackage_class(pkgs, arg[1])
else:
sig += arg[0]
sig += ')'
for tmp in typere.findall(ret):
if len(tmp[1]) > 0:
sig += 'L%s;' % repackage_class(pkgs, tmp[1])
else:
sig += tmp[0]
return sig
def gen_renamed_conf(mcp_dir, fml_dir):
pkg_file = os.path.join(fml_dir, 'conf', 'packages.csv')
srg_in = os.path.join(mcp_dir, 'conf', 'joined.srg')
srg_out = os.path.join(mcp_dir, 'conf', 'packaged.srg')
exc_in = os.path.join(mcp_dir, 'conf', 'joined.exc')
exc_out = os.path.join(mcp_dir, 'conf', 'packaged.exc')
pkgs = {}
if os.path.isfile(pkg_file):
with open(pkg_file) as fh:
reader = csv.DictReader(fh)
for line in reader:
pkgs[line['class']] = line['package']
print 'Creating re-packaged srg'
with open(srg_in, 'r') as inf:
with open(srg_out, 'wb') as outf:
for line in inf:
pts = line.rstrip('\r\n').split(' ')
if pts[0] == 'PK:':
outf.write(' '.join(pts) + '\n')
elif pts[0] == 'CL:':
pts[2] = repackage_class(pkgs, pts[2])
outf.write('CL: %s %s\n' % (pts[1], pts[2]))
elif pts[0] == 'FD:':
tmp = pts[2].rsplit('/', 1)
tmp[0] = repackage_class(pkgs, tmp[0])
outf.write('FD: %s %s/%s\n' % (pts[1], tmp[0], tmp[1]))
elif pts[0] == 'MD:':
tmp = pts[3].rsplit('/', 1)
pts[3] = '%s/%s' % (repackage_class(pkgs, tmp[0]), tmp[1])
pts[4] = repackage_signature(pkgs, pts[4])
outf.write('MD: %s %s %s %s\n' % (pts[1], pts[2], pts[3], pts[4]))
else:
print 'Line unknown in SRG: ' + line
outf.write(line)
excre = re.compile('([\[ZBCSIJFDV]|L([\w\/]+);)')
print 'Creating re-packaged exc'
with open(exc_in, 'r') as inf:
with open(exc_out, 'wb') as outf:
for line in inf:
line = line.rstrip('\r\n')
cls = line.split('.')[0]
named = line.rsplit('=', 1)[1]
line = line[len(cls)+1:-1*len(named)-1]
func = line.split('(')[0]
tmp = named.split('|', 1)
if len(tmp[0]) > 0:
excs = tmp[0].split(',')
for x in range(len(excs)):
excs[x] = repackage_class(pkgs, excs[x])
named = '%s|%s' % (','.join(excs), tmp[1])
sig = repackage_signature(pkgs, line[len(func):])
cls = repackage_class(pkgs, cls)
outf.write('%s.%s%s=%s\n' % (cls, func, sig, named))
print 'Creating re-packaged MCP patch'
patch_in = os.path.join(mcp_dir, 'conf', 'patches', 'minecraft_ff.patch')
patch_tmp = os.path.join(mcp_dir, 'conf', 'patches', 'minecraft_ff.patch.tmp')
regnms = re.compile(r'net\\minecraft\\src\\(\w+)')
with open(patch_in, 'r') as fh:
buf = fh.read()
def mapname(match):
return repackage_class(pkgs, match.group(0).replace('\\', '/')).replace('/', '\\')
buf = regnms.sub(mapname, buf)
with open(patch_tmp, 'w') as fh:
fh.write(buf)
shutil.move(patch_tmp, patch_in)

View file

@ -1,10 +0,0 @@
--- ../src-base/common/net/minecraft/src/CallableSuspiciousClasses.java
+++ ../src-work/common/net/minecraft/src/CallableSuspiciousClasses.java
@@ -130,6 +130,6 @@
public Object call()
{
- return this.func_85085_a();
+ return "FML is installed";
}
}

View file

@ -1,19 +0,0 @@
--- ../src-base/common/net/minecraft/src/MemoryConnection.java
+++ ../src-work/common/net/minecraft/src/MemoryConnection.java
@@ -8,6 +8,8 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+
+import cpw.mods.fml.common.network.FMLNetworkHandler;
public class MemoryConnection implements INetworkManager
{
@@ -71,6 +73,7 @@
if (this.field_74441_e && this.field_74442_b.isEmpty())
{
this.field_74440_d.func_72515_a(this.field_74438_f, this.field_74439_g);
+ FMLNetworkHandler.onConnectionClosed(this, this.field_74440_d.getPlayer());
}
}

View file

@ -1,11 +0,0 @@
--- ../src-base/common/net/minecraft/src/NetHandler.java
+++ ../src-work/common/net/minecraft/src/NetHandler.java
@@ -345,4 +345,8 @@
{
return false;
}
+
+ public abstract void handleVanilla250Packet(Packet250CustomPayload payload);
+
+ public abstract EntityPlayer getPlayer();
}

View file

@ -1,20 +0,0 @@
--- ../src-base/common/net/minecraft/src/SlotFurnace.java
+++ ../src-work/common/net/minecraft/src/SlotFurnace.java
@@ -1,4 +1,6 @@
package net.minecraft.src;
+
+import cpw.mods.fml.common.registry.GameRegistry;
public class SlotFurnace extends Slot
{
@@ -72,7 +74,10 @@
}
}
+
this.field_75228_b = 0;
+
+ GameRegistry.onItemSmelted(field_75229_a, p_75208_1_);
if (p_75208_1_.field_77993_c == Item.field_77703_o.field_77779_bT)
{

View file

@ -1,19 +0,0 @@
--- ../src-base/common/net/minecraft/src/TcpConnection.java
+++ ../src-work/common/net/minecraft/src/TcpConnection.java
@@ -17,6 +17,8 @@
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import javax.crypto.SecretKey;
+
+import cpw.mods.fml.common.network.FMLNetworkHandler;
public class TcpConnection implements INetworkManager
{
@@ -387,6 +389,7 @@
if (this.field_74472_n && this.field_74473_o.isEmpty())
{
this.field_74485_r.func_72515_a(this.field_74481_v, this.field_74480_w);
+ FMLNetworkHandler.onConnectionClosed(this, this.field_74485_r.getPlayer());
}
}

View file

@ -1,59 +1,40 @@
--- ../src-base/minecraft/net/minecraft/client/Minecraft.java
+++ ../src-work/minecraft/net/minecraft/client/Minecraft.java
@@ -2,6 +2,10 @@
@@ -1,7 +1,15 @@
package net.minecraft.client;
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.common.registry.GameData;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.ItemData;
+import cpw.mods.fml.relauncher.ArgsWrapper;
+import cpw.mods.fml.relauncher.FMLRelauncher;
+
import java.awt.BorderLayout;
import java.awt.Canvas;
import java.awt.Color;
@@ -15,7 +19,9 @@
import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.List;
+
import javax.swing.JPanel;
+
import net.minecraft.src.AchievementList;
import net.minecraft.src.AnvilSaveConverter;
import net.minecraft.src.AxisAlignedBB;
@@ -122,6 +128,7 @@
import net.minecraft.src.WorldInfo;
import net.minecraft.src.WorldRenderer;
import net.minecraft.src.WorldSettings;
+
import org.lwjgl.LWJGLException;
import org.lwjgl.Sys;
import org.lwjgl.input.Keyboard;
@@ -134,6 +141,14 @@
import org.lwjgl.opengl.GLContext;
@@ -120,6 +128,8 @@
import org.lwjgl.opengl.PixelFormat;
import org.lwjgl.util.glu.GLU;
+
+import com.google.common.collect.MapDifference;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Side;
+import cpw.mods.fml.relauncher.ArgsWrapper;
+import cpw.mods.fml.relauncher.FMLRelauncher;
@SideOnly(Side.CLIENT)
public abstract class Minecraft implements Runnable, IPlayerUsage
@@ -316,7 +331,7 @@
this.func_71357_I();
{
@@ -302,6 +312,8 @@
this.field_71466_p = new FontRenderer(this.field_71474_y, "/font/default.png", this.field_71446_o, false);
this.field_71464_q = new FontRenderer(this.field_71474_y, "/font/alternate.png", this.field_71446_o, false);
-
+ FMLClientHandler.instance().beginMinecraftLoading(this);
+
if (this.field_71474_y.field_74363_ab != null)
{
StringTranslate.func_74808_a().func_74810_a(this.field_71474_y.field_74363_ab);
@@ -361,6 +376,8 @@
@@ -346,6 +358,8 @@
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);
@ -62,15 +43,16 @@
try
{
this.field_71430_V = new ThreadDownloadResources(this.field_71412_D, this);
@@ -389,6 +406,7 @@
@@ -374,6 +388,8 @@
{
this.func_71352_k();
}
+
+ FMLClientHandler.instance().onInitializationComplete();
}
private void func_71357_I() throws LWJGLException
@@ -747,9 +765,11 @@
@@ -732,9 +748,11 @@
if (!this.field_71454_w)
{
@ -82,35 +64,40 @@
}
GL11.glFlush();
@@ -1279,11 +1299,13 @@
@@ -1264,10 +1282,14 @@
public void func_71407_l()
{
+ FMLCommonHandler.instance().rescheduleTicks(Side.CLIENT);
+
if (this.field_71467_ac > 0)
{
--this.field_71467_ac;
}
+
+ FMLCommonHandler.instance().onPreClientTick();
this.field_71424_I.func_76320_a("stats");
this.field_71413_E.func_77449_e();
this.field_71424_I.func_76318_c("gui");
@@ -1739,6 +1761,7 @@
@@ -1724,6 +1746,8 @@
this.field_71453_ak.func_74428_b();
}
+ FMLCommonHandler.instance().onPostClientTick();
+
this.field_71424_I.func_76319_b();
this.field_71423_H = func_71386_F();
}
@@ -1777,8 +1800,23 @@
@@ -1762,8 +1786,27 @@
}
this.field_71413_E.func_77450_a(StatList.field_75936_f, 1);
+
+ GameData.initializeServerGate(2);
+
this.field_71437_Z = new IntegratedServer(this, p_71371_1_, p_71371_2_, p_71371_3_);
this.field_71437_Z.func_71256_s();
+
+ MapDifference<Integer, ItemData> idDifferences = GameData.gateWorldLoadingForValidation();
+ if (idDifferences!=null)
+ {
@ -123,12 +110,13 @@
+ }
+
+ }
+
+ public void continueWorldLoading()
+ {
this.field_71455_al = true;
this.field_71461_s.func_73720_a(StatCollector.func_74838_a("menu.loadingLevel"));
@@ -1993,6 +2031,12 @@
@@ -1978,6 +2021,12 @@
public static void main(String[] p_main_0_)
{

View file

@ -1,15 +1,15 @@
--- ../src-base/minecraft/net/minecraft/client/MinecraftApplet.java
+++ ../src-work/minecraft/net/minecraft/client/MinecraftApplet.java
@@ -5,6 +5,8 @@
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.relauncher.FMLRelauncher;
+
import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Canvas;
+
+import cpw.mods.fml.relauncher.FMLRelauncher;
import net.minecraft.src.CanvasMinecraftApplet;
import net.minecraft.src.MinecraftAppletImpl;
import net.minecraft.src.Session;
@@ -17,6 +19,11 @@
@@ -15,6 +17,11 @@
private Thread field_71482_c = null;
public void init()
@ -21,7 +21,7 @@
{
this.field_71483_a = new CanvasMinecraftApplet(this);
boolean var1 = "true".equalsIgnoreCase(this.getParameter("fullscreen"));
@@ -64,6 +71,11 @@
@@ -62,6 +69,11 @@
public void start()
{

Some files were not shown because too many files have changed in this diff Show more