#Advancement death to anything detection
1 messages · Page 1 of 1 (latest)
"criteria": {
"requirement": {
"trigger": "minecraft:entity_killed_player"
}
},
"rewards": {
"function": "trimeffect:death"
}
}```
ok right yep sounds good thanks
wait so can I integrate that scoreboard into the advancement or no?
No, you would have to check the scoreboard value in your tick function
You can maybe use an entity_hurt_player advancement and check if their health is 0
entity_hurt_players triggers for all damage
yeah thanks
Now I am having a problem with giving myself a potion and trying to clear the glass bottle at the same time can you help?
What do you mean by that?
basically i want the player to be able to drink a potion which they can craft and then it changes a scoreboard value, which I did, and then you can a potion to remove a scoreboard value (differnet data) but the issue I am having is that I cannot clear the bottle from the players inventory in time after the potion has been drank so you can effectively dupe bottles
scoreboard players remove @s trimeffect.life 1
give @s minecraft:potion[potion_contents={potion:"minecraft:water",custom_color:13046290},custom_name='["",{"text":"Bottled Life","italic":false}]',custom_data={bottled:1}] 1
clear @s minecraft:glass_bottle 1```
https://medal.tv/games/minecraft/clips/iicz52JSb4V9z9gAs/d1337dHT5pEs?invite=cr-MSxtN3AsMjY3NDk4MzUs Heres an example of the issue
Watch Untitled and millions of other Minecraft videos on Medal, the largest Game Clip Platform.
I am giving a bottle to make it easier but it doesnt get rid of the bottle from the other potion if you see what i mea
The bottle may not actually appear in your inventory until the next tick
You might need to wait one tick to clear it
how can i do that?
I guess give yourself a tag, like has_glass_bottle, and then check for that in the tick function, and clear it
righ tok
how can I modify this recipe to make the redstone require the custom data {life:1}?
"type": "minecraft:crafting_shaped",
"pattern": [
"#P#",
" G "
],
"key": {
"#": {
"item": "minecraft:redstone"
},
"P": {
"item": "minecraft:potion"
},
"G": {
"item": "minecraft:glowstone_dust"
}
},
"result": {
"id": "minecraft:potion",
"components": {
"custom_name": "[\"\",{\"text\":\"Empty Life Bottle\",\"italic\":false}]",
"custom_data": "{bottled:0}",
"minecraft:potion_contents": {
"potion": "minecraft:water",
"custom_color": 1835113
}
}
}
}```
You can't. Checking components in recipe inputs isn't supported
ah ok thanks
Do you know what I've done wrong here with this command, its not working
Its meant to say hello if I have a glass bottle in my hand
/execute if data entity Adcock SelectedItem[{id:"minecraft:glass_bottle"}] as @a run say hello
ah thank you
What have i done here?
"type": "minecraft:crafting_shaped",
"pattern": [
"#T#",
"SJP",
"#A#"
],
"key": {
"#": {
"item": "minecraft:end_crystal"
},
"T": {
"item": "minecraft:trident"
},
"S": {
"item": "minecraft:shaper_armor_trim_smithing_template"
},
"J": {
"item": "minecraft:totem_of_undying"
},
"P": {
"item": "minecraft:sentry_armor_trim_smithing_template"
},
"A": {
"item": "minecraft:turtle_helmet"
}
},
"result": {
"id": "minecraft:potion",
"components": {
"custom_name": "Life bottle",
"custom_data": "{life:1}",
"minecraft:potion_contents": {
"custom_color": 1835113
}
}
}
}```
Custom name is wrong
It takes a json text component, so it needs to be "\"Life bottle\""
ah thanks
If your question is resolved, that's great to hear! Make sure to run /resolve or click the Resolve Question button. Otherwise, feel free to continue asking for help! :D
Your question, #1263431241789870110 (Advancement death to anything detection), was resolved!
#1263431241789870110 message
4d13h19m