Class DatTeleporter
java.lang.Object
com.datdeveloper.datmoddingapi.util.DatTeleporter
- All Implemented Interfaces:
net.minecraftforge.common.util.ITeleporter
A simple teleporter that just teleports a player to a location in a level
Does not produce a portal and does not produce a sound
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.world.level.portal.PortalInfo
getPortalInfo
(net.minecraft.world.entity.Entity entity, net.minecraft.server.level.ServerLevel destWorld, Function<net.minecraft.server.level.ServerLevel, net.minecraft.world.level.portal.PortalInfo> defaultPortalInfo) net.minecraft.world.entity.Entity
placeEntity
(net.minecraft.world.entity.Entity entity, net.minecraft.server.level.ServerLevel currentWorld, net.minecraft.server.level.ServerLevel destWorld, float yaw, Function<Boolean, net.minecraft.world.entity.Entity> repositionEntity) boolean
playTeleportSound
(net.minecraft.server.level.ServerPlayer player, net.minecraft.server.level.ServerLevel sourceWorld, net.minecraft.server.level.ServerLevel destWorld) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.util.ITeleporter
isVanilla
-
Constructor Details
-
DatTeleporter
public DatTeleporter(net.minecraft.core.BlockPos destination)
-
-
Method Details
-
getPortalInfo
@Nullable public @Nullable net.minecraft.world.level.portal.PortalInfo getPortalInfo(net.minecraft.world.entity.Entity entity, net.minecraft.server.level.ServerLevel destWorld, Function<net.minecraft.server.level.ServerLevel, net.minecraft.world.level.portal.PortalInfo> defaultPortalInfo) - Specified by:
getPortalInfo
in interfacenet.minecraftforge.common.util.ITeleporter
-
placeEntity
public net.minecraft.world.entity.Entity placeEntity(net.minecraft.world.entity.Entity entity, net.minecraft.server.level.ServerLevel currentWorld, net.minecraft.server.level.ServerLevel destWorld, float yaw, Function<Boolean, net.minecraft.world.entity.Entity> repositionEntity) - Specified by:
placeEntity
in interfacenet.minecraftforge.common.util.ITeleporter
-
playTeleportSound
public boolean playTeleportSound(net.minecraft.server.level.ServerPlayer player, net.minecraft.server.level.ServerLevel sourceWorld, net.minecraft.server.level.ServerLevel destWorld) - Specified by:
playTeleportSound
in interfacenet.minecraftforge.common.util.ITeleporter
-