@CatalogedBy(value=RTPKernels.class) public interface RTPKernel extends org.spongepowered.api.CatalogType
RTPKernel provides the instructions for how to select
a location when using RTP.
RTPKernels can be registered in the appropriate registry.
Kernels can base logic on a supplied location, but
are expected to handle cases where a null or invalid
location is supplied.
| Modifier and Type | Method and Description |
|---|---|
java.util.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 target,
NucleusRTPService.RTPOptions options)
Gets a new location.
|
java.util.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 target,
NucleusRTPService.RTPOptions options)
Note that this may fail if the search times out. This does not indicate a failing routine.
currentLocation - The current location of the entity to teleport, if appropriatetarget - The target world for teleportoptions - The options to consider when teleporting