Compatibility
Minecraft: Java Edition
1.21.x
1.20.x
1.19.x
1.18.x
1.17.x
1.16.x
1.15.x
1.14.x
1.13.x
1.12.x
1.11.x
1.10.x
1.9.x
1.8.8–1.8.9
Platforms
Details
Changelog
Minecraft 1.20.5 change ItemStack format, in order to keep Rtag in continuous development, the next updates will have multiple experimental features It's not suggested to use any experimental change/addition unless you are shading the library in your project
Additions
- Support for Minecraft 1.20.5.
- Multiple removal notices in deprecated methods.
ItemObject#hasCustomData()to check if item has custom data (or tag for <1.20.5).ItemObject#apply()to apply data updates into item (or load compound for <1.20.5).ItemObject#copy()to copy the provided item.ItemObject#getCustomDataTag()andItemObject#setCustomDataTag()to get tag from custom data component inside item.ItemObject#getComponentPath()to convert any old tag path into new component path.ItemObject#getTagPath()to convert any new component path into any old tag path.ItemTagStream#ofVersion()to create an ItemTagStream instance with a provided version range.IContainerMirrorinstance to convert any item inside container on it's item form.TagCompound#newUncheckedTag()andTagList#newUncheckedTag()to create a new tag without check provided object.- (experimental)
Rtag#UNITconstant to get a Minecraft unit object. - (experimental)
Rtag#getMinecraftRegistrymethod to get a custom registry provided by Bukkit. - (experimental)
RtagItem#getComponents()method to get component map from MC item (only for +1.20.5). - (experimental)
IComponentMirrorinstance to convert item tags into components and viceversa to mantain cross-version support on ItemTagStream. - (experimental)
DataComponentutility class to manage any data Holder, Map and Patch instances. - (experimental)
ComponentTypeutility class to get, parse, encode and handle any data component type and object. - (experimental) Multiple methods to get/edit/set data components using
RtagIteminstance.
Changes
ServerInstanceutility class has been fully recoded.TagCompound.DATAusage will be moved toTStream.COMPOUND.- Any
#edit()method from RtagEditor instances has been moved into RtagEditor directly. - Any
Enchantmentusage from RtagItem on +1.20.5 servers will be redirected to Bukkit API (since items now cannot hold invalid enchantments). RtagItem#fixSerialization()will make no change on +1.20.5 since items now use different serialization.- ItemMirror instance now use item components has main conversion concept (on versions before 1.20.5 the components object will be item tag).
- ItemTagStream now make a fully usage of instance version to handle tags and also use item components on newer versions.
EasyLookup#field()is now a public method.
Deprecations
- Any
HideFlagusage from RtagItem since items cannot have flags on +1.20.5. ItemObject#load()since items now cannot implement direct updates from compound (and also is really messy to mantain on newer versions).ItemObject#getTag()andItemObject#setTag()since items now use custom data component.IShulkerMirrorinstance since IComponentMirror now is used to convert containers.




