Skip to content

Commit

Permalink
fix: fix ability to insert fuel from the side into the vial slot of t…
Browse files Browse the repository at this point in the history
…he bio-lab

Closes: #154
  • Loading branch information
Elenterius committed Nov 6, 2024
1 parent ae5ebe4 commit 7f6bb5b
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -99,8 +100,13 @@ public BioLabBlockEntity(BlockPos worldPosition, BlockState blockState) {
private LazyOptional<IItemHandler> 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
Expand Down

0 comments on commit 7f6bb5b

Please sign in to comment.