Represents a predicate for all kinds of NBT data.
The predicate will match the given NBT exactly, making partial matches not possible with this predicate. Nevertheless, a predicate without any NBT specified will be considered effectively as a way of matching any NBT data construct.
By default, the predicate allows any NBT, without checking it.
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
Sets the NBT data that should be matched by this predicate.
If the NBT data had already been set, then the data is replaced with the new instance.
Return Type: NBTPredicate
NBTPredicate.withData(data as IData) as NBTPredicate