diff --git a/patches/api/Add-basic-Datapack-API.patch b/patches/api/Add-basic-Datapack-API.patch index fba79a422d..ef37052bcd 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 <a href="https://minecraft.wiki/w/Data_pack">Minecraft wiki</a> + * @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 bb63105b0a..dd9be90aef 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 576709c240..4fbef829b5 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 { - * <li>Only occluding blocks can be "powered" ({@link Block#isBlockPowered()}). - * </ul> - * This list may be inconclusive. For a full list of the side effects of an occluding -- * block, see the <a href="https://minecraft.fandom.com/wiki/Opacity">Minecraft Wiki</a>. -+ * block, see the <a href="https://minecraft.wiki/wiki/Opacity">Minecraft Wiki</a>. - * - * @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 -- * <a href="https://minecraft.fandom.com/wiki/Experimental_Gameplay">minecraft experimental feature</a> -+ * <a href="https://minecraft.wiki/wiki/Experimental_Gameplay">minecraft experimental feature</a> - * and is subject to changes by Mojang. - * <p> - * <b>Note:</b> 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 <a href="https://minecraft.fandom.com/wiki/Spawn#Java_Edition_mob_cap">Minecraft Wiki</a> -+ * @see <a href="https://minecraft.wiki/wiki/Spawn#Java_Edition_mob_cap">Minecraft Wiki</a> - */ - 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 821386a84a..ead97d0bc5 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 97716b7760..3f480806aa 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<T> state) { @@ -0,0 +0,0 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat - T vanillaTileEntitiy = (T) BlockEntity.loadStatic(CraftLocation.toBlockPosition(location), getHandle(), this.getSnapshotNBT()); - return ClientboundBlockEntityDataPacket.create(vanillaTileEntitiy); + public CraftBlockEntityState<T> copy() { + return new CraftBlockEntityState<>(this); } + + // Paper start diff --git a/patches/server/Add-EntityBlockStorage-clearEntities.patch b/patches/server/Add-EntityBlockStorage-clearEntities.patch index 04569f62f8..64f5f109ef 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<BeehiveBlockEntity> 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 6e685c21f3..009cbd9381 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<PistonMovingBlockEn + public CraftMovingPiston copy() { + return new CraftMovingPiston(this); } ++ + // Paper start - Add Moving Piston API + @Override + public org.bukkit.block.data.BlockData getMovingBlock() { diff --git a/patches/server/Add-isCollidable-methods-to-various-places.patch b/patches/server/Add-isCollidable-methods-to-various-places.patch index 3d614c84fe..3331a82c92 100644 --- a/patches/server/Add-isCollidable-methods-to-various-places.patch +++ b/patches/server/Add-isCollidable-methods-to-various-places.patch @@ -27,8 +27,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -0,0 +0,0 @@ public class CraftBlockState implements BlockState { - protected void requirePlaced() { - Preconditions.checkState(this.isPlaced(), "The blockState must be placed to call this method"); + public CraftBlockState copy() { + return new CraftBlockState(this); } + + // Paper start diff --git a/patches/server/Add-more-Campfire-API.patch b/patches/server/Add-more-Campfire-API.patch index 8bf9f43507..56587cd114 100644 --- a/patches/server/Add-more-Campfire-API.patch +++ b/patches/server/Add-more-Campfire-API.patch @@ -70,8 +70,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCampfire.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCampfire.java @@ -0,0 +0,0 @@ public class CraftCampfire extends CraftBlockEntityState<CampfireBlockEntity> 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 f7873b1077..11a201ce9d 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<CommandBlockEntity> - 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<EnchantmentTable - super(world, tileEntity); + super(state); } + // Paper start diff --git a/patches/server/Allow-disabling-armour-stand-ticking.patch b/patches/server/Allow-disabling-armour-stand-ticking.patch index b690016c2d..dac6199875 100644 --- a/patches/server/Allow-disabling-armour-stand-ticking.patch +++ b/patches/server/Allow-disabling-armour-stand-ticking.patch @@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + if (this.noTickEquipmentDirty) { + this.noTickEquipmentDirty = false; -+ this.detectEquipmentUpdates(); ++ this.detectEquipmentUpdatesPublic(); + } + + return; diff --git a/patches/server/Beacon-API-custom-effect-ranges.patch b/patches/server/Beacon-API-custom-effect-ranges.patch index 70d0b56122..cc3fe909d8 100644 --- a/patches/server/Beacon-API-custom-effect-ranges.patch +++ b/patches/server/Beacon-API-custom-effect-ranges.patch @@ -108,8 +108,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 for (Player human : nms) { @@ -0,0 +0,0 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> 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 cf61aa93a8..0e5b11de58 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 c730250ba7..f623f128fd 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<T extends SculkSensorBlockEntity> extends CraftBlo - Preconditions.checkArgument(0 <= lastVibrationFrequency && lastVibrationFrequency <= 15, "Vibration frequency must be between 0-15"); - getSnapshot().lastVibrationFrequency = lastVibrationFrequency; + public CraftSculkSensor<T> 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 7038a638f9..8d6fee6e59 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 dd9d2beb1f..5944ada8af 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 997faaa22d..6cf977ef88 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 565a5d229a..7a83c97a6d 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<T extends BlockEntity> extends CraftBlockStat + } + + @Override +- public CraftBlockEntityState<T> copy() { +- return new CraftBlockEntityState<>(this); +- } ++ public abstract CraftBlockEntityState<T> 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 8f9b2a6ed9..771130a7fd 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<T extends AbstractFurnaceBlockEntity> extends - return recipesUsed.build(); - } + @Override + public abstract CraftFurnace<T> 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 aac005c816..6859375a03 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<StructurePiece> pieces) { +- Stream stream1 = pieces.map(StructurePiece::getBoundingBox); ++ Stream<BoundingBox> 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 17b5a8909f..c03c2b18a8 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 12dd424230..1908fe29a4 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<SpawnerBlockEnti - public void setSpawnRange(int spawnRange) { - this.getSnapshot().getSpawner().spawnRange = spawnRange; + public CraftCreatureSpawner copy() { + return new CraftCreatureSpawner(this); } + + // Paper start diff --git a/patches/server/More-Lidded-Block-API.patch b/patches/server/More-Lidded-Block-API.patch index 957efa8b93..cc88e951c5 100644 --- a/patches/server/More-Lidded-Block-API.patch +++ b/patches/server/More-Lidded-Block-API.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java @@ -0,0 +0,0 @@ public class CraftBarrel extends CraftLootable<BarrelBlockEntity> 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<ChestBlockEntity> 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<EnderChestBlockEntity - } - getTileEntity().openersCounter.opened = false; + public CraftEnderChest copy() { + return new CraftEnderChest(this); } + + // Paper start - More Lidded Block API @@ -65,6 +65,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } getTileEntity().opened = false; } +@@ -0,0 +0,0 @@ public class CraftShulkerBox extends CraftLootable<ShulkerBoxBlockEntity> 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 ec49e6df19..318a835285 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 eebf50dfcf..107b1bdb9e 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<BannerBlockEntity> 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 2f1d57196a..52ffcbdf29 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 560c340960..258cfa9323 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<? super Entity> predicate, final List<Entity> into) { ++ this.handle.getHardCollidingEntities(except, box, predicate, into); ++ } ++ ++ @Override ++ public List<Entity> getHardCollidingEntities(final Entity except, final AABB box, final Predicate<? super Entity> predicate) { ++ return this.handle.getHardCollidingEntities(except, box, predicate); ++ } ++ ++ @Override ++ public void getEntities(final Entity except, final AABB box, final Predicate<? super Entity> predicate, final List<Entity> into) { ++ this.handle.getEntities(except, box, predicate, into); ++ } ++ ++ @Override ++ public <T> void getEntitiesByClass(final Class<? extends T> clazz, final Entity except, final AABB box, final List<? super T> into, final Predicate<? super T> 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 cd002a46cc..985698cb35 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<SculkCatalystBlock - getTileEntity().getListener().bloom(world.getHandle(), getPosition(), getHandle(), world.getHandle().getRandom()); - getTileEntity().getListener().getSculkSpreader().addCursors(new BlockPos(block.getX(), block.getY(), block.getZ()), charge); + public CraftSculkCatalyst copy() { + return new CraftSculkCatalyst(this); } + + // Paper start - SculkCatalyst bloom API diff --git a/patches/server/Setup-Gradle-project.patch b/patches/server/Setup-Gradle-project.patch index f1e95b0143..8ce5c2bbc3 100644 --- a/patches/server/Setup-Gradle-project.patch +++ b/patches/server/Setup-Gradle-project.patch @@ -586,7 +586,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - <plugin> - <groupId>net.md-5</groupId> - <artifactId>specialsource-maven-plugin</artifactId> -- <version>2.0.0</version> +- <version>2.0.2</version> - <executions> - <execution> - <phase>package</phase> 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 c1093120a8..a46534b52e 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 63022048ed..cdc25a7371 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<T> state) { diff --git a/patches/server/Timings-v2.patch b/patches/server/Timings-v2.patch index d81d7f0b5b..2fbd3dd726 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 fb23cbb382..044d4ee93f 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit fb23cbb3829ef866094f45ffc5391d516e6a3c57 +Subproject commit 044d4ee93f77d1e9d82c91155d38742640d557f4 diff --git a/work/CraftBukkit b/work/CraftBukkit index f0661c3514..99aafc222b 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit f0661c3514a7d8e51e2281f045e1c14d0e733230 +Subproject commit 99aafc222b5fdc36dc0bc124080d114dcae06cb3 diff --git a/work/Spigot b/work/Spigot index 17ca32d0b2..a0f3d48691 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 17ca32d0b23fa936083ed19c5da14c3b9e422e50 +Subproject commit a0f3d48691557f3f6e528fc62cd7d48a1974f016