Skip to content

Commit 86683f2

Browse files
authored
Add 1.20.80 support (#2176)
1 parent 14e4a77 commit 86683f2

File tree

9 files changed

+12
-6
lines changed

9 files changed

+12
-6
lines changed

src/main/java/cn/nukkit/network/protocol/CraftingDataPacket.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ public void encode() {
110110
this.putUUID(shaped.getId());
111111
this.putString(CRAFTING_TAG_CRAFTING_TABLE);
112112
this.putVarInt(shaped.getPriority());
113+
this.putBoolean(true); // Assume symmetry
113114
this.putUnsignedVarInt(recipeNetworkId++);
114115
break;
115116
case FURNACE:

src/main/java/cn/nukkit/network/protocol/ProtocolInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ public interface ProtocolInfo {
1414
* Actual Minecraft: PE protocol version
1515
*/
1616
@SuppressWarnings("UnnecessaryBoxing")
17-
int CURRENT_PROTOCOL = Integer.valueOf("662"); // DO NOT REMOVE BOXING
17+
int CURRENT_PROTOCOL = Integer.valueOf("671"); // DO NOT REMOVE BOXING
1818

1919
List<Integer> SUPPORTED_PROTOCOLS = Ints.asList(CURRENT_PROTOCOL);
2020

21-
String MINECRAFT_VERSION_NETWORK = "1.20.70";
21+
String MINECRAFT_VERSION_NETWORK = "1.20.80";
2222
String MINECRAFT_VERSION = 'v' + MINECRAFT_VERSION_NETWORK;
2323

2424
byte BATCH_PACKET = (byte) 0xff;

src/main/java/cn/nukkit/network/protocol/ResourcePackStackPacket.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public void encode() {
4141
this.putString(this.gameVersion);
4242
this.putLInt(0); // Experiments length
4343
this.putBoolean(false); // Were experiments previously toggled
44+
this.putBoolean(false); // Has editor packs
4445
}
4546

4647
@Override

src/main/java/cn/nukkit/network/protocol/StartGamePacket.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public byte pid() {
8888
public byte chatRestrictionLevel;
8989
public boolean disablePlayerInteractions;
9090
public boolean emoteChatMuted;
91+
public boolean hardcore;
9192

9293
@Override
9394
public void decode() {
@@ -110,6 +111,7 @@ public void encode() {
110111
this.putVarInt(this.dimension);
111112
this.putVarInt(this.generator);
112113
this.putVarInt(this.worldGamemode);
114+
this.putBoolean(this.hardcore);
113115
this.putVarInt(this.difficulty);
114116
this.putBlockVector3(this.spawnX, this.spawnY, this.spawnZ);
115117
this.putBoolean(this.hasAchievementsDisabled);

src/main/java/cn/nukkit/network/protocol/UpdatePlayerGameTypePacket.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public class UpdatePlayerGameTypePacket extends DataPacket {
88

99
public GameType gameType;
1010
public long entityId;
11+
public int tick;
1112

1213
@Override
1314
public byte pid() {
@@ -24,7 +25,8 @@ public void decode() {
2425
public void encode() {
2526
this.reset();
2627
this.putVarInt(this.gameType.ordinal());
27-
this.putVarLong(entityId);
28+
this.putVarLong(this.entityId);
29+
this.putUnsignedVarInt(this.tick);
2830
}
2931

3032
public enum GameType {

src/main/resources/creative_items.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/main/resources/item_mappings.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-88 Bytes
Binary file not shown.

src/main/resources/runtime_item_states.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)