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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DimensionTransition.PostDimensionTransitionprivate final booleanThe field for themissingRespawnBlockrecord component.private final ServerLevelThe field for thenewLevelrecord component.static final DimensionTransition.PostDimensionTransitionstatic final DimensionTransition.PostDimensionTransitionprivate final Vec3The field for theposrecord component.private final DimensionTransition.PostDimensionTransitionThe field for thepostDimensionTransitionrecord component.private final Vec3The field for thespeedrecord component.private final floatThe field for thexRotrecord component.private final floatThe field for theyRotrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDimensionTransition(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 aDimensionTransitionrecord 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 booleanIndicates whether some other object is "equal to" this one.private static Vec3findAdjustedSharedSpawnPos(ServerLevel p_345512_, Entity p_344855_) final inthashCode()Returns a hash code value for this object.booleanReturns the value of themissingRespawnBlockrecord component.static DimensionTransitionmissingRespawnBlock(ServerLevel p_344639_, Entity p_345092_, DimensionTransition.PostDimensionTransition p_342728_) newLevel()Returns the value of thenewLevelrecord component.private static voidplacePortalTicket(Entity p_344820_) private static voidplayPortalSound(Entity p_342599_) pos()Returns the value of theposrecord component.Returns the value of thepostDimensionTransitionrecord component.speed()Returns the value of thespeedrecord component.final StringtoString()Returns a string representation of this record class.floatxRot()Returns the value of thexRotrecord component.floatyRot()Returns the value of theyRotrecord component.
-
Field Details
-
newLevel
The field for thenewLevelrecord component. -
pos
The field for theposrecord component. -
speed
The field for thespeedrecord component. -
yRot
private final float yRotThe field for theyRotrecord component. -
xRot
private final float xRotThe field for thexRotrecord component. -
missingRespawnBlock
private final boolean missingRespawnBlockThe field for themissingRespawnBlockrecord component. -
postDimensionTransition
The field for thepostDimensionTransitionrecord 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 aDimensionTransitionrecord class.- Parameters:
newLevel- the value for thenewLevelrecord componentpos- the value for theposrecord componentspeed- the value for thespeedrecord componentyRot- the value for theyRotrecord componentxRot- the value for thexRotrecord componentmissingRespawnBlock- the value for themissingRespawnBlockrecord componentpostDimensionTransition- the value for thepostDimensionTransitionrecord 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 thenewLevelrecord component.- Returns:
- the value of the
newLevelrecord component
-
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
speed
Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
yRot
public float yRot()Returns the value of theyRotrecord component.- Returns:
- the value of the
yRotrecord component
-
xRot
public float xRot()Returns the value of thexRotrecord component.- Returns:
- the value of the
xRotrecord component
-
missingRespawnBlock
public boolean missingRespawnBlock()Returns the value of themissingRespawnBlockrecord component.- Returns:
- the value of the
missingRespawnBlockrecord component
-
postDimensionTransition
Returns the value of thepostDimensionTransitionrecord component.- Returns:
- the value of the
postDimensionTransitionrecord component
-