BenWoodworth / knbt

Kotlin NBT library for kotlinx.serialization
GNU Lesser General Public License v3.0
72 stars 2 forks source link

Expose `NbtTagType` in the public API #40

Open BenWoodworth opened 4 months ago

BenWoodworth commented 4 months ago

This can be useful for more efficient switching in when statements (with enum whens compiling to branch tables on JVM), it can be useful for exposing the specific TAG_List element type (which could be TAG_End or something else for empty lists), and acts as a standard way to work with the tag types instead of library users having to create their own enum.