You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/biomes/registered-biomes.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,16 +10,16 @@ import SourceLink from "@/components/SourceLink.astro";
10
10
11
11
In addition to being able to keep references to your <SourceLinkpath="biome/CustomBiome.java">CustomBiome</SourceLink>s
12
12
in your own code, **BiomesAPI** also provides a built-in <SourceLinkpath="biome/RegisteredBiomes.java">RegisteredBiomes</SourceLink>
13
-
that allows you to get a reference to your custom biomes just from a <SourceLinkpath="keys/ResourceKey.java">BiomeResourceKey</SourceLink>.
13
+
that allows you to get a reference to your custom biomes just from a <SourceLinkpath="keys/ResourceKey.java">ResourceKey</SourceLink>.
14
14
15
15
**RegisteredBiomes** exposes the following methods. The `*Lazily` variants return a <SourceLinkpath="util/Lazy.java">Lazy</SourceLink> that defers the lookup until first accessed.
16
16
17
-
* <SourceLinkpath="biome/RegisteredBiomes.java"line={35}>get(BiomeResourceKey)</SourceLink>: Returns the custom biome for the given resource key, or `null` if none is registered.
18
-
* <SourceLinkpath="biome/RegisteredBiomes.java"line={52}>getOrThrow(BiomeResourceKey)</SourceLink>: Returns the custom biome for the given resource key, or throws <SourceLinkpath="exceptions/UnknownBiomeException.java">UnknownBiomeException</SourceLink> if none is registered.
19
-
* <SourceLinkpath="biome/RegisteredBiomes.java"line={67}>getLazily(BiomeResourceKey)</SourceLink>: A lazy version of `get` — the lookup runs on first access and may resolve to `null`.
20
-
* <SourceLinkpath="biome/RegisteredBiomes.java"line={79}>getOrThrowLazily(BiomeResourceKey)</SourceLink>: A lazy version of `getOrThrow`. The `UnknownBiomeException` is thrown on first access if the biome is not registered.
21
-
* <SourceLinkpath="biome/RegisteredBiomes.java"line={90}>isRegistered(BiomeResourceKey)</SourceLink>: Returns `true` if a biome with the given resource key is registered.
22
-
* <SourceLinkpath="biome/RegisteredBiomes.java"line={102}>isRegisteredLazily(BiomeResourceKey)</SourceLink>: A lazy version of `isRegistered`.
17
+
* <SourceLinkpath="biome/RegisteredBiomes.java"line={35}>get(ResourceKey)</SourceLink>: Returns the custom biome for the given resource key, or `null` if none is registered.
18
+
* <SourceLinkpath="biome/RegisteredBiomes.java"line={52}>getOrThrow(ResourceKey)</SourceLink>: Returns the custom biome for the given resource key, or throws <SourceLinkpath="exceptions/UnknownBiomeException.java">UnknownBiomeException</SourceLink> if none is registered.
19
+
* <SourceLinkpath="biome/RegisteredBiomes.java"line={67}>getLazily(ResourceKey)</SourceLink>: A lazy version of `get` — the lookup runs on first access and may resolve to `null`.
20
+
* <SourceLinkpath="biome/RegisteredBiomes.java"line={79}>getOrThrowLazily(ResourceKey)</SourceLink>: A lazy version of `getOrThrow`. The `UnknownBiomeException` is thrown on first access if the biome is not registered.
21
+
* <SourceLinkpath="biome/RegisteredBiomes.java"line={90}>isRegistered(ResourceKey)</SourceLink>: Returns `true` if a biome with the given resource key is registered.
22
+
* <SourceLinkpath="biome/RegisteredBiomes.java"line={102}>isRegisteredLazily(ResourceKey)</SourceLink>: A lazy version of `isRegistered`.
23
23
* <SourceLinkpath="biome/RegisteredBiomes.java"line={113}>iterator()</SourceLink>: Returns an iterator over all registered custom biomes (`RegisteredBiomes` implements `Iterable<CustomBiome>`).
24
24
* <SourceLinkpath="biome/RegisteredBiomes.java"line={123}>size()</SourceLink>: Returns the number of registered custom biomes.
25
25
* <SourceLinkpath="biome/RegisteredBiomes.java"line={133}>isEmpty()</SourceLink>: Returns `true` if no custom biomes are registered.
Represents a key for a biome resource in the game.
10
10
This interface extends Kyori's [`Keyed`](https://jd.advntr.dev/key/4.26.1/net/kyori/adventure/key/Keyed.html) interface, allowing it to be used as a key in various registries and maps.
11
11
12
-
* <SourceLinkpath="keys/ResourceKey.java"line={56}>of(String, String)</SourceLink>: Creates a new BiomeResourceKey with the specified namespace and value.
13
-
* <SourceLinkpath="keys/ResourceKey.java"line={81}>fromString(String)</SourceLink>: Creates a new BiomeResourceKey from a string in the format "namespace:value".
14
-
* <SourceLinkpath="keys/ResourceKey.java"line={37}>namespace()</SourceLink>: Returns the namespace of this BiomeResourceKey.
15
-
* <SourceLinkpath="keys/ResourceKey.java"line={41}>path()</SourceLink>: Returns the path of this BiomeResourceKey.
12
+
* <SourceLinkpath="keys/ResourceKey.java"line={56}>of(String, String)</SourceLink>: Creates a new ResourceKey with the specified namespace and value.
13
+
* <SourceLinkpath="keys/ResourceKey.java"line={81}>fromString(String)</SourceLink>: Creates a new ResourceKey from a string in the format "namespace:value".
14
+
* <SourceLinkpath="keys/ResourceKey.java"line={37}>namespace()</SourceLink>: Returns the namespace of this ResourceKey.
15
+
* <SourceLinkpath="keys/ResourceKey.java"line={41}>path()</SourceLink>: Returns the path of this ResourceKey.
0 commit comments