Jump to content

Recommended Posts

Posted

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

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.

Announcements



×
×
  • Create New...

Important Information

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