Class Registration

java.lang.Object
me.gamercoder215.mobchip.util.Registration

public final class Registration extends Object
Represents registration under a specific context.

Minecraft 1.20.5 introduced new changes to how registering new items (e.g. attributes, sensors, etc.) work. You are now required to pass a namespace, key, and version, as opposed to just a namespace and key. There is no functional difference if this is not provided, so MobChip will default to "unknown" for the version. You can provide custom parameters here for improved native interoperability with the registry.
  • Method Details

    • getVersion

      @NotNull public static @NotNull String getVersion()
      Gets the version for registration.
      Returns:
      The version.
    • setVersion

      public static void setVersion(@NotNull @NotNull String version)
      Sets the version for registration.
      Parameters:
      version - The version to set.
    • usePlugin

      public static void usePlugin(@NotNull @NotNull Plugin plugin)
      Use the plugin version for registration.
      Parameters:
      plugin - The plugin to use.