public interface NucleusRTPService
Modifier and Type | Interface and Description |
---|---|
static interface |
NucleusRTPService.RTPOptions
The RTP options to pass to the routines
|
Modifier and Type | Method and Description |
---|---|
RTPKernel |
getDefaultKernel()
Gets the
RTPKernel that Nucleus' RTP will use. |
default Optional<org.spongepowered.api.world.Location<org.spongepowered.api.world.World>> |
getLocation(org.spongepowered.api.world.Location<org.spongepowered.api.world.World> currentLocation,
org.spongepowered.api.world.World world,
NucleusRTPService.RTPOptions options)
Uses the default RTP kernel (from
getDefaultKernel() to find a
random location, given the provided NucleusRTPService.RTPOptions . |
default NucleusRTPService.RTPOptions |
options()
Gets the
NucleusRTPService.RTPOptions that contains the current
rtp configuration for a default world. |
NucleusRTPService.RTPOptions |
options(org.spongepowered.api.world.storage.WorldProperties world)
Gets the
NucleusRTPService.RTPOptions that contains the current
rtp configuration for the specified world. |
NucleusRTPService.RTPOptions.Builder |
optionsBuilder()
Gets the
NucleusRTPService.RTPOptions that contains the current
rtp configuration, but in builder format. |
void |
registerKernel(RTPKernel kernel)
Registers a kernel for use in Nucleus.
|
default NucleusRTPService.RTPOptions options()
NucleusRTPService.RTPOptions
that contains the current
rtp configuration for a default world.NucleusRTPService.RTPOptions
NucleusRTPService.RTPOptions options(@Nullable org.spongepowered.api.world.storage.WorldProperties world)
NucleusRTPService.RTPOptions
that contains the current
rtp configuration for the specified world.world
- The WorldProperties
, or null
for defaults.NucleusRTPService.RTPOptions
NucleusRTPService.RTPOptions.Builder optionsBuilder()
NucleusRTPService.RTPOptions
that contains the current
rtp configuration, but in builder format.
Changes in the builder do not affect the configuration, this is for overriding in specific circumstances.
NucleusRTPService.RTPOptions
RTPKernel getDefaultKernel()
RTPKernel
that Nucleus' RTP will use.
This is set by the rtp config, using the kernel's ID.
RTPKernel
default Optional<org.spongepowered.api.world.Location<org.spongepowered.api.world.World>> getLocation(@Nullable org.spongepowered.api.world.Location<org.spongepowered.api.world.World> currentLocation, org.spongepowered.api.world.World world, NucleusRTPService.RTPOptions options)
getDefaultKernel()
to find a
random location, given the provided NucleusRTPService.RTPOptions
.
Note that this may fail if the search times out. This does not indicate a failing routine.
A source of confusion is that this method works in exactly the same way as the rtp command. It does not. The RTP command makes attempts over multiple ticks to keep the server running while increasing the chance of finding a suitable spot.
This method makes one attempt at finding a suitable location. You may need to run this more than once.
currentLocation
- The current location to base the RTP off.world
- The world to warp tooptions
- The RTP options to usevoid registerKernel(RTPKernel kernel)
kernel
- The kernel.