TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Milking animals with a full inventory deletes the bucket stack

DanteTorn opened this issue ยท 1 comments

commented

Describe the bug
If you have a full inventory, including offhand slot, and you milk an animal using a >1 stack of buckets, it deletes the bucket stack.
Milking with a single bucket works as intended.
TFC wooden buckets, TNFC ultimate buckets, and vanilla buckets are all affected the same way.

I uploaded a video demonstrating the bug here:
https://youtu.be/LuObRpEvYds

To Reproduce

  1. Get a stack of at least 2 buckets and a familiarized cow.
  2. Fill every inventory slot including your offhand with items.
  3. Milk the cow.
  4. The stack of buckets disappears. A bucket of milk is not given.

Meta Info

  • TFC Version: 1.7.18.176
  • Both TechNodeFirmaCraft and a clean install of just Forge+TFC.
commented

Can confirm this, it's caused by null being passed to FluidUtil.tryFillContainerAndStow.

player.setHeldItem(hand, FluidUtil.tryFillContainerAndStow(itemstack, FluidUtil.getFluidHandler(new ItemStack(Items.MILK_BUCKET)),
new PlayerInvWrapper(player.inventory), Fluid.BUCKET_VOLUME, null, true).getResult()); // passing null player here ignores creative