/* * Decompiled with CFR 0.152. */ package net.minecraft.network.protocol.game; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.codec.StreamCodec; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.PacketType; import net.minecraft.network.protocol.game.ClientGamePacketListener; import net.minecraft.network.protocol.game.GamePacketTypes; public class ClientboundContainerSetDataPacket implements Packet { public static final StreamCodec STREAM_CODEC = Packet.codec(ClientboundContainerSetDataPacket::write, ClientboundContainerSetDataPacket::new); private final int containerId; private final int id; private final int value; public ClientboundContainerSetDataPacket(int containerId, int id, int value) { this.containerId = containerId; this.id = id; this.value = value; } private ClientboundContainerSetDataPacket(FriendlyByteBuf input) { this.containerId = input.readContainerId(); this.id = input.readShort(); this.value = input.readShort(); } private void write(FriendlyByteBuf output) { output.writeContainerId(this.containerId); output.writeShort(this.id); output.writeShort(this.value); } @Override public PacketType type() { return GamePacketTypes.CLIENTBOUND_CONTAINER_SET_DATA; } @Override public void handle(ClientGamePacketListener listener) { listener.handleContainerSetData(this); } public int getContainerId() { return this.containerId; } public int getId() { return this.id; } public int getValue() { return this.value; } }