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
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionClientInformation(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_302026_) -
Method Summary
Modifier 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_302000_)
-
Field Details
-
language
The field for thelanguagerecord component. -
viewDistance
private final int viewDistanceThe field for theviewDistancerecord component. -
chatVisibility
The field for thechatVisibilityrecord component. -
chatColors
private final boolean chatColorsThe field for thechatColorsrecord component. -
modelCustomisation
private final int modelCustomisationThe field for themodelCustomisationrecord component. -
mainHand
The field for themainHandrecord component. -
textFilteringEnabled
private final boolean textFilteringEnabledThe field for thetextFilteringEnabledrecord component. -
allowsListing
private final boolean allowsListingThe field for theallowsListingrecord 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 aClientInformationrecord class.- Parameters:
language- the value for thelanguagerecord componentviewDistance- the value for theviewDistancerecord componentchatVisibility- the value for thechatVisibilityrecord componentchatColors- the value for thechatColorsrecord componentmodelCustomisation- the value for themodelCustomisationrecord componentmainHand- the value for themainHandrecord componenttextFilteringEnabled- the value for thetextFilteringEnabledrecord componentallowsListing- the value for theallowsListingrecord 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 thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
viewDistance
public int viewDistance()Returns the value of theviewDistancerecord component.- Returns:
- the value of the
viewDistancerecord component
-
chatVisibility
Returns the value of thechatVisibilityrecord component.- Returns:
- the value of the
chatVisibilityrecord component
-
chatColors
public boolean chatColors()Returns the value of thechatColorsrecord component.- Returns:
- the value of the
chatColorsrecord component
-
modelCustomisation
public int modelCustomisation()Returns the value of themodelCustomisationrecord component.- Returns:
- the value of the
modelCustomisationrecord component
-
mainHand
Returns the value of themainHandrecord component.- Returns:
- the value of the
mainHandrecord component
-
textFilteringEnabled
public boolean textFilteringEnabled()Returns the value of thetextFilteringEnabledrecord component.- Returns:
- the value of the
textFilteringEnabledrecord component
-
allowsListing
public boolean allowsListing()Returns the value of theallowsListingrecord component.- Returns:
- the value of the
allowsListingrecord component
-