Jump to content

[1.12.2] Adding custom liquids to bottles


Recommended Posts

I have added several liquids to the game and forge has added buckets for all those liquids.

The liquids represent all kind of fruit juices (apple_juice, carrot_juice, lemon_juice, etc etc)

I have also added bottles with the liquid inside

What i want to achieve is that the game also knows that those bottles have the liquids.


I tried by adding NBT data:

	public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
		NBTTagCompound nbt = stack.getTagCompound();
		if (nbt == null) {nbt = new NBTTagCompound();}
		nbt.setString("FluidName", NBTliquid);
		nbt.setInteger("Amount", 1000);

where NBTliquid is a variable (String)  i get from the constructor.


I have also CraftTweaker installed so i did /ct hand with an apple_juice bottle in my hand to see the tag on it.

This is the result from a bucket: <forge:bucketfilled>.withTag({FluidName: "apple_juice", Amount: 1000})

This is the result from a bottle:  <winnetriesexpansionmod:apple_juice_bottle>.withTag({FluidName: "apple_juice", Amount: 1000})


Am i'm doing something wrong here. The bucket works properly but the bottle not.

For example the bucket is accepted in various mods that load and unloads liquids, the bottles are not

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.