diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/MiningTask.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/MiningTask.java index 7c870b9a6..c2f8c38bc 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/MiningTask.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/MiningTask.java @@ -268,8 +268,8 @@ class MiningTask implements Runnable { if (chest.getType() == Material.CHEST) { BlockState state = PaperLib.getBlockState(chest, false).getState(); - if (state instanceof Chest) { - Inventory inv = ((Chest) state).getBlockInventory(); + if (state instanceof Chest chestState) { + Inventory inv = chestState.getBlockInventory(); if (InvUtils.fits(inv, item)) { inv.addItem(item); @@ -299,8 +299,8 @@ class MiningTask implements Runnable { if (chest.getType() == Material.CHEST) { BlockState state = PaperLib.getBlockState(chest, false).getState(); - if (state instanceof Chest) { - Inventory inv = ((Chest) state).getBlockInventory(); + if (state instanceof Chest chestState) { + Inventory inv = chestState.getBlockInventory(); this.fuelLevel = grabFuelFrom(inv); } }