Skip to content

NBT compounds versus native Skript performance #281

Closed Answered by ShaneBeee
SandsByte asked this question in Q&A
Discussion options

You must be logged in to vote

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.
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, …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SandsByte
Comment options

Answer selected by SandsByte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants