mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Merge pull request #269 from Glitchfinder/master
Finished adding skill checks for Emerald Ore and Cocoa.
This commit is contained in:
commit
43fe92fe3f
@ -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();
|
||||
}
|
||||
@ -218,7 +218,12 @@ public class Herbalism {
|
||||
is = new ItemStack(ModChecks.getCustomBlock(block).getItemDrop());
|
||||
}
|
||||
else {
|
||||
is = new ItemStack(mat);
|
||||
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) {
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user