mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-11 15:57:31 +00:00
Fix crash when trying to revert an unchiselable block
This commit is contained in:
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];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user