Skip to content

Commit

Permalink
Fix lubricant overclocking not consuming the lubricant (#665)
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n authored Mar 13, 2024
1 parent 85c81b8 commit 8295ae2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ public static InteractionResult onUse(CrafterComponent crafter, Player player, I
FluidTank interactionTank = new FluidTank(maxAllowedLubricant, stack -> stack.getFluid() == MIFluids.LUBRICANT.asFluid());
var result = FluidUtil.tryEmptyContainer(player.getItemInHand(hand), interactionTank, maxAllowedLubricant, player, true);

if (result.isSuccess()) {
crafter.increaseEfficiencyTicks(interactionTank.getFluidAmount());
if (result.isSuccess() && interactionTank.getFluidAmount() >= mbPerTick) {
crafter.increaseEfficiencyTicks(interactionTank.getFluidAmount() / mbPerTick);
player.setItemInHand(hand, result.getResult());
return InteractionResult.SUCCESS;
}
}
Expand Down

0 comments on commit 8295ae2

Please sign in to comment.