1
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:
FN-FAL113 2022-01-31 10:11:00 +08:00 committed by GitHub
parent 45b4268871
commit 6cc4695e8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -311,18 +311,16 @@ class MiningTask implements Runnable {
for (MachineFuel fuelType : miner.fuelTypes) {
ItemStack item = inv.getContents()[i];
if (fuelType.test(item)) {
/*
* Fixes #3336
* Respects the state of the miner if there are
* no any errors during #setPistonState
*/
if (running) {
ItemUtils.consumeItem(item, false);
/*
* Fixes #3336
* Respects the state of the miner if there are
* no any errors during #setPistonState
*/
if (fuelType.test(item) && running) {
ItemUtils.consumeItem(item, false);
if (miner instanceof AdvancedIndustrialMiner) {
inv.addItem(new ItemStack(Material.BUCKET));
}
if (miner instanceof AdvancedIndustrialMiner) {
inv.addItem(new ItemStack(Material.BUCKET));
}
return fuelType.getTicks();