<commit_before>package com.github.steveice10.mc.protocol.packet.ingame.client.window;

import com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack;
import com.github.steveice10.packetlib.io.NetInput;
import com.github.steveice10.packetlib.io.NetOutput;
import com.github.steveice10.packetlib.packet.Packet;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.Setter;

import java.io.IOException;

@Data
@Setter(AccessLevel.NONE)
@NoArgsConstructor(access = AccessLevel.PRIVATE)
@AllArgsConstructor
public class ClientEditBookPacket implements Packet {
    private @NonNull ItemStack book;
    private boolean signing;

    @Override
    public void read(NetInput in) throws IOException {
        this.book = ItemStack.read(in);
        this.signing = in.readBoolean();
    }

    @Override
    public void write(NetOutput out) throws IOException {
        ItemStack.write(out, this.book);
        out.writeBoolean(this.signing);
    }

    @Override
    public boolean isPriority() {
        return false;
    }
}<commit_msg>add hand to edit book<commit_after>package com.github.steveice10.mc.protocol.packet.ingame.client.window;

import com.github.steveice10.mc.protocol.data.MagicValues;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack;
import com.github.steveice10.mc.protocol.data.game.entity.player.Hand;
import com.github.steveice10.packetlib.io.NetInput;
import com.github.steveice10.packetlib.io.NetOutput;
import com.github.steveice10.packetlib.packet.Packet;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.Setter;

import java.io.IOException;

@Data
@Setter(AccessLevel.NONE)
@NoArgsConstructor(access = AccessLevel.PRIVATE)
@AllArgsConstructor
public class ClientEditBookPacket implements Packet {
    private @NonNull ItemStack book;
    private boolean signing;
    private @NonNull Hand hand;

    @Override
    public void read(NetInput in) throws IOException {
        this.book = ItemStack.read(in);
        this.signing = in.readBoolean();
        this.hand = MagicValues.key(Hand.class, in.readVarInt());
    }

    @Override
    public void write(NetOutput out) throws IOException {
        ItemStack.write(out, this.book);
        out.writeBoolean(this.signing);
        out.writeVarInt(MagicValues.value(Integer.class, hand));
    }

    @Override
    public boolean isPriority() {
        return false;
    }
}
{'fraction_non_alphanumeric': 0.1002710027100271, 'fraction_numerical': 0.009291521486643438, 'mean_word_length': 4.199195171026157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4945804', 'n_tokens_mistral': 814, 'n_tokens_neox': 791, 'n_words': 153}