Class AddonRegistry
java.lang.Object
org.mcaccess.minecraftaccess.api.AddonRegistry
Registry for registering items with Minecraft Access.
Any usage outside of MinecraftAccessAddon.init(AddonRegistry) is unsupported and may break at any time.
- Since:
- 1.12.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAllows setting additional optional properties on registered access menu functions. -
Method Summary
Modifier and TypeMethodDescriptionregister(@NotNull String identifier, @NotNull AccessMenuFunction function) Registers anAccessMenuFunction.voidRegisters aStatus.voidregister(@NotNull String identifier, @NotNull WorldNarrator worldNarrator) Registers aWorldNarrator.
-
Method Details
-
register
Registers aStatus.- Parameters:
identifier- A unique identifier for theStatus. This is automatically namespaced by mod ID.status- TheStatusto register.- Throws:
IllegalArgumentException- If aStatusis already registered with the provided identifier and the same mod ID.UnsupportedOperationException- Registries are already frozen.- Since:
- 1.12.0
- See Also:
-
register
public AddonRegistry.AccessMenuFunctionRegistration register(@NotNull @NotNull String identifier, @NotNull @NotNull AccessMenuFunction function) Registers anAccessMenuFunction.- Parameters:
identifier- A unique identifier for theAccessMenuFunction. This is automatically namespaced by mod ID.function- TheAccessMenuFunctionto register.- Returns:
- An
AddonRegistry.AccessMenuFunctionRegistrationto set additional optional properties. - Throws:
IllegalArgumentException- If anAccessMenuFunctionis already registered with the provided identifier and the same mod ID.UnsupportedOperationException- Registries are already frozen.- Since:
- 1.12.0
- See Also:
-
register
public void register(@NotNull @NotNull String identifier, @NotNull @NotNull WorldNarrator worldNarrator) Registers aWorldNarrator.- Parameters:
identifier- A unique identifier for theWorldNarrator. This is automatically namespaced by mod ID.worldNarrator- TheWorldNarratorto register.- Throws:
IllegalArgumentException- If aWorldNarratoris already registered with the provided identifier and the same mod ID.UnsupportedOperationException- Registries are already frozen.- Since:
- 1.12.0
- See Also:
-