Xunlib v2.1.4 Changelog
Additions
- Set Identification:
- Added
getName()method toToolSetandArmorSet - Returns base material name (e.g.
rubyfor "Ruby Armor") - Use case: Streamlines datagen for language JSON files
- Added
- Mob Effect Utilities:
hasEffect(entity, effect): Checks if entity has specific effectclearEffect(entity, effect): Removes specific effect from entityclearEffects(entity): Removes all effects
Xunlib v2.1.3 Changelog
Fixes & Improvements
- ArmorSet/ToolSet Builders:
- Changed
Item.Propertiesfield to Supplier for safer delayed initialization withVanillaBalance()now correctly references Iron-tier attributes (attack damage/speed)
- Changed
- Registry Utilities:
- Restored static
Registriesmap in common utils class to resolvegetKey()/getRegistryId()problem
- Restored static
Features
- Custom Smithing Templates:
- Added
UpgradeSmithingTemplateItemwith extracted Netherite upgrade logic from vanilla - Customize icons, description text, and material requirements.
- Added
Hotfix Impact:
- Critical fixes for
ArmorSet/ToolSetattribute calculations and registry lookups
Upgrade Recommended for all users experiencing registry ID errors or custom tool/armor balance issues.
Xunlib v2.1 Changelog
Registration System Overhaul
- Renamed
Registrar→Register: Simplified naming for core registration API. - New Registry Paradigm:
- Replaced lazy registry references with strongly-typed holders:
RegistryHolder: Base for all registry objectsRegistryItem: Specialized holder for itemsRegistryBlock: Specialized holder for blocks
- Benefits: Type safety, explicit lifecycle control, and loader-agnostic initialization.
- Replaced lazy registry references with strongly-typed holders:
Breaking Changes
- Forge Support Removed:
- Discontinued due to API incompatibilities with the finite registration system.
- Still Supported: Fabric and NeoForge
- Deprecated/Removed:
- All lazy registry references (migrate to
RegistryHoldersubclasses).
- All lazy registry references (migrate to
Improvements
- Stable Registration Flow:
- Resolved issues from v1.6.x for reliable multi-loader registration.
Migration Guide:
- Replace
Registrar<T>withRegister - Use
RegistryItem/RegistryBlockinstead of lazy references - Forge users: Switch to Fabric/NeoForge or stay on v1.6.x
Xunlib v1.6.2 Changelog
Changes
- Generalized Registrar API:
- Renamed
ItemRegistrarto a genericRegistrar<T>class and marked it public.
- Renamed
Warning: Unstable API
Xunlib v1.5.1 Changelog (Hotfix)
Fixes
- Critical Registry Errors:
- Fixed
ArmorSetandToolSetclasses instantiating item instances too late, causing:- Forge/NeoForge:
Registry is already frozenerrors. - Fabric:
This registry can't create intrusive holderscrashes.
- Forge/NeoForge:
- Solution: Delayed item initialization to avoid unsafe registry access during class loading.
- Fixed
Features
- AABB Utilities: Added to
BlockPosUtilsfor axis-aligned bounding box operations:createAABBFromCenter(BlockPos center, double xRadius, double yRadius, double zRadius)expandAABB(AABB original, double x, double y, double z)getUnionAABB(AABB a, AABB b)isAABBWithinBlock(AABB box, BlockPos pos)
Upgrade Immediately if you use ArmorSet/ToolSet to resolve registry crashes. The new AABB utilities simplify collision detection and spatial queries.
Xunlib v1.5 Changelog
Features
- New Effect Stacking Strategy: Added
Prevent Stackingoption to the effect stacking strategy enum. - Mob Effect Instance Builder: Create and customize mob effect instances with a fluent builder API.
- Tickable Block Entities:
- Added
ITickableBlockEntityinterface for dynamic block entity updates. - Introduced
Ticking Entity Blockbase class for simplified ticking logic.
- Added
- Tool and Armor Sets:
ToolSetbuilder for defining tool collections (sword, axe, pickaxe, hoe, shovel).ArmorSetbuilder for armor sets (helmet, chestplate, leggings, boots).
Breaking Changes
- Package Reorganizations:
- Moved
@PersistentNbtannotation from.nbtto.annotationspackage. - Relocated all exceptions to the new
.exceptionspackage.
- Moved
- Renamed Classes:
InventorySection→PlayerInventorySection.EffectUtils→MobEffectUtils(aligns with utility focus).
- Removed Fuzzy Config Options:
- Removed
ALLfilter mode from fuzzy item matching configurations.
- Removed
Upgrade Notes:
- Update imports for
@PersistentNbt, exceptions, and renamed classes (PlayerInventorySection,MobEffectUtils). - Replace
ALLfilter mode in fuzzy configs with alternative strategies.
Xunlib v1.4 Changelog
Features
- Added
@PersistentNbtannotation: Automatically serialize/deserialize block entity data to from NBT.
Simplify data persistence by annotating fields in your block entity classes. - Custom NBT Adapters: Implement the
INbtAdapterinterface to define custom serialization/deserialization logic.
Override default NBT handling for advanced use cases.
Breaking Changes
- Moved
setModIdmethod: Relocated fromCommonUtilsto theModSetupclass.
Update your mod initialization code to callModSetup.setModId(...)instead. - Renamed inventory methods:
-addItems(...)→insertItems(...)
-removeItems(...)→extractItems(...)
Refactor existing code to use the new method names.
Improvements
- Enhanced Fuzzy Matching System:
Added whitelist/blacklist support for custom predicates.
Define inclusion/exclusion rules for item matching with greater flexibility.
Upgrade Note: If you rely on the old addItems or removeItems methods or setModId in CommoUtils, update your code to avoid runtime errors. Check the documentation for migration examples.



