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_344161_, Entity p_342923_, DimensionTransition.PostDimensionTransition p_343140_) 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_343308_, Vec3 p_345120_, Vec3 p_344292_, float p_344085_, float p_342881_, DimensionTransition.PostDimensionTransition p_344117_) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.private static Vec3
findAdjustedSharedSpawnPos
(ServerLevel p_345512_, Entity p_344855_) final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of themissingRespawnBlock
record component.static DimensionTransition
missingRespawnBlock
(ServerLevel p_344639_, Entity p_345092_, DimensionTransition.PostDimensionTransition p_342728_) newLevel()
Returns the value of thenewLevel
record component.private static void
placePortalTicket
(Entity p_344820_) private static void
playPortalSound
(Entity p_342599_) 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_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 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_344639_, Entity p_345092_, DimensionTransition.PostDimensionTransition p_342728_) -
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
-