Jump to content

[1.12.2] Adding custom liquids to bottles


winnetrie

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:

@Override
	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);
		stack.setTagCompound(nbt);
	}

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • my bad, i shared a very old LOG, now must be the right one, im sorry.
    • Hello TileEntity, thanks for your help, is just that i do not have terraria mod installed, i can give you mi list of mods.   EpicFight-20.7.4.jar handcrafted-forge-1.20.1-3.0.6.jar resourcefullib-forge-1.20.1-2.1.25.jar thedragonlib-1.20.1-1.0.0.jar tameablebeasts-1.20.1-5.1.jar geckolib-forge-1.20.1-4.4.6.jar mythicmounts-20.1-7.4.2-forge.jar Patchouli-1.20.1-84-FORGE.jar morevillagers-forge-1.20.1-5.0.0.jar balm-forge-1.20.1-7.3.4-all.jar trashslot-forge-1.20-15.1.0.jar peacefulrecipes 1.20.jar ferritecore-6.0.1-forge.jar darkmining-forge-1.20.1-1.1.0.jar ParCool-1.20.1-3.2.1.2-R.jar minecolonies-1.20.1-1.1.563-RELEASE.jar towntalk-1.20.1-1.1.0.jar structurize-1.20.1-1.0.733-RELEASE.jar blockui-1.20.1-1.0.156-RELEASE.jar domum_ornamentum-1.20.1-1.0.186-RELEASE-universal.jar multipiston-1.20-1.2.43-RELEASE.jar svmm-1.20.1-1.3.0.3.jar InsaneLib-1.13.5-mc1.20.1.jar Satako-7.0.16-1.20.1.jar Bountiful-6.0.3+1.20.1-forge.jar Kambrik-6.1.1+1.20.1-forge.jar kotlinforforge-4.11.0-all.jar kubejs-forge-2001.6.5-build.7.jar rhino-forge-2001.2.2-build.18.jar superbosses-1.2.0-1.20.1.jar lootjs-forge-1.20.1-2.12.0.jar MobsPropertiesRandomness-4.10.8-mc1.20.1.jar Pehkui-3.8.2+1.20.1-forge.jar lostcities-1.20-7.1.8.jar yuushya-1.20.1-forge-2.1.1.jar architectury-9.2.14-forge.jar artifacts-forge-9.5.11.jar curios-forge-5.9.1+1.20.1.jar cloth-config-11.1.118-forge.jar mcdar-4.0.3.jar mcdw-9.0.4.jar mcda-5.0.2.jar Connector-1.0.0-beta.43+1.20.1.jar ConnectorExtras-1.10.1+1.20.1.jar fabric-api-0.92.2+1.11.8+1.20.1.jar immersive_armors-1.6.1+1.20.1-forge.jar cosmeticarmorreworked-1.20.1-v1a.jar K-Turrets-3.0.25-1.20.1.jar M'TEG-1.0.1-1.20.1.jar JustEnoughGuns-0.4.0-1.20.1.jar framework-forge-1.20.1-0.7.6.jar JustEnoughResources-1.20.1-1.4.0.247.jar modernfix-forge-5.18.1+mc1.20.1.jar corpse-forge-1.20.1-1.0.12.jar randombonemealflowers-1.20.1-4.5.jar collective-1.20.1-7.61.jar treeharvester-1.20.1-8.7.jar ImprovableSkills-1.20.1-20.1.8.jar HammerLib-1.20.1-20.1.30.jar easy_mob_farm_1.20.1-7.1.0.jar easy-piglins-forge-1.20.1-1.0.5.jar easy_villagers-1.20.1-1.0.17.jar the_bumblezone-7.4.5+1.20.1-forge.jar productivebees-1.20.1-12.5.3.jar XaerosWorldMap_1.38.8_Forge_1.20.jar Xaeros_Minimap_24.2.0_Forge_1.20.jar jei-1.20.1-forge-15.3.0.8.jar Rats-1.20.1-8.1.2.jar citadel-2.5.4-1.20.1.jar Animation_Overhaul-forge-1.20.x-1.3.1.jar Necronomicon-Forge-1.4.2.jar invtweaks-1.20.1-1.1.0.jar sophisticatedbackpacks-1.20.1-3.20.5.1044.jar sophisticatedcore-1.20.1-0.6.22.611.jar travelersbackpack-forge-1.20.1-9.1.14.jar BetterThirdPerson-Forge-1.20-1.9.0.jar  
    • ill be asleep by the time you respond so mention like a lot of thing to do so when i wake i can try them
    • it instantly crashes
  • Topics

×
×
  • Create New...

Important Information

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