Package com.mojang.realmsclient.dto
Record Class RealmsSlotUpdateDto
java.lang.Object
java.lang.Record
com.mojang.realmsclient.dto.RealmsSlotUpdateDto
- All Implemented Interfaces:
ReflectionBasedSerialization
public record RealmsSlotUpdateDto(int slotId, int spawnProtection, boolean forceGameMode, int difficulty, int gameMode, String slotName, String version, RealmsServer.Compatibility compatibility, long templateId, @Nullable String templateImage, boolean hardcore)
extends Record
implements ReflectionBasedSerialization
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RealmsServer.CompatibilityThe field for thecompatibilityrecord component.private final intThe field for thedifficultyrecord component.private final booleanThe field for theforceGameModerecord component.private final intThe field for thegameModerecord component.private final booleanThe field for thehardcorerecord component.private final intThe field for theslotIdrecord component.private final StringThe field for theslotNamerecord component.private final intThe field for thespawnProtectionrecord component.private final longThe field for thetemplateIdrecord component.private final @Nullable StringThe field for thetemplateImagerecord component.private final StringThe field for theversionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRealmsSlotUpdateDto(int slotId, int spawnProtection, boolean forceGameMode, int difficulty, int gameMode, String slotName, String version, RealmsServer.Compatibility compatibility, long templateId, @Nullable String templateImage, boolean hardcore) Creates an instance of aRealmsSlotUpdateDtorecord class.RealmsSlotUpdateDto(int p_419486_, RealmsWorldOptions p_419985_, boolean p_419522_) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompatibilityrecord component.intReturns the value of thedifficultyrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theforceGameModerecord component.intgameMode()Returns the value of thegameModerecord component.booleanhardcore()Returns the value of thehardcorerecord component.final inthashCode()Returns a hash code value for this object.intslotId()Returns the value of theslotIdrecord component.slotName()Returns the value of theslotNamerecord component.intReturns the value of thespawnProtectionrecord component.longReturns the value of thetemplateIdrecord component.@Nullable StringReturns the value of thetemplateImagerecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Field Details
-
slotId
The field for theslotIdrecord component. -
spawnProtection
The field for thespawnProtectionrecord component. -
forceGameMode
The field for theforceGameModerecord component. -
difficulty
The field for thedifficultyrecord component. -
gameMode
The field for thegameModerecord component. -
slotName
The field for theslotNamerecord component. -
version
The field for theversionrecord component. -
compatibility
The field for thecompatibilityrecord component. -
templateId
The field for thetemplateIdrecord component. -
templateImage
The field for thetemplateImagerecord component. -
hardcore
The field for thehardcorerecord component.
-
-
Constructor Details
-
RealmsSlotUpdateDto
-
RealmsSlotUpdateDto
public RealmsSlotUpdateDto(int slotId, int spawnProtection, boolean forceGameMode, int difficulty, int gameMode, String slotName, String version, RealmsServer.Compatibility compatibility, long templateId, @Nullable String templateImage, boolean hardcore) Creates an instance of aRealmsSlotUpdateDtorecord class.- Parameters:
slotId- the value for theslotIdrecord componentspawnProtection- the value for thespawnProtectionrecord componentforceGameMode- the value for theforceGameModerecord componentdifficulty- the value for thedifficultyrecord componentgameMode- the value for thegameModerecord componentslotName- the value for theslotNamerecord componentversion- the value for theversionrecord componentcompatibility- the value for thecompatibilityrecord componenttemplateId- the value for thetemplateIdrecord componenttemplateImage- the value for thetemplateImagerecord componenthardcore- the value for thehardcorerecord component
-
-
Method Details
-
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 '=='. -
slotId
Returns the value of theslotIdrecord component.- Returns:
- the value of the
slotIdrecord component
-
spawnProtection
Returns the value of thespawnProtectionrecord component.- Returns:
- the value of the
spawnProtectionrecord component
-
forceGameMode
Returns the value of theforceGameModerecord component.- Returns:
- the value of the
forceGameModerecord component
-
difficulty
Returns the value of thedifficultyrecord component.- Returns:
- the value of the
difficultyrecord component
-
gameMode
Returns the value of thegameModerecord component.- Returns:
- the value of the
gameModerecord component
-
slotName
Returns the value of theslotNamerecord component.- Returns:
- the value of the
slotNamerecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
compatibility
Returns the value of thecompatibilityrecord component.- Returns:
- the value of the
compatibilityrecord component
-
templateId
Returns the value of thetemplateIdrecord component.- Returns:
- the value of the
templateIdrecord component
-
templateImage
Returns the value of thetemplateImagerecord component.- Returns:
- the value of the
templateImagerecord component
-
hardcore
Returns the value of thehardcorerecord component.- Returns:
- the value of the
hardcorerecord component
-