Tropical Fish Troubles (NBT Transfer?)

Started by Mindthemoods on

Topic category: Help with modding (Java Edition)

Last seen on 14:12, 13. Oct 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tropical Fish Troubles (NBT Transfer?)

So tropical fish store their variant data in an eight digit NBT number tag. And Tropical Fish buckets have a separate NBT tag that stores the variant of fish inside the bucket. (They're valled 'Variant' and 'BucketVariantTag' respectively.) Using /data get @e[type=tropical_fish,sort=nearest,limit=1] Variant, you can get a tropical fish's variant tag, and using /give @p tropical_fish_bucket{BucketVariantTag:12345678}, you can give yourself a bucket with a custom variant tag. But when I try to transfer the NBT from the entity to the item, (Saving the entity's tag as a local variable, and then trying to apply that local variable to the corresponding NBT tag on the bucket), nothing happens. In fact, simply trying to access the entity's Variant tag using procedures always yields zero. 

Long story short, is there something about four-bit NBT number tags that are different from regular ones? (I'm trying to make a net that can catch tropical fish and put them in a bucket, and I would ideally like it to preserve the variant data.) Barring that, is there a way I could write a multi-stage command to get the data, then transfer it into a /give command?

Anyways, I'll update this if I find anything.

Entity NBT management blocks…
Sun, 01/28/2024 - 16:40

Entity NBT management blocks operate on a subset of NBT provided by Forge and not to the direct entity NBT.

You may have luck instead using text join block to create a command that spawns tropical fish with desired variant