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 SummaryFieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theallowsListingrecord component.private final booleanThe field for thechatColorsrecord component.private final ChatVisiblityThe field for thechatVisibilityrecord component.private final StringThe field for thelanguagerecord component.private final HumanoidArmThe field for themainHandrecord component.static final intprivate final intThe field for themodelCustomisationrecord component.private final booleanThe field for thetextFilteringEnabledrecord component.private final intThe field for theviewDistancerecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionClientInformation(String language, int viewDistance, ChatVisiblity chatVisibility, boolean chatColors, int modelCustomisation, HumanoidArm mainHand, boolean textFilteringEnabled, boolean allowsListing) Creates an instance of aClientInformationrecord class.ClientInformation(FriendlyByteBuf p_300049_) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns the value of theallowsListingrecord component.booleanReturns the value of thechatColorsrecord component.Returns the value of thechatVisibilityrecord component.static ClientInformationfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.language()Returns the value of thelanguagerecord component.mainHand()Returns the value of themainHandrecord component.intReturns the value of themodelCustomisationrecord component.booleanReturns the value of thetextFilteringEnabledrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theviewDistancerecord component.voidwrite(FriendlyByteBuf p_297289_) 
- 
Field Details- 
languageThe field for thelanguagerecord component.
- 
viewDistanceprivate final int viewDistanceThe field for theviewDistancerecord component.
- 
chatVisibilityThe field for thechatVisibilityrecord component.
- 
chatColorsprivate final boolean chatColorsThe field for thechatColorsrecord component.
- 
modelCustomisationprivate final int modelCustomisationThe field for themodelCustomisationrecord component.
- 
mainHandThe field for themainHandrecord component.
- 
textFilteringEnabledprivate final boolean textFilteringEnabledThe field for thetextFilteringEnabledrecord component.
- 
allowsListingprivate final boolean allowsListingThe field for theallowsListingrecord component.
- 
MAX_LANGUAGE_LENGTHpublic static final int MAX_LANGUAGE_LENGTH- See Also:
 
 
- 
- 
Constructor Details- 
ClientInformation
- 
ClientInformationpublic ClientInformation(String language, int viewDistance, ChatVisiblity chatVisibility, boolean chatColors, int modelCustomisation, HumanoidArm mainHand, boolean textFilteringEnabled, boolean allowsListing) Creates an instance of aClientInformationrecord class.- Parameters:
- language- the value for the- languagerecord component
- viewDistance- the value for the- viewDistancerecord component
- chatVisibility- the value for the- chatVisibilityrecord component
- chatColors- the value for the- chatColorsrecord component
- modelCustomisation- the value for the- modelCustomisationrecord component
- mainHand- the value for the- mainHandrecord component
- textFilteringEnabled- the value for the- textFilteringEnabledrecord component
- allowsListing- the value for the- allowsListingrecord component
 
 
- 
- 
Method Details- 
write
- 
createDefault
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
languageReturns the value of thelanguagerecord component.- Returns:
- the value of the languagerecord component
 
- 
viewDistancepublic int viewDistance()Returns the value of theviewDistancerecord component.- Returns:
- the value of the viewDistancerecord component
 
- 
chatVisibilityReturns the value of thechatVisibilityrecord component.- Returns:
- the value of the chatVisibilityrecord component
 
- 
chatColorspublic boolean chatColors()Returns the value of thechatColorsrecord component.- Returns:
- the value of the chatColorsrecord component
 
- 
modelCustomisationpublic int modelCustomisation()Returns the value of themodelCustomisationrecord component.- Returns:
- the value of the modelCustomisationrecord component
 
- 
mainHandReturns the value of themainHandrecord component.- Returns:
- the value of the mainHandrecord component
 
- 
textFilteringEnabledpublic boolean textFilteringEnabled()Returns the value of thetextFilteringEnabledrecord component.- Returns:
- the value of the textFilteringEnabledrecord component
 
- 
allowsListingpublic boolean allowsListing()Returns the value of theallowsListingrecord component.- Returns:
- the value of the allowsListingrecord component
 
 
-