Add support for 1.16.4

This commit is contained in:
DoctorMacc 2020-10-15 20:34:39 -04:00 committed by Steveice10
parent 9182eca85b
commit 37af0d3a39
3 changed files with 7 additions and 8 deletions

View file

@ -5,7 +5,7 @@
<groupId>com.github.steveice10</groupId>
<artifactId>mcprotocollib</artifactId>
<version>1.16.3-1</version>
<version>1.16.4-pre1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MCProtocolLib</name>

View file

@ -12,12 +12,13 @@ public final class MinecraftConstants {
/**
* Current supported game version.
*/
public static final String GAME_VERSION = "1.16.3";
public static final String GAME_VERSION = "1.16.4-pre1";
/**
* Current supported protocol version.
*/
public static final int PROTOCOL_VERSION = 753;
//public static final int PROTOCOL_VERSION = 754;
public static final int PROTOCOL_VERSION = (1 << 30) | 1;
// General Key Constants

View file

@ -1,8 +1,6 @@
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;
@ -22,20 +20,20 @@ import java.io.IOException;
public class ClientEditBookPacket implements Packet {
private @NonNull ItemStack book;
private boolean signing;
private @NonNull Hand hand;
private int slot;
@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());
this.slot = 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));
out.writeVarInt(slot);
}
@Override