|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraft.src.ModLoader
public class ModLoader
Field Summary | |
---|---|
static String |
fmlMarker
|
static Map<String,Map<String,String>> |
localizedStrings
Deprecated. |
Constructor Summary | |
---|---|
ModLoader()
|
Method Summary | ||
---|---|---|
static void |
addAchievementDesc(Achievement achievement,
String name,
String description)
Adds localization info for an achievement, Not used on the server. |
|
static int |
addAllFuel(int id,
int metadata)
Deprecated. |
|
static void |
addAllRenderers(Map<Class<? extends Entity>,Render> renderers)
Deprecated. |
|
static void |
addAnimation(TextureFX anim)
|
|
static int |
addArmor(String armor)
Adds a new prefix to the armor texture list RenderingRegistry.addNewArmourRendererPrefix(String) |
|
static void |
addBiome(BiomeGenBase biome)
This method adds the supplied biome to the set of candidate biomes for the default world generator type. |
|
static void |
addCommand(ICommand command)
|
|
static void |
addDispenserBehavior(Item item,
IBehaviorDispenseItem behavior)
Add a behaviour to the dispenser |
|
static void |
addEntityTracker(BaseMod mod,
Class<? extends Entity> entityClass,
int entityTypeId,
int updateRange,
int updateInterval,
boolean sendVelocityInfo)
|
|
static void |
addLocalization(String key,
String value)
Add localization for the specified string |
|
static void |
addLocalization(String key,
String lang,
String value)
Add localization for the specified string |
|
static void |
addName(Object instance,
String name)
Name the specified minecraft object with the supplied name |
|
static void |
addName(Object instance,
String lang,
String name)
Unimplemented on the server as it does not generate names |
|
static int |
addOverride(String fileToOverride,
String fileToAdd)
Attempts to register a small image to be applied to a larger texture image, typically how old ModLoader mods add custom Item/Block textures. |
|
static void |
addOverride(String path,
String overlayPath,
int index)
Attempts to register a small image to be applied to a larger texture image, typically how old ModLoader mods add custom Item/Block textures. |
|
static void |
addRecipe(ItemStack output,
Object... params)
Add a Shaped Recipe |
|
static void |
addShapelessRecipe(ItemStack output,
Object... params)
Add a shapeless recipe |
|
static void |
addSmelting(int input,
ItemStack output)
Add a new product to be smelted |
|
static void |
addSmelting(int input,
ItemStack output,
float experience)
Add a new product to be smelted |
|
static void |
addSpawn(Class<? extends EntityLiving> entityClass,
int weightedProb,
int min,
int max,
EnumCreatureType spawnList)
Add a mob to the spawn list |
|
static void |
addSpawn(Class<? extends EntityLiving> entityClass,
int weightedProb,
int min,
int max,
EnumCreatureType spawnList,
BiomeGenBase... biomes)
Add a mob to the spawn list |
|
static void |
addSpawn(String entityName,
int weightedProb,
int min,
int max,
EnumCreatureType spawnList)
Add a mob to the spawn list |
|
static void |
addSpawn(String entityName,
int weightedProb,
int min,
int max,
EnumCreatureType spawnList,
BiomeGenBase... biomes)
Add a mob to the spawn list |
|
static void |
addTrade(int profession,
TradeEntry entry)
|
|
static void |
clientSendPacket(Packet packet)
Send a packet from the client |
|
static boolean |
dispenseEntity(World world,
double x,
double y,
double z,
int xVel,
int zVel,
ItemStack item)
Deprecated. |
|
static void |
genericContainerRemoval(World world,
int x,
int y,
int z)
Remove a container and drop all the items in it on the ground around |
|
static List<BaseMod> |
getLoadedMods()
Get a list of all BaseMod loaded into the system ModLoaderModContainer.findAll(java.lang.Class) |
|
static Logger |
getLogger()
Get a logger instance FMLCommonHandler.getFMLLogger() |
|
static Minecraft |
getMinecraftInstance()
|
|
static MinecraftServer |
getMinecraftServerInstance()
|
|
static
|
getPrivateValue(Class<? super E> instanceclass,
E instance,
int fieldindex)
Get a value from a field using reflection ObfuscationReflectionHelper.getPrivateValue(Class, Object, int) |
|
static
|
getPrivateValue(Class<? super E> instanceclass,
E instance,
String field)
Get a value from a field using reflection ObfuscationReflectionHelper.getPrivateValue(Class, Object, String[]) |
|
static int |
getUniqueBlockModelID(BaseMod mod,
boolean inventoryRenderer)
Stubbed method on the server to return a unique model id |
|
static int |
getUniqueEntityId()
Get a new unique entity id EntityRegistry.findGlobalUniqueEntityId() |
|
static int |
getUniqueSpriteIndex(String path)
|
|
static boolean |
isChannelActive(EntityPlayer player,
String channel)
To properly implement packet 250 protocol you should always check your channel is active prior to sending the packet |
|
static boolean |
isGUIOpen(Class<? extends GuiScreen> gui)
|
|
static boolean |
isModLoaded(String modname)
Is the named mod loaded? Loader.isModLoaded(String) |
|
static void |
loadConfig()
Deprecated. |
|
static BufferedImage |
loadImage(RenderEngine renderEngine,
String path)
|
|
static void |
onItemPickup(EntityPlayer player,
ItemStack item)
Deprecated. |
|
static void |
onTick(float tick,
Minecraft game)
Deprecated. |
|
static void |
openGUI(EntityPlayer player,
GuiScreen gui)
|
|
static void |
populateChunk(IChunkProvider generator,
int chunkX,
int chunkZ,
World world)
Deprecated. |
|
static void |
receivePacket(Packet250CustomPayload packet)
Deprecated. |
|
static KeyBinding[] |
registerAllKeys(KeyBinding[] keys)
Deprecated. |
|
static void |
registerAllTextureOverrides(RenderEngine cache)
Deprecated. |
|
static void |
registerBlock(Block block)
Register a new block |
|
static void |
registerBlock(Block block,
Class<? extends ItemBlock> itemclass)
Register a new block |
|
static void |
registerContainerID(BaseMod mod,
int id)
|
|
static void |
registerEntityID(Class<? extends Entity> entityClass,
String entityName,
int id)
Register a new entity ID |
|
static void |
registerEntityID(Class<? extends Entity> entityClass,
String entityName,
int id,
int background,
int foreground)
Register a new entity ID |
|
static void |
registerKey(BaseMod mod,
KeyBinding keyHandler,
boolean allowRepeat)
|
|
static void |
registerPacketChannel(BaseMod mod,
String channel)
Register the mod for packets on this channel. |
|
static void |
registerTileEntity(Class<? extends TileEntity> tileEntityClass,
String id)
Register a new tile entity class |
|
static void |
registerTileEntity(Class<? extends TileEntity> tileEntityClass,
String id,
TileEntitySpecialRenderer renderer)
|
|
static void |
removeBiome(BiomeGenBase biome)
Remove a biome from the list of generated biomes |
|
static void |
removeSpawn(Class<? extends EntityLiving> entityClass,
EnumCreatureType spawnList)
Remove a spawn |
|
static void |
removeSpawn(Class<? extends EntityLiving> entityClass,
EnumCreatureType spawnList,
BiomeGenBase... biomes)
Remove a spawn |
|
static void |
removeSpawn(String entityName,
EnumCreatureType spawnList)
Remove a spawn |
|
static void |
removeSpawn(String entityName,
EnumCreatureType spawnList,
BiomeGenBase... biomes)
Remove a spawn |
|
static boolean |
renderBlockIsItemFull3D(int modelID)
Deprecated. |
|
static void |
renderInvBlock(RenderBlocks renderer,
Block block,
int metadata,
int modelID)
Deprecated. |
|
static boolean |
renderWorldBlock(RenderBlocks renderer,
IBlockAccess world,
int x,
int y,
int z,
Block block,
int modelID)
Deprecated. |
|
static void |
saveConfig()
Deprecated. |
|
static void |
sendPacket(Packet packet)
Send a packet from client to server |
|
static void |
serverChat(String text)
Deprecated. |
|
static void |
serverLogin(NetClientHandler handler,
Packet1Login loginPacket)
Deprecated. |
|
static void |
serverOpenWindow(EntityPlayerMP player,
Container container,
int ID,
int x,
int y,
int z)
|
|
static void |
serverSendPacket(NetServerHandler handler,
Packet packet)
|
|
static void |
setInGameHook(BaseMod mod,
boolean enable,
boolean useClock)
Indicate that you want to receive ticks |
|
static void |
setInGUIHook(BaseMod mod,
boolean enable,
boolean useClock)
|
|
static
|
setPrivateValue(Class<? super T> instanceclass,
T instance,
int fieldindex,
E value)
Set a private field to a value using reflection ObfuscationReflectionHelper.setPrivateValue(Class, Object, int, Object) |
|
static
|
setPrivateValue(Class<? super T> instanceclass,
T instance,
String field,
E value)
Set a private field to a value using reflection ObfuscationReflectionHelper.setPrivateValue(Class, Object, String, Object) |
|
static void |
takenFromCrafting(EntityPlayer player,
ItemStack item,
IInventory matrix)
Deprecated. |
|
static void |
takenFromFurnace(EntityPlayer player,
ItemStack item)
Deprecated. |
|
static void |
throwException(String message,
Throwable e)
Throw the offered exception. |
|
static void |
throwException(Throwable e)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String fmlMarker
@Deprecated public static final Map<String,Map<String,String>> localizedStrings
Constructor Detail |
---|
public ModLoader()
Method Detail |
---|
public static void addAchievementDesc(Achievement achievement, String name, String description)
achievement
- The achievement to namename
- The namedescription
- The description@Deprecated public static int addAllFuel(int id, int metadata)
GameRegistry.getFuelValue(ItemStack)
id
- The Item IDmetadata
- The Item Metadata
@Deprecated public static void addAllRenderers(Map<Class<? extends Entity>,Render> renderers)
public static void addAnimation(TextureFX anim)
public static int addArmor(String armor)
RenderingRegistry.addNewArmourRendererPrefix(String)
armor
- The new armor prefix
public static void addBiome(BiomeGenBase biome)
biome
- The biome to addpublic static void addEntityTracker(BaseMod mod, Class<? extends Entity> entityClass, int entityTypeId, int updateRange, int updateInterval, boolean sendVelocityInfo)
public static void addCommand(ICommand command)
public static void addDispenserBehavior(Item item, IBehaviorDispenseItem behavior)
item
- behavior
- public static void addLocalization(String key, String value)
key
- Keyvalue
- Valuepublic static void addLocalization(String key, String lang, String value)
key
- Keylang
- Language identifiervalue
- Valuepublic static void addName(Object instance, String name)
instance
- Item to namename
- The name to give itpublic static void addName(Object instance, String lang, String name)
instance
- Item to namelang
- Languge identifiername
- Name to give itpublic static int addOverride(String fileToOverride, String fileToAdd)
fileToOverride
- The texture to apply the new image tofileToAdd
- The new image
public static void addOverride(String path, String overlayPath, int index)
path
- The texture to apply the new image tooverlayPath
- The new imageindex
- Where on the texture to apply itpublic static void addRecipe(ItemStack output, Object... params)
output
- The resultparams
- The inputpublic static void addShapelessRecipe(ItemStack output, Object... params)
output
- The resultparams
- The inputpublic static void addSmelting(int input, ItemStack output)
input
- output
- public static void addSmelting(int input, ItemStack output, float experience)
input
- output
- public static void addSpawn(Class<? extends EntityLiving> entityClass, int weightedProb, int min, int max, EnumCreatureType spawnList)
entityClass
- weightedProb
- min
- max
- spawnList
- public static void addSpawn(Class<? extends EntityLiving> entityClass, int weightedProb, int min, int max, EnumCreatureType spawnList, BiomeGenBase... biomes)
entityClass
- weightedProb
- min
- max
- spawnList
- biomes
- public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType spawnList)
entityName
- weightedProb
- min
- max
- spawnList
- public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType spawnList, BiomeGenBase... biomes)
entityName
- weightedProb
- min
- max
- spawnList
- biomes
- public static void addTrade(int profession, TradeEntry entry)
public static void clientSendPacket(Packet packet)
packet
- @Deprecated public static boolean dispenseEntity(World world, double x, double y, double z, int xVel, int zVel, ItemStack item)
world
- x
- y
- z
- xVel
- zVel
- item
-
public static void genericContainerRemoval(World world, int x, int y, int z)
world
- x
- y
- z
- public static List<BaseMod> getLoadedMods()
ModLoaderModContainer.findAll(java.lang.Class)
public static Logger getLogger()
FMLCommonHandler.getFMLLogger()
public static Minecraft getMinecraftInstance()
public static MinecraftServer getMinecraftServerInstance()
public static <T,E> T getPrivateValue(Class<? super E> instanceclass, E instance, int fieldindex)
ObfuscationReflectionHelper.getPrivateValue(Class, Object, int)
instanceclass
- instance
- fieldindex
-
public static <T,E> T getPrivateValue(Class<? super E> instanceclass, E instance, String field)
ObfuscationReflectionHelper.getPrivateValue(Class, Object, String[])
instanceclass
- instance
- field
-
public static int getUniqueBlockModelID(BaseMod mod, boolean inventoryRenderer)
public static int getUniqueEntityId()
EntityRegistry.findGlobalUniqueEntityId()
public static int getUniqueSpriteIndex(String path)
public static boolean isChannelActive(EntityPlayer player, String channel)
player
- channel
-
public static boolean isGUIOpen(Class<? extends GuiScreen> gui)
public static boolean isModLoaded(String modname)
Loader.isModLoaded(String)
modname
-
@Deprecated public static void loadConfig()
public static BufferedImage loadImage(RenderEngine renderEngine, String path) throws Exception
Exception
@Deprecated public static void onItemPickup(EntityPlayer player, ItemStack item)
player
- item
- @Deprecated public static void onTick(float tick, Minecraft game)
public static void openGUI(EntityPlayer player, GuiScreen gui)
@Deprecated public static void populateChunk(IChunkProvider generator, int chunkX, int chunkZ, World world)
@Deprecated public static void receivePacket(Packet250CustomPayload packet)
packet
- @Deprecated public static KeyBinding[] registerAllKeys(KeyBinding[] keys)
@Deprecated public static void registerAllTextureOverrides(RenderEngine cache)
public static void registerBlock(Block block)
block
- public static void registerBlock(Block block, Class<? extends ItemBlock> itemclass)
block
- itemclass
- public static void registerContainerID(BaseMod mod, int id)
public static void registerEntityID(Class<? extends Entity> entityClass, String entityName, int id)
entityClass
- entityName
- id
- public static void registerEntityID(Class<? extends Entity> entityClass, String entityName, int id, int background, int foreground)
entityClass
- entityName
- id
- background
- foreground
- public static void registerKey(BaseMod mod, KeyBinding keyHandler, boolean allowRepeat)
public static void registerPacketChannel(BaseMod mod, String channel)
NetworkRegistry.registerChannel(IPacketHandler, String)
mod
- channel
- public static void registerTileEntity(Class<? extends TileEntity> tileEntityClass, String id)
tileEntityClass
- id
- public static void registerTileEntity(Class<? extends TileEntity> tileEntityClass, String id, TileEntitySpecialRenderer renderer)
public static void removeBiome(BiomeGenBase biome)
biome
- public static void removeSpawn(Class<? extends EntityLiving> entityClass, EnumCreatureType spawnList)
entityClass
- spawnList
- public static void removeSpawn(Class<? extends EntityLiving> entityClass, EnumCreatureType spawnList, BiomeGenBase... biomes)
entityClass
- spawnList
- biomes
- public static void removeSpawn(String entityName, EnumCreatureType spawnList)
entityName
- spawnList
- public static void removeSpawn(String entityName, EnumCreatureType spawnList, BiomeGenBase... biomes)
entityName
- spawnList
- biomes
- @Deprecated public static boolean renderBlockIsItemFull3D(int modelID)
@Deprecated public static void renderInvBlock(RenderBlocks renderer, Block block, int metadata, int modelID)
@Deprecated public static boolean renderWorldBlock(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, Block block, int modelID)
@Deprecated public static void saveConfig()
ModLoaderModContainer
public static void sendPacket(Packet packet)
packet
- @Deprecated public static void serverChat(String text)
text
- @Deprecated public static void serverLogin(NetClientHandler handler, Packet1Login loginPacket)
public static void serverSendPacket(NetServerHandler handler, Packet packet)
public static void serverOpenWindow(EntityPlayerMP player, Container container, int ID, int x, int y, int z)
public static void setInGameHook(BaseMod mod, boolean enable, boolean useClock)
mod
- receiving the eventsenable
- indicates whether you want to recieve them or notuseClock
- don't receive render subticks, just world tickspublic static void setInGUIHook(BaseMod mod, boolean enable, boolean useClock)
public static <T,E> void setPrivateValue(Class<? super T> instanceclass, T instance, int fieldindex, E value)
ObfuscationReflectionHelper.setPrivateValue(Class, Object, int, Object)
instanceclass
- instance
- fieldindex
- value
- public static <T,E> void setPrivateValue(Class<? super T> instanceclass, T instance, String field, E value)
ObfuscationReflectionHelper.setPrivateValue(Class, Object, String, Object)
instanceclass
- instance
- field
- value
- @Deprecated public static void takenFromCrafting(EntityPlayer player, ItemStack item, IInventory matrix)
player
- item
- matrix
- @Deprecated public static void takenFromFurnace(EntityPlayer player, ItemStack item)
player
- item
- public static void throwException(String message, Throwable e)
message
- e
- public static void throwException(Throwable e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |