Package net.minecraft.world.level.portal
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
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DimensionTransition.PostDimensionTransition
private final boolean
The field for themissingRespawnBlock
record component.private final ServerLevel
The field for thenewLevel
record component.static final DimensionTransition.PostDimensionTransition
static final DimensionTransition.PostDimensionTransition
private final Vec3
The field for thepos
record component.private final DimensionTransition.PostDimensionTransition
The field for thepostDimensionTransition
record component.private final Vec3
The field for thespeed
record component.private final float
The field for thexRot
record component.private final float
The field for theyRot
record component. -
Constructor Summary
ConstructorDescriptionDimensionTransition
(ServerLevel p_348609_, Entity p_352432_, DimensionTransition.PostDimensionTransition p_352373_) DimensionTransition
(ServerLevel newLevel, Vec3 pos, Vec3 speed, float yRot, float xRot, boolean missingRespawnBlock, DimensionTransition.PostDimensionTransition postDimensionTransition) Creates an instance of aDimensionTransition
record class.DimensionTransition
(ServerLevel p_348637_, Vec3 p_348645_, Vec3 p_348472_, float p_348548_, float p_348664_, DimensionTransition.PostDimensionTransition p_352139_) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.private static Vec3
findAdjustedSharedSpawnPos
(ServerLevel p_352080_, Entity p_352400_) final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of themissingRespawnBlock
record component.static DimensionTransition
missingRespawnBlock
(ServerLevel p_348517_, Entity p_352420_, DimensionTransition.PostDimensionTransition p_352305_) newLevel()
Returns the value of thenewLevel
record component.private static void
placePortalTicket
(Entity p_352447_) private static void
playPortalSound
(Entity p_352075_) pos()
Returns the value of thepos
record component.Returns the value of thepostDimensionTransition
record component.speed()
Returns the value of thespeed
record component.final String
toString()
Returns a string representation of this record class.float
xRot()
Returns the value of thexRot
record component.float
yRot()
Returns the value of theyRot
record component.
-
Field Details
-
newLevel
The field for thenewLevel
record component. -
pos
The field for thepos
record component. -
speed
The field for thespeed
record component. -
yRot
private final float yRotThe field for theyRot
record component. -
xRot
private final float xRotThe field for thexRot
record component. -
missingRespawnBlock
private final boolean missingRespawnBlockThe field for themissingRespawnBlock
record component. -
postDimensionTransition
The field for thepostDimensionTransition
record component. -
DO_NOTHING
-
PLAY_PORTAL_SOUND
-
PLACE_PORTAL_TICKET
-
-
Constructor Details
-
DimensionTransition
public DimensionTransition(ServerLevel p_348637_, Vec3 p_348645_, Vec3 p_348472_, float p_348548_, float p_348664_, DimensionTransition.PostDimensionTransition p_352139_) -
DimensionTransition
public DimensionTransition(ServerLevel p_348609_, Entity p_352432_, DimensionTransition.PostDimensionTransition p_352373_) -
DimensionTransition
public DimensionTransition(ServerLevel newLevel, Vec3 pos, Vec3 speed, float yRot, float xRot, boolean missingRespawnBlock, DimensionTransition.PostDimensionTransition postDimensionTransition) Creates an instance of aDimensionTransition
record class.- Parameters:
newLevel
- the value for thenewLevel
record componentpos
- the value for thepos
record componentspeed
- the value for thespeed
record componentyRot
- the value for theyRot
record componentxRot
- the value for thexRot
record componentmissingRespawnBlock
- the value for themissingRespawnBlock
record componentpostDimensionTransition
- the value for thepostDimensionTransition
record component
-
-
Method Details
-
playPortalSound
-
placePortalTicket
-
missingRespawnBlock
public static DimensionTransition missingRespawnBlock(ServerLevel p_348517_, Entity p_352420_, DimensionTransition.PostDimensionTransition p_352305_) -
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
newLevel
Returns the value of thenewLevel
record component.- Returns:
- the value of the
newLevel
record component
-
pos
Returns the value of thepos
record component.- Returns:
- the value of the
pos
record component
-
speed
Returns the value of thespeed
record component.- Returns:
- the value of the
speed
record component
-
yRot
public float yRot()Returns the value of theyRot
record component.- Returns:
- the value of the
yRot
record component
-
xRot
public float xRot()Returns the value of thexRot
record component.- Returns:
- the value of the
xRot
record component
-
missingRespawnBlock
public boolean missingRespawnBlock()Returns the value of themissingRespawnBlock
record component.- Returns:
- the value of the
missingRespawnBlock
record component
-
postDimensionTransition
Returns the value of thepostDimensionTransition
record component.- Returns:
- the value of the
postDimensionTransition
record component
-