Record Class ClientboundGameRuleValuesPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundGameRuleValuesPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundGameRuleValuesPacket(Map<ResourceKey<GameRule<?>>, String> values)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StreamCodec<FriendlyByteBuf, ClientboundGameRuleValuesPacket> private final Map<ResourceKey<GameRule<?>>, String> The field for thevaluesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundGameRuleValuesPacket(Map<ResourceKey<GameRule<?>>, String> values) Creates an instance of aClientboundGameRuleValuesPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener listener) Passes this Packet on to the PacketListener for processing.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Map<ResourceKey<GameRule<?>>, String> values()Returns the value of thevaluesrecord component.Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
values
The field for thevaluesrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundGameRuleValuesPacket
Creates an instance of aClientboundGameRuleValuesPacketrecord class.- Parameters:
values- the value for thevaluesrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Description copied from interface:PacketPasses this Packet on to the PacketListener for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
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). -
values
Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-