Class ModLoader

java.lang.Object
  extended by ModLoader

public final class ModLoader
extends java.lang.Object

ModLoader loads classes that inherit from BaseMod and adds them to a list for use.

Version:
1.2.5

Field Summary
static java.util.logging.Level cfgLoggingLevel
          Default logging level.
static boolean DEBUG
          Whether debug mode is enabled.
static java.util.Properties props
          Contains all the properties loaded from config file.
static java.lang.String VERSION
          Current version.
 
Method Summary
static void addAchievementDesc(aeb achievement, java.lang.String name, java.lang.String description)
          Used to give your achievement a readable name and description.
static int addAllFuel(int id, int metadata)
          Used for adding new sources of fuel to the furnace.
static void addAllRenderers(java.util.Map<java.lang.Class<? extends nn>,um> renderers)
          Used to add all mod entity renderers.
static void addAnimation(tt anim)
          Registers one animation instance.
static int addArmor(java.lang.String armor)
          Use this when you need the player to have new armor skin.
static void addBiome(abn biome)
          Method for adding new biomes to the terrain generator.
static void addLocalization(java.lang.String key, java.lang.String value)
          Method for adding raw strings to the translation table.
static void addLocalization(java.lang.String key, java.lang.String lang, java.lang.String value)
          Method for adding raw strings to the translation table.
static void addName(java.lang.Object instance, java.lang.String name)
          This method will allow adding name to item in inventory.
static void addName(java.lang.Object instance, java.lang.String lang, java.lang.String name)
          This method will allow adding name to item in inventory.
static int addOverride(java.lang.String fileToOverride, java.lang.String fileToAdd)
          Use this to add custom images for your items and blocks.
static void addOverride(java.lang.String path, java.lang.String overlayPath, int index)
          Registers one texture override to be done.
static void addRecipe(aan output, java.lang.Object... params)
          Add recipe to crafting list.
static void addShapelessRecipe(aan output, java.lang.Object... params)
          Add recipe to crafting list.
static void addSmelting(int input, aan output)
          Used to add smelting recipes to the furnace.
static void addSpawn(java.lang.Class<? extends acq> entityClass, int weightedProb, int min, int max, acf spawnList)
          Add entity to spawn list for all biomes except Hell.
static void addSpawn(java.lang.Class<? extends acq> entityClass, int weightedProb, int min, int max, acf spawnList, abn... biomes)
          Add entity to spawn list for selected biomes.
static void addSpawn(java.lang.String entityName, int weightedProb, int min, int max, acf spawnList)
          Add entity to spawn list for all biomes except Hell.
static void addSpawn(java.lang.String entityName, int weightedProb, int min, int max, acf spawnList, abn... biomes)
          Add entity to spawn list for selected biomes.
static boolean dispenseEntity(xd world, double x, double y, double z, int xVel, int zVel, aan item)
          Dispenses the entity associated with the selected item.
static void genericContainerRemoval(xd world, int x, int y, int z)
           
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
<T,E> T
getPrivateValue(java.lang.Class<? super E> instanceclass, E instance, int fieldindex)
          Used for getting value of private fields.
static
<T,E> T
getPrivateValue(java.lang.Class<? super E> instanceclass, E instance, java.lang.String field)
          Used for getting value of private fields.
static int getUniqueBlockModelID(BaseMod mod, boolean full3DItem)
          Assigns a model id for blocks to use for the given mod.
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 vp> gui)
          Use this method to check if GUI is opened for the player.
static boolean isModLoaded(java.lang.String modname)
          Checks if a mod is loaded.
static void loadConfig()
          Reads the config file and stores the contents in props.
static java.awt.image.BufferedImage loadImage(aaw texCache, java.lang.String path)
          Loads an image from a file in the jar into a BufferedImage.
static void onItemPickup(yw player, aan item)
          Is called when an item is picked up from the world.
static void onTick(float tick, net.minecraft.client.Minecraft game)
          This method is called every tick while minecraft is running.
static void openGUI(yw player, vp gui)
          Opens GUI for use with mods.
static void populateChunk(ca generator, int chunkX, int chunkZ, xd world)
          Used for generating new blocks in the world.
static void receivePacket(ee packet)
           
static afu[] registerAllKeys(afu[] keys)
          Appends all mod key handlers to the given array and returns it.
static void registerAllTextureOverrides(aaw cache)
          Processes all registered texture overrides.
static void registerBlock(pb block)
          Adds block to list of blocks the player can use.
static void registerBlock(pb block, java.lang.Class<? extends vd> itemclass)
          Adds block to list of blocks the player can use.
static void registerEntityID(java.lang.Class<? extends nn> entityClass, java.lang.String entityName, int id)
          Registers an entity ID.
static void registerEntityID(java.lang.Class<? extends nn> entityClass, java.lang.String entityName, int id, int background, int foreground)
          Registers an entity ID.
static void registerKey(BaseMod mod, afu keyHandler, boolean allowRepeat)
          Use this to add an assignable key to the options menu.
static void registerPacketChannel(BaseMod mod, java.lang.String channel)
           
static void registerTileEntity(java.lang.Class<? extends kw> tileEntityClass, java.lang.String id)
          Registers a tile entity.
static void registerTileEntity(java.lang.Class<? extends kw> tileEntityClass, java.lang.String id, aar renderer)
          Registers a tile entity.
static void removeBiome(abn biome)
          Method for removing biomes from the terrain generator.
static void removeSpawn(java.lang.Class<? extends acq> entityClass, acf spawnList)
          Remove entity from spawn list for all biomes except Hell.
static void removeSpawn(java.lang.Class<? extends acq> entityClass, acf spawnList, abn... biomes)
          Remove entity from spawn list for selected biomes.
static void removeSpawn(java.lang.String entityName, acf spawnList)
          Remove entity from spawn list for all biomes except Hell.
static void removeSpawn(java.lang.String entityName, acf spawnList, abn... biomes)
          Remove entity from spawn list for selected biomes.
static boolean renderBlockIsItemFull3D(int modelID)
          Determines how the block should be rendered.
static void renderInvBlock(vl renderer, pb block, int metadata, int modelID)
          Renders a block in inventory.
static boolean renderWorldBlock(vl renderer, ali world, int x, int y, int z, pb block, int modelID)
          Renders a block in the world.
static void saveConfig()
          Saves props to the config file.
static void sendPacket(abs packet)
           
static void serverChat(java.lang.String text)
           
static void serverConnect(adl handler, aec loginPacket)
           
static void serverDisconnect()
           
static void setInGameHook(BaseMod mod, boolean enable, boolean useClock)
          Enable or disable BaseMod.onTickInGame(float, net.minecraft.client.Minecraft)
static void setInGUIHook(BaseMod mod, boolean enable, boolean useClock)
          Enable or disable BaseMod.onTickInGUI(float, net.minecraft.client.Minecraft, vp)
static
<T,E> void
setPrivateValue(java.lang.Class<? super T> instanceclass, T instance, int fieldindex, E value)
          Used for setting value of private fields.
static
<T,E> void
setPrivateValue(java.lang.Class<? super T> instanceclass, T instance, java.lang.String field, E value)
          Used for setting value of private fields.
static void takenFromCrafting(yw player, aan item, io matrix)
          Is called when an item is picked up from crafting result slot.
static void takenFromFurnace(yw player, aan item)
          Is called when an item is picked up from furnace result slot.
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

cfgLoggingLevel

public static java.util.logging.Level cfgLoggingLevel
Default logging level.


DEBUG

public static final boolean DEBUG
Whether debug mode is enabled. Not for use by others.

See Also:
Constant Field Values

props

public static final java.util.Properties props
Contains all the properties loaded from config file.


VERSION

public static final java.lang.String VERSION
Current version.

See Also:
Constant Field Values
Method Detail

addAchievementDesc

public static void addAchievementDesc(aeb achievement,
                                      java.lang.String name,
                                      java.lang.String description)
Used to give your achievement a readable name and description.

Parameters:
achievement - to assign name and description to.
name - title of your achievement
description - details on how to earn this achievement

addAllFuel

public static int addAllFuel(int id,
                             int metadata)
Used for adding new sources of fuel to the furnace.

Parameters:
id - ItemID for the item to use as fuel.
metadata - Extended data for the item.
Returns:
Duration of fuel provided.
See Also:
BaseMod.addFuel(int, int)

addAllRenderers

public static void addAllRenderers(java.util.Map<java.lang.Class<? extends nn>,um> renderers)
Used to add all mod entity renderers.

Parameters:
renderers - HashMap of the renderers. key is an entity class, value is the renderer.
See Also:
BaseMod.addRenderer(java.util.Map, um>)

addAnimation

public static void addAnimation(tt anim)
Registers one animation instance.

Parameters:
anim - instance of animation handler.

addArmor

public static int addArmor(java.lang.String armor)
Use this when you need the player to have new armor skin. This method will return the index of the skin. This will be located at "/armor/ARMORNAMEHERE_1.png" or "/armor/ARMORNAMEHERE_2.png", depending on armor type.

Parameters:
armor - Name of the armor skin.
Returns:
index assign for the armor skin.

addBiome

public static void addBiome(abn biome)
Method for adding new biomes to the terrain generator.

Parameters:
biome - Reference to biome.

addLocalization

public static void addLocalization(java.lang.String key,
                                   java.lang.String value)
Method for adding raw strings to the translation table.

Parameters:
key - tag for string.
value - string to add.

addLocalization

public static void addLocalization(java.lang.String key,
                                   java.lang.String lang,
                                   java.lang.String value)
Method for adding raw strings to the translation table.

Parameters:
key - tag for string.
value - string to add.

addName

public static void addName(java.lang.Object instance,
                           java.lang.String name)
This method will allow adding name to item in inventory. Requires name tag.

Parameters:
instance - A block, item, or item stack reference to name.
name - The name to give.

addName

public static void addName(java.lang.Object instance,
                           java.lang.String lang,
                           java.lang.String name)
This method will allow adding name to item in inventory. Requires name tag.

Parameters:
instance - A block, item, or item stack reference to name.
name - The name to give.

addOverride

public static int addOverride(java.lang.String fileToOverride,
                              java.lang.String fileToAdd)
Use this to add custom images for your items and blocks. This method should be called where you want to assign the index for the item or block to use.

Parameters:
fileToOverride - "/terrain.png" or "/gui/items.png".
fileToAdd - path to the image you want to add.
Returns:
index assigned to this image.

addOverride

public static void addOverride(java.lang.String path,
                               java.lang.String overlayPath,
                               int index)
Registers one texture override to be done.

Parameters:
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.

addRecipe

public static void addRecipe(aan output,
                             java.lang.Object... params)
Add recipe to crafting list.

Parameters:
output - ItemStack to create.
params - The recipe. First one to three params should be strings representing the layout of the recipe. Each string should be up to three letters. Following that is a pair of Character and Item, Block, or ItemStack references. The Character should match the one used in first three params.

addShapelessRecipe

public static void addShapelessRecipe(aan output,
                                      java.lang.Object... params)
Add recipe to crafting list.

Parameters:
output - ItemStack to create.
params - The recipe. An array of Item, Block, or ItemStack references.

addSmelting

public static void addSmelting(int input,
                               aan output)
Used to add smelting recipes to the furnace. See dj.class for details.

Parameters:
input - ID of the item, or block, to smelt.
output - the ItemStack created.

addSpawn

public static void addSpawn(java.lang.Class<? extends acq> entityClass,
                            int weightedProb,
                            int min,
                            int max,
                            acf spawnList)
Add entity to spawn list for all biomes except Hell.

Parameters:
entityClass - Class of entity to spawn.
weightedProb - Higher number means more likely to spawn.
min - Minimum number of entities per spawn attempt.
max - Maximum number of entities per spawn attempt.
spawnList - The type of list to add entity to. Monster, Creature, or Water.

addSpawn

public static void addSpawn(java.lang.Class<? extends acq> entityClass,
                            int weightedProb,
                            int min,
                            int max,
                            acf spawnList,
                            abn... biomes)
Add entity to spawn list for selected biomes.

Parameters:
entityClass - Class of entity to spawn.
weightedProb - Higher number means more likely to spawn.
min - Minimum number of entities per spawn attempt.
max - Maximum number of entities per spawn attempt.
spawnList - The type of list to add entity to. Monster, Creature, or Water.
biomes - Array of biomes to add entity spawning to.

addSpawn

public static void addSpawn(java.lang.String entityName,
                            int weightedProb,
                            int min,
                            int max,
                            acf spawnList)
Add entity to spawn list for all biomes except Hell.

Parameters:
entityName - Name of entity to spawn.
weightedProb - Higher number means more likely to spawn.
min - Minimum number of entities per spawn attempt.
max - Maximum number of entities per spawn attempt.
spawnList - The type of list to add entity to. Monster, Creature, or Water.

addSpawn

public static void addSpawn(java.lang.String entityName,
                            int weightedProb,
                            int min,
                            int max,
                            acf spawnList,
                            abn... biomes)
Add entity to spawn list for selected biomes.

Parameters:
entityName - Name of entity to spawn.
weightedProb - Higher number means more likely to spawn.
min - Minimum number of entities per spawn attempt.
max - Maximum number of entities per spawn attempt.
spawnList - The type of list to add entity to. Monster, Creature, or Water.
biomes - Array of biomes to add entity spawning to.

dispenseEntity

public static boolean dispenseEntity(xd world,
                                     double x,
                                     double y,
                                     double z,
                                     int xVel,
                                     int zVel,
                                     aan item)
Dispenses the entity associated with the selected item.

Parameters:
world - reference to the World.
x - X coordinate.
y - Y coordinate.
z - Z coordinate.
xVel - X velocity.
zVel - Z velocity.
item - Item to chosen to dispense entity.
Returns:
true if item was handled.
See Also:
BaseMod.dispenseEntity(xd, double, double, double, int, int, aan)

genericContainerRemoval

public static void genericContainerRemoval(xd world,
                                           int x,
                                           int y,
                                           int z)

getLoadedMods

public static java.util.List<BaseMod> getLoadedMods()
Use this method if you need a list of loaded mods.

Returns:
a list of mods.

getLogger

public static java.util.logging.Logger getLogger()
Use this to get a reference to the logger ModLoader uses.

Returns:
the logger instance.

getMinecraftInstance

public static net.minecraft.client.Minecraft getMinecraftInstance()
Use this method to get a reference to Minecraft instance.

Returns:
Minecraft instance.

getPrivateValue

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
Used for getting value of private fields.

Type Parameters:
T - Return type.
E - Type of instance.
Parameters:
instanceclass - Class to use with instance.
instance - Object to get private field from.
fieldindex - Name of the field.
Returns:
Value of private field.
Throws:
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.

getPrivateValue

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
Used for getting value of private fields.

Type Parameters:
T - Return type.
E - Type of instance.
Parameters:
instanceclass - Class to use with instance.
instance - Object to get private field from.
field - Name of the field.
Returns:
Value of private field.
Throws:
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.

getUniqueBlockModelID

public static int getUniqueBlockModelID(BaseMod mod,
                                        boolean full3DItem)
Assigns a model id for blocks to use for the given mod.

Parameters:
mod - to assign id to.
full3DItem - if true the item will have 3D model created from renderInvBlock(vl, pb, int, int), if false will be a flat image.
Returns:
assigned block model id.

getUniqueEntityId

public static int getUniqueEntityId()
Gets next Entity ID to use.

Returns:
Assigned ID.

getUniqueSpriteIndex

public static int getUniqueSpriteIndex(java.lang.String path)
Gets next available index for this sprite map.

Parameters:
path - Sprite map to get available index from.
Returns:
Assigned sprite index to use.

isGUIOpen

public static boolean isGUIOpen(java.lang.Class<? extends vp> gui)
Use this method to check if GUI is opened for the player.

Parameters:
gui - The type of GUI to check for. If null, will check for any GUI.
Returns:
true if GUI is open.

isModLoaded

public static boolean isModLoaded(java.lang.String modname)
Checks if a mod is loaded.

Parameters:
modname - Name of the mod to check for.
Returns:
Returns true if a mod with supplied name exists in the mod list.

loadConfig

public static void loadConfig()
                       throws java.io.IOException
Reads the config file and stores the contents in props.

Throws:
java.io.IOException

loadImage

public static java.awt.image.BufferedImage loadImage(aaw texCache,
                                                     java.lang.String path)
                                              throws java.lang.Exception
Loads an image from a file in the jar into a BufferedImage.

Parameters:
texCache - Reference to texture cache.
path - Path inside the jar to the image (starts with /).
Returns:
Loaded image to override with.
Throws:
java.lang.Exception

onItemPickup

public static void onItemPickup(yw player,
                                aan item)
Is called when an item is picked up from the world.

Parameters:
player - that picked up item
item - that was picked up

onTick

public static void onTick(float tick,
                          net.minecraft.client.Minecraft game)
This method is called every tick while minecraft is running.

Parameters:
tick - Partial tick. Used for smooth animation.
game - instance of the game class.

openGUI

public static void openGUI(yw player,
                           vp gui)
Opens GUI for use with mods.

Parameters:
player - Player instance to open GUI for.
gui - Instance of GUI to open for player.

populateChunk

public static void populateChunk(ca generator,
                                 int chunkX,
                                 int chunkZ,
                                 xd world)
Used for generating new blocks in the world.

Parameters:
generator - Generator to pair with.
chunkX - X coordinate of chunk.
chunkZ - Z coordinate of chunk.
world - World to generate blocks in.
See Also:
BaseMod.generateSurface(xd, java.util.Random, int, int), BaseMod.generateNether(xd, java.util.Random, int, int)

receivePacket

public static void receivePacket(ee packet)

registerAllKeys

public static afu[] registerAllKeys(afu[] keys)
Appends all mod key handlers to the given array and returns it.

Parameters:
keys - Array of the original keys.
Returns:
the appended array.

registerAllTextureOverrides

public static void registerAllTextureOverrides(aaw cache)
Processes all registered texture overrides.

Parameters:
cache - Reference to texture cache.

registerBlock

public static void registerBlock(pb block)
Adds block to list of blocks the player can use.

Parameters:
block - to add.

registerBlock

public static void registerBlock(pb block,
                                 java.lang.Class<? extends vd> itemclass)
Adds block to list of blocks the player can use. Includes the item to use for block.

Parameters:
block - to add.
itemclass - Class to use for block item.

registerEntityID

public static void registerEntityID(java.lang.Class<? extends nn> entityClass,
                                    java.lang.String entityName,
                                    int id)
Registers an entity ID.

Parameters:
entityClass - Class of entity to register.
entityName - The given name of entity. Used for saving.
id - Numeric ID of entity.

registerEntityID

public static void registerEntityID(java.lang.Class<? extends nn> entityClass,
                                    java.lang.String entityName,
                                    int id,
                                    int background,
                                    int foreground)
Registers an entity ID.

Parameters:
entityClass - Class of entity to register.
entityName - The given name of entity. Used for saving.
id - Numeric ID of entity.
background - color of entity egg.
foreground - color of entity egg.

registerKey

public static void registerKey(BaseMod mod,
                               afu keyHandler,
                               boolean allowRepeat)
Use this to add an assignable key to the options menu. A max of four should be used at a time.

Parameters:
mod - The mod which will use this. 99% of the time you should pass "this".
keyHandler - reference to the key to register. Define this in your mod file.
allowRepeat - when true the command will repeat. When false, only called once per press.

registerPacketChannel

public static void registerPacketChannel(BaseMod mod,
                                         java.lang.String channel)

registerTileEntity

public static void registerTileEntity(java.lang.Class<? extends kw> tileEntityClass,
                                      java.lang.String id)
Registers a tile entity.

Parameters:
tileEntityClass - Class of tile entity to register.
id - The given name of entity. Used for saving.

registerTileEntity

public static void registerTileEntity(java.lang.Class<? extends kw> tileEntityClass,
                                      java.lang.String id,
                                      aar renderer)
Registers a tile entity.

Parameters:
tileEntityClass - Class of tile entity to register.
id - The given name of entity. Used for saving.
renderer - Tile entity renderer to assign this tile entity.

removeBiome

public static void removeBiome(abn biome)
Method for removing biomes from the terrain generator.

Parameters:
biome - Reference to biome.

removeSpawn

public static void removeSpawn(java.lang.Class<? extends acq> entityClass,
                               acf spawnList)
Remove entity from spawn list for all biomes except Hell.

Parameters:
entityClass - Class of entity to spawn.
spawnList - The type of list to add entity to. Monster, Creature, or Water.

removeSpawn

public static void removeSpawn(java.lang.Class<? extends acq> entityClass,
                               acf spawnList,
                               abn... biomes)
Remove entity from spawn list for selected biomes.

Parameters:
entityClass - Class of entity to spawn.
spawnList - The type of list to add entity to. Monster, Creature, or Water.
biomes - Array of biomes to add entity spawning to.

removeSpawn

public static void removeSpawn(java.lang.String entityName,
                               acf spawnList)
Remove entity from spawn list for all biomes except Hell.

Parameters:
entityName - Name of entity to spawn.
spawnList - The type of list to add entity to. Monster, Creature, or Water.

removeSpawn

public static void removeSpawn(java.lang.String entityName,
                               acf spawnList,
                               abn... biomes)
Remove entity from spawn list for selected biomes.

Parameters:
entityName - Name of entity to spawn.
spawnList - The type of list to add entity to. Monster, Creature, or Water.
biomes - Array of biomes to add entity spawning to.

renderBlockIsItemFull3D

public static boolean renderBlockIsItemFull3D(int modelID)
Determines how the block should be rendered.

Parameters:
modelID - ID of block model.
Returns:
true if block should be rendered using renderInvBlock(vl, pb, int, int).

renderInvBlock

public static void renderInvBlock(vl renderer,
                                  pb block,
                                  int metadata,
                                  int modelID)
Renders a block in inventory.

Parameters:
renderer - parent renderer. Methods and fields may be referenced from here.
block - reference to block to render.
metadata - of block. Damage on an item.
modelID - ID of block model to render.

renderWorldBlock

public static boolean renderWorldBlock(vl renderer,
                                       ali world,
                                       int x,
                                       int y,
                                       int z,
                                       pb block,
                                       int modelID)
Renders a block in the world.

Parameters:
renderer - parent renderer. Methods and fields may be referenced from here.
world - to render block in.
x - XPos
y - YPos
z - ZPos
block - reference to block to render.
modelID - ID of block model to render.
Returns:
true if model was rendered.

saveConfig

public static void saveConfig()
                       throws java.io.IOException
Saves props to the config file.

Throws:
java.io.IOException

serverChat

public static void serverChat(java.lang.String text)

serverConnect

public static void serverConnect(adl handler,
                                 aec loginPacket)

serverDisconnect

public static void serverDisconnect()

sendPacket

public static void sendPacket(abs packet)

setInGameHook

public static void setInGameHook(BaseMod mod,
                                 boolean enable,
                                 boolean useClock)
Enable or disable BaseMod.onTickInGame(float, net.minecraft.client.Minecraft)

Parameters:
mod - to set
enable - whether to add or remove from list
useClock - if true will only run once each tick on game clock, if false once every render frame

setInGUIHook

public static void setInGUIHook(BaseMod mod,
                                boolean enable,
                                boolean useClock)
Enable or disable BaseMod.onTickInGUI(float, net.minecraft.client.Minecraft, vp)

Parameters:
mod - to set
enable - whether to add or remove from list
useClock - if true will only run once each tick on game clock, if false once every render frame

setPrivateValue

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
Used for setting value of private fields.

Type Parameters:
T - Type of instance.
E - Type of value.
Parameters:
instanceclass - Class to use with instance.
instance - Object to get private field from.
fieldindex - Offset of field in class.
value - Value to set.
Throws:
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.

setPrivateValue

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
Used for setting value of private fields.

Type Parameters:
T - Type of instance.
E - Type of value.
Parameters:
instanceclass - Class to use with instance.
instance - Object to get private field from.
field - Name of the field.
value - Value to set.
Throws:
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.

takenFromCrafting

public static void takenFromCrafting(yw player,
                                     aan item,
                                     io matrix)
Is called when an item is picked up from crafting result slot. Normally used to award achievements.

Parameters:
player - that picked up item
item - that was picked up
matrix - crafting matrix that is used

takenFromFurnace

public static void takenFromFurnace(yw player,
                                    aan item)
Is called when an item is picked up from furnace result slot. Normally used to award achievements.

Parameters:
player - that picked up item
item - that was picked up

throwException

public static void throwException(java.lang.String message,
                                  java.lang.Throwable e)
Used for catching an error and generating an error report.

Parameters:
message - Title of error report.
e - Exception to report.