NBT-Manipulator

A kotlin/java lib that allows you to read and write NBT data in a clean way

View on GitHub

//nbt-manipulator/br.com.gamemods.nbtmanipulator/NbtCompound/copyFrom

copyFrom

[jvm]
fun copyFrom(other: NbtCompound, tagKey: String, default: NbtTag? = null)

Checks if the other compound have a given tag, if it has been placed it in this compound.

The tag will be linked, so any change in the tag will also affect both compounds.

Parameters

jvm

   
other The compound that will be checked
tagKey The name of the tag that will be mapped
default If the other compound doesn’t have the tag then this parameter will be used.