Hi. I would like to do something with command blocks but do not know how.
So I want a Nether Star with the name "Magical Artifact" (in light_purple).
And I want to detect with /execute when he is on the ground.
But I do not want that when you detect a Normal Nether Star that the "Magical Artifact" is also get detected.
So a command for
Normal Nethter Star = detect
and a command for
"Magical Artifact"
single detect.
I've already tried using /execute at @e [type = item, nbt = {Item: {id: "minecraft: nethter_star"}}]
but with no colored name.
[/pre] Does anyone have any idea which command to use? PS: Its 1.14.4
Hi. I would like to do something with command blocks but do not know how.
So I want a Nether Star with the name "Magical Artifact" (in light_purple).
And I want to detect with /execute when he is on the ground.
But I do not want that when you detect a Normal Nether Star that the "Magical Artifact" is also get detected.
So a command for
Normal Nethter Star = detect
and a command for
"Magical Artifact"
single detect.
I've already tried using /execute at @e [type = item, nbt = {Item: {id: "minecraft: nethter_star"}}]
but with no colored name.
Does anyone have any idea which command to use? PS: Its 1.14.4
LG ~Sentyx
For more advance map making, we almost never use the item name to detect them. We use custom tags.
To add a custom tag to an item, you do sth like this:
Here's the target selector you can use to find it on the ground. You can use this in any command affecting the item itself, or run commands at it's location using /execute at...
So I want a Nether Star with the name "Magical Artifact" (in light_purple).
And I want to detect with /execute when he is on the ground.
But I do not want that when you detect a Normal Nether Star that the "Magical Artifact" is also get detected.
So a command for
Normal Nethter Star = detect
and a command for
"Magical Artifact"
single detect.
I've already tried using /execute at @e [type = item, nbt = {Item: {id: "minecraft: nethter_star"}}]
but with no colored name.
[/pre]
Does anyone have any idea which command to use?
PS: Its 1.14.4
LG ~Sentyx[/pre]
For more advance map making, we almost never use the item name to detect them. We use custom tags.
To add a custom tag to an item, you do sth like this:
/give @p <item>{AnyCustomTag_withabsolutely123_any_name:1} <count>
In your case, it can be like:
/give @p nether_star{display:{Name:'{"text":"Magical Artifact","color":"light_purple"}'},artifact:1} 1
Then you can simply detect like:
/execute at @e[nbt={tag:{artifact:1}}] ...
(and yes, if only 1 type of entity has this custom tag, you don't even need to specify the type.)
Edit: Oh yes, you need it to be on the ground.
/execute at @e[nbt={tag:{artifact:1},OnGround:1b}] ...
Here's the command to give you the nether star:
/give RobotNRP minecraft:nether_star{display:{Name:'{"text":"Magical Artifact","italic":"false","color":"light_purple"}'}}
Here's the target selector you can use to find it on the ground. You can use this in any command affecting the item itself, or run commands at it's location using /execute at...
@e[type=minecraft:item,nbt={Item:{id:"minecraft:nether_star",tag:{display:{Name:'{"text":"Magical Artifact","italic":"false","color":"light_purple"}'}}},OnGround:1b}]
If you're interested in more detail about item nbt, check out the minecraft wiki.