Annotation Interface ObjectHolder


@Retention(RUNTIME) @Target(FIELD) public @interface ObjectHolder
ObjectHolder can be used to automatically populate public static final fields with entries from the registry. These values can then be referred within mod code directly.
  • 元素详细资料

    • registryName

      String registryName
      The name of the registry to load registry entries from. This string is parsed as a ResourceLocation and can contain a namespace.
      返回:
      the registry name
    • value

      String value
      Represents a name in the form of a ResourceLocation which points to a registry object from the registry given by registryName(). Must specify the modid if not inside a class annotated with Mod.
      返回:
      a name in the form of a ResourceLocation