|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcpw.mods.fml.common.registry.GameRegistry
public class GameRegistry
Constructor Summary | |
---|---|
GameRegistry()
|
Method Summary | |
---|---|
static void |
addBiome(BiomeGenBase biome)
|
static void |
addRecipe(IRecipe recipe)
|
static void |
addRecipe(ItemStack output,
Object... params)
|
static void |
addShapelessRecipe(ItemStack output,
Object... params)
|
static void |
addSmelting(int input,
ItemStack output,
float xp)
|
static Object |
buildBlock(ModContainer container,
Class<?> type,
Mod.Block annotation)
Internal method for creating an @Block instance |
static void |
generateWorld(int chunkX,
int chunkZ,
World world,
IChunkProvider chunkGenerator,
IChunkProvider chunkProvider)
Callback hook for world gen - if your mod wishes to add extra mod related generation to the world call this |
static int |
getFuelValue(ItemStack itemStack)
|
static void |
onItemCrafted(EntityPlayer player,
ItemStack item,
IInventory craftMatrix)
|
static void |
onItemSmelted(EntityPlayer player,
ItemStack item)
|
static void |
onPickupNotification(EntityPlayer player,
EntityItem item)
|
static void |
onPlayerChangedDimension(EntityPlayer player)
|
static void |
onPlayerLogin(EntityPlayer player)
|
static void |
onPlayerLogout(EntityPlayer player)
|
static void |
onPlayerRespawn(EntityPlayer player)
|
static void |
registerBlock(Block block)
Deprecated. |
static void |
registerBlock(Block block,
Class<? extends ItemBlock> itemclass)
Deprecated. |
static void |
registerBlock(Block block,
Class<? extends ItemBlock> itemclass,
String name)
Register a block with the world, with the specified item class and block name |
static void |
registerBlock(Block block,
Class<? extends ItemBlock> itemclass,
String name,
String modId)
Register a block with the world, with the specified item class, block name and owning modId |
static void |
registerBlock(Block block,
String name)
Register a block with the specified mod specific name : overrides the standard type based name |
static void |
registerCraftingHandler(ICraftingHandler handler)
|
static void |
registerDispenserHandler(IDispenseHandler handler)
Deprecated. |
static void |
registerDispenserHandler(IDispenserHandler handler)
Deprecated. |
static void |
registerFuelHandler(IFuelHandler handler)
|
static void |
registerItem(Item item,
String name)
Register an item with the item registry with a custom name : this allows for easier server->client resolution |
static void |
registerItem(Item item,
String name,
String modId)
Register the specified Item with a mod specific name : overrides the standard type based name |
static void |
registerPickupHandler(IPickupNotifier handler)
|
static void |
registerPlayerTracker(IPlayerTracker tracker)
|
static void |
registerTileEntity(Class<? extends TileEntity> tileEntityClass,
String id)
|
static void |
registerWorldGenerator(IWorldGenerator generator)
Register a world generator - something that inserts new block types into the world |
static void |
removeBiome(BiomeGenBase biome)
|
static int |
tryDispense(World world,
int x,
int y,
int z,
int xVelocity,
int zVelocity,
ItemStack item,
Random random,
double entX,
double entY,
double entZ)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GameRegistry()
Method Detail |
---|
public static void registerWorldGenerator(IWorldGenerator generator)
generator
- public static void generateWorld(int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
chunkX
- chunkZ
- world
- chunkGenerator
- chunkProvider
- @Deprecated public static void registerDispenserHandler(IDispenserHandler handler)
handler
- @Deprecated public static void registerDispenserHandler(IDispenseHandler handler)
handler
- @Deprecated public static int tryDispense(World world, int x, int y, int z, int xVelocity, int zVelocity, ItemStack item, Random random, double entX, double entY, double entZ)
world
- x
- y
- z
- xVelocity
- zVelocity
- item
- public static Object buildBlock(ModContainer container, Class<?> type, Mod.Block annotation) throws Exception
container
- type
- annotation
-
Exception
public static void registerItem(Item item, String name)
item
- The item to registername
- The mod-unique name of the itempublic static void registerItem(Item item, String name, String modId)
item
- The item to registername
- The mod-unique name to register it as - null will remove a custom namemodId
- An optional modId that will "own" this block - generally used by multi-mod systems
where one mod should "own" all the blocks of all the mods, null defaults to the active mod@Deprecated public static void registerBlock(Block block)
public static void registerBlock(Block block, String name)
block
- The block to registername
- The mod-unique name to register it as@Deprecated public static void registerBlock(Block block, Class<? extends ItemBlock> itemclass)
block
- The block to registeritemclass
- The item type to register with itpublic static void registerBlock(Block block, Class<? extends ItemBlock> itemclass, String name)
block
- The block to registeritemclass
- The item type to register with itname
- The mod-unique name to register it withpublic static void registerBlock(Block block, Class<? extends ItemBlock> itemclass, String name, String modId)
block
- The block to registeritemclass
- The iterm type to register with itname
- The mod-unique name to register it withmodId
- The modId that will own the block name. null defaults to the active modIdpublic static void addRecipe(ItemStack output, Object... params)
public static void addShapelessRecipe(ItemStack output, Object... params)
public static void addRecipe(IRecipe recipe)
public static void addSmelting(int input, ItemStack output, float xp)
public static void registerTileEntity(Class<? extends TileEntity> tileEntityClass, String id)
public static void addBiome(BiomeGenBase biome)
public static void removeBiome(BiomeGenBase biome)
public static void registerFuelHandler(IFuelHandler handler)
public static int getFuelValue(ItemStack itemStack)
public static void registerCraftingHandler(ICraftingHandler handler)
public static void onItemCrafted(EntityPlayer player, ItemStack item, IInventory craftMatrix)
public static void onItemSmelted(EntityPlayer player, ItemStack item)
public static void registerPickupHandler(IPickupNotifier handler)
public static void onPickupNotification(EntityPlayer player, EntityItem item)
public static void registerPlayerTracker(IPlayerTracker tracker)
public static void onPlayerLogin(EntityPlayer player)
public static void onPlayerLogout(EntityPlayer player)
public static void onPlayerChangedDimension(EntityPlayer player)
public static void onPlayerRespawn(EntityPlayer player)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |