Class InventoryS2CPacket

java.lang.Object
net.minecraft.network.packet.s2c.play.InventoryS2CPacket
All Implemented Interfaces:
Packet<ClientPlayPacketListener>

public class InventoryS2CPacket
extends Object
implements Packet<ClientPlayPacketListener>
Represents the contents of a block or entity inventory being synchronized from the server to the client.
Mappings:
Namespace Name
official py
intermediary net/minecraft/class_2649
named net/minecraft/network/packet/s2c/play/InventoryS2CPacket
  • Field Details

    • syncId

      private int syncId
      The ScreenHandler.syncId of a screen handler.
      Mappings:
      Namespace Name Mixin selector
      official a Lpy;a:I
      intermediary field_12146 Lnet/minecraft/class_2649;field_12146:I
      named syncId Lnet/minecraft/network/packet/s2c/play/InventoryS2CPacket;syncId:I
    • contents

      private List<ItemStack> contents
      Mappings:
      Namespace Name Mixin selector
      official b Lpy;b:Ljava/util/List;
      intermediary field_12147 Lnet/minecraft/class_2649;field_12147:Ljava/util/List;
      named contents Lnet/minecraft/network/packet/s2c/play/InventoryS2CPacket;contents:Ljava/util/List;
  • Constructor Details

    • InventoryS2CPacket

      public InventoryS2CPacket()
    • InventoryS2CPacket

      public InventoryS2CPacket​(int syncId, DefaultedList<ItemStack> contents)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lpy;<init>(ILgj;)V
      intermediary <init> Lnet/minecraft/class_2649;<init>(ILnet/minecraft/class_2371;)V
      named <init> Lnet/minecraft/network/packet/s2c/play/InventoryS2CPacket;<init>(ILnet/minecraft/util/collection/DefaultedList;)V
  • Method Details

    • read

      public void read​(PacketByteBuf buf) throws IOException
      Specified by:
      read in interface Packet<ClientPlayPacketListener>
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lpa;a(Lnw;)V
      intermediary method_11053 Lnet/minecraft/class_2596;method_11053(Lnet/minecraft/class_2540;)V
      named read Lnet/minecraft/network/Packet;read(Lnet/minecraft/network/PacketByteBuf;)V
    • write

      public void write​(PacketByteBuf buf) throws IOException
      Specified by:
      write in interface Packet<ClientPlayPacketListener>
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official b Lpa;b(Lnw;)V
      intermediary method_11052 Lnet/minecraft/class_2596;method_11052(Lnet/minecraft/class_2540;)V
      named write Lnet/minecraft/network/Packet;write(Lnet/minecraft/network/PacketByteBuf;)V
    • apply

      public void apply​(ClientPlayPacketListener clientPlayPacketListener)
      Specified by:
      apply in interface Packet<ClientPlayPacketListener>
      Mappings:
      Namespace Name Mixin selector
      official a Lpy;a(Lpd;)V
      intermediary method_11439 Lnet/minecraft/class_2649;method_11439(Lnet/minecraft/class_2602;)V
      named apply Lnet/minecraft/network/packet/s2c/play/InventoryS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)V
    • getSyncId

      @Environment(CLIENT) public int getSyncId()
      Mappings:
      Namespace Name Mixin selector
      official b Lpy;b()I
      intermediary method_11440 Lnet/minecraft/class_2649;method_11440()I
      named getSyncId Lnet/minecraft/network/packet/s2c/play/InventoryS2CPacket;getSyncId()I
    • getContents

      @Environment(CLIENT) public List<ItemStack> getContents()
      Mappings:
      Namespace Name Mixin selector
      official c Lpy;c()Ljava/util/List;
      intermediary method_11441 Lnet/minecraft/class_2649;method_11441()Ljava/util/List;
      named getContents Lnet/minecraft/network/packet/s2c/play/InventoryS2CPacket;getContents()Ljava/util/List;