BiomeResourceKey
The BiomeResourceKey is a common component in BiomesAPI that is used to identify biomes.
It is used extensively throughout the interfaces in BiomesAPI and is functionally identical to Namespaced keys along with beind a wrapper around Minecraft’s internal Identifier (or ResourceLocation in older versions).
public class ExampleClass { public boolean exampleUsage() { BiomeResourceKey resourceKey1 = BiomeResourceKey.of("example", "fancybiome"); String resourceKey1AsString = resourceKey1.toString();
BiomeResourceKey resouceKey2 = BiomeResourceKey.fromString(resourceKey1AsString);
return resourceKey1.equals(resouceKey2); }}class ExampleClass { fun exampleUsage(): Boolean { val resourceKey1 = BiomeResourceKey.of("example", "fancybiome") val resourceKey1AsString = resourceKey1.toString()
val resourceKey2 = BiomeResourceKey.fromString(resourceKey1AsString)
return resourceKey1 == resourceKey2 }}