Package net.minecraft.server.level
Record Class ClientInformation
java.lang.Object
java.lang.Record
net.minecraft.server.level.ClientInformation
public record ClientInformation(String language, int viewDistance, ChatVisiblity chatVisibility, boolean chatColors, int modelCustomisation, HumanoidArm mainHand, boolean textFilteringEnabled, boolean allowsListing)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
The field for theallowsListing
record component.private final boolean
The field for thechatColors
record component.private final ChatVisiblity
The field for thechatVisibility
record component.private final String
The field for thelanguage
record component.private final HumanoidArm
The field for themainHand
record component.static final int
private final int
The field for themodelCustomisation
record component.private final boolean
The field for thetextFilteringEnabled
record component.private final int
The field for theviewDistance
record component. -
Constructor Summary
ConstructorDescriptionClientInformation
(String language, int viewDistance, ChatVisiblity chatVisibility, boolean chatColors, int modelCustomisation, HumanoidArm mainHand, boolean textFilteringEnabled, boolean allowsListing) Creates an instance of aClientInformation
record class.ClientInformation
(FriendlyByteBuf p_300049_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of theallowsListing
record component.boolean
Returns the value of thechatColors
record component.Returns the value of thechatVisibility
record component.static ClientInformation
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.language()
Returns the value of thelanguage
record component.mainHand()
Returns the value of themainHand
record component.int
Returns the value of themodelCustomisation
record component.boolean
Returns the value of thetextFilteringEnabled
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of theviewDistance
record component.void
write
(FriendlyByteBuf p_297289_)
-
Field Details
-
language
The field for thelanguage
record component. -
viewDistance
private final int viewDistanceThe field for theviewDistance
record component. -
chatVisibility
The field for thechatVisibility
record component. -
chatColors
private final boolean chatColorsThe field for thechatColors
record component. -
modelCustomisation
private final int modelCustomisationThe field for themodelCustomisation
record component. -
mainHand
The field for themainHand
record component. -
textFilteringEnabled
private final boolean textFilteringEnabledThe field for thetextFilteringEnabled
record component. -
allowsListing
private final boolean allowsListingThe field for theallowsListing
record component. -
MAX_LANGUAGE_LENGTH
public static final int MAX_LANGUAGE_LENGTH- See Also:
-
-
Constructor Details
-
ClientInformation
-
ClientInformation
public ClientInformation(String language, int viewDistance, ChatVisiblity chatVisibility, boolean chatColors, int modelCustomisation, HumanoidArm mainHand, boolean textFilteringEnabled, boolean allowsListing) Creates an instance of aClientInformation
record class.- Parameters:
language
- the value for thelanguage
record componentviewDistance
- the value for theviewDistance
record componentchatVisibility
- the value for thechatVisibility
record componentchatColors
- the value for thechatColors
record componentmodelCustomisation
- the value for themodelCustomisation
record componentmainHand
- the value for themainHand
record componenttextFilteringEnabled
- the value for thetextFilteringEnabled
record componentallowsListing
- the value for theallowsListing
record component
-
-
Method Details
-
write
-
createDefault
-
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 '=='. -
language
Returns the value of thelanguage
record component.- Returns:
- the value of the
language
record component
-
viewDistance
public int viewDistance()Returns the value of theviewDistance
record component.- Returns:
- the value of the
viewDistance
record component
-
chatVisibility
Returns the value of thechatVisibility
record component.- Returns:
- the value of the
chatVisibility
record component
-
chatColors
public boolean chatColors()Returns the value of thechatColors
record component.- Returns:
- the value of the
chatColors
record component
-
modelCustomisation
public int modelCustomisation()Returns the value of themodelCustomisation
record component.- Returns:
- the value of the
modelCustomisation
record component
-
mainHand
Returns the value of themainHand
record component.- Returns:
- the value of the
mainHand
record component
-
textFilteringEnabled
public boolean textFilteringEnabled()Returns the value of thetextFilteringEnabled
record component.- Returns:
- the value of the
textFilteringEnabled
record component
-
allowsListing
public boolean allowsListing()Returns the value of theallowsListing
record component.- Returns:
- the value of the
allowsListing
record component
-