Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.16' into 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Oct 7, 2023
2 parents 88b1620 + 2c8f934 commit c14c74f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ public void handleButtonMessage(int id, PlayerEntity playerEntity, CompoundNBT c
if (fluidTankComponent.getName().equalsIgnoreCase(name))
playerEntity.inventory.getItemStack().getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY).ifPresent(iFluidHandlerItem -> {
if (fill) {
int amount = Minecraft.getInstance().player.inventory.getItemStack().getItem() instanceof BucketItem ? FluidAttributes.BUCKET_VOLUME : Integer.MAX_VALUE;
int amount = playerEntity.inventory.getItemStack().getItem() instanceof BucketItem ? FluidAttributes.BUCKET_VOLUME : Integer.MAX_VALUE;
amount = fluidTankComponent.fill(iFluidHandlerItem.drain(amount, IFluidHandler.FluidAction.SIMULATE), IFluidHandler.FluidAction.EXECUTE);
iFluidHandlerItem.drain(amount, IFluidHandler.FluidAction.EXECUTE);
} else {
int amount = Minecraft.getInstance().player.inventory.getItemStack().getItem() instanceof BucketItem ? FluidAttributes.BUCKET_VOLUME : Integer.MAX_VALUE;
int amount = playerEntity.inventory.getItemStack().getItem() instanceof BucketItem ? FluidAttributes.BUCKET_VOLUME : Integer.MAX_VALUE;
amount = iFluidHandlerItem.fill(fluidTankComponent.drain(amount, IFluidHandler.FluidAction.SIMULATE), IFluidHandler.FluidAction.EXECUTE);
fluidTankComponent.drain(amount, IFluidHandler.FluidAction.EXECUTE);
}
Expand Down

0 comments on commit c14c74f

Please sign in to comment.