|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraftforge.common.MinecraftForge
public class MinecraftForge
Field Summary | |
---|---|
static EventBus |
EVENT_BUS
The core Forge EventBusses, all events for Forge will be fired on these, you should use this to register all your listeners. |
static EventBus |
ORE_GEN_BUS
|
static boolean |
SPAWNER_ALLOW_ON_INVERTED
Deprecated. |
static EventBus |
TERRAIN_GEN_BUS
|
Constructor Summary | |
---|---|
MinecraftForge()
|
Method Summary | |
---|---|
static void |
addGrassPlant(Block block,
int metadata,
int weight)
Register a new plant to be planted when bonemeal is used on grass. |
static void |
addGrassSeed(ItemStack seed,
int weight)
Register a new seed to be dropped when breaking tall grass. |
static int |
getBlockHarvestLevel(Block block,
int metadata,
String toolClass)
Returns the block harvest level for a particular tool class. |
static String |
getBrandingVersion()
|
static void |
initialize()
Method invoked by FML before any other mods are loaded. |
static void |
removeBlockEffectiveness(Block block,
int metadata,
String toolClass)
Remove a block effectiveness mapping. |
static void |
removeBlockEffectiveness(Block block,
String toolClass)
Remove a block effectiveness mapping. |
static void |
setBlockHarvestLevel(Block block,
int metadata,
String toolClass,
int harvestLevel)
Register a block to be harvested by a tool class. |
static void |
setBlockHarvestLevel(Block block,
String toolClass,
int harvestLevel)
Register a block to be harvested by a tool class. |
static void |
setToolClass(Item tool,
String toolClass,
int harvestLevel)
Register a tool as a tool class with a given harvest level. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final EventBus EVENT_BUS
public static final EventBus TERRAIN_GEN_BUS
public static final EventBus ORE_GEN_BUS
@Deprecated public static boolean SPAWNER_ALLOW_ON_INVERTED
Constructor Detail |
---|
public MinecraftForge()
Method Detail |
---|
public static void addGrassPlant(Block block, int metadata, int weight)
block
- The block to place.metadata
- The metadata to set for the block when being placed.weight
- The weight of the plant, where red flowers are
10 and yellow flowers are 20.public static void addGrassSeed(ItemStack seed, int weight)
seed
- The item to drop as a seed.weight
- The relative probability of the seeds,
where wheat seeds are 10.public static void setToolClass(Item tool, String toolClass, int harvestLevel)
tool
- The custom tool to register.toolClass
- The tool class to register as. The predefined tool
clases are "pickaxe", "shovel", "axe". You can add
others for custom tools.harvestLevel
- The harvest level of the tool.public static void setBlockHarvestLevel(Block block, int metadata, String toolClass, int harvestLevel)
block
- The block to register.metadata
- The metadata for the block subtype.toolClass
- The tool class to register as able to remove this block.
You may register the same block multiple times with different tool
classes, if multiple tool types can be used to harvest this block.harvestLevel
- The minimum tool harvest level required to successfully
harvest the block.for details on tool classes.
public static void removeBlockEffectiveness(Block block, int metadata, String toolClass)
block
- The block to remove effectiveness from.metadata
- The metadata for the block subtype.toolClass
- The tool class to remove the effectiveness mapping from.for details on tool classes.
public static void setBlockHarvestLevel(Block block, String toolClass, int harvestLevel)
block
- The block to register.toolClass
- The tool class to register as able to remove this block.
You may register the same block multiple times with different tool
classes, if multiple tool types can be used to harvest this block.harvestLevel
- The minimum tool harvest level required to successfully
harvest the block.for details on tool classes.
public static int getBlockHarvestLevel(Block block, int metadata, String toolClass)
block
- The block to check.metadata
- The metadata for the block subtype.toolClass
- The tool class to check as able to remove this block.
for details on tool classes.
public static void removeBlockEffectiveness(Block block, String toolClass)
block
- The block to remove effectiveness from.toolClass
- The tool class to remove the effectiveness mapping from.for details on tool classes.
public static void initialize()
public static String getBrandingVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |