Skip to content

Commit

Permalink
Add 1.20.0 support (#2118)
Browse files Browse the repository at this point in the history
* Initial 1.20.0 support

* Fix creative inventory RIDs
  • Loading branch information
Kazzuk authored Jun 9, 2023
1 parent fc076e8 commit 859aa11
Show file tree
Hide file tree
Showing 16 changed files with 12,001 additions and 10,594 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions src/main/java/cn/nukkit/blockentity/BlockEntityJukebox.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public void play() {
case Item.RECORD_OTHERSIDE:
this.getLevel().addLevelSoundEvent(this, LevelSoundEventPacket.SOUND_RECORD_OTHERSIDE);
break;
case Item.RECORD_5:
this.getLevel().addLevelSoundEvent(this, LevelSoundEventPacket.SOUND_RECORD_5);
break;
case Item.RECORD_RELIC:
this.getLevel().addLevelSoundEvent(this, LevelSoundEventPacket.SOUND_RECORD_RELIC);
break;
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/cn/nukkit/item/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ public static void init() {
list[RECORD_STRAD] = ItemRecordStrad.class; //508
list[RECORD_WAIT] = ItemRecordWait.class; //511
list[SHIELD] = ItemShield.class; //513
list[RECORD_5] = ItemRecord5.class; //643
list[RECORD_RELIC] = ItemRecordRelic.class; //701
list[SUSPICIOUS_STEW] = ItemSuspiciousStew.class; //734
list[HONEYCOMB] = ItemHoneycomb.class; //736
list[HONEY_BOTTLE] = ItemHoneyBottle.class; //737
Expand Down
18 changes: 2 additions & 16 deletions src/main/java/cn/nukkit/item/ItemID.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public interface ItemID {
int SIGN = 323;
int WOODEN_DOOR = 324;
int BUCKET = 325;

int MINECART = 328;
int SADDLE = 329;
int IRON_DOOR = 330;
Expand All @@ -99,7 +98,6 @@ public interface ItemID {
int SLIMEBALL = 341;
int CHEST_MINECART = 342;
int MINECART_WITH_CHEST = 342;

int EGG = 344;
int COMPASS = 345;
int FISHING_ROD = 346;
Expand Down Expand Up @@ -203,21 +201,16 @@ public interface ItemID {
int CHORUS_FRUIT = 432;
int POPPED_CHORUS_FRUIT = 433;
int BANNER_PATTERN = 434;

int DRAGON_BREATH = 437;
int SPLASH_POTION = 438;

int LINGERING_POTION = 441;

int COMMAND_BLOCK_MINECART = 443;
int ELYTRA = 444;
int SHULKER_SHELL = 445;
int BANNER = 446;
int TOTEM = 450;
int IRON_NUGGET = 452;

int TRIDENT = 455;

int BEETROOT = 457;
int BEETROOT_SEEDS = 458;
int BEETROOT_SEED = 458;
Expand All @@ -234,9 +227,7 @@ public interface ItemID {
int TURTLE_SHELL = 469;
int PHANTOM_MEMBRANE = 470;
int CROSSBOW = 471;

int SWEET_BERRIES = 477;

int RECORD_13 = 500;
int RECORD_CAT = 501;
int RECORD_BLOCKS = 502;
Expand All @@ -249,14 +240,12 @@ public interface ItemID {
int RECORD_WARD = 509;
int RECORD_11 = 510;
int RECORD_WAIT = 511;

int SHIELD = 513;

int RECORD_5 = 643;
int RECORD_RELIC = 701;
int SUSPICIOUS_STEW = 734;

int HONEYCOMB = 736;
int HONEY_BOTTLE = 737;

int LODESTONECOMPASS = 741;
int NETHERITE_INGOT = 742;
int NETHERITE_SWORD = 743;
Expand All @@ -269,11 +258,8 @@ public interface ItemID {
int NETHERITE_LEGGINGS = 750;
int NETHERITE_BOOTS = 751;
int NETHERITE_SCRAP = 752;

int WARPED_FUNGUS_ON_A_STICK = 757;

int RECORD_PIGSTEP = 759;

int SPYGLASS = 772;
int RECORD_OTHERSIDE = 773;
}
21 changes: 21 additions & 0 deletions src/main/java/cn/nukkit/item/ItemRecord5.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package cn.nukkit.item;

public class ItemRecord5 extends ItemRecord {

public ItemRecord5() {
this(0, 1);
}

public ItemRecord5(Integer meta) {
this(meta, 1);
}

public ItemRecord5(Integer meta, int count) {
super(RECORD_5, meta, count);
}

@Override
public String getSoundId() {
return "record.5";
}
}
21 changes: 21 additions & 0 deletions src/main/java/cn/nukkit/item/ItemRecordRelic.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package cn.nukkit.item;

public class ItemRecordRelic extends ItemRecord {

public ItemRecordRelic() {
this(0, 1);
}

public ItemRecordRelic(Integer meta) {
this(meta, 1);
}

public ItemRecordRelic(Integer meta, int count) {
super(RECORD_RELIC, meta, count);
}

@Override
public String getSoundId() {
return "record.relic";
}
}
Loading

0 comments on commit 859aa11

Please sign in to comment.