-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from TonimatasMCDEV/1.19/fixes
Delete unnecessary lines
- Loading branch information
Showing
3 changed files
with
29 additions
and
18 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/main/java/net/tonimatasmc/krystalcraft/block/entity/Utils/Simplify.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.tonimatasmc.krystalcraft.block.entity.Utils; | ||
|
||
import net.minecraft.world.SimpleContainer; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.item.Items; | ||
import net.minecraftforge.items.ItemStackHandler; | ||
import net.tonimatasmc.krystalcraft.item.ModItems; | ||
|
||
public class Simplify { | ||
public static boolean hasWaterInWaterSlot(ItemStackHandler itemStackHandler) { | ||
return itemStackHandler.getStackInSlot(0).getItem() == ModItems.SET_WATER_BOTTLES.get(); | ||
} | ||
|
||
public static boolean hasCoalSlot(ItemStackHandler itemStackHandler, int fuelProgress, int fuelMaxProgress) { | ||
return itemStackHandler.getStackInSlot(2).getItem() == Items.COAL || fuelProgress <= fuelMaxProgress; | ||
} | ||
|
||
public static boolean canInsertItemIntoOutputSlot(SimpleContainer inventory, ItemStack output) { | ||
return inventory.getItem(3).getItem() == output.getItem() || inventory.getItem(3).isEmpty(); | ||
} | ||
|
||
public static boolean canInsertAmountIntoOutputSlot(SimpleContainer inventory) { | ||
return inventory.getItem(3).getMaxStackSize() > inventory.getItem(3).getCount(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters