Class TeleportHelperFilters
- java.lang.Object
-
- org.spongepowered.api.world.teleport.TeleportHelperFilters
-
public final class TeleportHelperFilters extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static DefaultedRegistryReference<TeleportHelperFilter>
CONFIG
Designed to be combined with other filters, this filter determines if a block is in the config blacklist and returns the appropriate result.static DefaultedRegistryReference<TeleportHelperFilter>
DEFAULT
The default behavior for safe teleportation.static DefaultedRegistryReference<TeleportHelperFilter>
FLYING
The flying safe teleportation behavior.static DefaultedRegistryReference<TeleportHelperFilter>
NO_PORTAL
This filter is the same as theDEFAULT
kernel, except that portals are not valid targets.static DefaultedRegistryReference<TeleportHelperFilter>
SURFACE_ONLY
This filter is the same as theDEFAULT
kernel, except that only targets that can see the sky are considered.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Registry<TeleportHelperFilter>
registry()
-
-
-
Field Detail
-
CONFIG
public static final DefaultedRegistryReference<TeleportHelperFilter> CONFIG
Designed to be combined with other filters, this filter determines if a block is in the config blacklist and returns the appropriate result.
-
DEFAULT
public static final DefaultedRegistryReference<TeleportHelperFilter> DEFAULT
The default behavior for safe teleportation.This filter attempts to find a location to teleport to that has the following characteristics:
- The two blocks that the player would occupy (the target and the block above) are passable.
- The floor is a non-passable or liquid block which is not known to harm the player.
- The block in question is not blacklisted in the config for the
floor or body (see
CONFIG
).
-
FLYING
public static final DefaultedRegistryReference<TeleportHelperFilter> FLYING
The flying safe teleportation behavior.This filter attempts to find the following:
- A block that is air or a liquid which is not known by Sponge to harm the player.
- A similar block one block above the target.
- That floor blocks are not cacti (and thus, hurt).
-
NO_PORTAL
public static final DefaultedRegistryReference<TeleportHelperFilter> NO_PORTAL
This filter is the same as theDEFAULT
kernel, except that portals are not valid targets.
-
SURFACE_ONLY
public static final DefaultedRegistryReference<TeleportHelperFilter> SURFACE_ONLY
This filter is the same as theDEFAULT
kernel, except that only targets that can see the sky are considered.
-
-
Method Detail
-
registry
public static Registry<TeleportHelperFilter> registry()
-
-