From a5cf9bd9706071603a5078a9a8f40f2e718e8896 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 29 Sep 2023 10:28:26 +1000 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) 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: 044d4ee9 SPIGOT-7283, SPIGOT-7318: Add AsyncStructureGenerateEvent and BlockState cloning 57b73d57 PR-913: Deprecate Projectile#doesBounce() and #setBounce() 43373c44 PR-904: Update FeatureFlag for 1.20.2 a7bbbf0c PR-911: Expand DataPack API with 1.20.2 pack version methods 0341e3a0 SPIGOT-7489: Add TeleportDuration to Display Entity bcd8d2aa PR-912: Update Minecraft Wiki URLs CraftBukkit Changes: 99aafc222 Increase outdated build delay dab849f08 SPIGOT-7283, SPIGOT-7318: Add AsyncStructureGenerateEvent and BlockState cloning 041b29ae3 Upgrade specialsource-maven-plugin 851a32cff PR-1263: Remove unused implementation of AbstractProjectile#doesBounce() and #setBounce() 251af0da3 PR-1261: Expand DataPack API with 1.20.2 pack version methods 46e4ba627 Upgrade specialsource-maven-plugin df3738a24 SPIGOT-7489: Add TeleportDuration to Display Entity 8d0fea457 PR-1262: Update Minecraft Wiki URLs e62905aab SPIGOT-7490: Fix entity equipment updates Spigot Changes: a0f3d486 Rebuild patches --- patches/api/Add-basic-Datapack-API.patch | 4 +- .../api/Fix-Spigot-annotation-mistakes.patch | 14 +++--- patches/api/Fix-upstream-javadocs.patch | 39 --------------- patches/api/More-Projectile-API.patch | 2 +- ...-get-a-BlockState-without-a-snapshot.patch | 8 ++-- ...Add-EntityBlockStorage-clearEntities.patch | 5 +- patches/server/Add-Moving-Piston-API.patch | 4 ++ ...Collidable-methods-to-various-places.patch | 4 +- patches/server/Add-more-Campfire-API.patch | 4 +- patches/server/Adventure.patch | 6 +-- ...Allow-disabling-armour-stand-ticking.patch | 2 +- .../Beacon-API-custom-effect-ranges.patch | 4 +- patches/server/Build-system-changes.patch | 2 +- ...igurable-sculk-sensor-listener-range.patch | 5 +- ...verriding-a-block-entity-during-worl.patch | 2 +- ...hives-generating-from-using-bonemeal.patch | 2 +- patches/server/Fix-this-stupid-bullshit.patch | 2 +- .../Fix-upstreams-block-state-factories.patch | 11 +++++ ...nt-furnace-cook-speed-multiplier-API.patch | 4 +- patches/server/MC-Dev-fixes.patch | 13 +++++ patches/server/MC-Utils.patch | 37 +++++++++++++++ .../server/Mob-Spawner-API-Enhancements.patch | 4 +- patches/server/More-Lidded-Block-API.patch | 16 ++++--- patches/server/More-Projectile-API.patch | 7 ++- patches/server/Nameable-Banner-API.patch | 5 +- .../Remove-Spigot-Bug-Fix-for-MC-109346.patch | 2 +- patches/server/Rewrite-chunk-system.patch | 47 +++++++++++++++++++ patches/server/SculkCatalyst-bloom-API.patch | 4 +- patches/server/Setup-Gradle-project.patch | 2 +- ...ient-crashes-server-lists-and-Mojang.patch | 2 +- ...ate-location-if-we-failed-to-read-it.patch | 2 +- patches/server/Timings-v2.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 35 files changed, 175 insertions(+), 98 deletions(-) diff --git a/patches/api/Add-basic-Datapack-API.patch b/patches/api/Add-basic-Datapack-API.patch index fba79a422..ef37052bc 100644 --- a/patches/api/Add-basic-Datapack-API.patch +++ b/patches/api/Add-basic-Datapack-API.patch @@ -133,9 +133,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/packs/DataPack.java +++ b/src/main/java/org/bukkit/packs/DataPack.java @@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull; - - /** * Represents a data pack. + * + * @see Minecraft wiki + * @deprecated use {@link io.papermc.paper.datapack.Datapack} */ @ApiStatus.Experimental diff --git a/patches/api/Fix-Spigot-annotation-mistakes.patch b/patches/api/Fix-Spigot-annotation-mistakes.patch index bb63105b0..dd9be90ae 100644 --- a/patches/api/Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/Fix-Spigot-annotation-mistakes.patch @@ -511,22 +511,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/Projectile.java +++ b/src/main/java/org/bukkit/entity/Projectile.java @@ -0,0 +0,0 @@ public interface Projectile extends Entity { - * If a small fireball does not bounce it will set the target on fire. - * * @return true if it should bounce. -+ * @deprecated Does not do anything + * @deprecated does not do anything */ -+ @Deprecated(forRemoval = true) // Paper +- @Deprecated ++ @Deprecated(forRemoval = true) public boolean doesBounce(); /** @@ -0,0 +0,0 @@ public interface Projectile extends Entity { - * something. - * * @param doesBounce whether or not it should bounce. -+ * @deprecated Does not do anything + * @deprecated does not do anything */ -+ @Deprecated(forRemoval = true) // Paper +- @Deprecated ++ @Deprecated(forRemoval = true) public void setBounce(boolean doesBounce); } diff --git a/src/main/java/org/bukkit/entity/SplashPotion.java b/src/main/java/org/bukkit/entity/SplashPotion.java diff --git a/patches/api/Fix-upstream-javadocs.patch b/patches/api/Fix-upstream-javadocs.patch index 576709c24..4fbef829b 100644 --- a/patches/api/Fix-upstream-javadocs.patch +++ b/patches/api/Fix-upstream-javadocs.patch @@ -74,32 +74,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param z Z-coordinate (0-15) * @return temperature at given coordinate */ -diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/Material.java -+++ b/src/main/java/org/bukkit/Material.java -@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable { - *
  • Only occluding blocks can be "powered" ({@link Block#isBlockPowered()}). - * - * This list may be inconclusive. For a full list of the side effects of an occluding -- * block, see the Minecraft Wiki. -+ * block, see the Minecraft Wiki. - * - * @return True if this material is a block and occludes light - */ -diff --git a/src/main/java/org/bukkit/MinecraftExperimental.java b/src/main/java/org/bukkit/MinecraftExperimental.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/MinecraftExperimental.java -+++ b/src/main/java/org/bukkit/MinecraftExperimental.java -@@ -0,0 +0,0 @@ import org.jetbrains.annotations.ApiStatus; - - /** - * Indicates that the annotated element (class, method, field, etc.) is part of a -- * minecraft experimental feature -+ * minecraft experimental feature - * and is subject to changes by Mojang. - *

    - * Note: Elements marked with this annotation require the use of a datapack or otherwise diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/Particle.java @@ -534,19 +508,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * * @param location the location to remove * @see #getExploredLocations() -diff --git a/src/main/java/org/bukkit/entity/SpawnCategory.java b/src/main/java/org/bukkit/entity/SpawnCategory.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/entity/SpawnCategory.java -+++ b/src/main/java/org/bukkit/entity/SpawnCategory.java -@@ -0,0 +0,0 @@ package org.bukkit.entity; - /** - * Represents groups of entities with shared spawn behaviors and mob caps. - * -- * @see Minecraft Wiki -+ * @see Minecraft Wiki - */ - public enum SpawnCategory { - diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Villager.java diff --git a/patches/api/More-Projectile-API.patch b/patches/api/More-Projectile-API.patch index 821386a84..ead97d0bc 100644 --- a/patches/api/More-Projectile-API.patch +++ b/patches/api/More-Projectile-API.patch @@ -191,7 +191,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public ProjectileSource getShooter(); @@ -0,0 +0,0 @@ public interface Projectile extends Entity { */ - @Deprecated(forRemoval = true) // Paper + @Deprecated(forRemoval = true) public void setBounce(boolean doesBounce); + // Paper start + diff --git a/patches/server/API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/API-to-get-a-BlockState-without-a-snapshot.patch index 97716b776..3f480806a 100644 --- a/patches/server/API-to-get-a-BlockState-without-a-snapshot.patch +++ b/patches/server/API-to-get-a-BlockState-without-a-snapshot.patch @@ -76,7 +76,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final T tileEntity; private final T snapshot; -+ public final boolean snapshotDisabled; // Paper ++ public boolean snapshotDisabled; // Paper + public static boolean DISABLE_SNAPSHOT = false; // Paper public CraftBlockEntityState(World world, T tileEntity) { @@ -100,10 +100,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end } - public void refreshSnapshot() { + protected CraftBlockEntityState(CraftBlockEntityState state) { @@ -0,0 +0,0 @@ public class CraftBlockEntityState extends CraftBlockStat - T vanillaTileEntitiy = (T) BlockEntity.loadStatic(CraftLocation.toBlockPosition(location), getHandle(), this.getSnapshotNBT()); - return ClientboundBlockEntityDataPacket.create(vanillaTileEntitiy); + public CraftBlockEntityState copy() { + return new CraftBlockEntityState<>(this); } + + // Paper start diff --git a/patches/server/Add-EntityBlockStorage-clearEntities.patch b/patches/server/Add-EntityBlockStorage-clearEntities.patch index 04569f62f..64f5f109e 100644 --- a/patches/server/Add-EntityBlockStorage-clearEntities.patch +++ b/patches/server/Add-EntityBlockStorage-clearEntities.patch @@ -25,9 +25,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java @@ -0,0 +0,0 @@ public class CraftBeehive extends CraftBlockEntityState impl - - getSnapshot().addOccupant(((CraftBee) entity).getHandle(), false); + public CraftBeehive copy() { + return new CraftBeehive(this); } ++ + // Paper start - Add EntityBlockStorage clearEntities + @Override + public void clearEntities() { diff --git a/patches/server/Add-Moving-Piston-API.patch b/patches/server/Add-Moving-Piston-API.patch index 6e685c21f..009cbd938 100644 --- a/patches/server/Add-Moving-Piston-API.patch +++ b/patches/server/Add-Moving-Piston-API.patch @@ -17,7 +17,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public CraftMovingPiston(World world, PistonMovingBlockEntity tileEntity) { super(world, tileEntity); +@@ -0,0 +0,0 @@ public class CraftMovingPiston extends CraftBlockEntityState im - public void setCookTimeTotal(int index, int cookTimeTotal) { - getSnapshot().cookingTime[index] = cookTimeTotal; + public CraftCampfire copy() { + return new CraftCampfire(this); } + + // Paper start diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index f7873b107..11a201ce9 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -3167,8 +3167,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java @@ -0,0 +0,0 @@ public class CraftCommandBlock extends CraftBlockEntityState - public void setName(String name) { - getSnapshot().getCommandBlock().setName(CraftChatMessage.fromStringOrNull(name != null ? name : "@")); + public CraftCommandBlock copy() { + return new CraftCommandBlock(this); } + + // Paper start @@ -3212,7 +3212,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java @@ -0,0 +0,0 @@ public class CraftEnchantingTable extends CraftBlockEntityState implem - public void setLock(String key) { - this.getSnapshot().lockKey = (key == null) ? LockCode.NO_LOCK : new LockCode(key); + public CraftBeacon copy() { + return new CraftBeacon(this); } + + // Paper start diff --git a/patches/server/Build-system-changes.patch b/patches/server/Build-system-changes.patch index cf61aa93a..0e5b11de5 100644 --- a/patches/server/Build-system-changes.patch +++ b/patches/server/Build-system-changes.patch @@ -157,7 +157,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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, -3); + deadline.add(Calendar.DAY_OF_YEAR, -7); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/patches/server/Configurable-sculk-sensor-listener-range.patch b/patches/server/Configurable-sculk-sensor-listener-range.patch index c730250ba..f623f128f 100644 --- a/patches/server/Configurable-sculk-sensor-listener-range.patch +++ b/patches/server/Configurable-sculk-sensor-listener-range.patch @@ -88,9 +88,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java @@ -0,0 +0,0 @@ public class CraftSculkSensor extends CraftBlo - Preconditions.checkArgument(0 <= lastVibrationFrequency && lastVibrationFrequency <= 15, "Vibration frequency must be between 0-15"); - getSnapshot().lastVibrationFrequency = lastVibrationFrequency; + public CraftSculkSensor copy() { + return new CraftSculkSensor<>(this); } ++ + // Paper start + @Override + public int getListenerRange() { diff --git a/patches/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch b/patches/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch index 7038a638f..8d6fee6e5 100644 --- a/patches/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch +++ b/patches/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch @@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end world.setBlock(blockposition2, Blocks.BARRIER.defaultBlockState(), 20); } - + // CraftBukkit start @@ -0,0 +0,0 @@ public class StructureTemplate { if (pair1.getSecond() != null) { tileentity = world.getBlockEntity(blockposition6); diff --git a/patches/server/Fix-beehives-generating-from-using-bonemeal.patch b/patches/server/Fix-beehives-generating-from-using-bonemeal.patch index dd9d2beb1..5944ada8a 100644 --- a/patches/server/Fix-beehives-generating-from-using-bonemeal.patch +++ b/patches/server/Fix-beehives-generating-from-using-bonemeal.patch @@ -41,4 +41,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper } - public static CapturedBlockState getBlockState(Level world, BlockPos pos, int flag) { + @Override diff --git a/patches/server/Fix-this-stupid-bullshit.patch b/patches/server/Fix-this-stupid-bullshit.patch index 997faaa22..6cf977ef8 100644 --- a/patches/server/Fix-this-stupid-bullshit.patch +++ b/patches/server/Fix-this-stupid-bullshit.patch @@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -3); + deadline.add(Calendar.DAY_OF_YEAR, -7); 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/Fix-upstreams-block-state-factories.patch b/patches/server/Fix-upstreams-block-state-factories.patch index 565a5d229..7a83c97a6 100644 --- a/patches/server/Fix-upstreams-block-state-factories.patch +++ b/patches/server/Fix-upstreams-block-state-factories.patch @@ -38,6 +38,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final T tileEntity; private final T snapshot; +@@ -0,0 +0,0 @@ public class CraftBlockEntityState extends CraftBlockStat + } + + @Override +- public CraftBlockEntityState copy() { +- return new CraftBlockEntityState<>(this); +- } ++ public abstract CraftBlockEntityState copy(); // Paper - make abstract + + // Paper start + @Override diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java diff --git a/patches/server/Implement-furnace-cook-speed-multiplier-API.patch b/patches/server/Implement-furnace-cook-speed-multiplier-API.patch index 8f9b2a6ed..771130a7f 100644 --- a/patches/server/Implement-furnace-cook-speed-multiplier-API.patch +++ b/patches/server/Implement-furnace-cook-speed-multiplier-API.patch @@ -110,8 +110,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java @@ -0,0 +0,0 @@ public abstract class CraftFurnace extends - return recipesUsed.build(); - } + @Override + public abstract CraftFurnace copy(); + + // Paper start - cook speed multiplier API + @Override diff --git a/patches/server/MC-Dev-fixes.patch b/patches/server/MC-Dev-fixes.patch index aac005c81..6859375a0 100644 --- a/patches/server/MC-Dev-fixes.patch +++ b/patches/server/MC-Dev-fixes.patch @@ -257,3 +257,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return AbortableIterationConsumer.Continuation.ABORT; } } +diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructurePiece.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructurePiece.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructurePiece.java ++++ b/src/main/java/net/minecraft/world/level/levelgen/structure/StructurePiece.java +@@ -0,0 +0,0 @@ public abstract class StructurePiece { + } + + public static BoundingBox createBoundingBox(Stream pieces) { +- Stream stream1 = pieces.map(StructurePiece::getBoundingBox); ++ Stream stream1 = pieces.map(StructurePiece::getBoundingBox); // Paper - decompile fx + + Objects.requireNonNull(stream1); + return (BoundingBox) BoundingBox.encapsulatingBoxes(stream1::iterator).orElseThrow(() -> { diff --git a/patches/server/MC-Utils.patch b/patches/server/MC-Utils.patch index 17b5a8909..c03c2b18a 100644 --- a/patches/server/MC-Utils.patch +++ b/patches/server/MC-Utils.patch @@ -8234,6 +8234,43 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // ======================================================================== public static byte toLegacyData(BlockState data) { +diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java +@@ -0,0 +0,0 @@ import net.minecraft.world.ticks.LevelTickAccess; + import net.minecraft.world.ticks.ScheduledTick; + import net.minecraft.world.ticks.TickPriority; + import org.bukkit.event.entity.CreatureSpawnEvent; ++import org.jetbrains.annotations.Nullable; + + public abstract class DelegatedGeneratorAccess implements WorldGenLevel { + +@@ -0,0 +0,0 @@ public abstract class DelegatedGeneratorAccess implements WorldGenLevel { + public int getMoonPhase() { + return this.handle.getMoonPhase(); + } ++ ++ // Paper start ++ @Nullable ++ @Override ++ public BlockState getBlockStateIfLoaded(final BlockPos blockposition) { ++ return null; ++ } ++ ++ @Nullable ++ @Override ++ public FluidState getFluidIfLoaded(final BlockPos blockposition) { ++ return null; ++ } ++ ++ @Nullable ++ @Override ++ public ChunkAccess getChunkIfLoadedImmediately(final int x, final int z) { ++ return null; ++ } ++ // Paper end + } diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java diff --git a/patches/server/Mob-Spawner-API-Enhancements.patch b/patches/server/Mob-Spawner-API-Enhancements.patch index 12dd42423..1908fe29a 100644 --- a/patches/server/Mob-Spawner-API-Enhancements.patch +++ b/patches/server/Mob-Spawner-API-Enhancements.patch @@ -73,8 +73,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java @@ -0,0 +0,0 @@ public class CraftCreatureSpawner extends CraftBlockEntityState implements Bar - } - getTileEntity().openersCounter.opened = false; + public CraftBarrel copy() { + return new CraftBarrel(this); } + + // Paper start - More Lidded Block API @@ -25,8 +25,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java @@ -0,0 +0,0 @@ public class CraftChest extends CraftLootable implements Chest - } - getTileEntity().openersCounter.opened = false; + public CraftChest copy() { + return new CraftChest(this); } + + // Paper start - More Lidded Block API @@ -41,8 +41,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java @@ -0,0 +0,0 @@ public class CraftEnderChest extends CraftBlockEntityState implem + public CraftShulkerBox copy() { + return new CraftShulkerBox(this); + } + + // Paper start - More Lidded Block API + @Override diff --git a/patches/server/More-Projectile-API.patch b/patches/server/More-Projectile-API.patch index ec49e6df1..318a83528 100644 --- a/patches/server/More-Projectile-API.patch +++ b/patches/server/More-Projectile-API.patch @@ -49,9 +49,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java @@ -0,0 +0,0 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti - public void setBounce(boolean doesBounce) { - this.doesBounce = doesBounce; - } + @Override + public void setBounce(boolean doesBounce) {} + + // Paper start + @Override + public boolean hasLeftShooter() { @@ -113,7 +113,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return this.getHandle().ownerUUID; + } + // Paper end - } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 diff --git a/patches/server/Nameable-Banner-API.patch b/patches/server/Nameable-Banner-API.patch index eebf50dfc..107b1bdb9 100644 --- a/patches/server/Nameable-Banner-API.patch +++ b/patches/server/Nameable-Banner-API.patch @@ -9,9 +9,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java @@ -0,0 +0,0 @@ public class CraftBanner extends CraftBlockEntityState implem - } - banner.itemPatterns = newPatterns; + public CraftBanner copy() { + return new CraftBanner(this); } ++ + // Paper start + @Override + public net.kyori.adventure.text.Component customName() { diff --git a/patches/server/Remove-Spigot-Bug-Fix-for-MC-109346.patch b/patches/server/Remove-Spigot-Bug-Fix-for-MC-109346.patch index 2f1d57196..52ffcbdf2 100644 --- a/patches/server/Remove-Spigot-Bug-Fix-for-MC-109346.patch +++ b/patches/server/Remove-Spigot-Bug-Fix-for-MC-109346.patch @@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -0,0 +0,0 @@ public class ServerEntity { - ((LivingEntity) this.entity).detectEquipmentUpdates(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending + ((LivingEntity) this.entity).detectEquipmentUpdatesPublic(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending } - // CraftBukkit start - MC-109346: Fix for nonsensical head yaw diff --git a/patches/server/Rewrite-chunk-system.patch b/patches/server/Rewrite-chunk-system.patch index 560c34096..258cfa932 100644 --- a/patches/server/Rewrite-chunk-system.patch +++ b/patches/server/Rewrite-chunk-system.patch @@ -22860,6 +22860,53 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @Override +diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java +@@ -0,0 +0,0 @@ public abstract class DelegatedGeneratorAccess implements WorldGenLevel { + @Nullable + @Override + public BlockState getBlockStateIfLoaded(final BlockPos blockposition) { +- return null; ++ return this.handle.getBlockStateIfLoaded(blockposition); + } + + @Nullable + @Override + public FluidState getFluidIfLoaded(final BlockPos blockposition) { +- return null; ++ return this.handle.getFluidIfLoaded(blockposition); + } + + @Nullable + @Override + public ChunkAccess getChunkIfLoadedImmediately(final int x, final int z) { +- return null; ++ return this.handle.getChunkIfLoadedImmediately(x, z); ++ } ++ ++ @Override ++ public void getHardCollidingEntities(final Entity except, final AABB box, final Predicate predicate, final List into) { ++ this.handle.getHardCollidingEntities(except, box, predicate, into); ++ } ++ ++ @Override ++ public List getHardCollidingEntities(final Entity except, final AABB box, final Predicate predicate) { ++ return this.handle.getHardCollidingEntities(except, box, predicate); ++ } ++ ++ @Override ++ public void getEntities(final Entity except, final AABB box, final Predicate predicate, final List into) { ++ this.handle.getEntities(except, box, predicate, into); ++ } ++ ++ @Override ++ public void getEntitiesByClass(final Class clazz, final Entity except, final AABB box, final List into, final Predicate predicate) { ++ this.handle.getEntitiesByClass(clazz, except, box, into, predicate); + } + // Paper end + } diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java diff --git a/patches/server/SculkCatalyst-bloom-API.patch b/patches/server/SculkCatalyst-bloom-API.patch index cd002a46c..985698cb3 100644 --- a/patches/server/SculkCatalyst-bloom-API.patch +++ b/patches/server/SculkCatalyst-bloom-API.patch @@ -11,8 +11,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSculkCatalyst.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSculkCatalyst.java @@ -0,0 +0,0 @@ public class CraftSculkCatalyst extends CraftBlockEntityState - net.md-5 - specialsource-maven-plugin -- 2.0.0 +- 2.0.2 - - - package diff --git a/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index c1093120a..a46534b52 100644 --- a/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { - deadline.add(Calendar.DAY_OF_YEAR, -3); + deadline.add(Calendar.DAY_OF_YEAR, -7); 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/Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/Show-blockstate-location-if-we-failed-to-read-it.patch index 63022048e..cdc25a737 100644 --- a/patches/server/Show-blockstate-location-if-we-failed-to-read-it.patch +++ b/patches/server/Show-blockstate-location-if-we-failed-to-read-it.patch @@ -30,4 +30,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end } - public void refreshSnapshot() { + protected CraftBlockEntityState(CraftBlockEntityState state) { diff --git a/patches/server/Timings-v2.patch b/patches/server/Timings-v2.patch index d81d7f0b5..2fbd3dd72 100644 --- a/patches/server/Timings-v2.patch +++ b/patches/server/Timings-v2.patch @@ -1461,7 +1461,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot } - public void detectEquipmentUpdates() { + public void detectEquipmentUpdatesPublic() { // CraftBukkit @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable { this.setDeltaMovement(d0, d1, d2); diff --git a/work/Bukkit b/work/Bukkit index fb23cbb38..044d4ee93 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit fb23cbb3829ef866094f45ffc5391d516e6a3c57 +Subproject commit 044d4ee93f77d1e9d82c91155d38742640d557f4 diff --git a/work/CraftBukkit b/work/CraftBukkit index f0661c351..99aafc222 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit f0661c3514a7d8e51e2281f045e1c14d0e733230 +Subproject commit 99aafc222b5fdc36dc0bc124080d114dcae06cb3 diff --git a/work/Spigot b/work/Spigot index 17ca32d0b..a0f3d4869 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 17ca32d0b23fa936083ed19c5da14c3b9e422e50 +Subproject commit a0f3d48691557f3f6e528fc62cd7d48a1974f016