So I was making a thing that makes a stair object above the player fall if it has a custom name.
The Issue:
The effect worked on stairs with any name defined with CustomName. This makes it impossible to differentiate between specific blocks.
This system should only work on blocks of a certain name, so that all blocks of that type aren't effected. Of course it's possible to use different data values but they might not work for every type of block (I.E. stairs data value determines their position, so there's no way to differentiate stairs of the same position).
I'm currently using /testforblock and /setblock with the CustomName datatag and neither of them are working as expected.
Comments 5
The thing is that Blocks, like mobs/container/etc, can have a customized name, and their name can be defined in the DataTag "CustomName," but the issue that arises is that the name, for some reason, isn't checked in testforblock and setblock. Just because it isn't a container shouldn't be the issue. You can add the CustomName DataTag in those commands, but for whatever reason they do not function properly. That sounds like a bug to me. If not, then shouldn't the command output an error like "DataTag 'CustomName' is not usable on blocks."
Still not a bug.
DataTag
will never give any error message.
It's up to you to put in only those datatags which can be applied to the block-to-set.
This
/setblock ~ ~ ~1 dirt 0 replace {ThisHasNoEffect:"whatever",thisWontWorkEither:2b,CustomName:"ThePreviousTagIsIgnored"}
will set a block of dirt. Nothing else.
Stairs are not a container. See http://minecraft.gamepedia.com/Chunk_format#Block_entity_format for the list of blocks capable of CustomName.
This site is for bug reports only. For feature suggestions or changes please see: Minecraft Suggestions on Reddit.