|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectModLoader
public final class ModLoader
ModLoader loads classes that inherit from BaseMod and adds them to a
list for use.
| Field Summary | |
|---|---|
static boolean |
texturesOverridden
Whether RegisterAllTextureOverrides has already run. |
| Method Summary | ||
|---|---|---|
static int |
AddAllFuel(int id)
Used for adding new sources of fuel to the furnace. |
|
static void |
AddAllRecipes(fg recipes)
Used to add recipes from all the mods. |
|
static void |
AddAllRenderers(java.util.Map<java.lang.Class<? extends nl>,ba> renderers)
Used to add all mod entity renderers. |
|
static void |
addAnimation(ah anim)
Registers one animation instance. |
|
static void |
AddName(java.lang.Object instance,
java.lang.String name)
This method will allow adding name to item in inventory. |
|
static void |
addOverride(java.lang.String path,
java.lang.String overlayPath,
int index)
Registers one texture override to be done. |
|
static void |
AddSmelting(int input,
gm output)
Used to add smelting recipes to the furnace. |
|
static java.util.List<BaseMod> |
getLoadedMods()
Use this method if you need a list of loaded mods. |
|
static java.util.logging.Logger |
getLogger()
Use this to get a reference to the logger ModLoader uses. |
|
static net.minecraft.client.Minecraft |
getMinecraftInstance()
Use this method to get a reference to Minecraft instance. |
|
static
|
getPrivateValue(java.lang.Class<? super E> instanceclass,
E instance,
int fieldindex)
Used for getting value of private fields. |
|
static
|
getPrivateValue(java.lang.Class<? super E> instanceclass,
E instance,
java.lang.String field)
Used for getting value of private fields. |
|
static int |
getUniqueEntityId()
Gets next Entity ID to use. |
|
static int |
getUniqueSpriteIndex(java.lang.String path)
Gets next available index for this sprite map. |
|
static boolean |
isGUIOpen(java.lang.Class<? extends by> gui)
Use this method to check if GUI is opened for the player. |
|
static boolean |
isModLoaded(java.lang.String mod)
Checks if a mod is loaded. |
|
static void |
OpenModGUI(eu player,
java.lang.Object instance)
Opens GUI for use with mods. |
|
static void |
PopulateChunk(bm generator,
int chunkX,
int chunkZ,
dn world)
Used for generating new blocks in the world. |
|
static void |
RegisterAllTextureOverrides(gs texCache)
Processes all registered texture overrides, modifies internal buffers. |
|
static void |
RegisterBlock(pj block)
Adds block to list of blocks the player can use. |
|
static void |
RegisterEntityID(java.lang.Class<? extends nl> entityClass,
java.lang.String entityName,
int id)
Registers an entity ID. |
|
static void |
RegisterTileEntity(java.lang.Class<? extends kp> tileEntityClass,
java.lang.String id)
Registers a tile entity. |
|
static void |
RunOSDHooks(net.minecraft.client.Minecraft game)
Runs all registered OSD hooks, run by GUIInGame. |
|
static
|
setPrivateValue(java.lang.Class<? super T> instanceclass,
T instance,
int fieldindex,
E value)
Used for setting value of private fields. |
|
static
|
setPrivateValue(java.lang.Class<? super T> instanceclass,
T instance,
java.lang.String field,
E value)
Used for setting value of private fields. |
|
static void |
ThrowException(java.lang.String message,
java.lang.Throwable e)
Used for catching an error and generating an error report. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean texturesOverridden
| Method Detail |
|---|
public static java.util.logging.Logger getLogger()
public static int AddAllFuel(int id)
id - ItemID for the item to use as fuel.
BaseMod.AddFuel(int)public static void AddAllRecipes(fg recipes)
recipes - Recipe instance to add to.BaseMod.AddRecipes(fg)public static void AddAllRenderers(java.util.Map<java.lang.Class<? extends nl>,ba> renderers)
renderers - HashMap of the renderers. key is an entity class, value is the
renderer.BaseMod.AddRenderer(java.util.Map, ba>)
public static void AddSmelting(int input,
gm output)
input - ID of the item, or block, to smelt.output - the ItemStack created.public static void addAnimation(ah anim)
anim - instance of animation handler.
public static void AddName(java.lang.Object instance,
java.lang.String name)
instance - A block or item reference to name.name - The name to give.
public static void addOverride(java.lang.String path,
java.lang.String overlayPath,
int index)
path - Path to the texture file to modify.overlayPath - Path to the texture file which is to be overlaid.index - Sprite index into the texture to be modified.public static java.util.List<BaseMod> getLoadedMods()
public static net.minecraft.client.Minecraft getMinecraftInstance()
public static <T,E> T getPrivateValue(java.lang.Class<? super E> instanceclass,
E instance,
int fieldindex)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException,
java.lang.NoSuchFieldException
T - Return type.E - Type of instance.instanceclass - Class to use with instance.instance - Object to get private field from.fieldindex - Name of the field.
java.lang.IllegalArgumentException - if instance isn't compatible with instanceclass.
java.lang.SecurityException - if the thread is not allowed to access field.
java.lang.NoSuchFieldException - if field does not exist.
public static <T,E> T getPrivateValue(java.lang.Class<? super E> instanceclass,
E instance,
java.lang.String field)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException,
java.lang.NoSuchFieldException
T - Return type.E - Type of instance.instanceclass - Class to use with instance.instance - Object to get private field from.field - Name of the field.
java.lang.IllegalArgumentException - if instance isn't compatible with instanceclass.
java.lang.SecurityException - if the thread is not allowed to access field.
java.lang.NoSuchFieldException - if field does not exist.public static int getUniqueEntityId()
public static int getUniqueSpriteIndex(java.lang.String path)
path - Sprite map to get available index from.
public static boolean isGUIOpen(java.lang.Class<? extends by> gui)
gui - The type of GUI to check for. If null, will check for any GUI.
public static boolean isModLoaded(java.lang.String mod)
mod - Name of the mod to check for.
public static void OpenModGUI(eu player,
java.lang.Object instance)
player - Player instance to open GUI for.instance - Used for identifying which mod this call is for. Allows for
passing extra data to GUI.BaseMod.OpenModGUI(eu, java.lang.Object)
public static void PopulateChunk(bm generator,
int chunkX,
int chunkZ,
dn world)
generator - Generator to pair with.chunkX - X coordinate of chunk.chunkZ - Z coordinate of chunk.world - World to generate blocks in.BaseMod.GenerateSurface(dn, java.util.Random, int, int),
BaseMod.GenerateNether(dn, java.util.Random, int, int)public static void RegisterAllTextureOverrides(gs texCache)
texCache - Reference to texture cache.BaseMod.RegisterTextureOverrides()public static void RegisterBlock(pj block)
block - Block to add.
public static void RegisterEntityID(java.lang.Class<? extends nl> entityClass,
java.lang.String entityName,
int id)
entityClass - Class of entity to register.entityName - The given name of entity. Used for saving.id - Numeric ID of entity.
public static void RegisterTileEntity(java.lang.Class<? extends kp> tileEntityClass,
java.lang.String id)
tileEntityClass - Class of tile entity to register.id - The given name of entity. Used for saving.public static void RunOSDHooks(net.minecraft.client.Minecraft game)
game - instance of the game class.BaseMod.OSDHook(net.minecraft.client.Minecraft)
public static <T,E> void setPrivateValue(java.lang.Class<? super T> instanceclass,
T instance,
int fieldindex,
E value)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException,
java.lang.NoSuchFieldException
T - Type of instance.E - Type of value.instanceclass - Class to use with instance.instance - Object to get private field from.fieldindex - Offset of field in class.value - Value to set.
java.lang.IllegalArgumentException - if instance isn't compatible with instanceclass.
java.lang.SecurityException - if the thread is not allowed to access field.
java.lang.NoSuchFieldException - if field does not exist.
public static <T,E> void setPrivateValue(java.lang.Class<? super T> instanceclass,
T instance,
java.lang.String field,
E value)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException,
java.lang.NoSuchFieldException
T - Type of instance.E - Type of value.instanceclass - Class to use with instance.instance - Object to get private field from.field - Name of the field.value - Value to set.
java.lang.IllegalArgumentException - if instance isn't compatible with instanceclass.
java.lang.SecurityException - if the thread is not allowed to access field.
java.lang.NoSuchFieldException - if field does not exist.
public static void ThrowException(java.lang.String message,
java.lang.Throwable e)
message - Title of error report.e - Exception to report.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||