additional comments
This commit is contained in:
parent
b892916d6f
commit
c35f8e5ddb
2 changed files with 24 additions and 1 deletions
|
@ -20,6 +20,10 @@ import java.util.TreeMap;
|
||||||
|
|
||||||
import net.minecraft.src.Block;
|
import net.minecraft.src.Block;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class offers advanced configurations capabilities, allowing to provide
|
||||||
|
* various categories for configuration variables.
|
||||||
|
*/
|
||||||
public class Configuration {
|
public class Configuration {
|
||||||
|
|
||||||
private boolean configBlocks[] = null;
|
private boolean configBlocks[] = null;
|
||||||
|
|
|
@ -20,18 +20,30 @@ public class MinecraftForge {
|
||||||
private static LinkedList<IBiomePopulator> biomePopulators = new LinkedList<IBiomePopulator>();
|
private static LinkedList<IBiomePopulator> biomePopulators = new LinkedList<IBiomePopulator>();
|
||||||
private static LinkedList<IHarvestHandler> harvestHandlers = new LinkedList<IHarvestHandler>();
|
private static LinkedList<IHarvestHandler> harvestHandlers = new LinkedList<IHarvestHandler>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a new custom bucket handler.
|
||||||
|
*/
|
||||||
public static void registerCustomBucketHander(IBucketHandler handler) {
|
public static void registerCustomBucketHander(IBucketHandler handler) {
|
||||||
bucketHandlers.add(handler);
|
bucketHandlers.add(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a new biome contributer.
|
||||||
|
*/
|
||||||
public static void registerBiomePopulate(IBiomePopulator populator) {
|
public static void registerBiomePopulate(IBiomePopulator populator) {
|
||||||
biomePopulators.add(populator);
|
biomePopulators.add(populator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a new harvest handler.
|
||||||
|
*/
|
||||||
public static void registerHarvestHandler(IHarvestHandler handler) {
|
public static void registerHarvestHandler(IHarvestHandler handler) {
|
||||||
harvestHandlers.add(handler);
|
harvestHandlers.add(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is not supposed to be called outside of Minecraft internals.
|
||||||
|
*/
|
||||||
public static ItemStack fillCustomBucket(World w, int i, int j, int k) {
|
public static ItemStack fillCustomBucket(World w, int i, int j, int k) {
|
||||||
for (IBucketHandler handler : bucketHandlers) {
|
for (IBucketHandler handler : bucketHandlers) {
|
||||||
ItemStack stack = handler.fillCustomBucket(w, i, j, k);
|
ItemStack stack = handler.fillCustomBucket(w, i, j, k);
|
||||||
|
@ -44,6 +56,9 @@ public class MinecraftForge {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is not supposed to be called outside of Minecraft internals.
|
||||||
|
*/
|
||||||
public static void populateBiome(World world, BiomeGenBase biomegenbase,
|
public static void populateBiome(World world, BiomeGenBase biomegenbase,
|
||||||
int x, int z) {
|
int x, int z) {
|
||||||
for (IBiomePopulator populator : biomePopulators) {
|
for (IBiomePopulator populator : biomePopulators) {
|
||||||
|
@ -51,6 +66,9 @@ public class MinecraftForge {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is not supposed to be called outside of Minecraft internals.
|
||||||
|
*/
|
||||||
public static boolean canHarvestBlock(ItemTool item, Block block) {
|
public static boolean canHarvestBlock(ItemTool item, Block block) {
|
||||||
for (IHarvestHandler handler : harvestHandlers) {
|
for (IHarvestHandler handler : harvestHandlers) {
|
||||||
if (handler.canHarvestBlock(item, block)) {
|
if (handler.canHarvestBlock(item, block)) {
|
||||||
|
@ -62,7 +80,8 @@ public class MinecraftForge {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a block to the list of blocks supposed to be
|
* Add a block to the list of blocks to which the pixaxe is know to be
|
||||||
|
* effective.
|
||||||
*/
|
*/
|
||||||
public static void addPixaxeBlockEffectiveAgainst (Block block) {
|
public static void addPixaxeBlockEffectiveAgainst (Block block) {
|
||||||
((ItemTool) Item.pickaxeWood).addBlockEffectiveAgainst(block);
|
((ItemTool) Item.pickaxeWood).addBlockEffectiveAgainst(block);
|
||||||
|
|
Loading…
Reference in a new issue