mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -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>
|
<groupId>com.github.steveice10</groupId>
|
||||||
<artifactId>mcprotocollib</artifactId>
|
<artifactId>mcprotocollib</artifactId>
|
||||||
<version>1.13.1-1-SNAPSHOT</version>
|
<version>1.13.2-1-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>MCProtocolLib</name>
|
<name>MCProtocolLib</name>
|
||||||
|
|
|
@ -2,8 +2,8 @@ package com.github.steveice10.mc.protocol;
|
||||||
|
|
||||||
public class MinecraftConstants {
|
public class MinecraftConstants {
|
||||||
// General Constants
|
// General Constants
|
||||||
public static final String GAME_VERSION = "1.13.1";
|
public static final String GAME_VERSION = "1.13.2";
|
||||||
public static final int PROTOCOL_VERSION = 401;
|
public static final int PROTOCOL_VERSION = 404;
|
||||||
|
|
||||||
// General Key Constants
|
// General Key Constants
|
||||||
public static final String PROFILE_KEY = "profile";
|
public static final String PROFILE_KEY = "profile";
|
||||||
|
|
|
@ -69,19 +69,18 @@ public class NetUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack readItem(NetInput in) throws IOException {
|
public static ItemStack readItem(NetInput in) throws IOException {
|
||||||
short item = in.readShort();
|
boolean present = in.readBoolean();
|
||||||
if(item < 0) {
|
if (!present) {
|
||||||
return null;
|
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 {
|
public static void writeItem(NetOutput out, ItemStack item) throws IOException {
|
||||||
if(item == null) {
|
out.writeBoolean(item != null);
|
||||||
out.writeShort(-1);
|
if (item != null) {
|
||||||
} else {
|
out.writeVarInt(item.getId());
|
||||||
out.writeShort(item.getId());
|
|
||||||
out.writeByte(item.getAmount());
|
out.writeByte(item.getAmount());
|
||||||
writeNBT(out, item.getNBT());
|
writeNBT(out, item.getNBT());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue