From 7f6bb5bfa1ca8af39f5c014c2dc49f5211a453b7 Mon Sep 17 00:00:00 2001 From: Elenterius Date: Wed, 6 Nov 2024 22:50:14 +0100 Subject: [PATCH] fix: fix ability to insert fuel from the side into the vial slot of the bio-lab Closes: #154 --- .../biomancy/block/biolab/BioLabBlockEntity.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/elenterius/biomancy/block/biolab/BioLabBlockEntity.java b/src/main/java/com/github/elenterius/biomancy/block/biolab/BioLabBlockEntity.java index 86007206..dc4e5cb8 100644 --- a/src/main/java/com/github/elenterius/biomancy/block/biolab/BioLabBlockEntity.java +++ b/src/main/java/com/github/elenterius/biomancy/block/biolab/BioLabBlockEntity.java @@ -2,6 +2,7 @@ import com.github.elenterius.biomancy.api.nutrients.FuelHandler; import com.github.elenterius.biomancy.api.nutrients.FuelHandlerImpl; +import com.github.elenterius.biomancy.api.nutrients.Nutrients; import com.github.elenterius.biomancy.block.base.MachineBlock; import com.github.elenterius.biomancy.block.base.MachineBlockEntity; import com.github.elenterius.biomancy.client.util.ClientLoopingSoundHelper; @@ -99,8 +100,13 @@ public BioLabBlockEntity(BlockPos worldPosition, BlockState blockState) { private LazyOptional createCombinedInventory() { return LazyOptional.of(() -> new CombinedInvWrapper( fuelInventory, - new RangedWrapper(inputInventory, inputInventory.getSlots() - 1, inputInventory.getSlots()) - )); + new RangedWrapper(inputInventory, inputInventory.getSlots() - 1, inputInventory.getSlots())) { + @Override + public boolean isItemValid(int slot, ItemStack stack) { + return !Nutrients.FUEL_PREDICATE.test(stack) && super.isItemValid(slot, stack); + } + } + ); } @Override