-
Firstly, I love bees and I also love SkBee. I really appreciate this project and it has been so helpful to unlock important constraints in Skript. Some of which (arguably) should be included with Skript by default, but I digress. In the process of writing a very ambitious script. My script is presently suffering from long load times due to large indexes. Which is another issue entirely. Example 1: Q: Is it more performant to use coordinates in a variable or checking for an NBT tag when a block is broken? Essentially this
Versus
My first thought is the NBT solution is much quicker because it doesn't need to cross-check a potentially giant variable. On the other hand, how the storage and check of NBT tags for each placed block could also cause some performance issue in addition to nbt-block function...? Thank you so much in advance for any insight |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
for starters: on place:
set {_n} to nbt compound of event-block
set tag "custom;placed" of {_n} to 1
set nbt-block at event-location to event-block with nbt {_c} This is overkill, you just need to set the tag, ex: on place:
set tag "custom; placed" of nbt compound of event-block to 1 Simple As for the rest of your question, NBT is quite fast to the best of my knowledge. When it comes to storage, having thousands of variables just to know if a player placed a block is serious overkill and WILL harm your server, since when the server loads, it loads EVERY VARIABLE into ram, |
Beta Was this translation helpful? Give feedback.
for starters:
This is overkill, you just need to set the tag, ex:
Simple
As for the rest of your question, NBT is quite fast to the best of my knowledge.
It's a bit hard to do bench marking on this since the actual process is quite fast.
When it comes to storage, having thousands of variables just to know if a player placed a block is serious overkill and WILL harm your server, since when the server loads, it loads EVERY VARIABLE into ram,
in this scenario, …