AnnoLib

AnnoLib is an annotation-driven library for NeoForge 1.21.1 that helps mod developers register content, generate assets, and add runtime features with simple annotations.

AnnoLib

Annotation-driven registration and datagen for NeoForge 1.21.1.

AnnoLib is a developer-focused library that reduces boilerplate by letting mods declare content and runtime behavior directly with annotations. Write an annotation, and AnnoLib handles registration, generated resources, or the corresponding NeoForge integration.

Why AnnoLib?

  • Less boilerplate: register items, blocks, entities, and other entries with @Register.
  • Built-in datagen: generate language files, item/block models, blockstates, tags, recipes, and data maps.
  • Runtime integrations: commands, key mappings, configs, network packets, spawn eggs, and item customization.
  • Stable extension points: registration hooks and safe factories without replacing registry objects.
  • Works with existing content: modify vanilla or modded items through NeoForge events.

Features

  • @Register with registry inference, automatic BlockItems, creative tabs, and safe object factories
  • @Translation, @Model, @Tag, @ShapedRecipe, @ShapelessRecipe
  • @SpawnEgg
  • @Fuel, @Compostable, @Flammable
  • @Command, @KeyMapping, @Config
  • @Packet / @PacketHandler
  • @Intercept registration before/after hooks
  • @ItemAttributes and @ItemComponents for vanilla and modded items
  • API/implementation split: annolib-api for compilation, annolib for runtime

Requirements

  • Minecraft 1.21.1
  • NeoForge 21.1.222+
  • Java 21
  • ScannerLib 1.1.0+ installed at runtime

Installation

Place both jars in your mods folder:

mods/
├── annolib-1.2.0.jar
└── scannerlib-neoforge-1.1.0.jar

annolib-api-1.2.0.jar is an optional compile-time artifact and must not be installed as a mod.

For Developers

Add AnnoLib as a dependency and write annotated entries:

@Register("ruby")
@Translation(en = "Ruby", zhCn = "红宝石")
public static final Item RUBY = new Item(new Item.Properties());

AnnoLib processes the entry during startup and registers it as your_mod_id:ruby.

See the README for the full annotation reference, examples, and datagen setup.

Current Scope

Fabric support is not included in this release. Entity renderers, entity attributes, loot tables, and global Mixin interception are also outside the current scope.

Links

License

MIT

AnnoLib Team

profile avatar
  • 2
    Projects
  • 17
    Downloads

More from Vanil1a_Chocolate

  • ScannerLib project image

    ScannerLib

    A cross-loader annotation scanning library for NeoForge and Fabric on Minecraft 1.21.1.

    • 15
    • December 2, 2026
  • ScannerLib project image

    ScannerLib

    A cross-loader annotation scanning library for NeoForge and Fabric on Minecraft 1.21.1.

    • 15
    • December 2, 2026