Record Class ServerboundSetGameRulePacket.Entry
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ServerboundSetGameRulePacket.Entry
- Enclosing class:
ServerboundSetGameRulePacket
public static record ServerboundSetGameRulePacket.Entry(ResourceKey<GameRule<?>> gameRuleKey, String value)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceKey<GameRule<?>> The field for thegameRuleKeyrecord component.static final StreamCodec<io.netty.buffer.ByteBuf, ServerboundSetGameRulePacket.Entry> private final StringThe field for thevaluerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntry(ResourceKey<GameRule<?>> gameRuleKey, String value) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.ResourceKey<GameRule<?>> Returns the value of thegameRuleKeyrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
gameRuleKey
The field for thegameRuleKeyrecord component. -
value
The field for thevaluerecord component. -
STREAM_CODEC
public static final StreamCodec<io.netty.buffer.ByteBuf, ServerboundSetGameRulePacket.Entry> STREAM_CODEC
-
-
Constructor Details
-
Entry
Creates an instance of aEntryrecord class.- Parameters:
gameRuleKey- the value for thegameRuleKeyrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
toString
-
hashCode
-
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 withObjects::equals(Object,Object). -
gameRuleKey
Returns the value of thegameRuleKeyrecord component.- Returns:
- the value of the
gameRuleKeyrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-