diff --git a/build.gradle b/build.gradle index 92ad28e..0f0bb80 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ repositories { apply plugin: 'net.minecraftforge.gradle.forge' -version = "1.5.0" +version = "1.5.1" group= "gigaherz.survivalist" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Survivalist-1.10.2" diff --git a/src/main/java/gigaherz/survivalist/chopblock/BlockChopping.java b/src/main/java/gigaherz/survivalist/chopblock/BlockChopping.java index adca5fb..d5ba6d5 100644 --- a/src/main/java/gigaherz/survivalist/chopblock/BlockChopping.java +++ b/src/main/java/gigaherz/survivalist/chopblock/BlockChopping.java @@ -148,9 +148,8 @@ public void onBlockClicked(World worldIn, BlockPos pos, EntityPlayer playerIn) { TileChopping chopper = (TileChopping) tileentity; ItemStack heldItem = playerIn.getHeldItem(EnumHand.MAIN_HAND); - assert heldItem != null; - int harvestLevel = heldItem.getItem().getHarvestLevel(heldItem, "axe"); + int harvestLevel = heldItem != null ? heldItem.getItem().getHarvestLevel(heldItem, "axe") : -1; if (harvestLevel >= 0) { if (chopper.chop(playerIn, harvestLevel, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, heldItem)))