winnetrie Posted July 11, 2019 Posted July 11, 2019 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 Quote Try out my new Modpack for MC 1.15.2 https://www.curseforge.com/minecraft/modpacks/terran-civilization
Recommended Posts
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.