Skip to content

Commit

Permalink
Support for 1.20.40 (#2156)
Browse files Browse the repository at this point in the history
  • Loading branch information
PetteriM1 authored Oct 24, 2023
1 parent e4fde13 commit 3328245
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/main/java/cn/nukkit/blockentity/BlockEntityJukebox.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ public void saveNBT() {

@Override
public CompoundTag getSpawnCompound() {
return getDefaultCompound(this, JUKEBOX)
.putCompound("RecordItem", NBTIO.putItemHelper(this.recordItem));
return getDefaultCompound(this, JUKEBOX);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ public byte pid() {

@Override
public void decode() {
this.getVarInt(); // Disconnect fail reason
this.hideDisconnectionScreen = this.getBoolean();
this.message = this.getString();
}

@Override
public void encode() {
this.reset();
this.putVarInt(0); // Disconnect fail reason UNKNOWN
this.putBoolean(this.hideDisconnectionScreen);
if (!this.hideDisconnectionScreen) {
this.putString(this.message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ public class LevelSoundEventPacket extends DataPacket {
public static final int SOUND_HOGLIN_CONVERT_TO_ZOMBIE = 474;
public static final int SOUND_AMBIENT_UNDERWATER_ENTER = 475;
public static final int SOUND_AMBIENT_UNDERWATER_EXIT = 476;
public static final int SOUND_UNDEFINED = 477;
public static final int SOUND_BOTTLE_FILL = 477;
public static final int SOUND_BOTTLE_EMPTY = 478;

public int sound;
public float x;
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("618"); // DO NOT REMOVE BOXING
int CURRENT_PROTOCOL = Integer.valueOf("622"); // DO NOT REMOVE BOXING

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

String MINECRAFT_VERSION_NETWORK = "1.20.30";
String MINECRAFT_VERSION_NETWORK = "1.20.40";
String MINECRAFT_VERSION = 'v' + MINECRAFT_VERSION_NETWORK;

byte BATCH_PACKET = (byte) 0xff;
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.

0 comments on commit 3328245

Please sign in to comment.