So the basic plan is to get tridents to be able to do different effects on players (in this case glowing)
I've successfully gotten tridents to cause glowing... but its ALL of them, I tried using "NBT" but in 1.20.6 it doesnt seem to work that way? I guess its "components" to get to item NBT now?
This code SHOULD make every trident named "Test" Give the effect glowing to the player that was hit, however the highlighted portion is not functioning properly. Any ideas?
-
-
-
-
-
EDIT: Here's the code for copy pasta
So the basic plan is to get tridents to be able to do different effects on players (in this case glowing)
I've successfully gotten tridents to cause glowing... but its ALL of them, I tried using "NBT" but in 1.20.6 it doesnt seem to work that way? I guess its "components" to get to item NBT now?
This code SHOULD make every trident named "Test" Give the effect glowing to the player that was hit, however the highlighted portion is not functioning properly. Any ideas?
-
-
-
-
-
EDIT: Here's the code for copy pasta
# advancement example:trident/glowing
{
"criteria": {
"requirement": {
"trigger": "minecraft:entity_hurt_player",
"conditions": {
"damage": {
"type": {
"direct_entity": {
"type": "minecraft:trident",
"components": {\"minecraft:custom_name\":'{\"text\":\"Test\"}'}
}
}
}
}
}
},
"rewards": {
"function": "example:glowing"
}
}
# function example:glowing
advancement revoke @s only example:trident/glowing
effect give @s glowing
The code has been adjusted to this and is still not working D;
# Example trident
give @s trident[custom_data={glowing:true}]
# advancement example:trident/glowing
{
"criteria": {
"requirement": {
"trigger": "minecraft:entity_hurt_player",
"conditions": {
"damage": {
"type": {
"direct_entity": {
"type": "minecraft:trident",
"slots": {
"contents": {
"predicates": {
"minecraft:custom_data": "{glowing: true}"
}
}
}
}
}
}
}
}
},
"rewards": {
"function": "example:glowing"
}
}
# function example:glowing
advancement revoke @s only example:trident/glowing
effect give @s glowing