Record Class DimensionTransition

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

public record DimensionTransition(ServerLevel newLevel, Vec3 pos, Vec3 speed, float yRot, float xRot, boolean missingRespawnBlock, DimensionTransition.PostDimensionTransition postDimensionTransition) extends Record
  • Field Details

    • newLevel

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

      private final Vec3 pos
      The field for the pos record component.
    • speed

      private final Vec3 speed
      The field for the speed 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.
    • postDimensionTransition

      private final DimensionTransition.PostDimensionTransition postDimensionTransition
      The field for the postDimensionTransition record component.
    • DO_NOTHING

      public static final DimensionTransition.PostDimensionTransition DO_NOTHING
    • PLAY_PORTAL_SOUND

      public static final DimensionTransition.PostDimensionTransition PLAY_PORTAL_SOUND
    • PLACE_PORTAL_TICKET

      public static final DimensionTransition.PostDimensionTransition PLACE_PORTAL_TICKET
  • Constructor Details

    • DimensionTransition

      public DimensionTransition(ServerLevel p_343308_, Vec3 p_345120_, Vec3 p_344292_, float p_344085_, float p_342881_, DimensionTransition.PostDimensionTransition p_344117_)
    • DimensionTransition

      public DimensionTransition(ServerLevel p_344161_, Entity p_342923_, DimensionTransition.PostDimensionTransition p_343140_)
    • DimensionTransition

      public DimensionTransition(ServerLevel newLevel, Vec3 pos, Vec3 speed, float yRot, float xRot, boolean missingRespawnBlock, DimensionTransition.PostDimensionTransition postDimensionTransition)
      Creates an instance of a DimensionTransition record class.
      Parameters:
      newLevel - the value for the newLevel record component
      pos - the value for the pos record component
      speed - the value for the speed 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
      postDimensionTransition - the value for the postDimensionTransition record component
  • Method Details

    • playPortalSound

      private static void playPortalSound(Entity p_342599_)
    • placePortalTicket

      private static void placePortalTicket(Entity p_344820_)
    • missingRespawnBlock

      public static DimensionTransition missingRespawnBlock(ServerLevel p_344639_, Entity p_345092_, DimensionTransition.PostDimensionTransition p_342728_)
    • findAdjustedSharedSpawnPos

      private static Vec3 findAdjustedSharedSpawnPos(ServerLevel p_345512_, Entity p_344855_)
    • 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
    • pos

      public Vec3 pos()
      Returns the value of the pos record component.
      Returns:
      the value of the pos record component
    • speed

      public Vec3 speed()
      Returns the value of the speed record component.
      Returns:
      the value of the speed 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
    • postDimensionTransition

      public DimensionTransition.PostDimensionTransition postDimensionTransition()
      Returns the value of the postDimensionTransition record component.
      Returns:
      the value of the postDimensionTransition record component