Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 1.20.80 #2176

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public void encode() {
this.putUUID(shaped.getId());
this.putString(CRAFTING_TAG_CRAFTING_TABLE);
this.putVarInt(shaped.getPriority());
this.putBoolean(true); // Assume symmetry
this.putUnsignedVarInt(recipeNetworkId++);
break;
case FURNACE:
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/cn/nukkit/network/protocol/ProtocolInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public interface ProtocolInfo {
* Actual Minecraft: PE protocol version
*/
@SuppressWarnings("UnnecessaryBoxing")
int CURRENT_PROTOCOL = Integer.valueOf("662"); // DO NOT REMOVE BOXING
int CURRENT_PROTOCOL = Integer.valueOf("671"); // DO NOT REMOVE BOXING

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

String MINECRAFT_VERSION_NETWORK = "1.20.70";
String MINECRAFT_VERSION_NETWORK = "1.20.80";
String MINECRAFT_VERSION = 'v' + MINECRAFT_VERSION_NETWORK;

byte BATCH_PACKET = (byte) 0xff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public void encode() {
this.putString(this.gameVersion);
this.putLInt(0); // Experiments length
this.putBoolean(false); // Were experiments previously toggled
this.putBoolean(false); // Has editor packs
}

@Override
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/cn/nukkit/network/protocol/StartGamePacket.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public byte pid() {
public byte chatRestrictionLevel;
public boolean disablePlayerInteractions;
public boolean emoteChatMuted;
public boolean hardcore;

@Override
public void decode() {
Expand All @@ -110,6 +111,7 @@ public void encode() {
this.putVarInt(this.dimension);
this.putVarInt(this.generator);
this.putVarInt(this.worldGamemode);
this.putBoolean(this.hardcore);
this.putVarInt(this.difficulty);
this.putBlockVector3(this.spawnX, this.spawnY, this.spawnZ);
this.putBoolean(this.hasAchievementsDisabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class UpdatePlayerGameTypePacket extends DataPacket {

public GameType gameType;
public long entityId;
public int tick;

@Override
public byte pid() {
Expand All @@ -24,7 +25,8 @@ public void decode() {
public void encode() {
this.reset();
this.putVarInt(this.gameType.ordinal());
this.putVarLong(entityId);
this.putVarLong(this.entityId);
this.putUnsignedVarInt(this.tick);
}

public enum GameType {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/creative_items.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/item_mappings.json

Large diffs are not rendered by default.

Binary file modified src/main/resources/runtime_block_states.dat
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/resources/runtime_item_states.json

Large diffs are not rendered by default.

Loading