#how to check the entities around?
1 messages · Page 1 of 1 (latest)
Experimental:
query.get_nearby_entities
query.get_nearby_entities_except_self
with commands:
/testfor @e[...]
can you write the range?
"sequence": [
{
"run_command": {
"command": [
"playsound aba.shot_hit @a ~~~"
]
}
},
{
"run_command": {
"command": [
"playsound aba.shot_no_hit @a ~~~"
]
}
}
]
{
"format_version": "1.10.0",
"animations": {
"animation.pig.find_player": {
"animation_length": 0.05,
"loop": true,
"timeline": {
"0": [
"v.x = 0.0; for_each(t.player, q.get_nearby_entities_except_self(16, 'minecraft:player'), { v.x = v.x + 1; }); return v.x > 0.0;"
]
}
}
}
}
You can find more details here
I want there to be a different sound when a player hits and when a block hits
What do you mean when a block hits?
"minecraft:projectile": {
"on_hit": {
"remove_on_hit": { },
"impact_damage": {
"knockback": true,
"damage": [ 10, 8 ]
},
"definition_event": {
"event_trigger": {
"event": "aba:hit"
}
}
},
Sorry I don't know how to do that.
"sequence": [
{
"run_command": {
"command": [
"execute at @s if entity @p[r=1] run playsound aba.shot_hit @a ~~~"
]
}
},
{
"run_command": {
"command": [
"execute at @s unless entity @p[r=1] run playsound aba.shot_no_hit @a ~~~"
]
}
}
]
But maybe this works, could you test it?
[Json][error]-Ошибка синтаксиса: непредвиденное «@s»: в «xecute at >>@s<< if entity»
[Commands][error]-Command response could not compile commands
[Json][error]-Ошибка синтаксиса: непредвиденное «@s»: в «xecute at >>@s<< unless en»
Can you put the full file here?
[Json][error]-Ошибка синтаксиса: непредвиденное «@s»: в «xecute at >>@s<< if entity»
[Commands][error]-Command response could not compile commands
[Json][error]-Ошибка синтаксиса: непредвиденное «@s»: в «xecute at >>@s<< unless en»
This is strange, at @s is correct, I just checked it in the game, try this other file:
What is the version of your manifest file?
I'm deleting the old addon
minecraft version: 1.20.41
ok, thanks for the help
this work?
?
Does this file work?
I haven't tested it and it's not effective