Record Class SetPlayerInventoryS2CPacket
java.lang.Object
java.lang.Record
net.minecraft.network.packet.s2c.play.SetPlayerInventoryS2CPacket
- Record Components:
slot-contents-
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public record SetPlayerInventoryS2CPacket(int slot, ItemStack contents)
extends Record
implements Packet<ClientPlayPacketListener>
- Mappings:
Namespace Name named net/minecraft/network/packet/s2c/play/SetPlayerInventoryS2CPacketintermediary net/minecraft/class_9835official afenamed slotintermediary comp_2891official bnamed contentsintermediary comp_2892official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PacketCodec<RegistryByteBuf, SetPlayerInventoryS2CPacket> private final ItemStackThe field for thecontentsrecord component.private final intThe field for theslotrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(ClientPlayPacketListener clientPlayPacketListener) contents()Returns the value of thecontentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intslot()Returns the value of theslotrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.packet.Packet
isWritingErrorSkippable, transitionsNetworkState
-
Field Details
-
slot
private final int slotThe field for theslotrecord component. -
contents
The field for thecontentsrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/network/packet/s2c/play/SetPlayerInventoryS2CPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_52327Lnet/minecraft/class_9835;field_52327:Lnet/minecraft/class_9139;official aLafe;a:Lyn;
-
-
Constructor Details
-
SetPlayerInventoryS2CPacket
-
-
Method Details
-
getPacketType
- Specified by:
getPacketTypein interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector named getPacketTypeLnet/minecraft/network/packet/Packet;getPacketType()Lnet/minecraft/network/packet/PacketType;intermediary method_65080Lnet/minecraft/class_2596;method_65080()Lnet/minecraft/class_9145;official aLyw;a()Lyy;
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector named applyLnet/minecraft/network/packet/s2c/play/SetPlayerInventoryS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)Vintermediary method_61217Lnet/minecraft/class_9835;method_61217(Lnet/minecraft/class_2602;)Vofficial aLafe;a(Labl;)V
-
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 '=='. -
slot
public int slot()Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-
contents
Returns the value of thecontentsrecord component.- Returns:
- the value of the
contentsrecord component
-