After making 5-6 datapacks, my survival world started lagging. Animals and other creatures are moving slowly. I tried my best to use less commands but it looks like it was a failure. Do you have any suggestions?
2
Use functions triggered by advancements instead of ticking checks whenever possible. If you ever use @e, make sure to always specify the type= first, always always always. And don't put anything in a tick function that can go anywhere else.
A few pointers:
- Reduce your usage of @e.
- Split off things into separate functions where possible; reduce the amount of commands run every tick.
- Reduce NBT checks and use predicates where possible in place of the NBT selector.
- Reduce your usage of @e.
- Split off things into separate functions where possible; reduce the amount of commands run every tick.
- Reduce NBT checks and use predicates where possible in place of the NBT selector.
