Added support for carrots and potatoes. Also updated to ignore beacon blocks and anvil blocks.

This commit is contained in:
Glitchfinder
2012-10-28 20:53:03 -07:00
parent 43fe92fe3f
commit 11f1889f1f
4 changed files with 35 additions and 0 deletions

View File

@ -199,6 +199,20 @@ public class Herbalism {
}
break;
case CARROT:
if (((byte) data) == 0x3) {
mat = Material.CARROT;
xp = Config.getInstance().getHerbalismXPCarrot();
}
break;
case POTATO:
if (((byte) data) == 0x3) {
mat = Material.POTATO;
xp = Config.getInstance().getHerbalismXPPotato();
}
break;
default:
if (Config.getInstance().getBlockModsEnabled() && CustomBlocksConfig.getInstance().customHerbalismBlocks.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
customPlant = true;
@ -221,6 +235,13 @@ public class Herbalism {
if (mat == Material.COCOA) {
is = new ItemStack(Material.INK_SACK, 1, (short) 3);
}
else if (mat == Material.COCOA) {
is = new ItemStack(Material.CARROT_ITEM, 1, (short) 0);
}
else if (mat == Material.COCOA) {
is = new ItemStack(Material.POTATO_ITEM, 1, (short) 0);
}
else {
is = new ItemStack(mat);
}