mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Update MiningTask.java
This commit is contained in:
parent
36c7fc7726
commit
d0b5221df6
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user