Minecraft losing lots of ticks on command functions
I'm losing a lot of server ticks to these command functions. Commandblocks are not enabled so it could not be anything like that. Anyone knows what is going on or how I can get rid of it?
Plugins:
Durability HUD datapack, Dynmap, Imageonmap, ChairStairs and SinglePlayerSleep
[01] | commandFunctions(195/1) - 25.11%/25.11% [02] | | minecraft:tick(195/1) - 99.90%/25.08% [03] | | | execute as @a store result score @s itm.info run data get entity @s SelectedItem.tag.Damage 1(195/1) - 3.34%/0.84% [03] | | | execute as @a if data entity @s SelectedItem.tag.Damage run title @s actionbar [{"score":{"name":"@s","objective":"itm.output"}}](195/1) - 3.20%/0.80% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:iron_boots"}}] itm.id 196(354/2) - 2.52%/0.63% [03] | | | execute as @a unless data entity @s SelectedItem.tag.Damage run title @s actionbar {"text":" "}(195/1) - 2.06%/0.52% [03] | | | execute as @a if data entity @s SelectedItem.tag.Damage run function durability:a(195/1) - 2.02%/0.51% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:bow"}}] itm.id 384(354/2) - 1.85%/0.46% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:iron_pickaxe"}}] itm.id 250(354/2) - 1.78%/0.45% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:gold_shovel"}}] itm.id 32(354/2) - 1.77%/0.44% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:diamond_boots"}}] itm.id 430(354/2) - 1.77%/0.44% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:iron_sword"}}] itm.id 250(354/2) - 1.74%/0.44% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:gold_helmet"}}] itm.id 78(354/2) - 1.74%/0.44% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:iron_axe"}}] itm.id 250(354/2) - 1.68%/0.42% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:iron_chestplate"}}] itm.id 241(354/2) - 1.62%/0.41% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:crossbow"}}] itm.id 326(354/2) - 1.62%/0.41% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:trident"}}] itm.id 250(354/2) - 1.59%/0.40% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:diamond_pickaxe"}}] itm.id 1561(354/2) - 1.58%/0.40% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:flint_and_steel"}}] itm.id 64(354/2) - 1.58%/0.40% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:shears"}}] itm.id 238(354/2) - 1.58%/0.40% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:elytra"}}] itm.id 432(354/2) - 1.58%/0.40% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:shield"}}] itm.id 336(354/2) - 1.57%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick"}}] itm.id 25(354/2) - 1.57%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:wooden_pickaxe"}}] itm.id 59(354/2) - 1.57%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:wooden_axe"}}] itm.id 59(354/2) - 1.57%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:fishing_rod"}}] itm.id 64(354/2) - 1.57%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:wooden_sword"}}] itm.id 59(354/2) - 1.57%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:wooden_shovel"}}] itm.id 59(354/2) - 1.57%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:gold_sword"}}] itm.id 32(354/2) - 1.57%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:diamond_sword"}}] itm.id 1561(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:wooden_hoe"}}] itm.id 59(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:chainmail_helmet"}}] itm.id 165(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:gold_axe"}}] itm.id 32(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:diamond_shovel"}}] itm.id 1561(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:diamond_axe"}}] itm.id 1561(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:iron_shovel"}}] itm.id 250(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:stone_sword"}}] itm.id 131(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:gold_hoe"}}] itm.id 32(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:stone_pickaxe"}}] itm.id 131(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:gold_pickaxe"}}] itm.id 32(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:stone_axe"}}] itm.id 131(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:iron_hoe"}}] itm.id 250(354/2) - 1.56%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:diamond_chestplate"}}] itm.id 529(354/2) - 1.55%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:gold_chestplate"}}] itm.id 113(354/2) - 1.55%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:iron_leggings"}}] itm.id 226(354/2) - 1.55%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:diamond_helmet"}}] itm.id 364(354/2) - 1.55%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:stone_shovel"}}] itm.id 131(354/2) - 1.55%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:chainmail_chestplate"}}] itm.id 240(354/2) - 1.55%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:diamond_hoe"}}] itm.id 1561(354/2) - 1.55%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:stone_hoe"}}] itm.id 131(354/2) - 1.55%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:diamond_leggings"}}] itm.id 496(354/2) - 1.55%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:iron_helmet"}}] itm.id 166(354/2) - 1.55%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:turtle_helmet"}}] itm.id 276(354/2) - 1.54%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:chainmail_leggings"}}] itm.id 225(354/2) - 1.54%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:chainmail_boots"}}] itm.id 195(354/2) - 1.54%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:gold_boots"}}] itm.id 1561(354/2) - 1.54%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:gold_leggings"}}] itm.id 92(354/2) - 1.54%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:leather_leggings"}}] itm.id 76(354/2) - 1.54%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:leather_helmet"}}] itm.id 56(354/2) - 1.54%/0.39% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:leather_chestplate"}}] itm.id 81(354/2) - 1.53%/0.38% [03] | | | scoreboard players set @s[nbt={SelectedItem:{id:"minecraft:leather_boots"}}] itm.id 66(354/2) - 1.53%/0.38% [03] | | | unspecified(195/1) - 1.06%/0.27% [03] | | | scoreboard players operation @s itm.output = @s itm.id(354/2) - 0.10%/0.03% [03] | | | function durability:a(354/2) - 0.03%/0.01% [03] | | | scoreboard players operation @s itm.output -= @s itm.info(354/2) - 0.02%/0.00%
Solution 1:
I am Leon Nikolai Engelsvold, the creator of the Durability Hud Datapack. If you have installed the datapack from any site other than Planetminecraft, curseforge or Github it's likely you have an outdated version, as I do not administer listings on other sites.
I did at the time not consider servers using the datapack.
Earlier versions of the Datapack performed badly because it checked all players SelectedItem
every minecraft:tick
. When used on servers containing larger amounts of people, the datapack would yield bad server performance results. I did at the time not consider servers using the datapack.
Fixed / Improved performance in newer versions.
New versions perform much better because of optimizations only checking on inventory or hotbar changes rather than every tick, done by utilizing advancements rather than minecraft:tick
functions.
Solution 2:
I had a bad datapack installed which created the problem. I was using the durability hud datapack and it was creating problems.