Cooking for Blockheads

Cooking for Blockheads

145M Downloads

Milk Jar question

Rithenar opened this issue ยท 6 comments

commented

Is it possible to allow milk jars to be filled by a refined storage export bus? No point in making cows in a jar when you have hundreds of thousands of buckets of milk in storage.

commented

I think this is also preventing me from extracting out of it. It's quite a bit OP, but I tend to pipe from a cow in a jar, to a larger storage(such as a mekanism tank) then from that to a regular jar that's attached to my kitchen.

commented

basically in 1.16+ (right now) unless a mod adds the exact fluid "minecraft:milk" it wont work, best bet is to find an auto clicker block and feed it buckets, then use another mod to transfer that into other fluid storage

commented

I can confirm, the cow in a jar is not correctly functioning as a fluid container in 1.16+ because of this issue. Getting a fix for this issue, ideally as @Mowmaster suggested, or alternately by implementing the mod's own milk fluid, would be really nice to have.

commented

I don't know, have you tried it?

commented

Sorry, yeah I did. I tried using a refined storage export with milk, but it did not connect to any of the sides of the milk jar.

commented

On 1.16+ it seems the jar might be returning false on this method https://github.com/blay09/CookingForBlockheads/blob/336033122534a7ce944c41612196a68575889be2/src/main/java/net/blay09/mods/cookingforblockheads/compat/Compat.java#L24
so the jar wont act like a fluid tank that can be pulled out of
https://github.com/blay09/CookingForBlockheads/blob/1.16.x/src/main/java/net/blay09/mods/cookingforblockheads/tile/MilkJarTileEntity.java#L119
(If I read this correctly)
The industrial foregoing mod adds fluid milk, but using F3 it shows up under "industrialforegoing:milk" and not "minecraft:milk"
Couldnt a Itemstack milkBucket = newItemStack(Items.MILK_BUCKET) be used in this way to also check if it existed?
public FluidStack getFluidInItem(ItemStack milkBucket) { if(FluidUtil.getFluidHandler(milkBucket).isPresent()) { FluidStack fluidInItem = FluidUtil.getFluidContained(milkBucket).get(); return fluidInItem; } return FluidStack.EMPTY; }
im sure that there is a better way then that, but at least that would cover use cases where "minecraft:milk" doesnt exist.