All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.legendofdragoon.modloader.registries.RegistryId Maven / Gradle / Ivy

There is a newer version: 3.0.4
Show newest version
package org.legendofdragoon.modloader.registries;

public record RegistryId(String modId, String entryId) {
  public static RegistryId of(final String id) {
    final String[] parts = id.split(":");

    if(parts.length != 2) {
      throw new IllegalArgumentException("Invalid registry ID " + id);
    }

    return new RegistryId(parts[0], parts[1]);
  }

  @Override
  public String toString() {
    return this.modId + ':' + this.entryId;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy