mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Remove nested condition
This commit is contained in:
parent
45b4268871
commit
6cc4695e8c
@ -311,19 +311,17 @@ class MiningTask implements Runnable {
|
|||||||
for (MachineFuel fuelType : miner.fuelTypes) {
|
for (MachineFuel fuelType : miner.fuelTypes) {
|
||||||
ItemStack item = inv.getContents()[i];
|
ItemStack item = inv.getContents()[i];
|
||||||
|
|
||||||
if (fuelType.test(item)) {
|
|
||||||
/*
|
/*
|
||||||
* Fixes #3336
|
* Fixes #3336
|
||||||
* Respects the state of the miner if there are
|
* Respects the state of the miner if there are
|
||||||
* no any errors during #setPistonState
|
* no any errors during #setPistonState
|
||||||
*/
|
*/
|
||||||
if (running) {
|
if (fuelType.test(item) && running) {
|
||||||
ItemUtils.consumeItem(item, false);
|
ItemUtils.consumeItem(item, false);
|
||||||
|
|
||||||
if (miner instanceof AdvancedIndustrialMiner) {
|
if (miner instanceof AdvancedIndustrialMiner) {
|
||||||
inv.addItem(new ItemStack(Material.BUCKET));
|
inv.addItem(new ItemStack(Material.BUCKET));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return fuelType.getTicks();
|
return fuelType.getTicks();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user