Tag.contains() doesn't work with dynamic registry tags
See original GitHub issueHere’s a simple test:
- Write the following code
Tag<Biome> biomeTag = TagFactory.BIOME.create(new Identifier("modid", "test"));
System.out.println(biomeTag.values().size()); //expected "1"
Biome biome1 = BuiltinRegistries.BIOME.get(BiomeKeys.BADLANDS); //in the tag
Biome biome2 = BuiltinRegistries.BIOME.get(BiomeKeys.JUNGLE); //not in the tag
System.out.println(biomeTag.contains(biome1)); //expected "true"
System.out.println(biomeTag.contains(biome2)); //expected "false"
System.out.println(biomeTag.values().get(0)); //expected "minecraft:badlands"
//see Biome's implementation of toString()
- Put the
test.json
tag file in the right place
{
"replace": false,
"values": [
"minecraft:badlands"
]
}
- Read the output
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Custom dynamic tag image doesn't work - WordPress.org
I have created a custom dynamic Tag of category image to show an image in the frontend. It doesn't seem to work. What...
Read more >Dynamic tags overview (deprecated) - Help Center - WordFly
What is a dynamic tag? Dynamic tags allow you to personalize your email design with conditional statements. This is a valuable tool if...
Read more >Click event doesn't work on dynamically generated elements
In jQuery, Click() event Direct binding which attaches the event handler to the element only if the particular element(Html code) exists on the...
Read more >Google Ads dynamic remarketing - Tag Manager Help
You can also create triggers based on a custom event that register in Tag Manager via the Data Layer. Test and deploy. The...
Read more >Dynamic Meters and Metrics with Micrometer | by Aviad Pines
This is a known issue, and Micrometer has open issues about it. Some solutions exist, like Hana Giat's Multi-Tagged Metrics, which I have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We need some protection mechanism against this. Perhaps we could throw an error if the wrong registry is used? Clearly this kind of issue will be frequent if we don’t do anything about it.
To be honest, having to use the actual dynamic registry to get the references sounds the intended behavior to me.