Fix crash when trying to revert an unchiselable block

This commit is contained in:
tterrag1098 committed 2015-08-16 15:45:22 -04:00
1 parent 25a1e7970d
commit 7555e21144
1 file changed
+2 -1
@@ -181,7 +181,8 @@ public class TileEntityAutoChisel extends TileEntity implements ISidedInventory
private ItemStack getTarget() {
if (inventory[BASE] != null && hasUpgrade(Upgrade.REVERSION)) {
// if we have a reversion upgrade, use that for the target
return Carving.chisel.getItemsForChiseling(inventory[BASE]).get(0);
List<ItemStack> possible = Carving.chisel.getItemsForChiseling(inventory[BASE]);
return possible.isEmpty() ? null : possible.get(0);
} else {
return inventory[TARGET];
}