Skip to content

Auto Registry [No Dependency]

TheInsanityGod edited this page Apr 30, 2026 · 3 revisions

InsanityLib will automatically generate a method for registering stuff to the class registry (this method is called during AutoSetup).

Currently the following classes will be automatically registered:

  • Item
  • CollectibleBehavior
  • Block
  • BlockBehavior
  • BlockEntity
  • BlockEntityBehavior
  • ITransitionHandler

Naming Scheme

By default the registry name follows the following scheme: "{modid}:{name}" where {modid} is substituted with the modid defined in the modinfo.json and {name} is substituted the name of the relevant Type using PascalCase

This can be changed by applying the AutoRegistryNameAttribute attribute to the assembly and/or a specific class.

Clone this wiki locally