Commit 6bcb990129f5e47d213e030e9f4220b3e7bf0ebe

Authored by Mumfrey
1 parent 89fcc90e

LiteLoader 1.6.4 - version bump only, still preliminary

ant/build_liteloader.xml
@@ -4,8 +4,8 @@ @@ -4,8 +4,8 @@
4 <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> 4 <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
5 5
6 <!-- Versions !!IMPORTANT --> 6 <!-- Versions !!IMPORTANT -->
7 - <property name="version" value="1.6.3" />  
8 - <property name="mcversion" value="1.6.3" /> 7 + <property name="version" value="1.6.4" />
  8 + <property name="mcversion" value="1.6.4" />
9 <property name="author" value="Mumfrey" /> 9 <property name="author" value="Mumfrey" />
10 10
11 <!-- Project definitions and dependencies --> 11 <!-- Project definitions and dependencies -->
java/com/mumfrey/liteloader/core/LiteLoader.java
@@ -44,14 +44,14 @@ import com.mumfrey.liteloader.util.PrivateFields; @@ -44,14 +44,14 @@ import com.mumfrey.liteloader.util.PrivateFields;
44 * lightweight mods 44 * lightweight mods
45 * 45 *
46 * @author Adam Mummery-Smith 46 * @author Adam Mummery-Smith
47 - * @version 1.6.3 47 + * @version 1.6.4
48 */ 48 */
49 public final class LiteLoader implements FilenameFilter 49 public final class LiteLoader implements FilenameFilter
50 { 50 {
51 /** 51 /**
52 * Liteloader version 52 * Liteloader version
53 */ 53 */
54 - private static final LiteLoaderVersion VERSION = LiteLoaderVersion.MC_1_6_3_R0; 54 + private static final LiteLoaderVersion VERSION = LiteLoaderVersion.MC_1_6_4_R0;
55 55
56 /** 56 /**
57 * Maximum recursion depth for mod discovery 57 * Maximum recursion depth for mod discovery
@@ -801,6 +801,30 @@ public final class LiteLoader implements FilenameFilter @@ -801,6 +801,30 @@ public final class LiteLoader implements FilenameFilter
801 } 801 }
802 802
803 /** 803 /**
  804 + * Get a reference to a loaded mod, if the mod exists
  805 + *
  806 + * @param modName Mod's name or class name
  807 + * @return
  808 + * @throws InvalidActivityException
  809 + */
  810 + @SuppressWarnings("unchecked")
  811 + public <T extends LiteMod> T getMod(Class<T> modClass)
  812 + {
  813 + if (!this.loaderStartupComplete)
  814 + {
  815 + throw new RuntimeException("Attempted to get a reference to a mod before loader startup is complete");
  816 + }
  817 +
  818 + for (LiteMod mod : this.mods)
  819 + {
  820 + if (mod.getClass().equals(modClass))
  821 + return (T)mod;
  822 + }
  823 +
  824 + return null;
  825 + }
  826 +
  827 + /**
804 * Get whether the specified mod is installed 828 * Get whether the specified mod is installed
805 * 829 *
806 * @param modName 830 * @param modName
@@ -1609,7 +1633,7 @@ public final class LiteLoader implements FilenameFilter @@ -1609,7 +1633,7 @@ public final class LiteLoader implements FilenameFilter
1609 } 1633 }
1610 1634
1611 // ----------------------------------------------------------------------------------------------------------- 1635 // -----------------------------------------------------------------------------------------------------------
1612 - // TODO Remove delegates below after 1.6.3 1636 + // TODO Remove delegates below after 1.6.4
1613 // ----------------------------------------------------------------------------------------------------------- 1637 // -----------------------------------------------------------------------------------------------------------
1614 1638
1615 /** 1639 /**
java/com/mumfrey/liteloader/core/LiteLoaderVersion.java
@@ -7,7 +7,7 @@ import java.util.Set; @@ -7,7 +7,7 @@ import java.util.Set;
7 * LiteLoader version table 7 * LiteLoader version table
8 * 8 *
9 * @author Adam Mummery-Smith 9 * @author Adam Mummery-Smith
10 - * @version 1.6.3 10 + * @version 1.6.4
11 */ 11 */
12 public enum LiteLoaderVersion 12 public enum LiteLoaderVersion
13 { 13 {
@@ -19,7 +19,8 @@ public enum LiteLoaderVersion @@ -19,7 +19,8 @@ public enum LiteLoaderVersion
19 MC_1_6_2_R1(13, "1.6.2", "1.6.2_02", "1.6.2", "1.6.r2"), 19 MC_1_6_2_R1(13, "1.6.2", "1.6.2_02", "1.6.2", "1.6.r2"),
20 MC_1_6_2_R2(14, "1.6.2", "1.6.2_03", "1.6.2", "1.6.r2"), 20 MC_1_6_2_R2(14, "1.6.2", "1.6.2_03", "1.6.2", "1.6.r2"),
21 MC_1_6_2_R3(15, "1.6.2", "1.6.2_04", "1.6.2", "1.6.r2"), 21 MC_1_6_2_R3(15, "1.6.2", "1.6.2_04", "1.6.2", "1.6.r2"),
22 - MC_1_6_3_R0(16, "1.6.3", "1.6.3", "1.6.3", "1.6.r3"); 22 + MC_1_6_3_R0(16, "1.6.3", "1.6.3", "1.6.3", "1.6.r3"),
  23 + MC_1_6_4_R0(17, "1.6.4", "1.6.4", "1.6.4", "1.6.r4");
23 24
24 private int revision; 25 private int revision;
25 26
java/com/mumfrey/liteloader/launch/LiteLoaderTransformer.java
@@ -13,7 +13,7 @@ public class LiteLoaderTransformer implements IClassTransformer @@ -13,7 +13,7 @@ public class LiteLoaderTransformer implements IClassTransformer
13 { 13 {
14 private static final String classMappingRenderLightningBolt = "net.minecraft.src.RenderLightningBolt"; 14 private static final String classMappingRenderLightningBolt = "net.minecraft.src.RenderLightningBolt";
15 15
16 - // TODO Obfuscation 1.6.3 16 + // TODO Obfuscation 1.6.4
17 private static final String classMappingRenderLightningBoltObf = "bha"; 17 private static final String classMappingRenderLightningBoltObf = "bha";
18 18
19 private static Logger logger = Logger.getLogger("liteloader"); 19 private static Logger logger = Logger.getLogger("liteloader");
java/com/mumfrey/liteloader/launch/LiteLoaderTweaker.java
@@ -21,7 +21,7 @@ import net.minecraft.launchwrapper.LaunchClassLoader; @@ -21,7 +21,7 @@ import net.minecraft.launchwrapper.LaunchClassLoader;
21 */ 21 */
22 public class LiteLoaderTweaker implements ITweaker 22 public class LiteLoaderTweaker implements ITweaker
23 { 23 {
24 - public static final String VERSION = "1.6.3"; 24 + public static final String VERSION = "1.6.4";
25 25
26 private File gameDirectory; 26 private File gameDirectory;
27 27
java/com/mumfrey/liteloader/util/PrivateFields.java
@@ -15,7 +15,7 @@ import net.minecraft.src.*; @@ -15,7 +15,7 @@ import net.minecraft.src.*;
15 * @param <P> Parent class type, the type of the class that owns the field 15 * @param <P> Parent class type, the type of the class that owns the field
16 * @param <T> Field type, the type of the field value 16 * @param <T> Field type, the type of the field value
17 * 17 *
18 - * TODO Obfuscation - updated 1.6.3 18 + * TODO Obfuscation - updated 1.6.4
19 */ 19 */
20 @SuppressWarnings("rawtypes") 20 @SuppressWarnings("rawtypes")
21 public class PrivateFields<P, T> 21 public class PrivateFields<P, T>