cpw.mods.fml.common.registry
Class GameRegistry

java.lang.Object
  extended by cpw.mods.fml.common.registry.GameRegistry

public class GameRegistry
extends Object


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)
          Register a block with the world
static void registerBlock(Block block, Class<? extends ItemBlock> itemclass)
          Register a block with the world, with the specified item class
static void registerCraftingHandler(ICraftingHandler handler)
           
static void registerDispenserHandler(IDispenseHandler handler)
          Deprecated. 
static void registerDispenserHandler(IDispenserHandler handler)
           
static void registerFuelHandler(IFuelHandler handler)
           
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)
          Callback hook for dispenser activities - if you add a block and want mods to be able to extend their dispenser related activities to it call this
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameRegistry

public GameRegistry()
Method Detail

registerWorldGenerator

public static void registerWorldGenerator(IWorldGenerator generator)
Register a world generator - something that inserts new block types into the world

Parameters:
generator -

generateWorld

public 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

Parameters:
chunkX -
chunkZ -
world -
chunkGenerator -
chunkProvider -

registerDispenserHandler

public static void registerDispenserHandler(IDispenserHandler handler)

registerDispenserHandler

@Deprecated
public static void registerDispenserHandler(IDispenseHandler handler)
Deprecated. 

Register a handler for dispensers

Parameters:
handler -

tryDispense

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)
Callback hook for dispenser activities - if you add a block and want mods to be able to extend their dispenser related activities to it call this

Parameters:
world -
x -
y -
z -
xVelocity -
zVelocity -
item -
Returns:

buildBlock

public static Object buildBlock(ModContainer container,
                                Class<?> type,
                                Mod.Block annotation)
                         throws Exception
Internal method for creating an @Block instance

Parameters:
container -
type -
annotation -
Returns:
Throws:
Exception

registerBlock

public static void registerBlock(Block block)
Register a block with the world


registerBlock

public static void registerBlock(Block block,
                                 Class<? extends ItemBlock> itemclass)
Register a block with the world, with the specified item class

Parameters:
block -
itemclass -

addRecipe

public static void addRecipe(ItemStack output,
                             Object... params)

addShapelessRecipe

public static void addShapelessRecipe(ItemStack output,
                                      Object... params)

addRecipe

public static void addRecipe(IRecipe recipe)

addSmelting

public static void addSmelting(int input,
                               ItemStack output,
                               float xp)

registerTileEntity

public static void registerTileEntity(Class<? extends TileEntity> tileEntityClass,
                                      String id)

addBiome

public static void addBiome(BiomeGenBase biome)

removeBiome

public static void removeBiome(BiomeGenBase biome)

registerFuelHandler

public static void registerFuelHandler(IFuelHandler handler)

getFuelValue

public static int getFuelValue(ItemStack itemStack)

registerCraftingHandler

public static void registerCraftingHandler(ICraftingHandler handler)

onItemCrafted

public static void onItemCrafted(EntityPlayer player,
                                 ItemStack item,
                                 IInventory craftMatrix)

onItemSmelted

public static void onItemSmelted(EntityPlayer player,
                                 ItemStack item)

registerPickupHandler

public static void registerPickupHandler(IPickupNotifier handler)

onPickupNotification

public static void onPickupNotification(EntityPlayer player,
                                        EntityItem item)

registerPlayerTracker

public static void registerPlayerTracker(IPlayerTracker tracker)

onPlayerLogin

public static void onPlayerLogin(EntityPlayer player)

onPlayerLogout

public static void onPlayerLogout(EntityPlayer player)

onPlayerChangedDimension

public static void onPlayerChangedDimension(EntityPlayer player)

onPlayerRespawn

public static void onPlayerRespawn(EntityPlayer player)