XunLib

A common code library designed to ease mod dev

File Details

[NeoForge 1.21] v2.1

  • R
  • Jun 6, 2025
  • 108.67 KB
  • 8
  • 1.21.1+1
  • NeoForge

File Name

xunlib-neoforge-1.21-2.1.jar

Supported Versions

  • 1.21.1
  • 1.21

Curse Maven Snippet

NeoForge

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

Learn more about Curse Maven

Xunlib v2.1 Changelog

Registration System Overhaul

  • Renamed RegistrarRegister: Simplified naming for core registration API.
  • New Registry Paradigm:
    • Replaced lazy registry references with strongly-typed holders:
    • RegistryHolder: Base for all registry objects
    • RegistryItem: Specialized holder for items
    • RegistryBlock: Specialized holder for blocks
    • Benefits: Type safety, explicit lifecycle control, and loader-agnostic initialization.

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 RegistryHolder subclasses).

Improvements

  • Stable Registration Flow:
    • Resolved issues from v1.6.x for reliable multi-loader registration.

Migration Guide:

  1. Replace Registrar<T> with Register
  2. Use RegistryItem/RegistryBlock instead of lazy references
  3. Forge users: Switch to Fabric/NeoForge or stay on v1.6.x