#Could someone help me fix the crashing bug?
1 messages · Page 1 of 1 (latest)
how many players online when this happened?
you should convert most of your commands to actual javascript code.
Since this is scripting you have events, and in no need of the old commandblock logic that you must run stuff each tick
also all those system.runInterval, running each tick. Do they need to run every single tick?
system.runInterval(() => {
world.getDimension("overworld").runCommand('execute @e[type=hp2_cpx:guide_book] ~~~ tp @s ~~~ facing ~~~1')
})
This is terribly inefficient.
- You don't need to get the dimension each tick, that's a very inefficient method. Save the overworld to a constant outside of the runInterval. Then the selector... you can use a world.getEntity with a filter for that selector, and then use the method for entity to rotate it, if they need to be rotated.