Skip to content

Registry

WolfyScript edited this page Feb 20, 2022 · 4 revisions

The Registry makes it easy to register objects and types.
Additionally, it allows other plugins to register custom content too.

All the registries are available via the Registries class.
You can get an instance of that via your API instance wolfyutilities.getRegistries() or WolfyUtilCore.getInstance().getRegistries().

Registries (as of 3.16.1):

  • custom_items
  • custom_item_data
  • particle_effects
  • particle_animations
  • custom_item/actions/values
  • custom_item/actions/types
  • custom_item/events/values
  • custom_item/events/types
  • particle_animators
  • particles/shapes
  • particle_timers
  • custom_item_nbt_checks

Implement a new type of Registry in your Project

To create a new type of Registry, you should create a class in your project, that contains all the instances of your custom registries.
(For an example, see CustomCrafting).
It is recommended to use the RegistrySimple<> or TypeRegistrySimple<> as it implements all the basic registry functionality. In case you need more features, you can extend it.

| Home

| GUIs

| NBT Tools

Clone this wiki locally