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:
parent
78a91dfb48
commit
52718dba10
12 changed files with 178 additions and 88 deletions
|
@ -7,10 +7,10 @@ This allows you to create already filled textures on Skulls to avoid texture loo
|
|||
which commonly cause rate limit issues with Mojang API
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java
|
||||
index 83ca284e02f0c2229126d8f40cb33b18f44524d3..d89da5e370d95cfbc4dac776a64e402c5c1f5fc1 100644
|
||||
index 8d4093a413ca14a1c4c24a2a1b74c1d574943ffa..c7502a3913cf14e66559c21489d6f2205f3eb06a 100644
|
||||
--- a/src/main/java/org/bukkit/block/Skull.java
|
||||
+++ b/src/main/java/org/bukkit/block/Skull.java
|
||||
@@ -62,6 +62,20 @@ public interface Skull extends TileState {
|
||||
@@ -63,6 +63,20 @@ public interface Skull extends TileState {
|
||||
*/
|
||||
public void setOwningPlayer(@NotNull OfflinePlayer player);
|
||||
|
||||
|
@ -31,7 +31,7 @@ index 83ca284e02f0c2229126d8f40cb33b18f44524d3..d89da5e370d95cfbc4dac776a64e402c
|
|||
/**
|
||||
* Gets the profile of the player who owns the skull. This player profile
|
||||
* may appear as the texture depending on skull type.
|
||||
@@ -69,6 +83,7 @@ public interface Skull extends TileState {
|
||||
@@ -70,6 +84,7 @@ public interface Skull extends TileState {
|
||||
* @return the profile of the owning player
|
||||
*/
|
||||
@Nullable
|
||||
|
@ -39,7 +39,7 @@ index 83ca284e02f0c2229126d8f40cb33b18f44524d3..d89da5e370d95cfbc4dac776a64e402c
|
|||
PlayerProfile getOwnerProfile();
|
||||
|
||||
/**
|
||||
@@ -83,6 +98,7 @@ public interface Skull extends TileState {
|
||||
@@ -84,6 +99,7 @@ public interface Skull extends TileState {
|
||||
* @throws IllegalArgumentException if the profile does not contain the
|
||||
* necessary information
|
||||
*/
|
||||
|
@ -48,10 +48,10 @@ index 83ca284e02f0c2229126d8f40cb33b18f44524d3..d89da5e370d95cfbc4dac776a64e402c
|
|||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
index dcefd0eea9461441c4209d587896d704389487d0..9ad062968335ee02bff5353d8c63c330d9338cd7 100644
|
||||
index 5a18a66a0b7877ec0c1859f78cce659db4b8541a..862640b4611458dfbcd3be797eacd120fc8d1f9f 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
@@ -37,6 +37,20 @@ public interface SkullMeta extends ItemMeta {
|
||||
@@ -38,6 +38,20 @@ public interface SkullMeta extends ItemMeta {
|
||||
@Deprecated
|
||||
boolean setOwner(@Nullable String owner);
|
||||
|
||||
|
@ -72,7 +72,7 @@ index dcefd0eea9461441c4209d587896d704389487d0..9ad062968335ee02bff5353d8c63c330
|
|||
/**
|
||||
* Gets the owner of the skull.
|
||||
*
|
||||
@@ -63,6 +77,7 @@ public interface SkullMeta extends ItemMeta {
|
||||
@@ -64,6 +78,7 @@ public interface SkullMeta extends ItemMeta {
|
||||
* @return the profile of the owning player
|
||||
*/
|
||||
@Nullable
|
||||
|
@ -80,11 +80,11 @@ index dcefd0eea9461441c4209d587896d704389487d0..9ad062968335ee02bff5353d8c63c330
|
|||
PlayerProfile getOwnerProfile();
|
||||
|
||||
/**
|
||||
@@ -77,6 +92,7 @@ public interface SkullMeta extends ItemMeta {
|
||||
@@ -78,6 +93,7 @@ public interface SkullMeta extends ItemMeta {
|
||||
* @throws IllegalArgumentException if the profile does not contain the
|
||||
* necessary information
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
void setOwnerProfile(@Nullable PlayerProfile profile);
|
||||
|
||||
@Override
|
||||
/**
|
||||
|
|
|
@ -348,6 +348,26 @@ index 9bef6c6597222833f6c36bbfc382849fecad4439..d404ee784f3b99276080ec77d91ba5da
|
|||
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
public interface HangingSign extends Sign {
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java
|
||||
index c7502a3913cf14e66559c21489d6f2205f3eb06a..e4b8b03ceed86548e46774096e84b0c0a39b61a4 100644
|
||||
--- a/src/main/java/org/bukkit/block/Skull.java
|
||||
+++ b/src/main/java/org/bukkit/block/Skull.java
|
||||
@@ -110,6 +110,7 @@ public interface Skull extends TileState {
|
||||
*
|
||||
* @return the key of the sound, or null
|
||||
*/
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
@Nullable
|
||||
public NamespacedKey getNoteBlockSound();
|
||||
|
||||
@@ -121,6 +122,7 @@ public interface Skull extends TileState {
|
||||
*
|
||||
* @param noteBlockSound the key of the sound to be played, or null
|
||||
*/
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
public void setNoteBlockSound(@Nullable NamespacedKey noteBlockSound);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/block/data/type/ChiseledBookshelf.java b/src/main/java/org/bukkit/block/data/type/ChiseledBookshelf.java
|
||||
index a172e22ce47c74554a582e8fce2796238bfb5d65..c21e8afdbe944b74049d959e27d4d389a6980d15 100644
|
||||
--- a/src/main/java/org/bukkit/block/data/type/ChiseledBookshelf.java
|
||||
|
@ -454,3 +474,23 @@ index bc992fdf6d5517995547d136e8cdbe4bd3496abe..751a13c4c00c7167ed3c64c0cd91ac66
|
|||
public interface BundleMeta extends ItemMeta {
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
index 862640b4611458dfbcd3be797eacd120fc8d1f9f..263fd5d4f8288108c4e2d16ca57a29a7e1c1e376 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
@@ -104,6 +104,7 @@ public interface SkullMeta extends ItemMeta {
|
||||
*
|
||||
* @param noteBlockSound the key of the sound to be played, or null
|
||||
*/
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
void setNoteBlockSound(@Nullable NamespacedKey noteBlockSound);
|
||||
|
||||
/**
|
||||
@@ -114,6 +115,7 @@ public interface SkullMeta extends ItemMeta {
|
||||
*
|
||||
* @return the key of the sound, or null
|
||||
*/
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
@Nullable
|
||||
NamespacedKey getNoteBlockSound();
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Add missing instrument enums
|
|||
fix some wrong javadocs
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Instrument.java b/src/main/java/org/bukkit/Instrument.java
|
||||
index 92194803bcdfbcfdb99567835906ce9219eabd04..ec36b0a685bbaf80ae563ad169a94a62298edd88 100644
|
||||
index de976be7132d05506fde7a839cac3954b0dd8da4..27dafd1850d3b984a6af155f5c08ee543cd109f0 100644
|
||||
--- a/src/main/java/org/bukkit/Instrument.java
|
||||
+++ b/src/main/java/org/bukkit/Instrument.java
|
||||
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
@ -28,52 +28,82 @@ index 92194803bcdfbcfdb99567835906ce9219eabd04..ec36b0a685bbaf80ae563ad169a94a62
|
|||
* block.
|
||||
*/
|
||||
STICKS(0x3),
|
||||
@@ -74,7 +74,44 @@ public enum Instrument {
|
||||
@@ -78,38 +78,43 @@ 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;
|
||||
@@ -117,9 +122,8 @@ 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;
|
||||
}
|
||||
@@ -129,9 +133,8 @@ 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 1e27b9de47f111b9c000243214e22890e323f7fc..19995314b01f19c312efa2a4584ccfba2d700c52 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
|
@ -89,3 +119,18 @@ index 1e27b9de47f111b9c000243214e22890e323f7fc..19995314b01f19c312efa2a4584ccfba
|
|||
*
|
||||
* @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 14ad060eba6b78c6b7c7deeecc455ea385b92f36..e3d718d75474c5b31c95bd64cb58247ab72364e4 100644
|
||||
--- a/src/test/java/org/bukkit/InstrumentTest.java
|
||||
+++ b/src/test/java/org/bukkit/InstrumentTest.java
|
||||
@@ -8,9 +8,7 @@ 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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue