EnderItem[0].tag update
I have the following function (From McTsts's Ender Chest GUI datapack https://github.com/McTsts/Ender-Chest-GUI) which essentially evaluates which item has been removed from an enderchest (items are tagged with an eval number). I'm not sure how to update the snippets referencing tags (e.g.
EnderItems[0].tag) . When I tried on my own, it didn't function properly, causing an infinite loop. What is the proper way to update these to the component format?execute store result score @s tsEGUI_guiTemp run data get entity @s EnderItems[0].tag.eval scoreboard players operation @s[tag=!tsEGUI_Skip] tsEGUI_guiVal -= @s tsEGUI_guiTemp scoreboard players operation @s[tag=tsEGUI_Skip] tsEGUI_guiVal += @s tsEGUI_guiTemp execute store result score @s tsEGUI_guiTemp run data get entity @s EnderItems[0].Slot function egui:gui/code/clear execute store result score @s tsEGUI_guiTemp run data get entity @s EnderItems execute as @s[scores={tsEGUI_guiTemp=1..}] run function egui:gui/code/eval```