mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +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;
|
break;
|
||||||
|
|
||||||
case COCOA:
|
case COCOA:
|
||||||
if (data == (byte) 0x2) {
|
if ((((byte) data) & 0x8) == 0x8) {
|
||||||
mat = Material.COCOA;
|
mat = Material.COCOA;
|
||||||
xp = Config.getInstance().getHerbalismXPCocoa();
|
xp = Config.getInstance().getHerbalismXPCocoa();
|
||||||
}
|
}
|
||||||
@ -217,9 +217,14 @@ public class Herbalism {
|
|||||||
if (customPlant) {
|
if (customPlant) {
|
||||||
is = new ItemStack(ModChecks.getCustomBlock(block).getItemDrop());
|
is = new ItemStack(ModChecks.getCustomBlock(block).getItemDrop());
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (mat == Material.COCOA) {
|
||||||
|
is = new ItemStack(Material.INK_SACK, 1, (short) 3);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
is = new ItemStack(mat);
|
is = new ItemStack(mat);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (herbLevel > MAX_BONUS_LEVEL || random.nextInt(randomChance) <= herbLevel) {
|
if (herbLevel > MAX_BONUS_LEVEL || random.nextInt(randomChance) <= herbLevel) {
|
||||||
Config configInstance = Config.getInstance();
|
Config configInstance = Config.getInstance();
|
||||||
|
@ -52,6 +52,8 @@ public class BlockChecks {
|
|||||||
case VINE:
|
case VINE:
|
||||||
case WATER_LILY:
|
case WATER_LILY:
|
||||||
case YELLOW_FLOWER:
|
case YELLOW_FLOWER:
|
||||||
|
case COCOA:
|
||||||
|
case EMERALD_ORE:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -123,6 +125,7 @@ public class BlockChecks {
|
|||||||
case IRON_ORE:
|
case IRON_ORE:
|
||||||
case LAPIS_ORE:
|
case LAPIS_ORE:
|
||||||
case REDSTONE_ORE:
|
case REDSTONE_ORE:
|
||||||
|
case EMERALD_ORE:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -175,6 +178,7 @@ public class BlockChecks {
|
|||||||
case VINE:
|
case VINE:
|
||||||
case WATER_LILY:
|
case WATER_LILY:
|
||||||
case YELLOW_FLOWER:
|
case YELLOW_FLOWER:
|
||||||
|
case COCOA:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case CROPS:
|
case CROPS:
|
||||||
@ -217,6 +221,7 @@ public class BlockChecks {
|
|||||||
case REDSTONE_ORE:
|
case REDSTONE_ORE:
|
||||||
case SANDSTONE:
|
case SANDSTONE:
|
||||||
case STONE:
|
case STONE:
|
||||||
|
case EMERALD_ORE:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user