mojira.dev
MC-142752

block tags that have entries with block states do not load properly

Title. I expected that a block tag that had entries that specified block states would only check for that block if it matched those block states. Instead, the tag is skipped during loading.

The provided data pack may be used for testing.

The following error message appears in the logs on datapack load:

Couldn't read block tag list block_tags:with_block_states from 
block_tags:tags/blocks/with_block_states.json in data pack block_tags.zip n: 
Non [a-z0-9/._-] character in path of location: minecraft:white_glazed_terracotta[facing=east] 
at qs.<init>(SourceFile:38) at qs.<init>(SourceFile:43) at zb$a.a(SourceFile:144) at zc.a(SourceFile:103)
at zc$$Lambda$2319/1092215710.get(Unknown Source) 
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1582) 
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1574) 
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) 
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) 
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689) 
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

This error makes sense for functions, which have strict and specific naming restrictions. However for blocks and items this doesn't apply.

Attachments

Comments 5

The error message in 1.15 is much less verbose, simply reading as follows:

Couldn't read block tag list block_tags:with_block_states from block_tags:tags/blocks/with_block_states.json in data pack block_tags.zip

Working as intended. The 17w49a article mentioned:

Inside data packs, you can create a file at data/(namespace)/tags/blocks/foo.json to make a block tag called namespace:foo, which contains a list of blocks that should be tagged with namespace:foo.

You can only use block/item ID's in block/item tags.

This is a feature request, and should be posted on the feedback site.

You can only use block/item ID's in block/item tags.

Where in the 17w49a article does it say you can't use blockstates?

It says you can use block IDs, not block states (or block state IDs). These are distinct. Internally, tags work purely off of block IDs (which also is seen with the tags packet), and not block state IDs. In other words, this isn't a case of tags failing to load block states from the file, but instead them not being designed to use block states at all.

Ely G

(Unassigned)

Unconfirmed

(Unassigned)

Minecraft 1.13.2, Minecraft 1.14.1, Minecraft 1.14.2, Minecraft 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2

Retrieved