Add in a mechanism to get the modcontainer for a mod - so things can be programmatically changed

This commit is contained in:
Christian committed 2012-06-26 16:24:50 -04:00
1 parent 508c986166
commit b6ae926fd3
6 files changed
+159 -137

No files matched your search

+30 -30
View File
@@ -44,9 +44,9 @@ public class ModLoader
/**
* This method is a call in hook from modified external code. Implemented elsewhere.
*
*
* {@link FMLCommonHandler#fuelLookup(int, int)}
*
*
* @param id
* @param metadata
* @return
@@ -134,7 +134,7 @@ public class ModLoader
/**
* Unimplemented on the server as it does not render textures
*
*
* @param fileToOverride
* @param fileToAdd
* @return
@@ -146,7 +146,7 @@ public class ModLoader
/**
* Unimplemented on the server as it does not render textures
*
*
* @param path
* @param overlayPath
* @param index
@@ -248,7 +248,7 @@ public class ModLoader
/**
* This method is a call in hook from modified external code. Implemented elsewhere.
* {@link FMLServerHandler#tryDispensingEntity(World, double, double, double, byte, byte, ItemStack)}
*
*
* @param world
* @param x
* @param y
@@ -374,7 +374,7 @@ public class ModLoader
/**
* Get a value from a field using reflection
* {@link ReflectionHelper#getPrivateValue(Class, Object, String)}
*
*
* @param instanceclass
* @param instance
* @param field
@@ -387,7 +387,7 @@ public class ModLoader
/**
* Stubbed method on the server to return a unique model id
*
*
*/
public static int getUniqueBlockModelID(BaseMod mod, boolean inventoryRenderer)
{
@@ -409,11 +409,11 @@ public class ModLoader
{
return -1;
}
/**
* To properly implement packet 250 protocol you should always check your
* channel is active prior to sending the packet
*
*
* @param player
* @param channel
* @return
@@ -431,7 +431,7 @@ public class ModLoader
/**
* Is the named mod loaded?
* {@link Loader#isModLoaded(String)}
*
*
* @param modname
* @return
*/
@@ -483,7 +483,7 @@ public class ModLoader
/**
* This method is a call in hook from modified external code. Implemented elsewhere.
* {@link FMLServerHandler#handlePacket250(Packet250CustomPayload, EntityPlayer)}
*
*
* @param packet
*/
@Deprecated
@@ -504,7 +504,7 @@ public class ModLoader
/**
* Register a new block
*
*
* @param block
*/
public static void registerBlock(Block block)
@@ -514,7 +514,7 @@ public class ModLoader
/**
* Register a new block
*
*
* @param block
* @param itemclass
*/
@@ -525,7 +525,7 @@ public class ModLoader
/**
* Register a new entity ID
*
*
* @param entityClass
* @param entityName
* @param id
@@ -537,7 +537,7 @@ public class ModLoader
/**
* Register a new entity ID
*
*
* @param entityClass
* @param entityName
* @param id
@@ -559,18 +559,18 @@ public class ModLoader
* channel with Forge Mod Loader, not with clients connecting- use
* BaseMod.onClientLogin to tell them about your custom channel
* {@link FMLCommonHandler#registerChannel(cpw.mods.fml.common.ModContainer, String)}
*
*
* @param mod
* @param channel
*/
public static void registerPacketChannel(BaseMod mod, String channel)
{
FMLCommonHandler.instance().registerChannel(ModLoaderModContainer.findContainerFor(mod), channel);
FMLCommonHandler.instance().registerChannel(FMLCommonHandler.instance().findContainerFor(mod), channel);
}
/**
* Register a new tile entity class
*
*
* @param tileEntityClass
* @param id
*/
@@ -586,7 +586,7 @@ public class ModLoader
/**
* Remove a biome from the list of generated biomes
*
*
* @param biome
*/
public static void removeBiome(BiomeGenBase biome)
@@ -596,7 +596,7 @@ public class ModLoader
/**
* Remove a spawn
*
*
* @param entityClass
* @param spawnList
*/
@@ -607,7 +607,7 @@ public class ModLoader
/**
* Remove a spawn
*
*
* @param entityClass
* @param spawnList
* @param biomes
@@ -619,7 +619,7 @@ public class ModLoader
/**
* Remove a spawn
*
*
* @param entityName
* @param spawnList
*/
@@ -630,7 +630,7 @@ public class ModLoader
/**
* Remove a spawn
*
*
* @param entityName
* @param spawnList
* @param biomes
@@ -670,7 +670,7 @@ public class ModLoader
/**
* Send a chat message to the server
* {@link FMLServerHandler#handleChatPacket(Packet3Chat, EntityPlayer)}
*
*
* @param text
*/
@Deprecated
@@ -697,7 +697,7 @@ public class ModLoader
ModLoaderHelper.updateStandardTicks(mod, enable, useClock);
}
public static void setInGUIHook(BaseMod mod, boolean enable, boolean useClock)
{
ModLoaderHelper.updateGUITicks(mod, enable, useClock);
@@ -706,7 +706,7 @@ public class ModLoader
/**
* Set a private field to a value using reflection
* {@link ReflectionHelper#setPrivateValue(Class, Object, int, Object)}
*
*
* @param instanceclass
* @param instance
* @param fieldindex
@@ -720,7 +720,7 @@ public class ModLoader
/**
* Set a private field to a value using reflection
* {@link ReflectionHelper#setPrivateValue(Class, Object, String, Object)}
*
*
* @param instanceclass
* @param instance
* @param field
@@ -734,7 +734,7 @@ public class ModLoader
/**
* This method is a call in hook from modified external code. Implemented elsewhere.
* {@link FMLServerHandler#onItemCrafted(EntityPlayer, ItemStack, IInventory)}
*
*
* @param player
* @param item
* @param matrix
@@ -747,7 +747,7 @@ public class ModLoader
/**
* This method is a call in hook from modified external code. Implemented elsewhere.
* {@link FMLServerHandler#onItemSmelted(EntityPlayer, ItemStack)}
*
*
* @param player
* @param item
*/
@@ -766,7 +766,7 @@ public class ModLoader
{
FMLCommonHandler.instance().raiseException(e, message, true);
}
public static void throwException(Throwable e)
{
throwException("Exception in ModLoader", e);