mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 23:13:15 +00:00
First draft of 1.6 update
This commit is contained in:
1 parent
bc02f3e67b
commit
95f7345ff7
64 files changed
+444
-536
No files matched your search
@@ -13,6 +13,7 @@
|
||||
package cpw.mods.fml.common.asm.transformers.deobf;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
@@ -81,10 +82,7 @@ public class FMLDeobfuscatingRemapper extends Remapper {
|
||||
try
|
||||
{
|
||||
File mapData = new File(deobfFileName);
|
||||
mapData = mapData.getCanonicalFile();
|
||||
ZipFile mapZip = new ZipFile(mapData);
|
||||
ZipEntry classData = mapZip.getEntry("joined.srg");
|
||||
ZipInputSupplier zis = new ZipInputSupplier(mapZip, classData);
|
||||
LZMAInputSupplier zis = new LZMAInputSupplier(new FileInputStream(mapData));
|
||||
InputSupplier<InputStreamReader> srgSupplier = CharStreams.newReaderSupplier(zis,Charsets.UTF_8);
|
||||
List<String> srgList = CharStreams.readLines(srgSupplier);
|
||||
rawMethodMaps = Maps.newHashMap();
|
||||
@@ -132,12 +130,8 @@ public class FMLDeobfuscatingRemapper extends Remapper {
|
||||
this.classLoader = classLoader;
|
||||
try
|
||||
{
|
||||
File libDir = new File(mcDir, "lib");
|
||||
File mapData = new File(libDir, deobfFileName);
|
||||
mapData = mapData.getCanonicalFile();
|
||||
ZipFile mapZip = new ZipFile(mapData);
|
||||
ZipEntry classData = mapZip.getEntry("joined.srg");
|
||||
ZipInputSupplier zis = new ZipInputSupplier(mapZip, classData);
|
||||
InputStream classData = getClass().getResourceAsStream(deobfFileName);
|
||||
LZMAInputSupplier zis = new LZMAInputSupplier(classData);
|
||||
InputSupplier<InputStreamReader> srgSupplier = CharStreams.newReaderSupplier(zis,Charsets.UTF_8);
|
||||
List<String> srgList = CharStreams.readLines(srgSupplier);
|
||||
rawMethodMaps = Maps.newHashMap();
|
||||
|
||||
+8
-8
@@ -5,7 +5,7 @@
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
@@ -17,22 +17,22 @@ import java.io.InputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import LZMA.LzmaInputStream;
|
||||
|
||||
import com.google.common.io.InputSupplier;
|
||||
|
||||
public class ZipInputSupplier implements InputSupplier<InputStream> {
|
||||
private ZipFile zipFile;
|
||||
private ZipEntry zipEntry;
|
||||
public class LZMAInputSupplier implements InputSupplier<InputStream> {
|
||||
private InputStream compressedData;
|
||||
|
||||
public ZipInputSupplier(ZipFile zip, ZipEntry entry)
|
||||
public LZMAInputSupplier(InputStream compressedData)
|
||||
{
|
||||
this.zipFile = zip;
|
||||
this.zipEntry = entry;
|
||||
this.compressedData = compressedData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getInput() throws IOException
|
||||
{
|
||||
return zipFile.getInputStream(zipEntry);
|
||||
return new LzmaInputStream(this.compressedData);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.google.common.base.Throwables;
|
||||
import com.google.common.collect.ObjectArrays;
|
||||
|
||||
import cpw.mods.fml.relauncher.FMLLaunchHandler;
|
||||
|
||||
@@ -20,12 +21,13 @@ public class FMLTweaker implements ITweaker {
|
||||
private File assetsDir;
|
||||
private String profile;
|
||||
private static URI jarLocation;
|
||||
private String[] array;
|
||||
|
||||
@Override
|
||||
public void acceptOptions(List<String> args, File gameDir, File assetsDir, String profile)
|
||||
{
|
||||
this.args = args;
|
||||
this.gameDir = gameDir;
|
||||
this.gameDir = (gameDir == null ? new File(".") : gameDir);
|
||||
this.assetsDir = assetsDir;
|
||||
this.profile = profile;
|
||||
try
|
||||
@@ -51,13 +53,36 @@ public class FMLTweaker implements ITweaker {
|
||||
@Override
|
||||
public String getLaunchTarget()
|
||||
{
|
||||
return "net.minecraft.client.Minecraft";
|
||||
return "net.minecraft.client.main.Main";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getLaunchArguments()
|
||||
{
|
||||
return args.toArray(new String[args.size()]);
|
||||
String[] array = args.toArray(new String[args.size()]);
|
||||
|
||||
if (gameDir != null)
|
||||
{
|
||||
array = ObjectArrays.concat(gameDir.getAbsolutePath(),array);
|
||||
array = ObjectArrays.concat("--gameDir",array);
|
||||
}
|
||||
|
||||
if (assetsDir != null)
|
||||
{
|
||||
array = ObjectArrays.concat(assetsDir.getAbsolutePath(),array);
|
||||
array = ObjectArrays.concat("--assetsDir",array);
|
||||
}
|
||||
if (profile != null)
|
||||
{
|
||||
array = ObjectArrays.concat(profile,array);
|
||||
array = ObjectArrays.concat("--version",array);
|
||||
}
|
||||
else
|
||||
{
|
||||
array = ObjectArrays.concat("UnknownFMLProfile",array);
|
||||
array = ObjectArrays.concat("--version",array);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
public File getGameDir()
|
||||
|
||||
@@ -88,6 +88,12 @@ public class ClassPatchManager {
|
||||
{
|
||||
FMLRelaunchLog.fine("FML URI is %s", FMLTweaker.getJarLocation());
|
||||
File fmlJarFile = new File(FMLTweaker.getJarLocation());
|
||||
if (!fmlJarFile.exists() || !fmlJarFile.isFile())
|
||||
{
|
||||
FMLRelaunchLog.log(Level.INFO, "Not found an FML jar, I assume you're developing FML. Hi cpw or Lex!");
|
||||
patches = ArrayListMultimap.create();
|
||||
return;
|
||||
}
|
||||
fmlJar = new JarFile(fmlJarFile);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
@@ -28,6 +28,7 @@ import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StringTranslate;
|
||||
@@ -45,7 +46,7 @@ public class LanguageRegistry
|
||||
|
||||
public String getStringLocalization(String key)
|
||||
{
|
||||
return getStringLocalization(key, StringTranslate.func_74808_a().func_74811_c());
|
||||
return getStringLocalization(key, Minecraft.func_71410_x().func_135016_M().func_135041_c().func_135034_a());
|
||||
}
|
||||
|
||||
public String getStringLocalization(String key, String lang)
|
||||
@@ -93,9 +94,9 @@ public class LanguageRegistry
|
||||
|
||||
public static void reloadLanguageTable()
|
||||
{
|
||||
// reload language table by forcing lang to null and reloading the properties file
|
||||
String lang = StringTranslate.func_74808_a().func_74811_c();
|
||||
StringTranslate.func_74808_a().func_74810_a(lang, true);
|
||||
// // reload language table by forcing lang to null and reloading the properties file
|
||||
// String lang = StringTranslate.func_74808_a().func_74811_c();
|
||||
// StringTranslate.func_74808_a().func_74810_a(lang, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -120,17 +121,17 @@ public class LanguageRegistry
|
||||
instance().addNameForObject(objectToName, "en_US", name);
|
||||
}
|
||||
|
||||
public void loadLanguageTable(Properties languagePack, String lang)
|
||||
public void loadLanguageTable(Map field_135032_a, String lang)
|
||||
{
|
||||
Properties usPack=modLanguageData.get("en_US");
|
||||
if (usPack!=null) {
|
||||
languagePack.putAll(usPack);
|
||||
field_135032_a.putAll(usPack);
|
||||
}
|
||||
Properties langPack=modLanguageData.get(lang);
|
||||
if (langPack==null) {
|
||||
return;
|
||||
}
|
||||
languagePack.putAll(langPack);
|
||||
field_135032_a.putAll(langPack);
|
||||
}
|
||||
|
||||
public void loadLocalization(String localizationFile, String lang, boolean isXML)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ import java.util.Random;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import net.minecraft.client.resources.ResourceLocation;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.Tuple;
|
||||
@@ -32,6 +33,8 @@ import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Registry for villager trading control
|
||||
@@ -45,8 +48,9 @@ public class VillagerRegistry
|
||||
|
||||
private Multimap<Integer, IVillageTradeHandler> tradeHandlers = ArrayListMultimap.create();
|
||||
private Map<Class<?>, IVillageCreationHandler> villageCreationHandlers = Maps.newHashMap();
|
||||
private Map<Integer, String> newVillagers = Maps.newHashMap();
|
||||
private List<Integer> newVillagerIds = Lists.newArrayList();
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Map<Integer, ResourceLocation> newVillagers;
|
||||
|
||||
/**
|
||||
* Allow access to the {@link net.minecraft.world.gen.structure.StructureVillagePieces} array controlling new village
|
||||
@@ -110,21 +114,33 @@ public class VillagerRegistry
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register your villager id
|
||||
* @param id
|
||||
*/
|
||||
public void registerVillagerId(int id)
|
||||
{
|
||||
if (newVillagerIds.contains(id))
|
||||
{
|
||||
FMLLog.severe("Attempt to register duplicate villager id %d", id);
|
||||
throw new RuntimeException();
|
||||
}
|
||||
newVillagerIds.add(id);
|
||||
}
|
||||
/**
|
||||
* Register a new skin for a villager type
|
||||
*
|
||||
* @param villagerId
|
||||
* @param villagerSkin
|
||||
*/
|
||||
public void registerVillagerType(int villagerId, String villagerSkin)
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerVillagerSkin(int villagerId, ResourceLocation villagerSkin)
|
||||
{
|
||||
if (newVillagers.containsKey(villagerId))
|
||||
if (newVillagers == null)
|
||||
{
|
||||
FMLLog.severe("Attempt to register duplicate villager id %d", villagerId);
|
||||
throw new RuntimeException();
|
||||
newVillagers = Maps.newHashMap();
|
||||
}
|
||||
newVillagers.put(villagerId, villagerSkin);
|
||||
newVillagerIds.add(villagerId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,7 +170,8 @@ public class VillagerRegistry
|
||||
* @param villagerType
|
||||
* @param defaultSkin
|
||||
*/
|
||||
public static String getVillagerSkin(int villagerType, String defaultSkin)
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static ResourceLocation getVillagerSkin(int villagerType, ResourceLocation defaultSkin)
|
||||
{
|
||||
if (instance().newVillagers.containsKey(villagerType))
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ public class FMLInjectionData
|
||||
|
||||
static String debfuscationDataName()
|
||||
{
|
||||
return "deobfuscation_data_"+mccversion+".zip";
|
||||
return "/deobfuscation_data-"+mccversion+".lzma";
|
||||
}
|
||||
public static Object[] data()
|
||||
{
|
||||
|
||||
@@ -105,6 +105,7 @@ public class FMLLaunchHandler
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
t.printStackTrace();
|
||||
FMLRelaunchLog.log(Level.SEVERE, t, "An error occurred trying to configure the minecraft home at %s for Forge Mod Loader", minecraftHome.getAbsolutePath());
|
||||
throw Throwables.propagate(t);
|
||||
}
|
||||
|
||||
+44
-41
@@ -1,73 +1,76 @@
|
||||
#Main FML Access Transformer configuration file
|
||||
# TileEntity addMapping
|
||||
public aqp.a(Ljava/lang/Class;Ljava/lang/String;)V #MD:TileEntity/func_70306_a
|
||||
public ash.a(Ljava/lang/Class;Ljava/lang/String;)V #MD:TileEntity/func_70306_a
|
||||
# EntityList addMappings
|
||||
public mv.a(Ljava/lang/Class;Ljava/lang/String;I)V #MD:EntityList/func_75618_a
|
||||
public mv.a(Ljava/lang/Class;Ljava/lang/String;III)V #MD:EntityList/func_75614_a
|
||||
public mv.b #FD:EntityList/field_75625_b #nameToClassMap
|
||||
public mv.c #FD:EntityList/field_75626_c #classToNameMap
|
||||
public mv.d #FD:EntityList/field_75623_d #idToClassMap
|
||||
public np.a(Ljava/lang/Class;Ljava/lang/String;I)V #MD:EntityList/func_75618_a
|
||||
public np.a(Ljava/lang/Class;Ljava/lang/String;III)V #MD:EntityList/func_75614_a
|
||||
public np.b #FD:EntityList/field_75625_b #nameToClassMap
|
||||
public np.c #FD:EntityList/field_75626_c #classToNameMap
|
||||
public np.d #FD:EntityList/field_75623_d #idToClassMap
|
||||
# RenderEngine
|
||||
#public bba.h #FD:RenderEngine/field_78367_h #textureList # -- MISSING MAPPING # -- MISSING MAPPING
|
||||
public bge.g #FD:RenderEngine/field_78366_k #texturePack
|
||||
#public bge.g #FD:RenderEngine/field_78366_k #texturePack # -- MISSING MAPPING
|
||||
# RenderManager
|
||||
public bgy.q #FD:RenderManager/field_78729_o #renderers
|
||||
public bfx.q #FD:RenderManager/field_78729_o #renderers
|
||||
# RenderBlocks - everything
|
||||
public bgf.* #FD:RenderBlocks/*
|
||||
public bgf.*() #MD:RenderBlocks/*
|
||||
public bfd.* #FD:RenderBlocks/*
|
||||
public bfd.*() #MD:RenderBlocks/*
|
||||
#RenderPlayer
|
||||
public-f bht.h #FD:RenderPlayer/field_77110_j #armorlist
|
||||
#public-f bht.h #FD:RenderPlayer/field_77110_j #armorlist # -- MISSING MAPPING
|
||||
#RenderBiped
|
||||
public-f bhg.k #FD:RenderBiped/field_82424_k #armorlist
|
||||
public-f bgg.l #FD:RenderBiped/field_82424_k #armorlist
|
||||
#StringTranslate
|
||||
public bp.b #FD:StringTranslate/field_74815_b
|
||||
public bp.e #FD:StringTranslate/field_74813_d
|
||||
#public bp.b #FD:StringTranslate/field_74815_b # -- MISSING MAPPING
|
||||
#public bp.e #FD:StringTranslate/field_74813_d # -- MISSING MAPPING
|
||||
# TileEntityRenderer
|
||||
public bjd.m #FD:TileEntityRenderer/field_76966_m
|
||||
public bip.m #FD:TileEntityRenderer/field_76966_m
|
||||
# CraftingManager - make the add recipe methods public
|
||||
public yk.a(Lwm;[Ljava/lang/Object;)Lyn; #MD:CraftingManager/func_92103_a
|
||||
public yk.b(Lwm;[Ljava/lang/Object;)V #MD:CraftingManager/func_77596_b
|
||||
public zz.a(Lxy;[Ljava/lang/Object;)Laac; #MD:CraftingManager/func_92103_a
|
||||
public zz.b(Lxy;[Ljava/lang/Object;)V #MD:CraftingManager/func_77596_b
|
||||
# WeightedRandomItem
|
||||
public lo.a #FD:WeightedRandomItem/field_76292_a #probability
|
||||
public mf.a #FD:WeightedRandomItem/field_76292_a #probability
|
||||
# ItemStack
|
||||
#public+f tv.c #FD:ItemStack/field_77993_c #itemId
|
||||
# StatBase
|
||||
public ka.a #FD:StatBase/field_75978_a #statName
|
||||
public kq.a #FD:StatBase/field_75978_a #statName
|
||||
# NetLoginHandler
|
||||
public jf.a(Ljf;Z)Z #MD:NetLoginHandler/func_72531_a #'complete connection'
|
||||
public jf.g #FD:NetLoginHandler/field_72543_h #userName
|
||||
public ju.a(Lju;Z)Z #MD:NetLoginHandler/func_72531_a #'complete connection'
|
||||
public ju.g #FD:NetLoginHandler/field_72543_h #userName
|
||||
# EntityPlayerMP getNextWindowId
|
||||
public jc.ct()V #MD:EntityPlayerMP/func_71117_bO
|
||||
public jc.cu #FD:EntityPlayerMP/field_71139_cq
|
||||
public jr.bJ()V #MD:EntityPlayerMP/func_71117_bO
|
||||
public jr.bX #FD:EntityPlayerMP/field_71139_cq
|
||||
# EntityAITaskEntry
|
||||
public oo #CL:EntityAITaskEntry
|
||||
public pq #CL:EntityAITaskEntry
|
||||
# EntityAITasks
|
||||
public on.a #FD:EntityAITasks/field_75782_a #taskList
|
||||
public pp.a #FD:EntityAITasks/field_75782_a #taskList
|
||||
# BlockChest
|
||||
public aln.m(Laab;III)Z #MD:BlockChest/func_72292_n #isOcelotBlockingChest
|
||||
public anc.m(Labq;III)Z #MD:BlockChest/func_72292_n #isOcelotBlockingChest
|
||||
# EntityLiving
|
||||
public ng.aU #FD:EntityLiving/field_70736_aM #carryoverDamage
|
||||
public ng.bo #FD:EntityLiving/field_70714_bg #tasks
|
||||
public ng.bG #FD:EntityLiving/field_70703_bu #isJumping
|
||||
#public ng.aU #FD:EntityLiving/field_70736_aM #carryoverDamage # -- MISSING MAPPING
|
||||
public oc.c #FD:EntityLiving/field_70714_bg #tasks
|
||||
#public ng.bG #FD:EntityLiving/field_70703_bu #isJumping # -- MISSING MAPPING
|
||||
# EntityAIOcelotSit
|
||||
protected pa.a(Laab;III)Z #MD:EntityAIOcelotSit/func_75398_a #nearestSittableBlock
|
||||
protected pa.f()Z #MD:EntityAIOcelotSit/func_75399_f #isblocksittable
|
||||
protected qc.a(Labq;III)Z #MD:EntityAIOcelotSit/func_75398_a #nearestSittableBlock
|
||||
protected qc.f()Z #MD:EntityAIOcelotSit/func_75399_f #isblocksittable
|
||||
# CallableMinecraftVersion - sanity check the MC version
|
||||
public c #CL:CallableMinecraftVersion
|
||||
public c.<init>(Lb;)V #MD:CallableMinecraftVersion/<init>(Lnet/minecraft/src/CrashReport;) #constructor
|
||||
# EntityAnimal
|
||||
public qh.d #FD:EntityAnimal/field_70881_d #inLove
|
||||
public rl.bp #FD:EntityAnimal/field_70881_d #inLove
|
||||
# WorldType
|
||||
public aal.<init>(ILjava/lang/String;)V #MD:WorldType/<init>(ILjava/lang/String;)
|
||||
public aal.<init>(ILjava/lang/String;I)V #MD:WorldType/<init>(ILjava/lang/String;I)
|
||||
public aca.<init>(ILjava/lang/String;)V #MD:WorldType/<init>(ILjava/lang/String;)
|
||||
public aca.<init>(ILjava/lang/String;I)V #MD:WorldType/<init>(ILjava/lang/String;I)
|
||||
# ComponentVillage
|
||||
public ahp #CL:ComponentVillage
|
||||
public aje #CL:ComponentVillage
|
||||
# EntityVillager - minmax lists
|
||||
public sm.a(Lzr;ILjava/util/Random;F)V #MD:EntityVillager/func_70948_a #addBuy
|
||||
public sm.b(Lzr;ILjava/util/Random;F)V #MD:EntityVillager/func_70949_b #addSell
|
||||
public sm.bP #FD:EntityVillager/field_70958_bB
|
||||
public sm.bQ #FD:EntityVillager/field_70960_bC
|
||||
public tv.a(Labg;ILjava/util/Random;F)V #MD:EntityVillager/func_70948_a #addBuy
|
||||
public tv.b(Labg;ILjava/util/Random;F)V #MD:EntityVillager/func_70949_b #addSell
|
||||
public tv.bB #FD:EntityVillager/field_70958_bB
|
||||
public tv.bC #FD:EntityVillager/field_70960_bC
|
||||
# GuiButtonMerchant
|
||||
public azi #CL:GuiButtonMerchant
|
||||
public axn #CL:GuiButtonMerchant
|
||||
|
||||
protected awk.a #FD:GuiYesNo/field_73942_a #guiScreen
|
||||
protected aun.a #FD:GuiYesNo/field_73942_a #guiScreen
|
||||
# Minecraft
|
||||
public atm.C #FD:Minecraft/field_71425_J #running
|
||||
public atm.M #FD:Minecraft/field_71446_o # textureManager
|
||||
Reference in new issue
Block a user