Updated Upstream (Bukkit/CraftBukkit) (#8714)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: aef9b6d2 PR-800: Add support for NoteBlock sounds in Skulls CraftBukkit Changes: ae8f5fc02 PR-1125: Add support for NoteBlock sounds in Skulls 0a1c89e4b SPIGOT-7212: Allow negative firework power 909a246af SPIGOT-7211: generateTree() with Consumer or Predicate is broken c810c3ed8 Increase outdated build delay
This commit is contained in:
@@ -30,50 +30,80 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
STICKS(0x3),
|
||||
@@ -0,0 +0,0 @@ public enum Instrument {
|
||||
/**
|
||||
* Pling is normally played when a note block is on top of a glowstone block.
|
||||
* Zombie is normally played when a Zombie Head is on top of the note block.
|
||||
*/
|
||||
- PLING(0xF);
|
||||
+ // Paper start
|
||||
+ PLING(0xF),
|
||||
+ /**
|
||||
+ * Zombie is normally played when a zombie head is on top of a note block.
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
||||
+ ZOMBIE(0x10),
|
||||
+ /**
|
||||
+ * Skeleton is normally played when a skeleton skull is on top of a note block.
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
||||
+ SKELETON(0x11),
|
||||
+ /**
|
||||
+ * Creeper is normally played when a creeper head is on top of a note block.
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
||||
+ CREEPER(0x12),
|
||||
+ /**
|
||||
+ * Dragon is normally played when an Ender Dragon head is on top of a note block.
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
||||
+ DRAGON(0x13),
|
||||
+ /**
|
||||
+ * Wither skeleton is normally played when a wither skeleton skull head is on top of a note block.
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
||||
+ WITHER_SKELETON(0x14),
|
||||
+ /**
|
||||
+ * Piglin is normally played when a piglin head is on top of a note block.
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
||||
+ PIGLIN(0x15),
|
||||
+ /**
|
||||
+ * Custom head is normally played when a player head is on top of a note block.
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
||||
+ CUSTOM_HEAD(0x16);
|
||||
+ // Paper end
|
||||
- ZOMBIE,
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
+ ZOMBIE(0x10), // Paper
|
||||
/**
|
||||
* Skeleton is normally played when a Skeleton Head is on top of the note block.
|
||||
*/
|
||||
- SKELETON,
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
+ SKELETON(0x11), // Paper
|
||||
/**
|
||||
* Creeper is normally played when a Creeper Head is on top of the note block.
|
||||
*/
|
||||
- CREEPER,
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
+ CREEPER(0x12), // Paper
|
||||
/**
|
||||
* Dragon is normally played when a Dragon Head is on top of the note block.
|
||||
*/
|
||||
- DRAGON,
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
+ DRAGON(0x13), // Paper
|
||||
/**
|
||||
* Wither Skeleton is normally played when a Wither Skeleton Head is on top of the note block.
|
||||
*/
|
||||
- WITHER_SKELETON,
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
+ WITHER_SKELETON(0x14), // Paper
|
||||
/**
|
||||
* Piglin is normally played when a Piglin Head is on top of the note block.
|
||||
*/
|
||||
- PIGLIN,
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
+ PIGLIN(0x15), // Paper
|
||||
/**
|
||||
* Custom Sound is normally played when a Player Head with the required data is on top of the note block.
|
||||
*/
|
||||
- CUSTOM_HEAD;
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
+ CUSTOM_HEAD(0x16); // Paper
|
||||
|
||||
private final byte type;
|
||||
private static final Map<Byte, Instrument> BY_DATA = Maps.newHashMap();
|
||||
|
||||
- private Instrument() {
|
||||
- this(-1);
|
||||
- }
|
||||
+ // Paper - remove ctor (the server still uses the byte magic value)
|
||||
|
||||
private Instrument(final int type) {
|
||||
this.type = (byte) type;
|
||||
@@ -0,0 +0,0 @@ public enum Instrument {
|
||||
|
||||
/**
|
||||
* @return The type ID of this instrument.
|
||||
- * @deprecated Magic value
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getType() {
|
||||
return this.type;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public enum Instrument {
|
||||
*
|
||||
* @param type The type ID
|
||||
* @return The instrument
|
||||
- * @deprecated Magic value
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Instrument getByType(final byte type) {
|
||||
return BY_DATA.get(type);
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -89,3 +119,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
*
|
||||
* @param loc The location of a note block
|
||||
* @param instrument The instrument
|
||||
diff --git a/src/test/java/org/bukkit/InstrumentTest.java b/src/test/java/org/bukkit/InstrumentTest.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/test/java/org/bukkit/InstrumentTest.java
|
||||
+++ b/src/test/java/org/bukkit/InstrumentTest.java
|
||||
@@ -0,0 +0,0 @@ public class InstrumentTest {
|
||||
@Test
|
||||
public void getByType() {
|
||||
for (Instrument instrument : Instrument.values()) {
|
||||
- if (instrument.getType() < 0) {
|
||||
- continue;
|
||||
- }
|
||||
+ // Paper - byte magic values are still used
|
||||
|
||||
assertThat(Instrument.getByType(instrument.getType()), is(instrument));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user