Update Planter.java

See #140 for discussion
took me a while to test, first time gradle user, couldn't figure out how to call gradle commands from my ide and not manually from cli
This commit is contained in:
Eric Horvitz committed 2015-02-03 12:27:57 -08:00
1 parent ea47aec970
commit cfcc5757e9
1 file changed
+9
@@ -53,6 +53,15 @@ public class Planter {
addPlantable(seed, block, canPlantOn);
}
@ZenMethod
public static void addPlantable(IItemStack seed, IItemStack itemblock, @Optional IBlockPattern canPlantOn) {
IBlock block = itemblock.asBlock();
if (block == null) {
MineTweakerAPI.logError("The given itemblock has no block equivalant");
}
addPlantable(seed, block, canPlantOn);
}
@ZenMethod
public static void addPlantable(IIngredient seed, IBlock block, @Optional IBlockPattern canPlantOn) {
if (canPlantOn == null) {