Tags
Creators
Details
Licensed MIT
Created 4 years ago
Updated last month
All versions
2.11.0
Release
2.11.04 years ago 974
Compatibility
Minecraft: Java Edition
1.19.2–1.19.3
1.18.2
1.17.1
1.16.4–1.16.5
1.15.2
1.14.4
1.13.2
1.12.2
1.11.2
1.10.2
1.9.4
1.9.2
1.8.9
Platforms
Bukkit
Paper
Purpur
Spigot
Changes
New major NBTAPI release, adding 1.19.3 support and a new way to interact with the API.
Changes:
- 1.19.3 support
- Added interfaces to most nbt logic, including read-only versions
- Added a new utility class
NBT, which provides clean lambda access to read and write NBT. https://github.com/tr7zw/Item-NBT-API/wiki/Using-the-NBT-API has updated examples on how to use this class. - Utility
readFrom/saveTomethods to NBTFile hasTagas alternative forhasKey, returningbooleaninstead ofBoolean- Added
getOrDefaultmethod - Added
getOrNullmethod - Deprecated
setObject/getObject, please do the serialization yourself using your preferred lib/settings getUUID/setUUIDnow will handle pre-1.16 and post-1.16 formats correctly on their owngetItemStackwill now return null if the tag is not foundgetKeysis now a copy of the Set, and no longer linked to NMS internal objects- Added
setItemStackArray/getItemStackArraymethods - Added
modifyMetamethods to ItemStacks. Do not modify the NBT while inside the modifyMeta scope - The wiki is now inside the Github repository, so anyone can make pull requests to add examples, clarifications etc.
NBTItemnow will correctly reject ItemStacks of size 0- Updated a lot of Javadoc
- The full API Javadoc is now available under https://tr7zw.github.io/Item-NBT-API/v2-api/
- Pulling the NBTAPI plugin via Maven/Gradle will now also correctly contain the API Javadoc(only had the plugin Javadoc before)
- Fixed small NPE error during error reporting(ironic)
NBTCompoundListnow extendNBTList<ReadWriteNBT>instead ofNBTList<NBTListCompound>. This is a compile-time breaking change, and code needs to be updated accordingly. Already published plugins should not be affected by this.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:nfGCP9fk:xOJV9FdK"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:nfGCP9fk:xOJV9FdK"
}
