Merge pull request #269 from Glitchfinder/master

Finished adding skill checks for Emerald Ore and Cocoa.
This commit is contained in:
Grant 2012-10-18 08:34:47 -07:00
commit 43fe92fe3f
2 changed files with 12 additions and 2 deletions

View File

@ -193,7 +193,7 @@ public class Herbalism {
break;
case COCOA:
if (data == (byte) 0x2) {
if ((((byte) data) & 0x8) == 0x8) {
mat = Material.COCOA;
xp = Config.getInstance().getHerbalismXPCocoa();
}
@ -217,9 +217,14 @@ public class Herbalism {
if (customPlant) {
is = new ItemStack(ModChecks.getCustomBlock(block).getItemDrop());
}
else {
if (mat == Material.COCOA) {
is = new ItemStack(Material.INK_SACK, 1, (short) 3);
}
else {
is = new ItemStack(mat);
}
}
if (herbLevel > MAX_BONUS_LEVEL || random.nextInt(randomChance) <= herbLevel) {
Config configInstance = Config.getInstance();

View File

@ -52,6 +52,8 @@ public class BlockChecks {
case VINE:
case WATER_LILY:
case YELLOW_FLOWER:
case COCOA:
case EMERALD_ORE:
return true;
default:
@ -123,6 +125,7 @@ public class BlockChecks {
case IRON_ORE:
case LAPIS_ORE:
case REDSTONE_ORE:
case EMERALD_ORE:
return true;
default:
@ -175,6 +178,7 @@ public class BlockChecks {
case VINE:
case WATER_LILY:
case YELLOW_FLOWER:
case COCOA:
return true;
case CROPS:
@ -217,6 +221,7 @@ public class BlockChecks {
case REDSTONE_ORE:
case SANDSTONE:
case STONE:
case EMERALD_ORE:
return true;
default: