diff --git a/patches/api/0084-Add-setPlayerProfile-API-for-Skulls.patch b/patches/api/0084-Add-setPlayerProfile-API-for-Skulls.patch index d78a267340..7f444fd34b 100644 --- a/patches/api/0084-Add-setPlayerProfile-API-for-Skulls.patch +++ b/patches/api/0084-Add-setPlayerProfile-API-for-Skulls.patch @@ -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 + /** diff --git a/patches/api/0418-Mark-experimental-api-as-such.patch b/patches/api/0418-Mark-experimental-api-as-such.patch index 40135a78e7..a75596d1c2 100644 --- a/patches/api/0418-Mark-experimental-api-as-such.patch +++ b/patches/api/0418-Mark-experimental-api-as-such.patch @@ -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(); + diff --git a/patches/api/0419-fix-Instruments.patch b/patches/api/0419-fix-Instruments.patch index bd8a9717ca..701943942f 100644 --- a/patches/api/0419-fix-Instruments.patch +++ b/patches/api/0419-fix-Instruments.patch @@ -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 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)); + } diff --git a/patches/server/0003-Build-system-changes.patch b/patches/server/0003-Build-system-changes.patch index 6f1e65c3ae..44108b429a 100644 --- a/patches/server/0003-Build-system-changes.patch +++ b/patches/server/0003-Build-system-changes.patch @@ -67,7 +67,7 @@ index 40d1dcd4a0870cf002ee6d0309ce667f49a89d35..a2d2c817cdc1798cd30b3a852b3a495b exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class") } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 3790fd4f33a1fcd7d1430032af146cc724fcde61..16c38195c3e4f5550122df0d65fcce8ca3a83822 100644 +index 19c669347c5f3a70e7f378c836798e6787094e26..8842ac222e0dea1afb7ba4584512147bb53ccb56 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -192,7 +192,7 @@ public class Main { @@ -78,7 +78,7 @@ index 3790fd4f33a1fcd7d1430032af146cc724fcde61..16c38195c3e4f5550122df0d65fcce8c + Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -7); + deadline.add(Calendar.DAY_OF_YEAR, -14); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/patches/server/0025-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/0025-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 330cb67fc7..e111c858bf 100644 --- a/patches/server/0025-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/patches/server/0025-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -19,7 +19,7 @@ index e9f4ffec4b659f3300daa0138f6e955a8d97786d..e2e66fd4bd34e0ceaab350214a50ddbb public SystemReport fillSystemReport(SystemReport details) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5b6653bb3ed90ca1b200ae13ed71e834c07b5d27..445c73c27b2e87fbbc3d5f57098b0c6b618d002e 100644 +index 82b267898f98b7e6c808a2377951106769a4a763..e609a52750fe6ca178ce2933510d000a11438270 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -259,7 +259,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -32,11 +32,11 @@ index 5b6653bb3ed90ca1b200ae13ed71e834c07b5d27..445c73c27b2e87fbbc3d5f57098b0c6b private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index c6b04971733b2a26f287e0fa7bf74316c8cc48f2..0be441eef296ebf301d086edaf8dc3d0e107a025 100644 +index a51581263f1c9d72aab7c9223a816d034630f702..d453c630da1780a7aeab80cf95adcee62f4e8a14 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -223,12 +223,25 @@ public class Main { - deadline.add(Calendar.DAY_OF_YEAR, -7); + deadline.add(Calendar.DAY_OF_YEAR, -14); if (buildDate.before(deadline.getTime())) { System.err.println("*** Error, this build is outdated ***"); - System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***"); diff --git a/patches/server/0046-Use-UserCache-for-player-heads.patch b/patches/server/0046-Use-UserCache-for-player-heads.patch index 138ab08c4d..9754d03580 100644 --- a/patches/server/0046-Use-UserCache-for-player-heads.patch +++ b/patches/server/0046-Use-UserCache-for-player-heads.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use UserCache for player heads diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index a07d4639a9cd932f241784d3a127b9824c26f4a1..70a683529534e1f82c35350accbfeeb5ae4ceb6b 100644 +index 30865eece58ba2f3c991f9d373a128ada3385b4f..85b9baad074634a2f21c15adbb393ebc5924bdd8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -@@ -169,7 +169,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -208,7 +208,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { if (name == null) { this.setProfile(null); } else { diff --git a/patches/server/0140-Do-not-submit-profile-lookups-to-worldgen-threads.patch b/patches/server/0140-Do-not-submit-profile-lookups-to-worldgen-threads.patch index f8618a2bbb..87ccb015be 100644 --- a/patches/server/0140-Do-not-submit-profile-lookups-to-worldgen-threads.patch +++ b/patches/server/0140-Do-not-submit-profile-lookups-to-worldgen-threads.patch @@ -50,18 +50,18 @@ index 58e923f4ef1980bc7fff1e3b3fcdaad8c4eded53..4038bb76339d43f18770624bd7fecc79 }, this.executor).whenCompleteAsync((optional, throwable) -> { consumer.accept(optional); diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java -index 8fa6b788c4c330ad50e9833bbf7082da540b109c..91fb6678214d5f23b33d5d3b65a29fdfbb003c58 100644 +index bb7dd7a81a2af3d2a7df9d117f0d6395ecaed61b..28ce257b54f224b801a5206dd6d39cbae0ef248b 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java -@@ -137,7 +137,7 @@ public class SkullBlockEntity extends BlockEntity { +@@ -140,7 +140,7 @@ public class SkullBlockEntity extends BlockEntity { public static void updateGameprofile(@Nullable GameProfile owner, Consumer callback) { - if (owner != null && !StringUtil.isNullOrEmpty(owner.getName()) && (!owner.isComplete() || !owner.getProperties().containsKey("textures")) && profileCache != null && sessionService != null) { - profileCache.getAsync(owner.getName(), (profile) -> { + if (owner != null && !StringUtil.isNullOrEmpty(owner.getName()) && (!owner.isComplete() || !owner.getProperties().containsKey("textures")) && SkullBlockEntity.profileCache != null && SkullBlockEntity.sessionService != null) { + SkullBlockEntity.profileCache.getAsync(owner.getName(), (optional) -> { - Util.backgroundExecutor().execute(() -> { + Util.PROFILE_EXECUTOR.execute(() -> { // Paper - not a good idea to use BLOCKING OPERATIONS on the worldgen executor - Util.ifElse(profile, (profilex) -> { - Property property = Iterables.getFirst(profilex.getProperties().get("textures"), (Property)null); - if (property == null) { + Util.ifElse(optional, (gameprofile1) -> { + Property property = (Property) Iterables.getFirst(gameprofile1.getProperties().get("textures"), (Object) null); + diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java index 3030c153725415802f68c144e0b577d919307058..3e40d47f504248cd7caeef6b841a8aa6f1976170 100644 --- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java diff --git a/patches/server/0151-Fix-this-stupid-bullshit.patch b/patches/server/0151-Fix-this-stupid-bullshit.patch index e5d7069049..da40a6458f 100644 --- a/patches/server/0151-Fix-this-stupid-bullshit.patch +++ b/patches/server/0151-Fix-this-stupid-bullshit.patch @@ -31,12 +31,12 @@ index b5aa358638b9d0638dfe47f7ebac04cca1dd80b9..0d3a8f576c037886ccdd6068ce953c4c Bootstrap.isBootstrapped = true; if (BuiltInRegistries.REGISTRY.keySet().isEmpty()) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 75f5a3eb8730af1fea5bedbe168dcffacdbc85ad..22bb84601865960459040d7cb51d0c8d96695b3c 100644 +index 7004baa10a6df287239db868dce64d054105040c..127b05c44aa1e20ce097f1c1fe6b6ca2b32226c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -241,10 +241,12 @@ public class Main { Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -7); + deadline.add(Calendar.DAY_OF_YEAR, -14); if (buildDate.before(deadline.getTime())) { - System.err.println("*** Error, this build is outdated ***"); + // Paper start - This is some stupid bullshit diff --git a/patches/server/0172-Add-setPlayerProfile-API-for-Skulls.patch b/patches/server/0172-Add-setPlayerProfile-API-for-Skulls.patch index 1168f481da..45c86f49cd 100644 --- a/patches/server/0172-Add-setPlayerProfile-API-for-Skulls.patch +++ b/patches/server/0172-Add-setPlayerProfile-API-for-Skulls.patch @@ -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/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java -index 5158ba8c1d03cc2ffbd576146c6f72377bf05233..060939a6720049a4fef345f228ce76517f7741a4 100644 +index cf76e486bc873580c3b28dee88e168a2f3666a79..1325e9140a4b568170f0bd400904fe3c9d00cd4f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java -@@ -102,7 +102,22 @@ public class CraftSkull extends CraftBlockEntityState implemen +@@ -106,7 +106,22 @@ public class CraftSkull extends CraftBlockEntityState implemen } } @@ -33,7 +33,7 @@ index 5158ba8c1d03cc2ffbd576146c6f72377bf05233..060939a6720049a4fef345f228ce7651 public PlayerProfile getOwnerProfile() { if (!this.hasOwner()) { return null; -@@ -112,11 +127,12 @@ public class CraftSkull extends CraftBlockEntityState implemen +@@ -116,11 +131,12 @@ public class CraftSkull extends CraftBlockEntityState implemen } @Override @@ -48,10 +48,10 @@ index 5158ba8c1d03cc2ffbd576146c6f72377bf05233..060939a6720049a4fef345f228ce7651 } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 70a683529534e1f82c35350accbfeeb5ae4ceb6b..2771dd62c04c8da890724fe03f836fdeba440c55 100644 +index 85b9baad074634a2f21c15adbb393ebc5924bdd8..deed77a3d44bc55681483d7f47f148b5220135f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -@@ -145,6 +145,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -184,6 +184,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { return this.hasOwner() ? this.profile.getName() : null; } @@ -71,7 +71,7 @@ index 70a683529534e1f82c35350accbfeeb5ae4ceb6b..2771dd62c04c8da890724fe03f836fde @Override public OfflinePlayer getOwningPlayer() { if (this.hasOwner()) { -@@ -195,6 +208,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -234,6 +247,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { } @Override @@ -79,7 +79,7 @@ index 70a683529534e1f82c35350accbfeeb5ae4ceb6b..2771dd62c04c8da890724fe03f836fde public PlayerProfile getOwnerProfile() { if (!this.hasOwner()) { return null; -@@ -204,11 +218,12 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -243,11 +257,12 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { } @Override @@ -93,12 +93,12 @@ index 70a683529534e1f82c35350accbfeeb5ae4ceb6b..2771dd62c04c8da890724fe03f836fde } } -@@ -245,7 +260,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -301,7 +316,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { Builder serialize(Builder builder) { super.serialize(builder); if (this.profile != null) { - return builder.put(SKULL_OWNER.BUKKIT, new CraftPlayerProfile(this.profile)); + return builder.put(SKULL_OWNER.BUKKIT, new com.destroystokyo.paper.profile.CraftPlayerProfile(this.profile)); // Paper } - return builder; - } + NamespacedKey namespacedKeyNB = this.getNoteBlockSound(); + if (namespacedKeyNB != null) { diff --git a/patches/server/0858-Add-missing-important-BlockStateListPopulator-method.patch b/patches/server/0858-Add-missing-important-BlockStateListPopulator-method.patch index 626d855b8e..79060f09a4 100644 --- a/patches/server/0858-Add-missing-important-BlockStateListPopulator-method.patch +++ b/patches/server/0858-Add-missing-important-BlockStateListPopulator-method.patch @@ -6,19 +6,24 @@ Subject: [PATCH] Add missing important BlockStateListPopulator methods Without these methods it causes exceptions due to these being used by certain feature generators. diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java -index 8e6a71c1e8b53faa70b893c76f5bd25f96a5e142..19abf7b6000a875be8c7141cfba81b279b2cae60 100644 +index 4bd59614606962a5371fd0da54bde25bf6a01325..602ce766f00dfde057c735eae3351068d09feab1 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java +++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java -@@ -129,4 +129,32 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { - public DimensionType dimensionType() { - return this.world.dimensionType(); +@@ -128,7 +128,7 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { + + @Override + public boolean isFluidAtPosition(BlockPos pos, Predicate state) { +- return this.world.isFluidAtPosition(pos, state); ++ return state.test(this.getFluidState(pos)); // Paper - fix + } + + @Override +@@ -140,4 +140,28 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { + public RegistryAccess registryAccess() { + return this.world.registryAccess(); } -+ // Paper start -+ @Override -+ public boolean isFluidAtPosition(BlockPos pos, Predicate state) { -+ return state.test(this.getFluidState(pos)); -+ } + ++ // Paper start + @Override + public java.util.Optional getBlockEntity(BlockPos pos, net.minecraft.world.level.block.entity.BlockEntityType type) { + BlockEntity tileentity = this.getBlockEntity(pos); diff --git a/work/Bukkit b/work/Bukkit index f50ad1f8b3..aef9b6d205 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit f50ad1f8b307cda71968d3f53921ab29d1e5835a +Subproject commit aef9b6d2051e45d924d2e2b294fdb700b357bd3c diff --git a/work/CraftBukkit b/work/CraftBukkit index 2ed3e3e6e5..ae8f5fc025 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 2ed3e3e6e50cb606709522d4476f98e9edc5e79c +Subproject commit ae8f5fc02595a9a70dab28ad1835c9cd44ddc60d