Interface BootstrapBiomeRegistry
Registers custom biomes during the Paper bootstrap/registry-load phase, so they enter the
biome registry before it freezes (no post-freezing). A biome that fails
to build should fail server startup.
- Since:
- 2.3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WireProvider<BootstrapBiomeRegistry> static final WireProvider<BootstrapBiomeRegistry> -
Method Summary
Modifier and TypeMethodDescriptionaddToDimension(ResourceKey dimension, ResourceKey target, ClimatePoint placement) Adds a biome to a dimension's biome distribution.static BootstrapBiomeRegistrycompose(BootstrapContext context, Composer type) Composes a new BootstrapBiomeRegistry instance.static BootstrapBiomeRegistrydatapack()Creates a new DatapackBootstrapBiomeRegistry instance.deferring(ThrowingRunnable runnable) Defers the execution of a runnable until the registry is installed.static BootstrapBiomeRegistryinjector()Creates a new UnsafePaperBootstrapBiomeRegistry instance.install(BootstrapContext context) Installs the registry into the given context.Queues a biome to be registered.replaceInDimension(ResourceKey dimension, ResourceKey target, ResourceKey replacement) Replaces a biome in a dimension.
-
Field Details
-
UNSAFE
-
DATAPACK
-
-
Method Details
-
compose
Composes a new BootstrapBiomeRegistry instance.- Parameters:
context- the bootstrap contexttype- the type of registry to compose- Returns:
- a new BootstrapBiomeRegistry instance
- Since:
- 2.3.0
- See Also:
-
injector
Creates a new UnsafePaperBootstrapBiomeRegistry instance.- Returns:
- a new instance of UnsafePaperBootstrapBiomeRegistry
- Since:
- 2.3.0
-
datapack
Creates a new DatapackBootstrapBiomeRegistry instance.- Returns:
- a new instance of DatapackBootstrapBiomeRegistry
- Since:
- 2.3.0
-
install
Installs the registry into the given context.- Parameters:
context- the context to install the registry into- Since:
- 2.3.0
-
queue
Queues a biome to be registered.- Parameters:
biome- the biome to register- Since:
- 2.3.0
-
deferring
Defers the execution of a runnable until the registry is installed.- Parameters:
runnable- the runnable to defer- Returns:
- this registry instance
- Since:
- 2.3.0
-
addToDimension
@AsOf("2.3.0") BootstrapBiomeRegistry addToDimension(ResourceKey dimension, ResourceKey target, ClimatePoint placement) throws UnsupportedOperationException Adds a biome to a dimension's biome distribution. The biome will be added at the specified climate point and may replace an existing biome if the point overlaps with an existing one.- Parameters:
dimension- the dimension to add the biome totarget- the biome to addplacement- the climate point to place the biome at- Returns:
- this registry instance
- Throws:
UnsupportedOperationException- if the implementation does not support this operation- Since:
- 2.3.0
- See Also:
-
replaceInDimension
@AsOf("2.3.0") BootstrapBiomeRegistry replaceInDimension(ResourceKey dimension, ResourceKey target, ResourceKey replacement) throws UnsupportedOperationException Replaces a biome in a dimension.- Parameters:
dimension- the dimension to replace the biome intarget- the biome to replacereplacement- the biome to replace with- Returns:
- this registry instance
- Throws:
UnsupportedOperationException- if the implementation does not support this operation- Since:
- 2.3.0
- See Also:
-