net.minecraft.src.forge
Class MinecraftForge

java.lang.Object
  extended by net.minecraft.src.forge.MinecraftForge

public class MinecraftForge
extends java.lang.Object


Constructor Summary
MinecraftForge()
           
 
Method Summary
static void addPickaxeBlockEffectiveAgainst(net.minecraft.src.Block block)
          This function is deprecated and will be removed eventually.
static net.minecraft.src.ItemStack fillCustomBucket(net.minecraft.src.World w, int i, int j, int k)
          This is not supposed to be called outside of Minecraft internals.
static void killMinecraft(java.lang.String modname, java.lang.String msg)
          Kill minecraft with an error message.
static void registerCraftingHandler(ICraftingHandler handler)
          Registers a new crafting handler.
static void registerCustomBucketHander(IBucketHandler handler)
          Deprecated. Spelling mistake, don't use this function! It will go away soon.
static void registerCustomBucketHandler(IBucketHandler handler)
          Register a new custom bucket handler.
static void registerDestroyToolHandler(IDestroyToolHandler handler)
          Registers a new destroy tool handler.
static void registerSleepHandler(ISleepHandler handler)
          Registers a new sleeping handler.
static void removeBlockEffectiveness(net.minecraft.src.Block bl, int md, java.lang.String tclass)
          Remove a block effectiveness mapping.
static void removeBlockEffectiveness(net.minecraft.src.Block bl, java.lang.String tclass)
          Remove a block effectiveness mapping.
static void setBlockHarvestLevel(net.minecraft.src.Block bl, int md, java.lang.String tclass, int hlevel)
          Register a block to be harvested by a tool class.
static void setBlockHarvestLevel(net.minecraft.src.Block bl, java.lang.String tclass, int hlevel)
          Register a block to be harvested by a tool class.
static void setToolClass(net.minecraft.src.Item tool, java.lang.String tclass, int hlevel)
          Register a tool as a tool class with a given harvest level.
static void versionDetect(java.lang.String modname, int major, int minor, int revision)
          Version checking.
static void versionDetectStrict(java.lang.String modname, int major, int minor, int revision)
          Strict version checking.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinecraftForge

public MinecraftForge()
Method Detail

registerCustomBucketHander

public static void registerCustomBucketHander(IBucketHandler handler)
Deprecated. Spelling mistake, don't use this function! It will go away soon.

Registers a new custom bucket handler.


registerCustomBucketHandler

public static void registerCustomBucketHandler(IBucketHandler handler)
Register a new custom bucket handler.


registerSleepHandler

public static void registerSleepHandler(ISleepHandler handler)
Registers a new sleeping handler.


registerDestroyToolHandler

public static void registerDestroyToolHandler(IDestroyToolHandler handler)
Registers a new destroy tool handler.


registerCraftingHandler

public static void registerCraftingHandler(ICraftingHandler handler)
Registers a new crafting handler.


fillCustomBucket

public static net.minecraft.src.ItemStack fillCustomBucket(net.minecraft.src.World w,
                                                           int i,
                                                           int j,
                                                           int k)
This is not supposed to be called outside of Minecraft internals.


setToolClass

public static void setToolClass(net.minecraft.src.Item tool,
                                java.lang.String tclass,
                                int hlevel)
Register a tool as a tool class with a given harvest level.

Parameters:
tool - The custom tool to register.
tclass - The tool class to register as. The predefined tool clases are "pickaxe", "shovel", "axe". You can add others for custom tools.
hlevel - The harvest level of the tool.

setBlockHarvestLevel

public static void setBlockHarvestLevel(net.minecraft.src.Block bl,
                                        int md,
                                        java.lang.String tclass,
                                        int hlevel)
Register a block to be harvested by a tool class. This is the metadata sensitive version, use it if your blocks are using metadata variants. By default, this sets the block class as effective against that type.

Parameters:
bl - The block to register.
md - The metadata for the block subtype.
tclass - 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.
hlevel - The minimum tool harvest level required to successfully harvest the block.
See Also:
for details on tool classes.

removeBlockEffectiveness

public static void removeBlockEffectiveness(net.minecraft.src.Block bl,
                                            int md,
                                            java.lang.String tclass)
Remove a block effectiveness mapping. Since setBlockHarvestLevel makes the tool class effective against the block by default, this can be used to remove that mapping. This will force a block to be harvested at the same speed regardless of tool quality, while still requiring a given harvesting level.

Parameters:
bl - The block to remove effectiveness from.
md - The metadata for the block subtype.
tclass - The tool class to remove the effectiveness mapping from.
See Also:
for details on tool classes.

setBlockHarvestLevel

public static void setBlockHarvestLevel(net.minecraft.src.Block bl,
                                        java.lang.String tclass,
                                        int hlevel)
Register a block to be harvested by a tool class. By default, this sets the block class as effective against that type.

Parameters:
bl - The block to register.
tclass - 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.
hlevel - The minimum tool harvest level required to successfully harvest the block.
See Also:
for details on tool classes.

removeBlockEffectiveness

public static void removeBlockEffectiveness(net.minecraft.src.Block bl,
                                            java.lang.String tclass)
Remove a block effectiveness mapping. Since setBlockHarvestLevel makes the tool class effective against the block by default, this can be used to remove that mapping. This will force a block to be harvested at the same speed regardless of tool quality, while still requiring a given harvesting level.

Parameters:
bl - The block to remove effectiveness from.
tclass - The tool class to remove the effectiveness mapping from.
See Also:
for details on tool classes.

addPickaxeBlockEffectiveAgainst

public static void addPickaxeBlockEffectiveAgainst(net.minecraft.src.Block block)
This function is deprecated and will be removed eventually.


killMinecraft

public static void killMinecraft(java.lang.String modname,
                                 java.lang.String msg)
Kill minecraft with an error message.


versionDetect

public static void versionDetect(java.lang.String modname,
                                 int major,
                                 int minor,
                                 int revision)
Version checking. Ensures that a sufficiently recent version of Forge is installed. Will result in a fatal error if the major versions mismatch or if the version is too old. Will print a warning message if the minor versions don't match.


versionDetectStrict

public static void versionDetectStrict(java.lang.String modname,
                                       int major,
                                       int minor,
                                       int revision)
Strict version checking. Ensures that a sufficiently recent version of Forge is installed. Will result in a fatal error if the major or minor versions mismatch or if the version is too old. Use this function for mods that use recent, new, or unstable APIs to prevent incompatibilities.