Class DatTeleporter

java.lang.Object
com.datdeveloper.datmoddingapi.util.DatTeleporter
All Implemented Interfaces:
net.minecraftforge.common.util.ITeleporter

public class DatTeleporter extends Object implements 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
    Constructor
    Description
    DatTeleporter(net.minecraft.core.BlockPos destination)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @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 interface net.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 interface net.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 interface net.minecraftforge.common.util.ITeleporter