XunLib

A common code library designed to ease mod dev

File Details

[Forge 1.21] v1.5.1

  • R
  • Apr 27, 2025
  • 97.49 KB
  • 8
  • 1.21.1+1
  • Forge

File Name

XunLib-forge-1.21-1.5.1.jar

Supported Versions

  • 1.21.1
  • 1.21

Curse Maven Snippet

Forge

implementation "curse.maven:xunlib-1245630:6471565"
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

Xunlib v1.5.1 Changelog (Hotfix)

Fixes

  • Critical Registry Errors:
    • Fixed ArmorSet and ToolSet classes instantiating item instances too late, causing:
    • Forge/NeoForge: Registry is already frozen errors.
    • Fabric: This registry can't create intrusive holders crashes.
    • Solution: Delayed item initialization to avoid unsafe registry access during class loading.

Features

  • AABB Utilities: Added to BlockPosUtils for 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.