Skip to content

Commit

Permalink
Update to 1.14.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Johni0702 committed Jun 24, 2019
1 parent 520589e commit 0dc580e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.github.steveice10</groupId>
<artifactId>mcprotocollib</artifactId>
<version>1.14.2-SNAPSHOT</version>
<version>1.14.3-SNAPSHOT</version>
<packaging>jar</packaging>

<name>MCProtocolLib</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

public class MinecraftConstants {
// General Constants
public static final String GAME_VERSION = "1.14.2";
public static final int PROTOCOL_VERSION = 485;
public static final String GAME_VERSION = "1.14.3";
public static final int PROTOCOL_VERSION = 490;

// General Key Constants
public static final String PROFILE_KEY = "profile";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ public class ServerTradeListPacket extends MinecraftPacket {
private int villagerLevel;
private int experience;
private boolean isRegularVillager;
private boolean canRestock;

public ServerTradeListPacket() {
}

public ServerTradeListPacket(int windowId, VillagerTrade[] trades, int villagerLevel, int experience, boolean isRegularVillager) {
public ServerTradeListPacket(int windowId, VillagerTrade[] trades, int villagerLevel, int experience, boolean isRegularVillager, boolean canRestock) {
this.windowId = windowId;
this.trades = trades;
this.villagerLevel = villagerLevel;
this.experience = experience;
this.isRegularVillager = isRegularVillager;
this.canRestock = canRestock;
}

public int getWindowId() {
Expand All @@ -48,6 +50,10 @@ public boolean isRegularVillager() {
return isRegularVillager;
}

public boolean canRestock() {
return canRestock;
}

@Override
public void read(NetInput in) throws IOException {
this.windowId = in.readVarInt();
Expand Down Expand Up @@ -76,6 +82,7 @@ public void read(NetInput in) throws IOException {
this.villagerLevel = in.readVarInt();
this.experience = in.readVarInt();
this.isRegularVillager = in.readBoolean();
this.canRestock = in.readBoolean();
}

@Override
Expand Down Expand Up @@ -106,5 +113,6 @@ public void write(NetOutput out) throws IOException {
out.writeVarInt(this.villagerLevel);
out.writeVarInt(this.experience);
out.writeBoolean(this.isRegularVillager);
out.writeBoolean(this.canRestock);
}
}

0 comments on commit 0dc580e

Please sign in to comment.