diff --git a/patches/api/Add-workaround-for-plugins-modifying-the-parent-of-t.patch b/patches/api/Add-workaround-for-plugins-modifying-the-parent-of-t.patch index 0e31b4a10c..ff4691499f 100644 --- a/patches/api/Add-workaround-for-plugins-modifying-the-parent-of-t.patch +++ b/patches/api/Add-workaround-for-plugins-modifying-the-parent-of-t.patch @@ -100,7 +100,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.url = file.toURI().toURL(); this.libraryLoader = libraryLoader; -- + this.logger = com.destroystokyo.paper.utils.PaperPluginLogger.getLogger(description); // Paper - Register logger early // Paper start this.dependencyContext = dependencyContext; diff --git a/patches/api/Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/api/Expand-World.spawnParticle-API-and-add-Builder.patch index fe125337ce..a6c2cd0f16 100644 --- a/patches/api/Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/api/Expand-World.spawnParticle-API-and-add-Builder.patch @@ -503,8 +503,8 @@ diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/P index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/Particle.java +++ b/src/main/java/org/bukkit/Particle.java -@@ -0,0 +0,0 @@ public enum Particle { - return dataType; +@@ -0,0 +0,0 @@ public enum Particle implements Keyed { + return key; } + // Paper start - Particle API expansion @@ -518,6 +518,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return new com.destroystokyo.paper.ParticleBuilder(this); + } + // Paper end ++ /** * Options which can be applied to redstone dust particles - a particle * color and size. diff --git a/patches/api/Expand-world-key-API.patch b/patches/api/Expand-world-key-API.patch index 070f843b12..9bc2f7f562 100644 --- a/patches/api/Expand-world-key-API.patch +++ b/patches/api/Expand-world-key-API.patch @@ -108,8 +108,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param name Name of the world that will be created */ public WorldCreator(@NotNull String name) { -- if (name == null) { -- throw new IllegalArgumentException("World name cannot be null"); +- Preconditions.checkArgument(name != null, "World name cannot be null"); + // Paper start + this(name, getWorldKey(name)); + } @@ -124,7 +123,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return NamespacedKey.minecraft("the_end"); + } else { + return NamespacedKey.minecraft(name.toLowerCase(java.util.Locale.ENGLISH).replace(" ", "_")); - } ++ } + } - this.name = name; diff --git a/patches/api/Fix-Spigot-annotation-mistakes.patch b/patches/api/Fix-Spigot-annotation-mistakes.patch index e20f0c33cd..a062e32b3a 100644 --- a/patches/api/Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/Fix-Spigot-annotation-mistakes.patch @@ -132,10 +132,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * * @param namespace namespace * @param key key -- * @deprecated should never be used by plugins, for internal use only!! +- * @apiNote should never be used by plugins, for internal use only!! + * @see #NamespacedKey(Plugin, String) */ -- @Deprecated +- @ApiStatus.Internal public NamespacedKey(@NotNull String namespace, @NotNull String key) { Preconditions.checkArgument(namespace != null && isValidNamespace(namespace), "Invalid namespace. Must be [a-z0-9._-]: %s", namespace); Preconditions.checkArgument(key != null && isValidKey(key), "Invalid key. Must be [a-z0-9/._-]: %s", key); @@ -155,6 +155,42 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public enum NetherWartsState { /** +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 ++++ b/src/main/java/org/bukkit/Particle.java +@@ -0,0 +0,0 @@ public enum Particle implements Keyed { + BLOCK_CRACK("block", BlockData.class), + /** + * Uses {@link BlockData} as DataType ++ * @deprecated use {@link #BLOCK_CRACK} + */ ++ @Deprecated // Paper + BLOCK_DUST("block", BlockData.class, false), + WATER_DROP("rain"), + MOB_APPEARANCE("elder_guardian"), +@@ -0,0 +0,0 @@ public enum Particle implements Keyed { + // ----- Legacy Separator ----- + /** + * Uses {@link MaterialData} as DataType ++ * @deprecated {@link MaterialData} is deprecated API + */ ++ @Deprecated // Paper + LEGACY_BLOCK_CRACK(null, MaterialData.class, false), + /** + * Uses {@link MaterialData} as DataType ++ * @deprecated {@link MaterialData} is deprecated API + */ ++ @Deprecated // Paper + LEGACY_BLOCK_DUST(null, MaterialData.class, false), + /** + * Uses {@link MaterialData} as DataType ++ * @deprecated {@link MaterialData} is deprecated API + */ ++ @Deprecated // Paper + LEGACY_FALLING_DUST(null, MaterialData.class, false); + + private final NamespacedKey key; diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/Registry.java diff --git a/patches/api/Fix-upstream-javadocs.patch b/patches/api/Fix-upstream-javadocs.patch index 4fbef829b5..d10ef5ad01 100644 --- a/patches/api/Fix-upstream-javadocs.patch +++ b/patches/api/Fix-upstream-javadocs.patch @@ -74,25 +74,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param z Z-coordinate (0-15) * @return temperature at given coordinate */ -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 -+++ b/src/main/java/org/bukkit/Particle.java -@@ -0,0 +0,0 @@ public enum Particle { - SCRAPE, - SONIC_BOOM, - SCULK_SOUL, -+ /** -+ * Uses {@link Float} as DataType, representing the angle the particle displays at in radians -+ */ - SCULK_CHARGE(Float.class), - SCULK_CHARGE_POP, -+ /** -+ * Uses {@link Integer} as DataType, representing the delay in ticks until the particle shows up -+ */ - SHRIEK(Integer.class), - CHERRY_LEAVES, - EGG_CRACK, diff --git a/src/main/java/org/bukkit/RegionAccessor.java b/src/main/java/org/bukkit/RegionAccessor.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/RegionAccessor.java diff --git a/patches/api/Paper-Plugins.patch b/patches/api/Paper-Plugins.patch index 1e6eb8ba8b..c7092eed0c 100644 --- a/patches/api/Paper-Plugins.patch +++ b/patches/api/Paper-Plugins.patch @@ -2130,14 +2130,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.url = file.toURI().toURL(); this.libraryLoader = libraryLoader; -+ + // Paper start + this.dependencyContext = dependencyContext; + this.classLoaderGroup = io.papermc.paper.plugin.provider.classloader.PaperClassLoaderStorage.instance().registerSpigotGroup(this); + // Paper end ++ + Class jarClass; try { - Class jarClass; - try { + jarClass = Class.forName(description.getMain(), true, this); @@ -0,0 +0,0 @@ final class PluginClassLoader extends URLClassLoader { return findResources(name); } diff --git a/patches/api/WorldCreator-keepSpawnLoaded.patch b/patches/api/WorldCreator-keepSpawnLoaded.patch index b6bdced6e5..48650c39d9 100644 --- a/patches/api/WorldCreator-keepSpawnLoaded.patch +++ b/patches/api/WorldCreator-keepSpawnLoaded.patch @@ -12,17 +12,63 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private boolean generateStructures = true; private String generatorSettings = ""; private boolean hardcore = false; +- private boolean keepSpawnInMemory = true; + private net.kyori.adventure.util.TriState keepSpawnLoaded = net.kyori.adventure.util.TriState.NOT_SET; // Paper /** * Creates an empty WorldCreationOptions for the given world name @@ -0,0 +0,0 @@ public class WorldCreator { + type = world.getWorldType(); + generateStructures = world.canGenerateStructures(); + hardcore = world.isHardcore(); +- keepSpawnInMemory = world.getKeepSpawnInMemory(); ++ this.keepSpawnLoaded = net.kyori.adventure.util.TriState.byBoolean(world.getKeepSpawnInMemory()); // Paper + + return this; + } +@@ -0,0 +0,0 @@ public class WorldCreator { + generateStructures = creator.generateStructures(); + generatorSettings = creator.generatorSettings(); + hardcore = creator.hardcore(); +- keepSpawnInMemory = creator.keepSpawnInMemory(); ++ keepSpawnLoaded = creator.keepSpawnLoaded(); // Paper + + return this; + } +@@ -0,0 +0,0 @@ public class WorldCreator { + * + * @param keepSpawnInMemory Whether the spawn chunks will be kept loaded + * @return This object, for chaining ++ * @deprecated use {@link #keepSpawnLoaded(net.kyori.adventure.util.TriState)} + */ + @NotNull ++ @Deprecated(forRemoval = true) // Paper + public WorldCreator keepSpawnInMemory(boolean keepSpawnInMemory) { +- this.keepSpawnInMemory = keepSpawnInMemory; +- +- return this; ++ return this.keepSpawnLoaded(net.kyori.adventure.util.TriState.byBoolean(keepSpawnInMemory)); // Paper + } + + /** + * Gets whether or not the spawn chunks will be kept loaded. + * + * @return True if the spawn chunks will be kept loaded ++ * @deprecated use {@link #keepSpawnLoaded()} + */ ++ @Deprecated(forRemoval = true) // Paper + public boolean keepSpawnInMemory() { +- return keepSpawnInMemory; ++ return this.keepSpawnLoaded() == net.kyori.adventure.util.TriState.TRUE; // Paper + } + + /** +@@ -0,0 +0,0 @@ public class WorldCreator { return result; } + -+ // Paper start -+ ++ // Paper start - keep spawn loaded tristate + /** + * Returns the current intent to keep the world loaded, @see {@link WorldCreator#keepSpawnLoaded(net.kyori.adventure.util.TriState)} + * @@ -42,10 +88,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + @NotNull + public WorldCreator keepSpawnLoaded(@NotNull net.kyori.adventure.util.TriState keepSpawnLoaded) { -+ java.util.Objects.requireNonNull(keepSpawnLoaded, "keepSpawnLoaded"); ++ Preconditions.checkArgument(keepSpawnLoaded != null, "keepSpawnLoaded"); + this.keepSpawnLoaded = keepSpawnLoaded; + return this; + } + -+ // Paper end ++ // Paper end - keep spawn loaded tristate } diff --git a/patches/server/Anti-Xray.patch b/patches/server/Anti-Xray.patch index f563025d92..de179d4fbb 100644 --- a/patches/server/Anti-Xray.patch +++ b/patches/server/Anti-Xray.patch @@ -1550,9 +1550,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final int z; - private static final PalettedContainer emptyBlockIDs = new PalettedContainer<>(net.minecraft.world.level.block.Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), PalettedContainer.Strategy.SECTION_STATES); + private static final PalettedContainer emptyBlockIDs = new PalettedContainer<>(net.minecraft.world.level.block.Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), PalettedContainer.Strategy.SECTION_STATES, null); // Paper - Anti-Xray - Add preset block states - private static final byte[] emptyLight = new byte[2048]; + private static final byte[] FULL_LIGHT = new byte[2048]; + private static final byte[] EMPTY_LIGHT = new byte[2048]; - public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/patches/server/Build-system-changes.patch b/patches/server/Build-system-changes.patch index 41726cd4c1..bbb48a0dab 100644 --- a/patches/server/Build-system-changes.patch +++ b/patches/server/Build-system-changes.patch @@ -148,7 +148,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, -7); + deadline.add(Calendar.DAY_OF_YEAR, -21); 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/Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/Expand-World.spawnParticle-API-and-add-Builder.patch index a6997032bd..d32e020d3c 100644 --- a/patches/server/Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/server/Expand-World.spawnParticle-API-and-add-Builder.patch @@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - Particle API Expansion + return sendParticles(players, sender, t0, d0, d1, d2, i, d3, d4, d5, d6, force); + } -+ public int sendParticles(List receivers, ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { ++ public int sendParticles(List receivers, @Nullable ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { + // Paper end ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(t0, force, d0, d1, d2, (float) d3, (float) d4, (float) d5, (float) d6, i); // CraftBukkit end @@ -41,19 +41,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { -- if (data != null) { + // Paper start - Particle API Expansion + spawnParticle(particle, null, null, x, y, z, count, offsetX, offsetY, offsetZ, extra, data, force); + } ++ @Override + public void spawnParticle(Particle particle, List receivers, Player sender, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { + // Paper end -+ if (data != null && !particle.getDataType().isInstance(data)) { + particle = CraftParticle.convertLegacy(particle); + data = CraftParticle.convertLegacy(data); + if (data != null) { Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType()); } this.getHandle().sendParticles( - null, // Sender + receivers == null ? getHandle().players() : receivers.stream().map(player -> ((CraftPlayer) player).getHandle()).collect(java.util.stream.Collectors.toList()), // Paper - Particle API Expansion + sender != null ? ((CraftPlayer) sender).getHandle() : null, // Sender // Paper - Particle API Expansion - CraftParticle.toNMS(particle, data), // Particle + CraftParticle.createParticleParam(particle, data), // Particle x, y, z, // Position count, // Count diff --git a/patches/server/Fix-NPE-in-SculkBloomEvent-world-access.patch b/patches/server/Fix-NPE-in-SculkBloomEvent-world-access.patch index 5d9fcac7a2..b053859c5f 100644 --- a/patches/server/Fix-NPE-in-SculkBloomEvent-world-access.patch +++ b/patches/server/Fix-NPE-in-SculkBloomEvent-world-access.patch @@ -4,19 +4,6 @@ Date: Fri, 20 Oct 2023 19:50:22 +0200 Subject: [PATCH] Fix NPE in SculkBloomEvent world access -diff --git a/src/main/java/net/minecraft/world/level/block/SculkSpreader.java b/src/main/java/net/minecraft/world/level/block/SculkSpreader.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/block/SculkSpreader.java -+++ b/src/main/java/net/minecraft/world/level/block/SculkSpreader.java -@@ -0,0 +0,0 @@ public class SculkSpreader { - private final int additionalDecayRate; - private List cursors = new ArrayList(); - private static final Logger LOGGER = LogUtils.getLogger(); -- Level level; // CraftBukkit -+ public Level level; // CraftBukkit // Paper - package-private -> public - - public SculkSpreader(boolean worldGen, TagKey replaceableTag, int extraBlockChance, int maxDistance, int spreadChance, int decayChance) { - this.isWorldGeneration = worldGen; diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java @@ -47,3 +34,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public CatalystListener(BlockState state, PositionSource positionSource) { this.blockState = state; + this.positionSource = positionSource; + this.sculkSpreader = SculkSpreader.createLevelSpreader(); +- this.sculkSpreader.level = this.level; // CraftBukkit ++ // this.sculkSpreader.level = this.level; // CraftBukkit // Paper - bad fix + } + + @Override diff --git a/patches/server/Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/Fix-Player-spawnParticle-x-y-z-precision-loss.patch index 03fa44c9b9..144d9dba85 100644 --- a/patches/server/Fix-Player-spawnParticle-x-y-z-precision-loss.patch +++ b/patches/server/Fix-Player-spawnParticle-x-y-z-precision-loss.patch @@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (data != null) { Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType()); } -- ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(CraftParticle.toNMS(particle, data), true, (float) x, (float) y, (float) z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count); -+ ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(CraftParticle.toNMS(particle, data), true, x, y, z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count); // Paper - Fix x/y/z coordinate precision loss +- ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(CraftParticle.createParticleParam(particle, data), true, (float) x, (float) y, (float) z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count); ++ ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(CraftParticle.createParticleParam(particle, data), true, x, y, z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count); // Paper - Fix x/y/z coordinate precision loss this.getHandle().connection.send(packetplayoutworldparticles); } diff --git a/patches/server/Fix-this-stupid-bullshit.patch b/patches/server/Fix-this-stupid-bullshit.patch index 6cf977ef88..041f8b9f4a 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, -7); + deadline.add(Calendar.DAY_OF_YEAR, -21); 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/Remap-fixes.patch b/patches/server/Remap-fixes.patch index 6cf68ac0e2..61df6859b6 100644 --- a/patches/server/Remap-fixes.patch +++ b/patches/server/Remap-fixes.patch @@ -88,6 +88,36 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private LootContextParamSet paramSet; private Optional randomSequence; +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftParticle.java b/src/main/java/org/bukkit/craftbukkit/CraftParticle.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftParticle.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftParticle.java +@@ -0,0 +0,0 @@ public abstract class CraftParticle implements Keyed { + private static final BiFunction, CraftParticle> VOID_FUNCTION = (name, particle) -> new CraftParticle<>(name, particle, Void.class) { + @Override + public ParticleOptions createParticleParam(Void data) { +- return (SimpleParticleType) CraftParticle.this.getHandle(); ++ return (SimpleParticleType) this.getHandle(); // Paper - fix? + } + }; + +@@ -0,0 +0,0 @@ public abstract class CraftParticle implements Keyed { + BiFunction, CraftParticle> itemStackFunction = (name, particle) -> new CraftParticle<>(name, particle, ItemStack.class) { + @Override + public ParticleOptions createParticleParam(ItemStack data) { +- return new ItemParticleOption((net.minecraft.core.particles.ParticleType) CraftParticle.this.getHandle(), CraftItemStack.asNMSCopy(data)); ++ return new ItemParticleOption((net.minecraft.core.particles.ParticleType) this.getHandle(), CraftItemStack.asNMSCopy(data)); // Paper - fix? + } + }; + + BiFunction, CraftParticle> blockDataFunction = (name, particle) -> new CraftParticle<>(name, particle, BlockData.class) { + @Override + public ParticleOptions createParticleParam(BlockData data) { +- return new BlockParticleOption((net.minecraft.core.particles.ParticleType) CraftParticle.this.getHandle(), ((CraftBlockData) data).getState()); ++ return new BlockParticleOption((net.minecraft.core.particles.ParticleType) this.getHandle(), ((CraftBlockData) data).getState()); // Paper - fix? + } + }; + diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/test/java/org/bukkit/DyeColorsTest.java @@ -118,6 +148,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 assertThat(color, is(Color.fromRGB(nmsColor))); } } +diff --git a/src/test/java/org/bukkit/ParticleTest.java b/src/test/java/org/bukkit/ParticleTest.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/test/java/org/bukkit/ParticleTest.java ++++ b/src/test/java/org/bukkit/ParticleTest.java +@@ -0,0 +0,0 @@ public class ParticleTest extends AbstractTestingBase { + Check in CraftParticle if the conversion is still correct. + """, bukkit.getKey())); + +- DataResult encoded = assertDoesNotThrow(() -> minecraft.codec().encodeStart(DynamicOpsNBT.INSTANCE, particleParam), ++ DataResult encoded = assertDoesNotThrow(() -> minecraft.codec().encodeStart(NbtOps.INSTANCE, particleParam), // Paper - remap fix + String.format(""" + Could not encoded particle param for particle %s. + This can indicated, that the wrong particle param is created in CraftParticle. diff --git a/src/test/java/org/bukkit/RegistryConstantsTest.java b/src/test/java/org/bukkit/RegistryConstantsTest.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/test/java/org/bukkit/RegistryConstantsTest.java 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 a46534b52e..de8ee7d258 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, -7); + deadline.add(Calendar.DAY_OF_YEAR, -21); 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/WorldCreator-keepSpawnLoaded.patch b/patches/server/WorldCreator-keepSpawnLoaded.patch index 506033c048..8a9919016c 100644 --- a/patches/server/WorldCreator-keepSpawnLoaded.patch +++ b/patches/server/WorldCreator-keepSpawnLoaded.patch @@ -8,6 +8,15 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/ja index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -0,0 +0,0 @@ public final class CraftServer implements Server { + + ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11), + worlddata.isDebugWorld(), j, creator.environment() == Environment.NORMAL ? list : ImmutableList.of(), true, this.console.overworld().getRandomSequences(), creator.environment(), generator, biomeProvider); +- internal.keepSpawnInMemory = creator.keepSpawnInMemory(); ++ // internal.keepSpawnInMemory = creator.keepSpawnInMemory(); // Paper - replace + + if (!(this.worlds.containsKey(name.toLowerCase(java.util.Locale.ENGLISH)))) { + return null; @@ -0,0 +0,0 @@ public final class CraftServer implements Server { internal.setSpawnSettings(true, true); // Paper - move up diff --git a/work/Bukkit b/work/Bukkit index 897a0a238b..5010ed00d3 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 897a0a238bc989f9ca89613f0ee413254bd1106b +Subproject commit 5010ed00d3f83b7c7acbf4c1b16f7c89f309eb9a diff --git a/work/CraftBukkit b/work/CraftBukkit index 71b0135cc7..75502b6ddc 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 71b0135cc7986690f2e0950dbcf679271e894245 +Subproject commit 75502b6ddcae5aa84b7e97fd02d2e1551afddebc diff --git a/work/Spigot b/work/Spigot index e0e223fe51..dba3cdc33b 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit e0e223fe5197272feb12eba337cfbbc567316a84 +Subproject commit dba3cdc33be9abb98bb8d13b612b33b18a812db6