Hi, I made a similar post before, yet here we are again.
As part of an auto-ban script I run execute as @a[scores={BanTool=1..}] at @s run ban @p You have died. every tick.
This causes some issues, apparently.
- It seems to break a deathsound i want to play every time someone dies
{
"deathcannon": {
"sounds": [
{
"name": "death_cannon:deathcannon",
"stream": true
}
]
}
}
scoreboard objectives add DeathCannon deathCount (Load)
execute as @a[scores={DeathCannon=1..}] at @s run playsound deathcannon.deathcannon master @a ~ ~ ~ (Tick)
scoreboard players set @a[scores={DeathCannon=1..}] DeathCannon 0 (Tick)
2. It also seems to break an override for the evoker loot table, which seeks to replace totems of undying with golden apples for their loot table.
{
"type": "minecraft:entity",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:golden_apple",
"conditions": [
{
"condition": "minecraft:killed_by_player",
"inverse": false
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:emerald",
"conditions": [
{
"condition": "minecraft:killed_by_player",
"inverse": false
}
],
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 2,
"max": 3
}
}
]
}
]
}
],
"functions": []
}
Other aspects of the datapack, including
- Custom advancements which grant items and recipes
- Custom recipes themselves
- Overrides to vanilla enchantments
- Some other stuff
Work just fine.
It's just the two abovementioned.
That said, if I change
execute as @a[scores={BanTool=1..}] at @s run ban @p You have died.
To execute as @a[scores={BanTool=1..}] at @s run tellraw @a "You have died."
Both the evoker loot table and the death sound work as intended. IN SINGLEPLAYER ONLY.
On the server, only the deathsound gets fixed. The evoker loot table remains vanille (broken, for my implementation)
This does make me believe that using ban itself is the issue?
Which is VERY unfortunate, as it somewhat breaks apart the core concept of what I am trying to do.
If anyone has an inkling on whether it could be some other thing that could be breaking things, or an alternative implementation to the ban functionality, please let me know.

