diff --git a/patches/unapplied/server/0842-Fix-NotePlayEvent.patch b/patches/removed/1.19/0842-Fix-NotePlayEvent.patch similarity index 100% rename from patches/unapplied/server/0842-Fix-NotePlayEvent.patch rename to patches/removed/1.19/0842-Fix-NotePlayEvent.patch diff --git a/patches/unapplied/server/0854-Replace-player-chunk-loader-system.patch b/patches/removed/1.19/0854-Replace-player-chunk-loader-system.patch similarity index 100% rename from patches/unapplied/server/0854-Replace-player-chunk-loader-system.patch rename to patches/removed/1.19/0854-Replace-player-chunk-loader-system.patch diff --git a/patches/unapplied/server/0865-Fix-World-locateNearestStructure.patch b/patches/removed/1.19/0865-Fix-World-locateNearestStructure.patch similarity index 100% rename from patches/unapplied/server/0865-Fix-World-locateNearestStructure.patch rename to patches/removed/1.19/0865-Fix-World-locateNearestStructure.patch diff --git a/patches/unapplied/server/0834-Add-new-overload-to-PersistentDataContainer-has.patch b/patches/server/0825-Add-new-overload-to-PersistentDataContainer-has.patch similarity index 100% rename from patches/unapplied/server/0834-Add-new-overload-to-PersistentDataContainer-has.patch rename to patches/server/0825-Add-new-overload-to-PersistentDataContainer-has.patch diff --git a/patches/unapplied/server/0835-Multiple-Entries-with-Scoreboards.patch b/patches/server/0826-Multiple-Entries-with-Scoreboards.patch similarity index 100% rename from patches/unapplied/server/0835-Multiple-Entries-with-Scoreboards.patch rename to patches/server/0826-Multiple-Entries-with-Scoreboards.patch diff --git a/patches/unapplied/server/0836-Reset-placed-block-on-exception.patch b/patches/server/0827-Reset-placed-block-on-exception.patch similarity index 92% rename from patches/unapplied/server/0836-Reset-placed-block-on-exception.patch rename to patches/server/0827-Reset-placed-block-on-exception.patch index 7666ecdfe1..abdf99f132 100644 --- a/patches/unapplied/server/0836-Reset-placed-block-on-exception.patch +++ b/patches/server/0827-Reset-placed-block-on-exception.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Reset placed block on exception diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java -index 8175bb6331727440da2232998bdad068a1c47ae8..893d5bf448ddbccb30db0ee751c7f4a4e83634b9 100644 +index 78cac63e5bd7c84f59b8e00ee40899be78e8cdb1..00d31df5ba7e147b4b969a89cfc2b5088a988169 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java @@ -78,6 +78,7 @@ public class BlockItem extends Item { - if (this instanceof WaterLilyBlockItem || this instanceof SolidBucketItem) { + if (this instanceof PlaceOnWaterBlockItem || this instanceof SolidBucketItem) { blockstate = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(blockactioncontext1.getLevel(), blockactioncontext1.getClickedPos()); } + final org.bukkit.block.BlockState oldBlockstate = blockstate != null ? blockstate : org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(blockactioncontext1.getLevel(), blockactioncontext1.getClickedPos()); // Paper diff --git a/patches/unapplied/server/0837-Add-configurable-height-for-slime-spawn.patch b/patches/server/0828-Add-configurable-height-for-slime-spawn.patch similarity index 86% rename from patches/unapplied/server/0837-Add-configurable-height-for-slime-spawn.patch rename to patches/server/0828-Add-configurable-height-for-slime-spawn.patch index a97643c215..9fbaa9eb79 100644 --- a/patches/unapplied/server/0837-Add-configurable-height-for-slime-spawn.patch +++ b/patches/server/0828-Add-configurable-height-for-slime-spawn.patch @@ -26,23 +26,23 @@ index 100de7e366c4ea8ce158b0fc0258e4db0ee83249..b13d4dc311f25f9d3132697381e52beb public int portalCreateRadius; public boolean portalSearchVanillaDimensionScaling; diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java -index 85edba5de3ce6c1fce8872855544863de84e7759..b6e78e8145ea78d532f22707c7525829c5778076 100644 +index bdc6a7e6a9fcd467f653d53afd7ca2e33776fb06..e82bf53e1d31a5dd81713fe858d1e5d7b8f8c60d 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java -@@ -325,7 +325,11 @@ public class Slime extends Mob implements Enemy { +@@ -320,7 +320,11 @@ public class Slime extends Mob implements Enemy { - public static boolean checkSlimeSpawnRules(EntityType type, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, Random random) { + public static boolean checkSlimeSpawnRules(EntityType type, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, RandomSource random) { if (world.getDifficulty() != Difficulty.PEACEFUL) { -- if (world.getBiome(pos).is(Biomes.SWAMP) && pos.getY() > 50 && pos.getY() < 70 && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) { +- if (world.getBiome(pos).is(BiomeTags.ALLOWS_SURFACE_SLIME_SPAWNS) && pos.getY() > 50 && pos.getY() < 70 && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) { + // Paper start - Replace rules for Height in Swamp Biome + final double maxHeightSwamp = world.getMinecraftWorld().paperConfig.slimeMaxSpawnHeightInSwamp; + final double minHeightSwamp = world.getMinecraftWorld().paperConfig.slimeMinSpawnHeightInSwamp; + if (world.getBiome(pos).is(Biomes.SWAMP) && pos.getY() > minHeightSwamp && pos.getY() < maxHeightSwamp && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) { -+ // Paper end ++ // Paper end return checkMobSpawnRules(type, world, spawnReason, pos, random); } -@@ -336,7 +340,10 @@ public class Slime extends Mob implements Enemy { +@@ -331,7 +335,10 @@ public class Slime extends Mob implements Enemy { ChunkPos chunkcoordintpair = new ChunkPos(pos); boolean flag = world.getMinecraftWorld().paperConfig.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper diff --git a/patches/unapplied/server/0838-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0829-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch similarity index 89% rename from patches/unapplied/server/0838-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/0829-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch index a834180d50..f587edffcd 100644 --- a/patches/unapplied/server/0838-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch +++ b/patches/server/0829-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added getHostname to AsyncPlayerPreLoginEvent diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 7065aa4522431d08018fec8e591ba7c255398140..befcb501b4b1b6330bf3cd53e00e30b01efade6f 100644 +index 221f32e034ccb57907f79bae4ecec324e9cdb14e..9311130b5401cda69c62b5b5c23718554b94ab84 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -395,7 +395,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener +@@ -455,7 +455,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener // Paper start com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(ServerLoginPacketListenerImpl.this.gameProfile); diff --git a/patches/unapplied/server/0839-Fix-xp-reward-for-baby-zombies.patch b/patches/server/0830-Fix-xp-reward-for-baby-zombies.patch similarity index 81% rename from patches/unapplied/server/0839-Fix-xp-reward-for-baby-zombies.patch rename to patches/server/0830-Fix-xp-reward-for-baby-zombies.patch index 8418f634d4..77ad44ff96 100644 --- a/patches/unapplied/server/0839-Fix-xp-reward-for-baby-zombies.patch +++ b/patches/server/0830-Fix-xp-reward-for-baby-zombies.patch @@ -9,21 +9,21 @@ so this resets it after each call to Zombie#getExperienceReward diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index f9b7877ce5f66cc58ff1111d0fa72081a03c4f4e..cd88413f30632307faba63572915656b6a8469f7 100644 +index 4e348ea70ecc3836befcffcaa27c12a104f29c2a..7b01bd1409dcb64c097badbbd73110d40e712751 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java @@ -172,11 +172,16 @@ public class Zombie extends Monster { @Override - protected int getExperienceReward(Player player) { + public int getExperienceReward() { + final int previousReward = this.xpReward; // Paper - store previous value to reset after calculating XP reward if (this.isBaby()) { this.xpReward = (int) ((double) this.xpReward * 2.5D); } -- return super.getExperienceReward(player); +- return super.getExperienceReward(); + // Paper start - only change the XP reward for the calculations in the super method -+ int reward = super.getExperienceReward(player); ++ int reward = super.getExperienceReward(); + this.xpReward = previousReward; + return reward; + // Paper end diff --git a/patches/server/0831-Kick-on-main-for-illegal-chars.patch b/patches/server/0831-Kick-on-main-for-illegal-chars.patch new file mode 100644 index 0000000000..56aa81cdcc --- /dev/null +++ b/patches/server/0831-Kick-on-main-for-illegal-chars.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke +Date: Mon, 17 Jan 2022 19:47:19 +0100 +Subject: [PATCH] Kick on main for illegal chars + + +diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +index 8b033cdd65402950e597efab7b2407f5baf4c3aa..56208159d46a25de26ab6ce4b65eae27c93297e7 100644 +--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -2104,7 +2104,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser + } + // CraftBukkit end + if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.getMessage())) { ++ this.server.scheduleOnMain(() -> { // Paper - push to main for event firing + this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add cause ++ }); // Paper - push to main for event firing + } else { + if (this.tryHandleChat(packet.getMessage(), packet.getTimeStamp())) { + // CraftBukkit start +@@ -2120,7 +2122,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser + @Override + public void handleChatCommand(ServerboundChatCommandPacket packet) { + if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { ++ this.server.scheduleOnMain(() -> { // Paper - push to main for event firing + this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); ++ }); // Paper - push to main for event firing + } else { + PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); + if (this.tryHandleChat(packet.command(), packet.timeStamp())) { diff --git a/patches/unapplied/server/0841-Multi-Block-Change-API-Implementation.patch b/patches/server/0832-Multi-Block-Change-API-Implementation.patch similarity index 93% rename from patches/unapplied/server/0841-Multi-Block-Change-API-Implementation.patch rename to patches/server/0832-Multi-Block-Change-API-Implementation.patch index eb260881d2..c3a6b47e42 100644 --- a/patches/unapplied/server/0841-Multi-Block-Change-API-Implementation.patch +++ b/patches/server/0832-Multi-Block-Change-API-Implementation.patch @@ -25,18 +25,18 @@ index 82ea4fabd5732052a286d50bcff8bbcc2c4aa7d7..652bea6868a03a5315965f79c76172fb public void write(FriendlyByteBuf buf) { buf.writeLong(this.sectionPos.asLong()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0978be96a4ef26dc0a2e3cc1bb10931496502413..f8039c0e62b8fa8f0491edb296054299e7e28bdf 100644 +index 1ad8ab6c9413e79385b2f796c960ea3184d72bdf..01ac24f0999c9829bffeb76c228779f80a571687 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -30,6 +30,7 @@ import javax.annotation.Nullable; - import net.minecraft.Util; +@@ -29,6 +29,7 @@ import java.util.logging.Logger; + import javax.annotation.Nullable; import net.minecraft.advancements.AdvancementProgress; import net.minecraft.core.BlockPos; +import net.minecraft.core.SectionPos; // Paper import net.minecraft.nbt.CompoundTag; import net.minecraft.network.FriendlyByteBuf; - import net.minecraft.network.chat.ChatType; -@@ -866,6 +867,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + import net.minecraft.network.chat.ChatSender; +@@ -863,6 +864,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(packet); } diff --git a/patches/unapplied/server/0843-Freeze-Tick-Lock-API.patch b/patches/server/0833-Freeze-Tick-Lock-API.patch similarity index 83% rename from patches/unapplied/server/0843-Freeze-Tick-Lock-API.patch rename to patches/server/0833-Freeze-Tick-Lock-API.patch index cde0c44088..e8e5f4dd2f 100644 --- a/patches/unapplied/server/0843-Freeze-Tick-Lock-API.patch +++ b/patches/server/0833-Freeze-Tick-Lock-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Freeze Tick Lock API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 18294d7cdb4619bb128c626ef567622bae187c8d..ede2f5f00b59893cca354e5626938360347b0a36 100644 +index 526c564ebbf44421af8595d14bbbadc0de02c081..fc03e5ddc126a57d4ca9f158b7d0f67401e1ca4b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -335,6 +335,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -356,6 +356,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { private org.bukkit.util.Vector origin; @javax.annotation.Nullable private UUID originWorld; @@ -16,7 +16,7 @@ index 18294d7cdb4619bb128c626ef567622bae187c8d..ede2f5f00b59893cca354e5626938360 public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -762,7 +763,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -784,7 +785,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.setRemainingFireTicks(this.remainingFireTicks - 1); } @@ -25,7 +25,7 @@ index 18294d7cdb4619bb128c626ef567622bae187c8d..ede2f5f00b59893cca354e5626938360 this.setTicksFrozen(0); this.level.levelEvent((Player) null, 1009, this.blockPosition, 1); } -@@ -2163,6 +2164,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2211,6 +2212,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (fromNetherPortal) { nbt.putBoolean("Paper.FromNetherPortal", true); } @@ -35,7 +35,7 @@ index 18294d7cdb4619bb128c626ef567622bae187c8d..ede2f5f00b59893cca354e5626938360 // Paper end return nbt; } catch (Throwable throwable) { -@@ -2325,6 +2329,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2373,6 +2377,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (spawnReason == null) { spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; } @@ -46,10 +46,10 @@ index 18294d7cdb4619bb128c626ef567622bae187c8d..ede2f5f00b59893cca354e5626938360 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 5ef73cf97df2949d308d4cc9213bfb173c15b4a5..c17b8c77b1a4d65afaefd9c4b32219d898882410 100644 +index 7bd5c41c08d198c4278486a245872d2f31162627..f2ac92cdd718d351e0cea7fd1d05008a4b5734b7 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3319,7 +3319,7 @@ public abstract class LivingEntity extends Entity { +@@ -3351,7 +3351,7 @@ public abstract class LivingEntity extends Entity { boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES); int i; @@ -59,10 +59,10 @@ index 5ef73cf97df2949d308d4cc9213bfb173c15b4a5..c17b8c77b1a4d65afaefd9c4b32219d8 if (this.isInPowderSnow && this.canFreeze()) { this.setTicksFrozen(Math.min(this.getTicksRequiredToFreeze(), i + 1)); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 0a998832afacb25cbaf39737d14aa33eab6967b7..a92755211e3d42934b5efaa3f201c6c19ab7d2b4 100644 +index 4ab2b20529acb61baca3878281258ba0818b8479..5b92c2ca03baed38f7d41a73fae7dd23ce541d43 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -662,6 +662,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -673,6 +673,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return this.getHandle().isFullyFrozen(); } diff --git a/patches/unapplied/server/0844-Dolphin-API.patch b/patches/server/0834-Dolphin-API.patch similarity index 100% rename from patches/unapplied/server/0844-Dolphin-API.patch rename to patches/server/0834-Dolphin-API.patch diff --git a/patches/unapplied/server/0845-More-PotionEffectType-API.patch b/patches/server/0835-More-PotionEffectType-API.patch similarity index 96% rename from patches/unapplied/server/0845-More-PotionEffectType-API.patch rename to patches/server/0835-More-PotionEffectType-API.patch index 14fb482187..5d8c4415d3 100644 --- a/patches/unapplied/server/0845-More-PotionEffectType-API.patch +++ b/patches/server/0835-More-PotionEffectType-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java -index fdd8e353bcbd2faace59288810d1a5121f174b56..82a6702a2ddc35222f5a416364de8c397c85d5bb 100644 +index a220102c6e981e4c7d03039340423f05b8c2aeb9..29830a30a886f88254a6d0e7c5245fa14f44bd09 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java -@@ -102,4 +102,46 @@ public class CraftPotionEffectType extends PotionEffectType { +@@ -104,4 +104,46 @@ public class CraftPotionEffectType extends PotionEffectType { public Color getColor() { return Color.fromRGB(this.handle.getColor()); } diff --git a/patches/unapplied/server/0846-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/patches/server/0836-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch similarity index 92% rename from patches/unapplied/server/0846-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch rename to patches/server/0836-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch index 3b79f9947c..2bbcd10eb9 100644 --- a/patches/unapplied/server/0846-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch +++ b/patches/server/0836-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a CHM for StructureTemplate.Pallete cache fixes a CME due to this collection being shared across threads diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index 129ebb095c2280376a59b54920e5ff90cf1f465a..c5827e4d870a0bba483649d54cae23072eab2b18 100644 +index f3fcd345178efd4917ef79cb141275a987f99e58..fcd6b2a438ffc2f039036a45ff88ba46017981f7 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java @@ -831,7 +831,7 @@ public class StructureTemplate { diff --git a/patches/unapplied/server/0847-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0837-API-for-creating-command-sender-which-forwards-feedb.patch similarity index 96% rename from patches/unapplied/server/0847-API-for-creating-command-sender-which-forwards-feedb.patch rename to patches/server/0837-API-for-creating-command-sender-which-forwards-feedb.patch index c6327b78cf..adaa672b00 100644 --- a/patches/unapplied/server/0847-API-for-creating-command-sender-which-forwards-feedb.patch +++ b/patches/server/0837-API-for-creating-command-sender-which-forwards-feedb.patch @@ -123,10 +123,10 @@ index 0000000000000000000000000000000000000000..ed3d488c6581df5eac425d9cccb8e741 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b4133f8dde5edb75b8d2d1008c50db7810276913..d9bfdeba8eaa8ab750b5037ff3d3a82a445adc2d 100644 +index ebf70b414c63cdb715d739c3333adbafc3bd01e7..4895f27be18157ae7fa6837cc970828554b9ced5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1988,6 +1988,13 @@ public final class CraftServer implements Server { +@@ -1970,6 +1970,13 @@ public final class CraftServer implements Server { return console.console; } @@ -162,7 +162,7 @@ index eaff8df6c8c12c64e005a68a02e2e35ed88f757c..1c638a4b1f2c841928d8b2a7ae43e4eb if (this instanceof CraftBlockCommandSender) { if (ServerCommandSender.blockPermInst == null) { diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java -index 4aa1dc543950b5de64345b3403a6d0bc41c521df..4525fb3bc9b137bce3b59310a8aecca96d6ad5ba 100644 +index 6df44aa60d2b41b95fe79ed4cf92a6d3369400ea..6035af2cf08353b3d3801220d8116d8611a0cd37 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java @@ -84,6 +84,11 @@ public final class VanillaCommandWrapper extends BukkitCommand { diff --git a/patches/unapplied/server/0848-Add-config-for-stronghold-seed.patch b/patches/server/0838-Add-config-for-stronghold-seed.patch similarity index 74% rename from patches/unapplied/server/0848-Add-config-for-stronghold-seed.patch rename to patches/server/0838-Add-config-for-stronghold-seed.patch index 020f8bb43a..1242c13ff2 100644 --- a/patches/unapplied/server/0848-Add-config-for-stronghold-seed.patch +++ b/patches/server/0838-Add-config-for-stronghold-seed.patch @@ -5,28 +5,28 @@ Subject: [PATCH] Add config for stronghold seed diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -index d5930d8ced9566c5494bed3685cf2d536eef6d50..daff5a9dd98e791b3f1dc898a082ff3e08adc92e 100644 +index 05c8b3f54ecb4221dcbf37574240401d93e14e7a..1af3570d080e8d2203434a52634e1eab86a7bf36 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -@@ -231,7 +231,13 @@ public abstract class ChunkGenerator implements BiomeManager.NoiseBiomeSource { - int k = concentricringsstructureplacement.spread(); - Random random = new Random(); +@@ -236,7 +236,13 @@ public abstract class ChunkGenerator { + HolderSet holderset = concentricringsstructureplacement.preferredBiomes(); + RandomSource randomsource = RandomSource.create(); + // Paper start + if (this.conf.strongholdSeed != null && this.structureSets.getResourceKey(holder).orElse(null) == net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS) { -+ random.setSeed(this.conf.strongholdSeed); ++ randomsource.setSeed(this.conf.strongholdSeed); + } else { + randomsource.setSeed(this instanceof FlatLevelSource ? 0L : randomstate.legacyLevelSeed()); ++ } + // Paper end - random.setSeed(this.ringPlacementSeed); -+ } // Paper - double d0 = random.nextDouble() * 3.141592653589793D * 2.0D; + double d0 = randomsource.nextDouble() * 3.141592653589793D * 2.0D; int l = 0; int i1 = 0; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index b498b027b127996976a394e9a86cfc90f8a8ed3b..31a447e6e156b7b244b2ac69a9c03c09c7ed388c 100644 +index 32f8a6aed0f69ad07ab5b42fee38a3471a59d426..b7d8363a96aa4527d84a43060d7e0b567a570a15 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -364,6 +364,7 @@ public class SpigotWorldConfig +@@ -352,6 +352,7 @@ public class SpigotWorldConfig public int mansionSeed; public int fossilSeed; public int portalSeed; @@ -34,7 +34,7 @@ index b498b027b127996976a394e9a86cfc90f8a8ed3b..31a447e6e156b7b244b2ac69a9c03c09 private void initWorldGenSeeds() { this.villageSeed = this.getInt( "seed-village", 10387312 ); -@@ -381,6 +382,10 @@ public class SpigotWorldConfig +@@ -369,6 +370,10 @@ public class SpigotWorldConfig this.mansionSeed = this.getInt( "seed-mansion", 10387319 ); this.fossilSeed = this.getInt( "seed-fossil", 14357921 ); this.portalSeed = this.getInt( "seed-portal", 34222645 ); diff --git a/patches/unapplied/server/0849-Implement-regenerateChunk.patch b/patches/server/0839-Implement-regenerateChunk.patch similarity index 98% rename from patches/unapplied/server/0849-Implement-regenerateChunk.patch rename to patches/server/0839-Implement-regenerateChunk.patch index fb9680ff85..67a81bb843 100644 --- a/patches/unapplied/server/0849-Implement-regenerateChunk.patch +++ b/patches/server/0839-Implement-regenerateChunk.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement regenerateChunk Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 925907eff49e26cac48e895f44c55f80b9a6f81e..7414bb0ba5754b4e3be468d3986a2a979de7c983 100644 +index 425e0940159e335f3919a6f623a56968864b8fc1..ee0ae10b555cf21e1e618bb3bc173c3be0e4ff2c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -133,6 +133,7 @@ import org.bukkit.util.Vector; diff --git a/patches/unapplied/server/0850-Log-exceptions-thrown-during-chat-processing.patch b/patches/server/0840-Log-exceptions-thrown-during-chat-processing.patch similarity index 91% rename from patches/unapplied/server/0850-Log-exceptions-thrown-during-chat-processing.patch rename to patches/server/0840-Log-exceptions-thrown-during-chat-processing.patch index 76bdbcdd9c..7e974e4627 100644 --- a/patches/unapplied/server/0850-Log-exceptions-thrown-during-chat-processing.patch +++ b/patches/server/0840-Log-exceptions-thrown-during-chat-processing.patch @@ -16,10 +16,10 @@ to the worker thread in the executor service, allowing the server to catch and properly log the exception to the console. diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java -index 8a0ced3f9b9099913ade4b71181aff6cafbc4ee6..21588ce5a408fed3454c317b56c05439ad3af27d 100644 +index 5c92aa1cc1a7e7fd0b7a06ae9b21e734fab71c74..3825aa2c381a3ee77e05bea520ff5fb828733857 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java -@@ -31,7 +31,7 @@ public class ServerboundChatPacket implements Packet { +@@ -45,7 +45,7 @@ public class ServerboundChatPacket implements Packet { public void handle(final ServerGamePacketListener listener) { if ( !this.message.startsWith("/") ) { diff --git a/patches/unapplied/server/0851-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0841-Fix-cancelled-powdered-snow-bucket-placement.patch similarity index 90% rename from patches/unapplied/server/0851-Fix-cancelled-powdered-snow-bucket-placement.patch rename to patches/server/0841-Fix-cancelled-powdered-snow-bucket-placement.patch index 9a95fdb1d3..f705aa0bd9 100644 --- a/patches/unapplied/server/0851-Fix-cancelled-powdered-snow-bucket-placement.patch +++ b/patches/server/0841-Fix-cancelled-powdered-snow-bucket-placement.patch @@ -8,7 +8,7 @@ snow bucket didn't revert grass that became snowy because of the placement. diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java -index 893d5bf448ddbccb30db0ee751c7f4a4e83634b9..8f3b9b8784f0d7b137a1ad87655ee8bad801b59d 100644 +index 00d31df5ba7e147b4b969a89cfc2b5088a988169..62d6c5b7590ff4faef5d8c7a8be03155b7338480 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java @@ -115,6 +115,7 @@ public class BlockItem extends Item { @@ -20,10 +20,10 @@ index 893d5bf448ddbccb30db0ee751c7f4a4e83634b9..8f3b9b8784f0d7b137a1ad87655ee8ba } return InteractionResult.FAIL; diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index a61a309bb921deba8b8022bc4e9fd04c2f8eba63..dc4639f905fb71435daf29c61f64621a3e2cc533 100644 +index 1f28b9adeb234496f80416fd416a86a0e6437a36..acd80da6e249f83ccd96c3bd24c3b75d9084fc91 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -325,7 +325,7 @@ public final class ItemStack { +@@ -339,7 +339,7 @@ public final class ItemStack { int oldCount = this.getCount(); ServerLevel world = (ServerLevel) itemactioncontext.getLevel(); @@ -32,7 +32,7 @@ index a61a309bb921deba8b8022bc4e9fd04c2f8eba63..dc4639f905fb71435daf29c61f64621a world.captureBlockStates = true; // special case bonemeal if (this.getItem() == Items.BONE_MEAL) { -@@ -379,7 +379,7 @@ public final class ItemStack { +@@ -393,7 +393,7 @@ public final class ItemStack { world.capturedBlockStates.clear(); if (blocks.size() > 1) { placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ()); diff --git a/patches/unapplied/server/0852-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0842-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch similarity index 86% rename from patches/unapplied/server/0852-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch rename to patches/server/0842-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index 85b0ad1a52..3f3f31f50c 100644 --- a/patches/unapplied/server/0852-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0842-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d9bfdeba8eaa8ab750b5037ff3d3a82a445adc2d..fbd4ecab83955c3c56fa076da12b28399641bd50 100644 +index 4895f27be18157ae7fa6837cc970828554b9ced5..1d9fc45d3fcf8a704f9bb286daa13ba027215f0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2157,6 +2157,8 @@ public final class CraftServer implements Server { +@@ -2139,6 +2139,8 @@ public final class CraftServer implements Server { @Override public int getSpawnLimit(SpawnCategory spawnCategory) { // Paper start diff --git a/patches/unapplied/server/0853-Add-GameEvent-tags.patch b/patches/server/0843-Add-GameEvent-tags.patch similarity index 83% rename from patches/unapplied/server/0853-Add-GameEvent-tags.patch rename to patches/server/0843-Add-GameEvent-tags.patch index 1a4217790e..d72915362f 100644 --- a/patches/unapplied/server/0853-Add-GameEvent-tags.patch +++ b/patches/server/0843-Add-GameEvent-tags.patch @@ -45,18 +45,10 @@ index 0000000000000000000000000000000000000000..cb78a3d4e21376ea24347187478525d5 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index fbd4ecab83955c3c56fa076da12b28399641bd50..2e0517aa65102af5c7aef08acbc25646b1a0afd8 100644 +index 1d9fc45d3fcf8a704f9bb286daa13ba027215f0a..3795f867ff439a3bce293aa6ad3754a1e218e8a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -97,6 +97,7 @@ import net.minecraft.world.level.biome.BiomeSource; - import net.minecraft.world.level.block.Block; - import net.minecraft.world.level.dimension.DimensionType; - import net.minecraft.world.level.dimension.LevelStem; -+import net.minecraft.world.level.gameevent.GameEvent; - import net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator; - import net.minecraft.world.level.levelgen.PatrolSpawner; - import net.minecraft.world.level.levelgen.PhantomSpawner; -@@ -2563,6 +2564,15 @@ public final class CraftServer implements Server { +@@ -2545,6 +2545,15 @@ public final class CraftServer implements Server { return (org.bukkit.Tag) new CraftEntityTag(Registry.ENTITY_TYPE, entityTagKey); } } @@ -72,14 +64,14 @@ index fbd4ecab83955c3c56fa076da12b28399641bd50..2e0517aa65102af5c7aef08acbc25646 default -> throw new IllegalArgumentException(); } -@@ -2595,6 +2605,13 @@ public final class CraftServer implements Server { +@@ -2577,6 +2586,13 @@ public final class CraftServer implements Server { Registry> entityTags = Registry.ENTITY_TYPE; return entityTags.getTags().map(pair -> (org.bukkit.Tag) new CraftEntityTag(entityTags, pair.getFirst())).collect(ImmutableList.toImmutableList()); } + // Paper start + case org.bukkit.Tag.REGISTRY_GAME_EVENTS -> { + Preconditions.checkArgument(clazz == org.bukkit.GameEvent.class); -+ Registry gameEvents = Registry.GAME_EVENT; ++ Registry gameEvents = Registry.GAME_EVENT; + return gameEvents.getTags().map(pair -> (org.bukkit.Tag) new io.papermc.paper.CraftGameEventTag(gameEvents, pair.getFirst())).collect(ImmutableList.toImmutableList()); + // Paper end + } diff --git a/patches/unapplied/server/0855-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0844-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch similarity index 87% rename from patches/unapplied/server/0855-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to patches/server/0844-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch index acba477db3..3d55321e07 100644 --- a/patches/unapplied/server/0855-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch +++ b/patches/server/0844-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch @@ -9,10 +9,10 @@ This might result in chunks loading far slower in the nether, for example. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 01aefce226ae82d707b38b0d56d2580d411a3c9a..c2c1242bcf26c73b3520c797e77c3c2d430dfac7 100644 +index 718b477b2f53a3b2decb4c045ece12ab75aee23d..47966d87c525067f0bc3d587cdf869d89cf5710c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1354,6 +1354,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { + nbt.put("listener", listenerNbt); + }); + if (this.listener.listenerRange != ((SculkSensorBlock) net.minecraft.world.level.block.Blocks.SCULK_SENSOR).getListenerRange()) nbt.putInt(PAPER_LISTENER_RANGE_NBT_KEY, this.listener.listenerRange); // Paper - only save if it's different from the default } diff --git a/patches/unapplied/server/0859-Add-missing-block-data-mins-and-maxes.patch b/patches/server/0848-Add-missing-block-data-mins-and-maxes.patch similarity index 73% rename from patches/unapplied/server/0859-Add-missing-block-data-mins-and-maxes.patch rename to patches/server/0848-Add-missing-block-data-mins-and-maxes.patch index 6f3d051671..83a0ac25ad 100644 --- a/patches/unapplied/server/0859-Add-missing-block-data-mins-and-maxes.patch +++ b/patches/server/0848-Add-missing-block-data-mins-and-maxes.patch @@ -4,19 +4,6 @@ Date: Sat, 16 Oct 2021 22:57:31 -0700 Subject: [PATCH] Add missing block data mins and maxes -diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java -index 5b0da54982fc0879005fd1db104284eb3318bee8..3c5a2de56724bc784f619f3087140c72a42dc57b 100644 ---- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java -+++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java -@@ -3,7 +3,7 @@ package org.bukkit.craftbukkit.block.data.type; - import org.bukkit.block.data.type.Leaves; - import org.bukkit.craftbukkit.block.data.CraftBlockData; - --public class CraftLeaves extends CraftBlockData implements Leaves { -+public abstract class CraftLeaves extends CraftBlockData implements Leaves { // Paper - make abstract (not used anyways) - - private static final net.minecraft.world.level.block.state.properties.IntegerProperty DISTANCE = getInteger("distance"); - private static final net.minecraft.world.level.block.state.properties.BooleanProperty PERSISTENT = getBoolean("persistent"); diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java index 83f86725c00f0e175cb46c7e27705ca777f413ba..24d16825c10edfed6d22e8e37ddb9fd804b716c4 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java @@ -34,22 +21,6 @@ index 83f86725c00f0e175cb46c7e27705ca777f413ba..24d16825c10edfed6d22e8e37ddb9fd8 // org.bukkit.craftbukkit.block.data.CraftLightable -diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java -index e17a85182555b7b50b4b1e42af871462699dba06..ef90de836888caa0a56c9c34c15bcd0d6c2d16a8 100644 ---- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java -+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java -@@ -31,4 +31,11 @@ public final class CraftCauldron extends org.bukkit.craftbukkit.block.data.Craft - public int getMaximumLevel() { - return getMax(CraftCauldron.LEVEL); - } -+ -+ // Paper start -+ @Override -+ public int getMinimumLevel() { -+ return getMin(CraftCauldron.LEVEL); -+ } -+ // Paper end - } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java index 780b6a29592571f4a730a858734256f69519cca7..ef97e77b25562a8aed35d68d42ced4825d43a29d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java @@ -99,12 +70,12 @@ index 0d08c81dd8582ef4f259f0e0db88e1b85d79f2a1..5b96ec73bf7bd4d90ce77cfe8ffec825 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java -index c4ac30e38bf786c491e0e1d47a9003f2b8e1d985..709812fd312f9eddfada21d3836eca6a696183fd 100644 +index 2775bcc7d61806764a121d45621a8928f5e301e7..8cb0f9bf8a2e264e089a0278d5fb4b157844f6e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java -@@ -37,4 +37,16 @@ public final class CraftLeaves extends org.bukkit.craftbukkit.block.data.CraftBl - public void setDistance(int distance) { - set(CraftLeaves.DISTANCE, distance); +@@ -51,4 +51,16 @@ public final class CraftLeaves extends org.bukkit.craftbukkit.block.data.CraftBl + public void setWaterlogged(boolean waterlogged) { + set(CraftLeaves.WATERLOGGED, waterlogged); } + + // Paper start diff --git a/patches/unapplied/server/0860-Option-to-have-default-CustomSpawners-in-custom-worl.patch b/patches/server/0849-Option-to-have-default-CustomSpawners-in-custom-worl.patch similarity index 69% rename from patches/unapplied/server/0860-Option-to-have-default-CustomSpawners-in-custom-worl.patch rename to patches/server/0849-Option-to-have-default-CustomSpawners-in-custom-worl.patch index 133d00d050..1a0f20075d 100644 --- a/patches/unapplied/server/0860-Option-to-have-default-CustomSpawners-in-custom-worl.patch +++ b/patches/server/0849-Option-to-have-default-CustomSpawners-in-custom-worl.patch @@ -10,12 +10,12 @@ just looking at the LevelStem key, look at the DimensionType key which is one level below that. Defaults to off to keep vanilla behavior. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 66d360b2c4ae9e380ec6c452a263c04bd3aef4ff..1ac6cf51f2682d5eb14fe19646e79f6617d492dd 100644 +index 8fff289a02234cbe5e808fe6e736788a2ed1e5c2..72e17ac76e5f3ac1283bec2133f76bc197353dd6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -683,4 +683,9 @@ public class PaperConfig { - globalMaxConcurrentChunkLoads = getDouble("settings.chunk-loading.global-max-concurrent-loads", 500.0); - playerMaxChunkLoadRate = getDouble("settings.chunk-loading.player-max-chunk-load-rate", -1.0); +@@ -642,4 +642,9 @@ public class PaperConfig { + private static void timeCommandAffectsAllWorlds() { + timeCommandAffectsAllWorlds = getBoolean("settings.time-command-affects-all-worlds", timeCommandAffectsAllWorlds); } + + public static boolean useDimensionTypeForCustomSpawners; @@ -24,22 +24,22 @@ index 66d360b2c4ae9e380ec6c452a263c04bd3aef4ff..1ac6cf51f2682d5eb14fe19646e79f66 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c2c1242bcf26c73b3520c797e77c3c2d430dfac7..443fb9cdce8bf542ca6216aa65c3e48c66dde654 100644 +index 47966d87c525067f0bc3d587cdf869d89cf5710c..dc585e962033c991f323d41a8a34e791a7cebe80 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -617,7 +617,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop spawners; -+ if (com.destroystokyo.paper.PaperConfig.useDimensionTypeForCustomSpawners && this.registryHolder.registryOrThrow(Registry.DIMENSION_TYPE_REGISTRY).getResourceKey(holder.value()).orElseThrow() == DimensionType.OVERWORLD_LOCATION) { ++ if (com.destroystokyo.paper.PaperConfig.useDimensionTypeForCustomSpawners && this.registryHolder.registryOrThrow(Registry.DIMENSION_TYPE_REGISTRY).getResourceKey(worlddimension.typeHolder().value()).orElseThrow() == net.minecraft.world.level.dimension.BuiltinDimensionTypes.OVERWORLD) { + spawners = list; + } else { + spawners = Collections.emptyList(); + } -+ world = new ServerLevel(this, this.executor, worldSession, iworlddataserver, worldKey, holder, worldloadlistener, chunkgenerator, flag, j, spawners, true, org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider); ++ world = new ServerLevel(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, spawners, true, org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider); + // Paper end } diff --git a/patches/unapplied/server/0861-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0850-Put-world-into-worldlist-before-initing-the-world.patch similarity index 85% rename from patches/unapplied/server/0861-Put-world-into-worldlist-before-initing-the-world.patch rename to patches/server/0850-Put-world-into-worldlist-before-initing-the-world.patch index 3c4e5271a9..3ca98470de 100644 --- a/patches/unapplied/server/0861-Put-world-into-worldlist-before-initing-the-world.patch +++ b/patches/server/0850-Put-world-into-worldlist-before-initing-the-world.patch @@ -7,10 +7,10 @@ Some parts of legacy conversion will need the overworld to get the legacy structure data storage diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 443fb9cdce8bf542ca6216aa65c3e48c66dde654..e4461fb3485391ec0a9d902d5b896bb95e7512b5 100644 +index dc585e962033c991f323d41a8a34e791a7cebe80..5bc41ec40452a81659d80edb3e28a8a7415434b2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -629,9 +629,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= 1 || Math.abs(j - this.xRotp) >= 1; - if (this.tickCount > 0 || this.entity instanceof AbstractArrow) { + if (!(this.entity instanceof net.minecraft.world.entity.decoration.HangingEntity) || this.tickCount > 0 || this.entity instanceof AbstractArrow) { // Paper - Always update position - // Paper start - remove allocation of Vec3D here - long k = ClientboundMoveEntityPacket.entityToPacket(vec3d_dx); - long l = ClientboundMoveEntityPacket.entityToPacket(vec3d_dy); - long i1 = ClientboundMoveEntityPacket.entityToPacket(vec3d_dz); - // Paper end - remove allocation of Vec3D here + long k = this.positionCodec.encodeX(vec3d); + long l = this.positionCodec.encodeY(vec3d); + long i1 = this.positionCodec.encodeZ(vec3d); boolean flag4 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L; + if (this.entity instanceof net.minecraft.world.entity.decoration.Painting) {flag4 = true;} // Paper - Always send exact position for paintings diff --git a/patches/unapplied/server/0863-Custom-Potion-Mixes.patch b/patches/server/0852-Custom-Potion-Mixes.patch similarity index 94% rename from patches/unapplied/server/0863-Custom-Potion-Mixes.patch rename to patches/server/0852-Custom-Potion-Mixes.patch index 2d9284dba0..b57e54dee9 100644 --- a/patches/unapplied/server/0863-Custom-Potion-Mixes.patch +++ b/patches/server/0852-Custom-Potion-Mixes.patch @@ -24,10 +24,10 @@ index 0000000000000000000000000000000000000000..6b0bed550763f34e18c9e92f9a47ec0c + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e4461fb3485391ec0a9d902d5b896bb95e7512b5..b079677723ff65f64adec044e7d89656ecc49e4d 100644 +index 5bc41ec40452a81659d80edb3e28a8a7415434b2..33953cc7afc2616577b768a23a7d4ce0230cf480 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2055,6 +2055,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -Date: Mon, 17 Jan 2022 19:47:19 +0100 -Subject: [PATCH] Kick on main for illegal chars - - -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1a15711e657c93965c2839dc130b7c53d86482b0..b42d4224d7f5c5de7e9fa8d6278af10f84d81245 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2081,7 +2081,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - - for (int i = 0; i < s.length(); ++i) { - if (!SharedConstants.isAllowedChatCharacter(s.charAt(i))) { -+ this.server.scheduleOnMain(() -> { // Paper - push to main for event firing - this.disconnect(new TranslatableComponent("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add cause -+ }); // Paper - push to main for event firing - return; - } - }