Package net.minecraft.client.input
Record Class CharacterEvent
java.lang.Object
java.lang.Record
net.minecraft.client.input.CharacterEvent
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCharacterEvent(int codepoint, int modifiers) Creates an instance of aCharacterEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecodepointrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanintReturns the value of themodifiersrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
codepoint
private final int codepointThe field for thecodepointrecord component. -
modifiers
private final int modifiersThe field for themodifiersrecord component.
-
-
Constructor Details
-
CharacterEvent
public CharacterEvent(int codepoint, int modifiers) Creates an instance of aCharacterEventrecord class.- Parameters:
codepoint- the value for thecodepointrecord componentmodifiers- the value for themodifiersrecord component
-
-
Method Details
-
codepointAsString
-
isAllowedChatCharacter
public boolean isAllowedChatCharacter() -
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. All components in this record class are compared with '=='. -
codepoint
public int codepoint()Returns the value of thecodepointrecord component.- Returns:
- the value of the
codepointrecord component
-
modifiers
public int modifiers()Returns the value of themodifiersrecord component.- Returns:
- the value of the
modifiersrecord component
-