Interface BootstrapDimensionRegistry
Registers custom dimension types during the Paper bootstrap/registry-load phase, so they enter
the dimension-type registry before it freezes.
- Since:
- 3.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WireProvider<BootstrapDimensionRegistry> static final WireProvider<BootstrapDimensionRegistry> -
Method Summary
Modifier and TypeMethodDescriptionstatic BootstrapDimensionRegistrycompose(BootstrapContext context, Composer type) Composes a new datapack-backed BootstrapDimensionRegistry and installs it into the context.static BootstrapDimensionRegistrydatapack()Creates a new DatapackBootstrapDimensionRegistry instance.deferring(ThrowingRunnable runnable) Defers the execution of a runnable until the registry is installed.install(BootstrapContext context) Installs the registry into the given context.Queues a dimension type to be registered.static BootstrapDimensionRegistryunsafe()Creates a new UnsafePaperBootstrapDimensionRegistry instance.
-
Field Details
-
DATAPACK
-
UNSAFE
-
-
Method Details
-
compose
Composes a new datapack-backed BootstrapDimensionRegistry and installs it into the context.- Parameters:
context- the bootstrap context- Returns:
- a new, installed BootstrapDimensionRegistry instance
- Since:
- 3.0.0
-
datapack
Creates a new DatapackBootstrapDimensionRegistry instance.- Returns:
- a new instance of DatapackBootstrapDimensionRegistry
- Since:
- 3.0.0
-
unsafe
Creates a new UnsafePaperBootstrapDimensionRegistry instance.- Returns:
- a new instance of UnsafePaperBootstrapDimensionRegistry
- Since:
- 3.0.0
-
install
Installs the registry into the given context.- Parameters:
context- the context to install the registry into- Returns:
- this registry instance
- Since:
- 3.0.0
-
queue
Queues a dimension type to be registered.- Parameters:
dimension- the dimension type to register- Returns:
- this registry instance
- Since:
- 3.0.0
-
deferring
Defers the execution of a runnable until the registry is installed.- Parameters:
runnable- the runnable to defer- Returns:
- this registry instance
- Since:
- 3.0.0
-