mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 12:51:09 -05:00
Update to Minecraft 1.13.2
This commit is contained in:
parent
10ec617e5a
commit
8b759faf44
3 changed files with 10 additions and 11 deletions
2
pom.xml
2
pom.xml
|
@ -5,7 +5,7 @@
|
|||
|
||||
<groupId>com.github.steveice10</groupId>
|
||||
<artifactId>mcprotocollib</artifactId>
|
||||
<version>1.13.1-1-SNAPSHOT</version>
|
||||
<version>1.13.2-1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>MCProtocolLib</name>
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.github.steveice10.mc.protocol;
|
|||
|
||||
public class MinecraftConstants {
|
||||
// General Constants
|
||||
public static final String GAME_VERSION = "1.13.1";
|
||||
public static final int PROTOCOL_VERSION = 401;
|
||||
public static final String GAME_VERSION = "1.13.2";
|
||||
public static final int PROTOCOL_VERSION = 404;
|
||||
|
||||
// General Key Constants
|
||||
public static final String PROFILE_KEY = "profile";
|
||||
|
|
|
@ -69,19 +69,18 @@ public class NetUtil {
|
|||
}
|
||||
|
||||
public static ItemStack readItem(NetInput in) throws IOException {
|
||||
short item = in.readShort();
|
||||
if(item < 0) {
|
||||
boolean present = in.readBoolean();
|
||||
if (!present) {
|
||||
return null;
|
||||
} else {
|
||||
return new ItemStack(item, in.readByte(), readNBT(in));
|
||||
}
|
||||
int item = in.readVarInt();
|
||||
return new ItemStack(item, in.readByte(), readNBT(in));
|
||||
}
|
||||
|
||||
public static void writeItem(NetOutput out, ItemStack item) throws IOException {
|
||||
if(item == null) {
|
||||
out.writeShort(-1);
|
||||
} else {
|
||||
out.writeShort(item.getId());
|
||||
out.writeBoolean(item != null);
|
||||
if (item != null) {
|
||||
out.writeVarInt(item.getId());
|
||||
out.writeByte(item.getAmount());
|
||||
writeNBT(out, item.getNBT());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue