Record Class TeleportTransition

java.lang.Object
java.lang.Record
net.minecraft.world.level.portal.TeleportTransition

public record TeleportTransition(ServerLevel newLevel, Vec3 position, Vec3 deltaMovement, float yRot, float xRot, boolean missingRespawnBlock, boolean asPassenger, Set<Relative> relatives, TeleportTransition.PostTeleportTransition postTeleportTransition) extends Record
  • Field Details

    • newLevel

      private final ServerLevel newLevel
      The field for the newLevel record component.
    • position

      private final Vec3 position
      The field for the position record component.
    • deltaMovement

      private final Vec3 deltaMovement
      The field for the deltaMovement record component.
    • yRot

      private final float yRot
      The field for the yRot record component.
    • xRot

      private final float xRot
      The field for the xRot record component.
    • missingRespawnBlock

      private final boolean missingRespawnBlock
      The field for the missingRespawnBlock record component.
    • asPassenger

      private final boolean asPassenger
      The field for the asPassenger record component.
    • relatives

      private final Set<Relative> relatives
      The field for the relatives record component.
    • postTeleportTransition

      private final TeleportTransition.PostTeleportTransition postTeleportTransition
      The field for the postTeleportTransition record component.
    • DO_NOTHING

      public static final TeleportTransition.PostTeleportTransition DO_NOTHING
    • PLAY_PORTAL_SOUND

      public static final TeleportTransition.PostTeleportTransition PLAY_PORTAL_SOUND
    • PLACE_PORTAL_TICKET

      public static final TeleportTransition.PostTeleportTransition PLACE_PORTAL_TICKET
  • Constructor Details

    • TeleportTransition

      public TeleportTransition(ServerLevel p_379776_, Vec3 p_379412_, Vec3 p_379320_, float p_380257_, float p_379610_, TeleportTransition.PostTeleportTransition p_380303_)
    • TeleportTransition

      public TeleportTransition(ServerLevel p_380133_, Vec3 p_379861_, Vec3 p_380308_, float p_379941_, float p_380119_, Set<Relative> p_379959_, TeleportTransition.PostTeleportTransition p_379425_)
    • TeleportTransition

      public TeleportTransition(ServerLevel p_379938_, Entity p_379604_, TeleportTransition.PostTeleportTransition p_379683_)
    • TeleportTransition

      public TeleportTransition(ServerLevel newLevel, Vec3 position, Vec3 deltaMovement, float yRot, float xRot, boolean missingRespawnBlock, boolean asPassenger, Set<Relative> relatives, TeleportTransition.PostTeleportTransition postTeleportTransition)
      Creates an instance of a TeleportTransition record class.
      Parameters:
      newLevel - the value for the newLevel record component
      position - the value for the position record component
      deltaMovement - the value for the deltaMovement record component
      yRot - the value for the yRot record component
      xRot - the value for the xRot record component
      missingRespawnBlock - the value for the missingRespawnBlock record component
      asPassenger - the value for the asPassenger record component
      relatives - the value for the relatives record component
      postTeleportTransition - the value for the postTeleportTransition record component
  • Method Details

    • playPortalSound

      private static void playPortalSound(Entity p_380322_)
    • placePortalTicket

      private static void placePortalTicket(Entity p_379684_)
    • missingRespawnBlock

      public static TeleportTransition missingRespawnBlock(ServerLevel p_380117_, Entity p_380173_, TeleportTransition.PostTeleportTransition p_380370_)
    • findAdjustedSharedSpawnPos

      private static Vec3 findAdjustedSharedSpawnPos(ServerLevel p_379295_, Entity p_379825_)
    • withRotation

      public TeleportTransition withRotation(float p_380177_, float p_379582_)
    • withPosition

      public TeleportTransition withPosition(Vec3 p_379914_)
    • transitionAsPassenger

      public TeleportTransition transitionAsPassenger()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • newLevel

      public ServerLevel newLevel()
      Returns the value of the newLevel record component.
      Returns:
      the value of the newLevel record component
    • position

      public Vec3 position()
      Returns the value of the position record component.
      Returns:
      the value of the position record component
    • deltaMovement

      public Vec3 deltaMovement()
      Returns the value of the deltaMovement record component.
      Returns:
      the value of the deltaMovement record component
    • yRot

      public float yRot()
      Returns the value of the yRot record component.
      Returns:
      the value of the yRot record component
    • xRot

      public float xRot()
      Returns the value of the xRot record component.
      Returns:
      the value of the xRot record component
    • missingRespawnBlock

      public boolean missingRespawnBlock()
      Returns the value of the missingRespawnBlock record component.
      Returns:
      the value of the missingRespawnBlock record component
    • asPassenger

      public boolean asPassenger()
      Returns the value of the asPassenger record component.
      Returns:
      the value of the asPassenger record component
    • relatives

      public Set<Relative> relatives()
      Returns the value of the relatives record component.
      Returns:
      the value of the relatives record component
    • postTeleportTransition

      public TeleportTransition.PostTeleportTransition postTeleportTransition()
      Returns the value of the postTeleportTransition record component.
      Returns:
      the value of the postTeleportTransition record component