Hey guys just trying to figure out why the realm keeps crashing and rolling back whenever i use the longer set of commands. I presume its being overloaded but i have no idea how to do a workaround.
These are the commands in the blocks:
/scoreboard players tag @e[type=!player] add HC
/scoreboard players set @e[type=!player] HC 19 {Health:19.0f}
/scoreboard players set @e[type=!player] HC 18 {Health:18.0f}
/scoreboard players set @e[type=!player] HC 17 {Health:17.0f}
/scoreboard players set @e[type=!player] HC 16 {Health:16.0f}
/scoreboard players set @e[type=!player] HC 15 {Health:15.0f}
/scoreboard players set @e[type=!player] HC 14 {Health:14.0f}
/scoreboard players set @e[type=!player] HC 13 {Health:13.0f}
/scoreboard players set @e[type=!player] HC 12 {Health:12.0f}
/scoreboard players set @e[type=!player] HC 11 {Health:11.0f}
/scoreboard players set @e[type=!player] HC 10 {Health:10.0f}
/scoreboard players set @e[type=!player] HC 9 {Health:9.0f}
/scoreboard players set @e[type=!player] HC 8 {Health:8.0f}
/scoreboard players set @e[type=!player] HC 7 {Health:7.0f}
/scoreboard players set @e[type=!player] HC 6 {Health:6.0f}
/scoreboard players set @e[type=!player] HC 5 {Health:5.0f}
/scoreboard players set @e[type=!player] HC 4 {Health:4.0f}
/scoreboard players set @e[type=!player] HC 3 {Health:3.0f}
/scoreboard players set @e[type=!player] HC 2 {Health:2.0f}
/scoreboard players set @e[type=!player] HC 1 {Health:1.0f}
Ok well let me broaden the topic. ive constructed(in the photo) a command to summon a lightning bolt when someone is holding a named item as their selected item. In order for it to work I need a selector for the specific entity that player is hitting. Everything currently works by tracking health, and summoning the lightning bolt at a particular number. The only problem I am having is the realm crashing. If this can be re done to track something different that achieves the same thing that would be awesome. If not then well ill have to scrap it.
Try to do it in a new world with those same commands, they should not be laggy. Commnd blocks that do nothing but change some variables are not laggy at all. I did an experiment myself once where I had 10000 execute commadns per tick and the tps on my survival world was at 19.50
Hey guys just trying to figure out why the realm keeps crashing and rolling back whenever i use the longer set of commands. I presume its being overloaded but i have no idea how to do a workaround.
These are the commands in the blocks:
/scoreboard players tag @e[type=!player] add HC
/scoreboard players set @e[type=!player] HC 19 {Health:19.0f}
/scoreboard players set @e[type=!player] HC 18 {Health:18.0f}
/scoreboard players set @e[type=!player] HC 17 {Health:17.0f}
/scoreboard players set @e[type=!player] HC 16 {Health:16.0f}
/scoreboard players set @e[type=!player] HC 15 {Health:15.0f}
/scoreboard players set @e[type=!player] HC 14 {Health:14.0f}
/scoreboard players set @e[type=!player] HC 13 {Health:13.0f}
/scoreboard players set @e[type=!player] HC 12 {Health:12.0f}
/scoreboard players set @e[type=!player] HC 11 {Health:11.0f}
/scoreboard players set @e[type=!player] HC 10 {Health:10.0f}
/scoreboard players set @e[type=!player] HC 9 {Health:9.0f}
/scoreboard players set @e[type=!player] HC 8 {Health:8.0f}
/scoreboard players set @e[type=!player] HC 7 {Health:7.0f}
/scoreboard players set @e[type=!player] HC 6 {Health:6.0f}
/scoreboard players set @e[type=!player] HC 5 {Health:5.0f}
/scoreboard players set @e[type=!player] HC 4 {Health:4.0f}
/scoreboard players set @e[type=!player] HC 3 {Health:3.0f}
/scoreboard players set @e[type=!player] HC 2 {Health:2.0f}
/scoreboard players set @e[type=!player] HC 1 {Health:1.0f}
I recommend you not to use this command. Cuz:
1. It's 20 (+3?) repeating command blocks working 1 time per tick (not rly an issue)
2. Your command only supports entities of integer value health, what if somebody crits and make it like 10.5 hp?
3. It's not necessary to show mob health.
4. 1.13 is almost out. Using /execute store and /data get can simplify the outcome you want A LOT. Better wait
In conclusion, forget about this command.
Ok well let me broaden the topic. ive constructed(in the photo) a command to summon a lightning bolt when someone is holding a named item as their selected item. In order for it to work I need a selector for the specific entity that player is hitting. Everything currently works by tracking health, and summoning the lightning bolt at a particular number. The only problem I am having is the realm crashing. If this can be re done to track something different that achieves the same thing that would be awesome. If not then well ill have to scrap it.
Does it crash on singleplayer? How about in a new realms world?
Lags extremely in singleplayer. And I have not checked in another world but I can check. Whats the basis around this?
Try to do it in a new world with those same commands, they should not be laggy. Commnd blocks that do nothing but change some variables are not laggy at all. I did an experiment myself once where I had 10000 execute commadns per tick and the tps on my survival world was at 19.50