From c96e71fbabfb55914328350895994da70ffece71 Mon Sep 17 00:00:00 2001 From: granny Date: Sun, 28 Apr 2024 02:12:36 -0700 Subject: [PATCH] all patches applied \o/ --- .../0247-Skeletons-eat-wither-roses.patch} | 2 +- ...48-Enchantment-Table-Persists-Lapis.patch} | 72 +-- .../0249-Spark-Profiler.patch} | 4 +- ...-disable-kick-for-out-of-order-chat.patch} | 6 +- ...for-sculk-shrieker-can_summon-state.patch} | 4 +- .../0252-Config-to-not-let-coral-die.patch} | 4 +- .../0253-Add-local-difficulty-api.patch} | 4 +- ...254-Add-toggle-for-RNG-manipulation.patch} | 8 +- .../0255-Send-client-custom-name-of-BE.patch} | 6 +- .../0256-Remove-Timings.patch} | 162 +++--- .../0257-Remove-Mojang-Profiler.patch} | 466 +++++++++--------- ...r-output-for-invalid-movement-kicks.patch} | 6 +- .../0259-Add-Bee-API.patch} | 8 +- .../0260-Debug-Marker-API.patch} | 10 +- ...g-option-to-ignore-creative-players.patch} | 4 +- ...62-Add-skeleton-bow-accuracy-option.patch} | 4 +- .../0263-Allay-respect-item-NBT.patch} | 4 +- .../0264-Add-death-screen-API.patch} | 4 +- ...5-Implement-ram-and-rambar-commands.patch} | 22 +- ...Configurable-block-blast-resistance.patch} | 12 +- ...gurable-block-fall-damage-modifiers.patch} | 12 +- .../0268-Language-API.patch} | 4 +- .../0269-Milk-Keeps-Beneficial-Effects.patch} | 6 +- ...s-not-looking-up-and-down-when-stra.patch} | 0 ...d-log-suppression-for-LibraryLoader.patch} | 2 +- ...ow-creeper-to-encircle-target-when-.patch} | 0 .../0273-Fire-Immunity-API.patch} | 18 +- ...eport-to-spawn-on-nether-ceiling-da.patch} | 4 +- .../0275-Added-got-ram-event.patch} | 4 +- .../0276-Log-skipped-entity-s-position.patch} | 4 +- .../0277-End-Crystal-Cramming.patch} | 2 +- ...eacon-effects-when-covered-by-tinte.patch} | 8 +- ...ute-clamping-and-armor-limit-config.patch} | 24 +- ...ig-to-remove-explosion-radius-clamp.patch} | 6 +- ...ble-sugarcane-cactus-and-netherwart.patch} | 8 +- .../0282-Add-PreExplodeEvents.patch} | 6 +- ...3-Improve-output-of-plugins-command.patch} | 0 .../0284-Add-mending-multiplier.patch} | 4 +- .../0285-Make-GUI-Great-Again.patch} | 14 +- .../0286-Shears-can-defuse-TNT.patch} | 4 +- .../0287-Explorer-Map-API.patch} | 24 +- ...Option-Ocelot-Spawn-Under-Sea-Level.patch} | 4 +- ...-piglins-to-ignore-gold-trimmed-arm.patch} | 8 +- ...ways-showing-item-in-player-death-m.patch} | 20 +- ...0291-place-end-crystal-on-any-block.patch} | 4 +- .../0292-Add-hover-lines-API.patch} | 4 +- ...able-the-copper-oxidation-proximity.patch} | 0 ...4-register-minecraft-debug-commands.patch} | 14 +- ...Configurable-villager-search-radius.patch} | 0 49 files changed, 492 insertions(+), 528 deletions(-) rename patches/{unapplied-server/0251-Skeletons-eat-wither-roses.patch => server/0247-Skeletons-eat-wither-roses.patch} (98%) rename patches/{unapplied-server/0252-Enchantment-Table-Persists-Lapis.patch => server/0248-Enchantment-Table-Persists-Lapis.patch} (60%) rename patches/{unapplied-server/0253-Spark-Profiler.patch => server/0249-Spark-Profiler.patch} (97%) rename patches/{unapplied-server/0254-Option-to-disable-kick-for-out-of-order-chat.patch => server/0250-Option-to-disable-kick-for-out-of-order-chat.patch} (87%) rename patches/{unapplied-server/0255-Config-for-sculk-shrieker-can_summon-state.patch => server/0251-Config-for-sculk-shrieker-can_summon-state.patch} (92%) rename patches/{unapplied-server/0256-Config-to-not-let-coral-die.patch => server/0252-Config-to-not-let-coral-die.patch} (92%) rename patches/{unapplied-server/0257-Add-local-difficulty-api.patch => server/0253-Add-local-difficulty-api.patch} (86%) rename patches/{unapplied-server/0258-Add-toggle-for-RNG-manipulation.patch => server/0254-Add-toggle-for-RNG-manipulation.patch} (89%) rename patches/{unapplied-server/0259-Send-client-custom-name-of-BE.patch => server/0255-Send-client-custom-name-of-BE.patch} (84%) rename patches/{unapplied-server/0260-Remove-Timings.patch => server/0256-Remove-Timings.patch} (89%) rename patches/{unapplied-server/0261-Remove-Mojang-Profiler.patch => server/0257-Remove-Mojang-Profiler.patch} (83%) rename patches/{unapplied-server/0262-Add-more-logger-output-for-invalid-movement-kicks.patch => server/0258-Add-more-logger-output-for-invalid-movement-kicks.patch} (91%) rename patches/{unapplied-server/0263-Add-Bee-API.patch => server/0259-Add-Bee-API.patch} (89%) rename patches/{unapplied-server/0264-Debug-Marker-API.patch => server/0260-Debug-Marker-API.patch} (94%) rename patches/{unapplied-server/0265-mob-spawning-option-to-ignore-creative-players.patch => server/0261-mob-spawning-option-to-ignore-creative-players.patch} (94%) rename patches/{unapplied-server/0266-Add-skeleton-bow-accuracy-option.patch => server/0262-Add-skeleton-bow-accuracy-option.patch} (95%) rename patches/{unapplied-server/0267-Allay-respect-item-NBT.patch => server/0263-Allay-respect-item-NBT.patch} (94%) rename patches/{unapplied-server/0268-Add-death-screen-API.patch => server/0264-Add-death-screen-API.patch} (87%) rename patches/{unapplied-server/0270-Implement-ram-and-rambar-commands.patch => server/0265-Implement-ram-and-rambar-commands.patch} (96%) rename patches/{unapplied-server/0273-Configurable-block-blast-resistance.patch => server/0266-Configurable-block-blast-resistance.patch} (78%) rename patches/{unapplied-server/0274-Configurable-block-fall-damage-modifiers.patch => server/0267-Configurable-block-fall-damage-modifiers.patch} (93%) rename patches/{unapplied-server/0275-Language-API.patch => server/0268-Language-API.patch} (88%) rename patches/{unapplied-server/0276-Milk-Keeps-Beneficial-Effects.patch => server/0269-Milk-Keeps-Beneficial-Effects.patch} (94%) rename patches/{unapplied-server/0277-MC-121706-Fix-mobs-not-looking-up-and-down-when-stra.patch => server/0270-MC-121706-Fix-mobs-not-looking-up-and-down-when-stra.patch} (100%) rename patches/{unapplied-server/0278-Add-log-suppression-for-LibraryLoader.patch => server/0271-Add-log-suppression-for-LibraryLoader.patch} (94%) rename patches/{unapplied-server/0279-Add-option-to-allow-creeper-to-encircle-target-when-.patch => server/0272-Add-option-to-allow-creeper-to-encircle-target-when-.patch} (100%) rename patches/{unapplied-server/0280-Fire-Immunity-API.patch => server/0273-Fire-Immunity-API.patch} (79%) rename patches/{unapplied-server/0281-Add-option-to-teleport-to-spawn-on-nether-ceiling-da.patch => server/0274-Add-option-to-teleport-to-spawn-on-nether-ceiling-da.patch} (93%) rename patches/{unapplied-server/0282-Added-got-ram-event.patch => server/0275-Added-got-ram-event.patch} (86%) rename patches/{unapplied-server/0283-Log-skipped-entity-s-position.patch => server/0276-Log-skipped-entity-s-position.patch} (86%) rename patches/{unapplied-server/0284-End-Crystal-Cramming.patch => server/0277-End-Crystal-Cramming.patch} (96%) rename patches/{unapplied-server/0285-Option-to-allow-beacon-effects-when-covered-by-tinte.patch => server/0278-Option-to-allow-beacon-effects-when-covered-by-tinte.patch} (91%) rename patches/{unapplied-server/0286-Add-attribute-clamping-and-armor-limit-config.patch => server/0279-Add-attribute-clamping-and-armor-limit-config.patch} (76%) rename patches/{unapplied-server/0287-Config-to-remove-explosion-radius-clamp.patch => server/0280-Config-to-remove-explosion-radius-clamp.patch} (91%) rename patches/{unapplied-server/0288-bonemealable-sugarcane-cactus-and-netherwart.patch => server/0281-bonemealable-sugarcane-cactus-and-netherwart.patch} (94%) rename patches/{unapplied-server/0289-Add-PreExplodeEvents.patch => server/0282-Add-PreExplodeEvents.patch} (86%) rename patches/{unapplied-server/0290-Improve-output-of-plugins-command.patch => server/0283-Improve-output-of-plugins-command.patch} (100%) rename patches/{unapplied-server/0291-Add-mending-multiplier.patch => server/0284-Add-mending-multiplier.patch} (93%) rename patches/{unapplied-server/0292-Make-GUI-Great-Again.patch => server/0285-Make-GUI-Great-Again.patch} (96%) rename patches/{unapplied-server/0294-Shears-can-defuse-TNT.patch => server/0286-Shears-can-defuse-TNT.patch} (95%) rename patches/{unapplied-server/0295-Explorer-Map-API.patch => server/0287-Explorer-Map-API.patch} (66%) rename patches/{unapplied-server/0296-Option-Ocelot-Spawn-Under-Sea-Level.patch => server/0288-Option-Ocelot-Spawn-Under-Sea-Level.patch} (93%) rename patches/{unapplied-server/0297-add-an-option-for-piglins-to-ignore-gold-trimmed-arm.patch => server/0289-add-an-option-for-piglins-to-ignore-gold-trimmed-arm.patch} (86%) rename patches/{unapplied-server/0298-Add-option-for-always-showing-item-in-player-death-m.patch => server/0290-Add-option-for-always-showing-item-in-player-death-m.patch} (64%) rename patches/{unapplied-server/0299-place-end-crystal-on-any-block.patch => server/0291-place-end-crystal-on-any-block.patch} (93%) rename patches/{unapplied-server/0300-Add-hover-lines-API.patch => server/0292-Add-hover-lines-API.patch} (88%) rename patches/{unapplied-server/0301-Add-option-to-disable-the-copper-oxidation-proximity.patch => server/0293-Add-option-to-disable-the-copper-oxidation-proximity.patch} (100%) rename patches/{unapplied-server/0302-register-minecraft-debug-commands.patch => server/0294-register-minecraft-debug-commands.patch} (85%) rename patches/{unapplied-server/0303-Configurable-villager-search-radius.patch => server/0295-Configurable-villager-search-radius.patch} (100%) diff --git a/patches/unapplied-server/0251-Skeletons-eat-wither-roses.patch b/patches/server/0247-Skeletons-eat-wither-roses.patch similarity index 98% rename from patches/unapplied-server/0251-Skeletons-eat-wither-roses.patch rename to patches/server/0247-Skeletons-eat-wither-roses.patch index 06d088a7b..f751cc545 100644 --- a/patches/unapplied-server/0251-Skeletons-eat-wither-roses.patch +++ b/patches/server/0247-Skeletons-eat-wither-roses.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Skeletons eat wither roses diff --git a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java -index 2064d6177b3e43810d5962102fe914296e2627ff..30ff77f5f137614b5d0d2df6dc90f47c97e8ab13 100644 +index 1aae461eed332fe31c1449c47d0928f655c740da..9eb6ed001bfc578311300977dda6f3f156d07190 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java @@ -14,6 +14,16 @@ import net.minecraft.world.item.Items; diff --git a/patches/unapplied-server/0252-Enchantment-Table-Persists-Lapis.patch b/patches/server/0248-Enchantment-Table-Persists-Lapis.patch similarity index 60% rename from patches/unapplied-server/0252-Enchantment-Table-Persists-Lapis.patch rename to patches/server/0248-Enchantment-Table-Persists-Lapis.patch index 506dc5fc1..a796d25b3 100644 --- a/patches/unapplied-server/0252-Enchantment-Table-Persists-Lapis.patch +++ b/patches/server/0248-Enchantment-Table-Persists-Lapis.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Enchantment Table Persists Lapis diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -index e6935b6632c7a7e07f4da459c95f564356242f98..1a686780e5aadcbdcfceb770ce8e283b38115209 100644 +index 5b3e33807e0e13480e3359c0cf067719e5749237..8a7cb30524c75d155c27571e32da6511e265cbf4 100644 --- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -@@ -40,6 +40,12 @@ import org.bukkit.event.enchantment.PrepareItemEnchantEvent; +@@ -38,6 +38,12 @@ import org.bukkit.event.enchantment.PrepareItemEnchantEvent; import org.bukkit.entity.Player; // CraftBukkit end @@ -21,7 +21,7 @@ index e6935b6632c7a7e07f4da459c95f564356242f98..1a686780e5aadcbdcfceb770ce8e283b public class EnchantmentMenu extends AbstractContainerMenu { static final ResourceLocation EMPTY_SLOT_LAPIS_LAZULI = new ResourceLocation("item/empty_slot_lapis_lazuli"); -@@ -74,6 +80,22 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -72,6 +78,22 @@ public class EnchantmentMenu extends AbstractContainerMenu { return context.getLocation(); } // CraftBukkit end @@ -44,7 +44,7 @@ index e6935b6632c7a7e07f4da459c95f564356242f98..1a686780e5aadcbdcfceb770ce8e283b }; this.random = RandomSource.create(); this.enchantmentSeed = DataSlot.standalone(); -@@ -99,6 +121,17 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -97,6 +119,17 @@ public class EnchantmentMenu extends AbstractContainerMenu { } }); @@ -62,7 +62,7 @@ index e6935b6632c7a7e07f4da459c95f564356242f98..1a686780e5aadcbdcfceb770ce8e283b int j; for (j = 0; j < 3; ++j) { -@@ -351,6 +384,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -332,6 +365,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { public void removed(net.minecraft.world.entity.player.Player player) { super.removed(player); this.access.execute((world, blockposition) -> { @@ -70,69 +70,37 @@ index e6935b6632c7a7e07f4da459c95f564356242f98..1a686780e5aadcbdcfceb770ce8e283b this.clearContainer(player, this.enchantSlots); }); } -diff --git a/src/main/java/net/minecraft/world/level/block/EnchantmentTableBlock.java b/src/main/java/net/minecraft/world/level/block/EnchantmentTableBlock.java -index af3a8d5f4d80b22d67092bb0c2af5da31b2e3bce..7d5233a96dfa9fca2255e8e44b02179313087ef6 100644 ---- a/src/main/java/net/minecraft/world/level/block/EnchantmentTableBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/EnchantmentTableBlock.java -@@ -30,6 +30,8 @@ import net.minecraft.world.level.pathfinder.PathComputationType; - import net.minecraft.world.phys.BlockHitResult; - import net.minecraft.world.phys.shapes.CollisionContext; - import net.minecraft.world.phys.shapes.VoxelShape; -+import net.minecraft.world.Containers; // Purpur -+import net.minecraft.world.item.Items; // Purpur - - public class EnchantmentTableBlock extends BaseEntityBlock { - public static final MapCodec CODEC = simpleCodec(EnchantmentTableBlock::new); -@@ -137,4 +139,18 @@ public class EnchantmentTableBlock extends BaseEntityBlock { - public boolean isPathfindable(BlockState state, BlockGetter world, BlockPos pos, PathComputationType type) { - return false; - } -+ -+ // Purpur start -+ @Override -+ public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean moved) { -+ BlockEntity blockEntity = level.getBlockEntity(pos); -+ -+ if (level.purpurConfig.enchantmentTableLapisPersists && blockEntity instanceof EnchantmentTableBlockEntity enchantmentTable) { -+ Containers.dropItemStack(level, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LAPIS_LAZULI, enchantmentTable.getLapis())); -+ level.updateNeighbourForOutputSignal(pos, this); -+ } -+ -+ super.onRemove(state, level, pos, newState, moved); -+ } -+ // Purpur end - } -diff --git a/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java -index a912a1ccd3816a9c398946a8724bd3c882f4e9c3..af936b9a2daff9974c2f6ca3c8f5541db94cb40d 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java -@@ -24,6 +24,7 @@ public class EnchantmentTableBlockEntity extends BlockEntity implements Nameable - public float tRot; +diff --git a/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java +index c3503eaec5c5ece6e27a52fb703d06ec7c767383..ed7b41604fb201c346c362803bb9280831c0d0fb 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java +@@ -28,6 +28,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable private static final RandomSource RANDOM = RandomSource.create(); + @Nullable private Component name; + private int lapis = 0; // Purpur - public EnchantmentTableBlockEntity(BlockPos pos, BlockState state) { + public EnchantingTableBlockEntity(BlockPos pos, BlockState state) { super(BlockEntityType.ENCHANTING_TABLE, pos, state); -@@ -35,6 +36,7 @@ public class EnchantmentTableBlockEntity extends BlockEntity implements Nameable +@@ -39,6 +40,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable if (this.hasCustomName()) { - nbt.putString("CustomName", Component.Serializer.toJson(this.name)); + nbt.putString("CustomName", Component.Serializer.toJson(this.name, registryLookup)); } + nbt.putInt("Purpur.Lapis", this.lapis); // Purpur } @Override -@@ -43,6 +45,7 @@ public class EnchantmentTableBlockEntity extends BlockEntity implements Nameable +@@ -47,6 +49,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable if (nbt.contains("CustomName", 8)) { - this.name = io.papermc.paper.util.MCUtil.getBaseComponentFromNbt("CustomName", nbt); // Paper - Catch ParseException + this.name = io.papermc.paper.util.MCUtil.getBaseComponentFromNbt("CustomName", nbt, registryLookup); // Paper - Catch ParseException } + this.lapis = nbt.getInt("Purpur.Lapis"); // Purpur } - public static void bookAnimationTick(Level world, BlockPos pos, BlockState state, EnchantmentTableBlockEntity blockEntity) { -@@ -117,4 +120,14 @@ public class EnchantmentTableBlockEntity extends BlockEntity implements Nameable - public Component getCustomName() { - return this.name; + public static void bookAnimationTick(Level world, BlockPos pos, BlockState state, EnchantingTableBlockEntity blockEntity) { +@@ -138,4 +141,14 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable + public void removeComponentsFromTag(CompoundTag nbt) { + nbt.remove("CustomName"); } + + // Purpur start diff --git a/patches/unapplied-server/0253-Spark-Profiler.patch b/patches/server/0249-Spark-Profiler.patch similarity index 97% rename from patches/unapplied-server/0253-Spark-Profiler.patch rename to patches/server/0249-Spark-Profiler.patch index a6de0555e..8ec8899bb 100644 --- a/patches/unapplied-server/0253-Spark-Profiler.patch +++ b/patches/server/0249-Spark-Profiler.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Spark Profiler Co-authored-by: granny diff --git a/src/main/java/io/papermc/paper/plugin/PluginInitializerManager.java b/src/main/java/io/papermc/paper/plugin/PluginInitializerManager.java -index 708e5bb9bbf0476fcc2c4b92c6830b094703b43e..6141f716b15ad47ac2ac4c9ce92a3897b3ad8807 100644 +index bb1cfa8ea8b11fc36ea72c8e382b8554bccd0ce5..a1af6a07a5fcd280993ad9dae139f3343200692f 100644 --- a/src/main/java/io/papermc/paper/plugin/PluginInitializerManager.java +++ b/src/main/java/io/papermc/paper/plugin/PluginInitializerManager.java -@@ -104,6 +104,7 @@ public class PluginInitializerManager { +@@ -109,6 +109,7 @@ public class PluginInitializerManager { @SuppressWarnings("unchecked") java.util.List files = ((java.util.List) optionSet.valuesOf("add-plugin")).stream().map(File::toPath).toList(); io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(io.papermc.paper.plugin.provider.source.PluginFlagProviderSource.INSTANCE, files); diff --git a/patches/unapplied-server/0254-Option-to-disable-kick-for-out-of-order-chat.patch b/patches/server/0250-Option-to-disable-kick-for-out-of-order-chat.patch similarity index 87% rename from patches/unapplied-server/0254-Option-to-disable-kick-for-out-of-order-chat.patch rename to patches/server/0250-Option-to-disable-kick-for-out-of-order-chat.patch index 9d3f78cc2..52d21411d 100644 --- a/patches/unapplied-server/0254-Option-to-disable-kick-for-out-of-order-chat.patch +++ b/patches/server/0250-Option-to-disable-kick-for-out-of-order-chat.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option to disable kick for out of order chat diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1cefa3b6bdd62ae7bf30da872012fc150905f5ae..db42bf7c5604f32b9b06accb4bbc004ed264a3c2 100644 +index 7c96644ee70ea061a5eb29809c2c5cc1bf55e194..530421935473693681819073e1ce9a52cb275775 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1716,7 +1716,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1696,7 +1696,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl do { if (!iterator.hasNext()) { @@ -18,7 +18,7 @@ index 1cefa3b6bdd62ae7bf30da872012fc150905f5ae..db42bf7c5604f32b9b06accb4bbc004e voxelshape1 = (VoxelShape) iterator.next(); diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 9bc5cc4944dcd3918b2a90bde9dd8fdd795ae3b2..b55a4366f69a1f259d5d7aed01764aec14a1dbb2 100644 +index 07d6455c781b8743a833cbc04576015433686c4b..d038e62a0151e3b5c9dee06f1b2682684d0b496e 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -461,9 +461,11 @@ public class PurpurConfig { diff --git a/patches/unapplied-server/0255-Config-for-sculk-shrieker-can_summon-state.patch b/patches/server/0251-Config-for-sculk-shrieker-can_summon-state.patch similarity index 92% rename from patches/unapplied-server/0255-Config-for-sculk-shrieker-can_summon-state.patch rename to patches/server/0251-Config-for-sculk-shrieker-can_summon-state.patch index 6436c671a..c1bcf0d56 100644 --- a/patches/unapplied-server/0255-Config-for-sculk-shrieker-can_summon-state.patch +++ b/patches/server/0251-Config-for-sculk-shrieker-can_summon-state.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Config for sculk shrieker can_summon state diff --git a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java -index 09c61eb5ba129e9630a756b452ef6aa61745c533..837c8399b2f490d98ca556e66018bfd471cf05bf 100644 +index b6b367492ebe2af3e63381bef935c6077f6ddb27..09f34c30d9a03751ed826b26375ac5aee778cce4 100644 --- a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java -@@ -137,7 +137,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo +@@ -134,7 +134,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo @Nullable @Override public BlockState getStateForPlacement(BlockPlaceContext ctx) { diff --git a/patches/unapplied-server/0256-Config-to-not-let-coral-die.patch b/patches/server/0252-Config-to-not-let-coral-die.patch similarity index 92% rename from patches/unapplied-server/0256-Config-to-not-let-coral-die.patch rename to patches/server/0252-Config-to-not-let-coral-die.patch index f57e87cf2..47b3baeb5 100644 --- a/patches/unapplied-server/0256-Config-to-not-let-coral-die.patch +++ b/patches/server/0252-Config-to-not-let-coral-die.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Config to not let coral die diff --git a/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java b/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java -index ffcb4849d83e0f02adbb106f4543bb4898678267..700108e84cf3836a0542c5e04856a9fe254794e9 100644 +index ce9f189bdafec26360bfadd0f36a8bc2726e132b..d5465b48531fd4b4094874c135274abf985ee71a 100644 --- a/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java @@ -38,6 +38,7 @@ public abstract class BaseCoralPlantTypeBlock extends Block implements SimpleWat @@ -17,7 +17,7 @@ index ffcb4849d83e0f02adbb106f4543bb4898678267..700108e84cf3836a0542c5e04856a9fe return true; } else { diff --git a/src/main/java/net/minecraft/world/level/block/CoralBlock.java b/src/main/java/net/minecraft/world/level/block/CoralBlock.java -index 8fd8285e07de4a0457da507501e49a807542f3b1..e580c5a141bebdc45893b5abde01e633c864fc13 100644 +index 81fe0dea8e6e23c4a78f07fc2f9c0d68cd683f11..bff97b7d3909f2ec9e58a341b901b3741927543f 100644 --- a/src/main/java/net/minecraft/world/level/block/CoralBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CoralBlock.java @@ -59,6 +59,7 @@ public class CoralBlock extends Block { diff --git a/patches/unapplied-server/0257-Add-local-difficulty-api.patch b/patches/server/0253-Add-local-difficulty-api.patch similarity index 86% rename from patches/unapplied-server/0257-Add-local-difficulty-api.patch rename to patches/server/0253-Add-local-difficulty-api.patch index d33da05e7..512458afe 100644 --- a/patches/unapplied-server/0257-Add-local-difficulty-api.patch +++ b/patches/server/0253-Add-local-difficulty-api.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add local difficulty api diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 00357d78182b3ff87e3d9a45705b072af56739c8..06abe25b335606b42ac2a7b5551f0c9e7143a474 100644 +index f2b20ed5063a293f0b464548f590d652170cd1d8..b7a02ae4eda06cab8ffd1220259a061558981dec 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2416,6 +2416,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2424,6 +2424,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight()); } diff --git a/patches/unapplied-server/0258-Add-toggle-for-RNG-manipulation.patch b/patches/server/0254-Add-toggle-for-RNG-manipulation.patch similarity index 89% rename from patches/unapplied-server/0258-Add-toggle-for-RNG-manipulation.patch rename to patches/server/0254-Add-toggle-for-RNG-manipulation.patch index 0fd9e65a7..ea5530bb4 100644 --- a/patches/unapplied-server/0258-Add-toggle-for-RNG-manipulation.patch +++ b/patches/server/0254-Add-toggle-for-RNG-manipulation.patch @@ -7,10 +7,10 @@ Paper patches RNG maniplulation by using a shared (and locked) random source. This comes with a performance gain, but technical players may prefer the ability to manipulate RNG. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 2cac12d2b788b0962b719a83b43dc23177b76ac6..ec6187bc3f445acb86e69161ab1b82248b6e99e0 100644 +index 2d1fc8734f440c284710c71abc6789e8185ec909..68e8f9913055219486ce19d95dcf9d7c76e08082 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -597,7 +597,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -597,7 +597,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; @@ -20,10 +20,10 @@ index 2cac12d2b788b0962b719a83b43dc23177b76ac6..ec6187bc3f445acb86e69161ab1b8224 this.fluidHeight = new Object2DoubleArrayMap(2); this.fluidOnEyes = new HashSet(); diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java -index fa15e43d19482125e1793e049d1a1380aced906c..38d1eb5680281b2812f2396677ffb959a6e089ce 100644 +index b86676ebcd6c301e5dd857d8e84e1db2c1da416b..cb950ba3ee3bdfe0ff7acdb94c7ee233d73ab22e 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Squid.java +++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java -@@ -44,7 +44,7 @@ public class Squid extends WaterAnimal { +@@ -42,7 +42,7 @@ public class Squid extends WaterAnimal { public Squid(EntityType type, Level world) { super(type, world); diff --git a/patches/unapplied-server/0259-Send-client-custom-name-of-BE.patch b/patches/server/0255-Send-client-custom-name-of-BE.patch similarity index 84% rename from patches/unapplied-server/0259-Send-client-custom-name-of-BE.patch rename to patches/server/0255-Send-client-custom-name-of-BE.patch index a54970c0e..964e26215 100644 --- a/patches/unapplied-server/0259-Send-client-custom-name-of-BE.patch +++ b/patches/server/0255-Send-client-custom-name-of-BE.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Send client custom name of BE diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 8e1afae66742fc69d5aab1074ba94a3999cbf9b8..e9701ed4e5b35ace1accd2b46f082191d8ab6497 100644 +index 4ea15e17a1393864422edb6d5c57962651abf69a..a78ed43288cfefaeb2592ed0a33fd11565dea2b2 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -205,10 +205,24 @@ public abstract class BlockEntity { +@@ -256,10 +256,24 @@ public abstract class BlockEntity { @Nullable public Packet getUpdatePacket() { @@ -22,7 +22,7 @@ index 8e1afae66742fc69d5aab1074ba94a3999cbf9b8..e9701ed4e5b35ace1accd2b46f082191 return null; } - public CompoundTag getUpdateTag() { + public CompoundTag getUpdateTag(HolderLookup.Provider registryLookup) { + // Purpur start + if (this instanceof net.minecraft.world.Nameable nameable && nameable.hasCustomName()) { + CompoundTag nbt = this.saveWithoutMetadata(); diff --git a/patches/unapplied-server/0260-Remove-Timings.patch b/patches/server/0256-Remove-Timings.patch similarity index 89% rename from patches/unapplied-server/0260-Remove-Timings.patch rename to patches/server/0256-Remove-Timings.patch index d63b5a6c6..f947838cd 100644 --- a/patches/unapplied-server/0260-Remove-Timings.patch +++ b/patches/server/0256-Remove-Timings.patch @@ -21,7 +21,7 @@ index 6bc7c6f16a1649fc9e24e7cf90fca401e5bd4875..e1ffd62f4ebceecb9bc5471df3da406c private static final ThreadLocal> CURRENT_TICKET_UPDATE_SCHEDULING = new ThreadLocal<>(); diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java -index b66a7d4aab887309579154815a0d4abf9de506b0..e6f56bc5b129699bab60db9c97c7f73b6ede2351 100644 +index 56b07a3306e5735816c8d89601b519cb0db6379a..604de7aed6db44c9c84d541765e57da48883cf00 100644 --- a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java +++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java @@ -1779,7 +1779,7 @@ public final class NewChunkHolder { @@ -43,10 +43,10 @@ index b66a7d4aab887309579154815a0d4abf9de506b0..e6f56bc5b129699bab60db9c97c7f73b return executedUnloadTask | canSaveChunk | canSaveEntities | canSavePOI ? new SaveStat(executedUnloadTask || canSaveChunk, canSaveEntities, canSavePOI): null; } diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -index 83302c252f54481f239522e5c6861ccfe233070a..620edb63cacd15e38f7fc859efd4095bfb5e5f72 100644 +index 57e76b53e5e314c3e6b8856010f7a84188121582..8c134a642ccaf3530022f2e675a858d726e1dda4 100644 --- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java +++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -@@ -50,7 +50,7 @@ public class PacketUtils { +@@ -51,7 +51,7 @@ public class PacketUtils { if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players if (listener.shouldHandleMessage(packet)) { co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings @@ -54,12 +54,12 @@ index 83302c252f54481f239522e5c6861ccfe233070a..620edb63cacd15e38f7fc859efd4095b + try { // Paper - timings // Purpur packet.handle(listener); } catch (Exception exception) { - label25: + if (exception instanceof ReportedException) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 71fca0aae67c632198625cbec4381afeff7771be..0b1f9a51aaf97c3fb8a68bb7141ff76430d3b1a5 100644 +index 5081a631a94920db0307341261755eac399fea1e..f3c66049ab3fe087fa0fa87c2fca36c3c8b5c572 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1439,7 +1439,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { entityplayer.connection.suspendFlushing(); }); @@ -129,7 +129,7 @@ index 71fca0aae67c632198625cbec4381afeff7771be..0b1f9a51aaf97c3fb8a68bb7141ff764 // Paper start - Folia scheduler API ((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick(); getAllLevels().forEach(level -> { -@@ -1694,21 +1694,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = Lists.newArrayList(); List list1 = this.level.players(); ObjectIterator objectiterator = this.entityMap.values().iterator(); @@ -297,7 +297,7 @@ index 1081e9df44bb24b2c51ebd9364c21c7b2a3a205a..3fbc1e7e401331790d590dcd513a0a26 ChunkMap.TrackedEntity playerchunkmap_entitytracker; -@@ -1198,17 +1198,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1214,17 +1214,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider playerchunkmap_entitytracker.serverEntity.sendChanges(); } } @@ -319,10 +319,10 @@ index 1081e9df44bb24b2c51ebd9364c21c7b2a3a205a..3fbc1e7e401331790d590dcd513a0a26 } diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 1cf8c819c0d7776c3b33d6594ca81abe3c2a719d..bbc3153379d7da8b4d91c49a3ba83d4415a7671a 100644 +index b99f50604bafecbc68835974c9ed0caa91911a40..07b428ed7837642254b1edd55fd08a7beac7e303 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -281,10 +281,10 @@ public class ServerChunkCache extends ChunkSource { +@@ -274,10 +274,10 @@ public class ServerChunkCache extends ChunkSource { if (!completablefuture.isDone()) { // Paper io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.pushChunkWait(this.level, x1, z1); // Paper - rewrite chunk system com.destroystokyo.paper.io.SyncLoadFinder.logSyncLoad(this.level, x, z); // Paper - Add debug for sync chunk loads @@ -333,9 +333,9 @@ index 1cf8c819c0d7776c3b33d6594ca81abe3c2a719d..bbc3153379d7da8b4d91c49a3ba83d44 - this.level.timings.syncChunkLoad.stopTiming(); // Paper + //this.level.timings.syncChunkLoad.stopTiming(); // Paper // Purpur } // Paper - ichunkaccess = (ChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { - return ichunkaccess1; -@@ -433,17 +433,17 @@ public class ServerChunkCache extends ChunkSource { + ChunkResult chunkresult = (ChunkResult) completablefuture.join(); + ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error +@@ -425,17 +425,17 @@ public class ServerChunkCache extends ChunkSource { public void save(boolean flush) { this.runDistanceManagerUpdates(); @@ -357,13 +357,16 @@ index 1cf8c819c0d7776c3b33d6594ca81abe3c2a719d..bbc3153379d7da8b4d91c49a3ba83d44 } // Paper end - Incremental chunk and player saving -@@ -480,23 +480,23 @@ public class ServerChunkCache extends ChunkSource { +@@ -472,26 +472,25 @@ public class ServerChunkCache extends ChunkSource { @Override public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) { this.level.getProfiler().push("purge"); - this.level.timings.doChunkMap.startTiming(); // Spigot + //this.level.timings.doChunkMap.startTiming(); // Spigot // Purpur - this.distanceManager.purgeStaleTickets(); + if (this.level.tickRateManager().runsNormally() || !tickChunks) { + this.distanceManager.purgeStaleTickets(); + } +- this.runDistanceManagerUpdates(); - this.level.timings.doChunkMap.stopTiming(); // Spigot + //this.level.timings.doChunkMap.stopTiming(); // Spigot // Purpur @@ -387,7 +390,7 @@ index 1cf8c819c0d7776c3b33d6594ca81abe3c2a719d..bbc3153379d7da8b4d91c49a3ba83d44 this.level.getProfiler().pop(); this.clearCache(); } -@@ -512,14 +512,14 @@ public class ServerChunkCache extends ChunkSource { +@@ -507,13 +506,13 @@ public class ServerChunkCache extends ChunkSource { gameprofilerfiller.push("pollingChunks"); gameprofilerfiller.push("filteringLoadedChunks"); // Paper - optimise chunk tick iteration @@ -396,24 +399,23 @@ index 1cf8c819c0d7776c3b33d6594ca81abe3c2a719d..bbc3153379d7da8b4d91c49a3ba83d44 // Paper - optimise chunk tick iteration - this.level.resetIceAndSnowTick(); // Pufferfish - reset ice & snow tick random - if (this.level.getServer().tickRateManager().runsNormally()) { + if (this.level.tickRateManager().runsNormally()) { gameprofilerfiller.popPush("naturalSpawnCount"); - this.level.timings.countNaturalMobs.startTiming(); // Paper - timings + //this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur int k = this.distanceManager.getNaturalSpawnChunkCount(); // Paper start - Optional per player mob spawns int naturalSpawnChunkCount = k; -@@ -549,7 +549,7 @@ public class ServerChunkCache extends ChunkSource { - // Pufferfish end +@@ -538,7 +537,7 @@ public class ServerChunkCache extends ChunkSource { + spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, !this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new LocalMobCapCalculator(this.chunkMap) : null, false); } // Paper end - Optional per player mob spawns - this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings + // this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur - // this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously + this.lastSpawnState = spawnercreature_d; gameprofilerfiller.popPush("spawnAndTick"); -@@ -658,19 +658,19 @@ public class ServerChunkCache extends ChunkSource { +@@ -647,19 +646,19 @@ public class ServerChunkCache extends ChunkSource { } } // Paper end - optimise chunk tick iteration @@ -437,7 +439,7 @@ index 1cf8c819c0d7776c3b33d6594ca81abe3c2a719d..bbc3153379d7da8b4d91c49a3ba83d44 // Paper start - optimise chunk tick iteration if (!this.chunkMap.needsChangeBroadcasting.isEmpty()) { it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet copy = this.chunkMap.needsChangeBroadcasting.clone(); -@@ -684,7 +684,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -673,7 +672,7 @@ public class ServerChunkCache extends ChunkSource { } } // Paper end - optimise chunk tick iteration @@ -447,10 +449,10 @@ index 1cf8c819c0d7776c3b33d6594ca81abe3c2a719d..bbc3153379d7da8b4d91c49a3ba83d44 gameprofilerfiller.pop(); gameprofilerfiller.pop(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a09bba649a 100644 +index ae2b9732b2795ea7faec96af4c27ccb04f772307..a84a9218838fb42c49a00c0d5f28e9e486fc7dac 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -866,7 +866,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -872,7 +872,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } gameprofilerfiller.popPush("tickPending"); @@ -459,7 +461,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 if (!this.isDebug() && flag) { j = this.getGameTime(); gameprofilerfiller.push("blockTicks"); -@@ -875,24 +875,24 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -881,24 +881,24 @@ public class ServerLevel extends Level implements WorldGenLevel { this.fluidTicks.tick(j, paperConfig().environment.maxFluidTicks, this::tickFluid); // Paper - configurable max fluid ticks gameprofilerfiller.pop(); } @@ -491,7 +493,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 } this.handlingTick = false; -@@ -905,7 +905,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -911,7 +911,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (flag1 || this.emptyTime++ < 300) { gameprofilerfiller.push("entities"); @@ -500,16 +502,16 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 if (this.dragonFight != null && flag) { gameprofilerfiller.push("dragonFight"); this.dragonFight.tick(); -@@ -913,7 +913,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -919,7 +919,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } org.spigotmc.ActivationRange.activateEntities(this); // Spigot - this.timings.entityTick.startTiming(); // Spigot + //this.timings.entityTick.startTiming(); // Spigot // Purpur this.entityTickList.forEach((entity) -> { - entity.activatedPriorityReset = false; // Pufferfish - DAB if (!entity.isRemoved()) { -@@ -954,8 +954,8 @@ public class ServerLevel extends Level implements WorldGenLevel { + if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed +@@ -946,8 +946,8 @@ public class ServerLevel extends Level implements WorldGenLevel { } } }); @@ -520,7 +522,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 gameprofilerfiller.pop(); this.tickBlockEntities(); } -@@ -1099,7 +1099,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1089,7 +1089,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } // Paper - Option to disable ice and snow gameprofilerfiller.popPush("tickBlocks"); @@ -529,7 +531,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 if (randomTickSpeed > 0) { // Paper start - optimize random block ticking LevelChunkSection[] sections = chunk.getSections(); -@@ -1133,7 +1133,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1123,7 +1123,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } // Paper end - optimise random block ticking @@ -538,7 +540,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 gameprofilerfiller.pop(); } -@@ -1477,8 +1477,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1467,8 +1467,8 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot end // Paper start- timings final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity); @@ -549,7 +551,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 // Paper end - timings entity.setOldPosAndRot(); ProfilerFiller gameprofilerfiller = this.getProfiler(); -@@ -1494,7 +1494,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1484,7 +1484,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.postTick(); // CraftBukkit } else { entity.inactiveTick(); } // Paper - EAR 2 this.getProfiler().pop(); @@ -558,7 +560,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 Iterator iterator = entity.getPassengers().iterator(); while (iterator.hasNext()) { -@@ -1517,8 +1517,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1507,8 +1507,8 @@ public class ServerLevel extends Level implements WorldGenLevel { if (passenger instanceof Player || this.entityTickList.contains(passenger)) { // Paper - EAR 2 final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(passenger); @@ -569,7 +571,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 // Paper end passenger.setOldPosAndRot(); ++passenger.tickCount; -@@ -1548,7 +1548,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1538,7 +1538,7 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickPassenger(passenger, entity2); } @@ -578,7 +580,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 } } else { passenger.stopRiding(); -@@ -1568,14 +1568,14 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1558,14 +1558,14 @@ public class ServerLevel extends Level implements WorldGenLevel { org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); } @@ -596,7 +598,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 // Copied from save() // CraftBukkit start - moved from MinecraftServer.saveChunks -@@ -1587,7 +1587,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1577,7 +1577,7 @@ public class ServerLevel extends Level implements WorldGenLevel { this.convertable.saveDataTag(this.server.registryAccess(), this.serverLevelData, this.server.getPlayerList().getSingleplayerData()); } // CraftBukkit end @@ -605,7 +607,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 } // Paper end - Incremental chunk and player saving -@@ -1601,7 +1601,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1591,7 +1591,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (!savingDisabled) { org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit @@ -614,7 +616,7 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 if (progressListener != null) { progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel")); } -@@ -1611,11 +1611,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1601,11 +1601,11 @@ public class ServerLevel extends Level implements WorldGenLevel { progressListener.progressStage(Component.translatable("menu.savingChunks")); } @@ -630,10 +632,10 @@ index 8caa45d3bdf1a7b576427f6e3ae976bbfcb911f6..0d9ac7d3248686780b7482afab3059a0 } else if (close) { chunkproviderserver.close(false); } // Paper - rewrite chunk system diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 716377ce3236c9ae012b9bbcf432251ca06a9342..fdbdaa1d8d5760c5c661cbeca803e8ff8ec46aac 100644 +index 530421935473693681819073e1ce9a52cb275775..5ae8b009e5ba2fc896e7f52b864aecafe4e892d4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2456,7 +2456,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2509,7 +2509,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl public void handleCommand(String s) { // Paper - private -> public org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher @@ -642,7 +644,7 @@ index 716377ce3236c9ae012b9bbcf432251ca06a9342..fdbdaa1d8d5760c5c661cbeca803e8ff if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); -@@ -2466,7 +2466,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2519,7 +2519,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.cserver.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -651,7 +653,7 @@ index 716377ce3236c9ae012b9bbcf432251ca06a9342..fdbdaa1d8d5760c5c661cbeca803e8ff return; } -@@ -2479,7 +2479,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2532,7 +2532,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); return; } finally { @@ -661,10 +663,10 @@ index 716377ce3236c9ae012b9bbcf432251ca06a9342..fdbdaa1d8d5760c5c661cbeca803e8ff } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 1b8b0bafce3352bd65d570ac7cb4ea3acdfe991d..ac1e0c66f167218306504db6037cc1d6509072a0 100644 +index d20a7a79e27db1092ff78910df5d45982971cc3e..b863f6fe65c796a1d3102cc3eddb5d6c5becd3ac 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1274,7 +1274,7 @@ public abstract class PlayerList { +@@ -1273,7 +1273,7 @@ public abstract class PlayerList { public void saveAll(int interval) { io.papermc.paper.util.MCUtil.ensureMain("Save Players" , () -> { // Paper - Ensure main @@ -673,7 +675,7 @@ index 1b8b0bafce3352bd65d570ac7cb4ea3acdfe991d..ac1e0c66f167218306504db6037cc1d6 int numSaved = 0; long now = MinecraftServer.currentTick; for (int i = 0; i < this.players.size(); ++i) { -@@ -1285,7 +1285,7 @@ public abstract class PlayerList { +@@ -1284,7 +1284,7 @@ public abstract class PlayerList { } // Paper end - Incremental chunk and player saving } @@ -683,7 +685,7 @@ index 1b8b0bafce3352bd65d570ac7cb4ea3acdfe991d..ac1e0c66f167218306504db6037cc1d6 } diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java -index 03092417cd8ab5c6d266f3af9f20f47b34cfaba3..8f7d9f8a5138bcd572691d66c814aaa7c308b317 100644 +index 9379dd4056018b52c93ed4888dcdc94579bd9691..612a14806ec63b0dcf31814396282f4b7f4a527c 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java @@ -59,9 +59,9 @@ public abstract class Behavior implements BehaviorContro @@ -715,7 +717,7 @@ index 03092417cd8ab5c6d266f3af9f20f47b34cfaba3..8f7d9f8a5138bcd572691d66c814aaa7 protected void tick(ServerLevel world, E entity, long time) { diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java -index 9e90cb2f51d1bacacb287e912d14ab9152523205..e553f52de2e0b30511ac1b73cb436374017cd7d7 100644 +index 85b4b24361e785acf75571ff98f924c00ae80748..09a7b418ddf564c0be13297f7c216db2e7ae1578 100644 --- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java +++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java @@ -53,10 +53,10 @@ public abstract class Sensor { @@ -732,10 +734,10 @@ index 9e90cb2f51d1bacacb287e912d14ab9152523205..e553f52de2e0b30511ac1b73cb436374 } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 9e896ede9f84568b5675e04294bb9b6a8d016324..ea9b33eb48d8610943d122811cc49d211bc22d86 100644 +index edd9762e2475aa8828930ada59eb331a8e8d3970..4d00d72d66adfb282d354e22703552b333138694 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1317,15 +1317,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1306,15 +1306,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { ProfilerFiller gameprofilerfiller = this.getProfiler(); gameprofilerfiller.push("blockEntities"); @@ -754,7 +756,7 @@ index 9e896ede9f84568b5675e04294bb9b6a8d016324..ea9b33eb48d8610943d122811cc49d21 // Spigot start // Iterator iterator = this.blockEntityTickers.iterator(); boolean flag = this.tickRateManager().runsNormally(); -@@ -1354,7 +1354,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1343,7 +1343,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075 @@ -764,10 +766,10 @@ index 9e896ede9f84568b5675e04294bb9b6a8d016324..ea9b33eb48d8610943d122811cc49d21 co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper gameprofilerfiller.pop(); diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 661acdf4b1f33d150b0caf179e925d3162d7be35..78eb2d8ba58f2937c1145147e2d9e7de802e541e 100644 +index ed8032495af9ce9c23419224814b8d27e4a97c17..2812505185df691e8f08932aa0bba162a7d9db86 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -133,7 +133,7 @@ public final class NaturalSpawner { +@@ -128,7 +128,7 @@ public final class NaturalSpawner { public static void spawnForChunk(ServerLevel world, LevelChunk chunk, NaturalSpawner.SpawnState info, boolean spawnAnimals, boolean spawnMonsters, boolean rareSpawn) { world.getProfiler().push("spawner"); @@ -776,7 +778,7 @@ index 661acdf4b1f33d150b0caf179e925d3162d7be35..78eb2d8ba58f2937c1145147e2d9e7de MobCategory[] aenumcreaturetype = NaturalSpawner.SPAWNING_CATEGORIES; int i = aenumcreaturetype.length; -@@ -186,7 +186,7 @@ public final class NaturalSpawner { +@@ -181,7 +181,7 @@ public final class NaturalSpawner { } } @@ -786,10 +788,10 @@ index 661acdf4b1f33d150b0caf179e925d3162d7be35..78eb2d8ba58f2937c1145147e2d9e7de } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index d087c8271dbdfe3dc6d805539a710d37ed6d7f21..8b1f5d290efbebe5fb6fc90b6031356ea3e4cef3 100644 +index 2a8609e33716949ff1877b6d10f64a9d7a7c81e9..e8d14bf4120dd9861e4ccb8bd6c14e175343c55d 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -799,7 +799,7 @@ public class LevelChunk extends ChunkAccess { +@@ -785,7 +785,7 @@ public class LevelChunk extends ChunkAccess { this.chunkHolder.getEntityChunk().callEntitiesLoadEvent(); // Paper - rewrite chunk system if (this.needsDecoration) { @@ -798,7 +800,7 @@ index d087c8271dbdfe3dc6d805539a710d37ed6d7f21..8b1f5d290efbebe5fb6fc90b6031356e this.needsDecoration = false; java.util.Random random = new java.util.Random(); random.setSeed(this.level.getSeed()); -@@ -819,7 +819,7 @@ public class LevelChunk extends ChunkAccess { +@@ -805,7 +805,7 @@ public class LevelChunk extends ChunkAccess { } } server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk)); @@ -807,7 +809,7 @@ index d087c8271dbdfe3dc6d805539a710d37ed6d7f21..8b1f5d290efbebe5fb6fc90b6031356e } } } -@@ -1177,7 +1177,7 @@ public class LevelChunk extends ChunkAccess { +@@ -1161,7 +1161,7 @@ public class LevelChunk extends ChunkAccess { ProfilerFiller gameprofilerfiller = LevelChunk.this.level.getProfiler(); gameprofilerfiller.push(this::getType); @@ -816,7 +818,7 @@ index d087c8271dbdfe3dc6d805539a710d37ed6d7f21..8b1f5d290efbebe5fb6fc90b6031356e BlockState iblockdata = LevelChunk.this.getBlockState(blockposition); if (this.blockEntity.getType().isValid(iblockdata)) { -@@ -1204,7 +1204,7 @@ public class LevelChunk extends ChunkAccess { +@@ -1188,7 +1188,7 @@ public class LevelChunk extends ChunkAccess { // Paper end - Prevent block entity and entity crashes // Spigot start } finally { @@ -903,10 +905,10 @@ index b3e1adeb932da9b3bed16acd94e2f16da48a7c72..d3ec817e95628f1fc8be4a29c9a0f13c // Paper end - add timings for scoreboard search } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index c63b7d5b442f2be5dadd529a2f4f65302e44e792..56e52b16b419c882440a15947f037ae1a902bc70 100644 +index a8fc07e06039e1418e020f7c1ad2cd36b9b94eb4..de2b469f06f6679aed1d20156052bfbef5e7c30b 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -172,7 +172,7 @@ public class ActivationRange +@@ -168,7 +168,7 @@ public class ActivationRange */ public static void activateEntities(Level world) { @@ -915,7 +917,7 @@ index c63b7d5b442f2be5dadd529a2f4f65302e44e792..56e52b16b419c882440a15947f037ae1 final int miscActivationRange = world.spigotConfig.miscActivationRange; final int raiderActivationRange = world.spigotConfig.raiderActivationRange; final int animalActivationRange = world.spigotConfig.animalActivationRange; -@@ -251,7 +251,7 @@ public class ActivationRange +@@ -228,7 +228,7 @@ public class ActivationRange } // Paper end } diff --git a/patches/unapplied-server/0261-Remove-Mojang-Profiler.patch b/patches/server/0257-Remove-Mojang-Profiler.patch similarity index 83% rename from patches/unapplied-server/0261-Remove-Mojang-Profiler.patch rename to patches/server/0257-Remove-Mojang-Profiler.patch index 3f5796f0f..03afccdd0 100644 --- a/patches/unapplied-server/0261-Remove-Mojang-Profiler.patch +++ b/patches/server/0257-Remove-Mojang-Profiler.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove Mojang Profiler diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 0026235782aeb5e663faa3aaf11040635cd12204..48a4f26eec06777b4ae165db6566c1f6198527fd 100644 +index 67ec90a2a05269a5912b3c8e64d6d4162a8c6ca2..d3c42c19a051fb3a670e541fc746b55717192a91 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -165,7 +165,7 @@ public class Commands { +@@ -166,7 +166,7 @@ public class Commands { DamageCommand.register(this.dispatcher, commandRegistryAccess); DataCommands.register(this.dispatcher); DataPackCommand.register(this.dispatcher); @@ -17,7 +17,7 @@ index 0026235782aeb5e663faa3aaf11040635cd12204..48a4f26eec06777b4ae165db6566c1f6 DefaultGameModeCommands.register(this.dispatcher); DifficultyCommand.register(this.dispatcher); EffectCommands.register(this.dispatcher, commandRegistryAccess); -@@ -332,9 +332,9 @@ public class Commands { +@@ -333,9 +333,9 @@ public class Commands { public void performCommand(ParseResults parseresults, String s, String label) { // CraftBukkit CommandSourceStack commandlistenerwrapper = (CommandSourceStack) parseresults.getContext().getSource(); @@ -29,7 +29,7 @@ index 0026235782aeb5e663faa3aaf11040635cd12204..48a4f26eec06777b4ae165db6566c1f6 ContextChain contextchain = this.finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit // Paper - Add UnknownCommandEvent try { -@@ -363,7 +363,7 @@ public class Commands { +@@ -364,7 +364,7 @@ public class Commands { Commands.LOGGER.error("'/{}' threw an exception", s, exception); } } finally { @@ -83,10 +83,10 @@ index e9775b4506909bee65a74964f0d5391a0513de1d..684f7f202305c09b1037c5d38a52a5ea } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0b1f9a51aaf97c3fb8a68bb7141ff76430d3b1a5..4611116f3328c0f8d5b37c8765feca36b2448ffe 100644 +index f3c66049ab3fe087fa0fa87c2fca36c3c8b5c572..dfeae138e830e95ab823b6349a91160b02622208 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -341,13 +341,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % autosavePeriod == 0; try { this.isSaving = true; -@@ -1582,7 +1582,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Purpur - this.profiler.push(() -> { + /*this.profiler.push(() -> { // Purpur - return worldserver + " " + worldserver.dimension().location(); + String s = String.valueOf(worldserver); + + return s + " " + String.valueOf(worldserver.dimension().location()); - }); + });*/ // Purpur /* Drop global time updates @@ -238,7 +242,7 @@ index 0b1f9a51aaf97c3fb8a68bb7141ff76430d3b1a5..4611116f3328c0f8d5b37c8765feca36 try { //worldserver.timings.doTick.startTiming(); // Spigot // Purpur -@@ -1769,17 +1769,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { this.executeBlocking(() -> { this.saveDebugReport(path.resolve("server")); -@@ -2738,40 +2738,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { + /*gameprofilerfiller.push(() -> { // Purpur - return "function " + function.id(); + return "function " + String.valueOf(function.id()); - }); + });*/ // Purpur try { - InstantiatedFunction instantiatedfunction = function.instantiate((CompoundTag) null, this.getDispatcher(), source); + InstantiatedFunction instantiatedfunction = function.instantiate((CompoundTag) null, this.getDispatcher()); @@ -86,7 +86,7 @@ public class ServerFunctionManager { } catch (Exception exception) { ServerFunctionManager.LOGGER.warn("Failed to execute function {}", function.id(), exception); @@ -442,10 +445,10 @@ index df0c15f6b5b2224d53e4f8fad42b9a1e5f33dc25..92aa26881818fec92d0663e2ccf50716 } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 3fbc1e7e401331790d590dcd513a0a267b5ea181..bb412ca874b85d777c0e3565fcefcee15b23182b 100644 +index bbe4580f7fc7cb6c8eb7055c82e2af7ad2ccd59d..4e6fccec4f5ca14562bf5bae495ac36c14982d85 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -538,20 +538,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -541,20 +541,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } protected void tick(BooleanSupplier shouldKeepTicking) { @@ -471,10 +474,10 @@ index 3fbc1e7e401331790d590dcd513a0a267b5ea181..bb412ca874b85d777c0e3565fcefcee1 public boolean hasWork() { diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..7b3ba500f465b999ce11964b0e4e30f36005536e 100644 +index 07b428ed7837642254b1edd55fd08a7beac7e303..476a04d87a61b021816d2970e86042bde32d95a2 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -264,16 +264,16 @@ public class ServerChunkCache extends ChunkSource { +@@ -259,14 +259,14 @@ public class ServerChunkCache extends ChunkSource { return ifLoaded; } // Paper end - Perf: Optimise getChunkAt calls for loaded chunks @@ -485,16 +488,14 @@ index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..7b3ba500f465b999ce11964b0e4e30f3 + //gameprofilerfiller.incrementCounter("getChunk"); // Purpur long k = ChunkPos.asLong(x, z); - ChunkAccess ichunkaccess; - // Paper - rewrite chunk system - there are no correct callbacks to remove items from cache in the new chunk system - gameprofilerfiller.incrementCounter("getChunkCacheMiss"); + //gameprofilerfiller.incrementCounter("getChunkCacheMiss"); // Purpur - CompletableFuture> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create, true); // Paper + CompletableFuture> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create); ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor; -@@ -467,24 +467,24 @@ public class ServerChunkCache extends ChunkSource { +@@ -459,26 +459,26 @@ public class ServerChunkCache extends ChunkSource { // CraftBukkit start - modelled on below public void purgeUnload() { if (true) return; // Paper - tickets will be removed later, this behavior isn't really well accounted for by the chunk system @@ -516,7 +517,9 @@ index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..7b3ba500f465b999ce11964b0e4e30f3 - this.level.getProfiler().push("purge"); + //this.level.getProfiler().push("purge"); // Purpur //this.level.timings.doChunkMap.startTiming(); // Spigot // Purpur - this.distanceManager.purgeStaleTickets(); + if (this.level.tickRateManager().runsNormally() || !tickChunks) { + this.distanceManager.purgeStaleTickets(); + } this.runDistanceManagerUpdates(); //this.level.timings.doChunkMap.stopTiming(); // Spigot // Purpur - this.level.getProfiler().popPush("chunks"); @@ -524,7 +527,7 @@ index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..7b3ba500f465b999ce11964b0e4e30f3 if (tickChunks) { //this.level.timings.chunks.startTiming(); // Paper - timings // Purpur this.chunkMap.level.playerChunkLoader.tick(); // Paper - replace player chunk loader - this is mostly required to account for view distance changes -@@ -494,10 +494,10 @@ public class ServerChunkCache extends ChunkSource { +@@ -488,10 +488,10 @@ public class ServerChunkCache extends ChunkSource { } //this.level.timings.doChunkUnload.startTiming(); // Spigot // Purpur @@ -537,7 +540,7 @@ index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..7b3ba500f465b999ce11964b0e4e30f3 this.clearCache(); } -@@ -507,10 +507,10 @@ public class ServerChunkCache extends ChunkSource { +@@ -501,17 +501,17 @@ public class ServerChunkCache extends ChunkSource { this.lastInhabitedUpdate = i; if (!this.level.isDebug()) { @@ -551,25 +554,24 @@ index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..7b3ba500f465b999ce11964b0e4e30f3 // Paper - optimise chunk tick iteration //if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur -@@ -518,7 +518,7 @@ public class ServerChunkCache extends ChunkSource { + // Paper - optimise chunk tick iteration - this.level.resetIceAndSnowTick(); // Pufferfish - reset ice & snow tick random - if (this.level.getServer().tickRateManager().runsNormally()) { + if (this.level.tickRateManager().runsNormally()) { - gameprofilerfiller.popPush("naturalSpawnCount"); + //gameprofilerfiller.popPush("naturalSpawnCount"); // Purpur //this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur int k = this.distanceManager.getNaturalSpawnChunkCount(); // Paper start - Optional per player mob spawns -@@ -552,7 +552,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -540,7 +540,7 @@ public class ServerChunkCache extends ChunkSource { // this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur - // this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously + this.lastSpawnState = spawnercreature_d; - gameprofilerfiller.popPush("spawnAndTick"); + //gameprofilerfiller.popPush("spawnAndTick"); // Purpur boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit // Paper start - optimise chunk tick iteration -@@ -660,7 +660,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -648,7 +648,7 @@ public class ServerChunkCache extends ChunkSource { // Paper end - optimise chunk tick iteration // this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur @@ -578,7 +580,7 @@ index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..7b3ba500f465b999ce11964b0e4e30f3 if (flag) { //try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings // Purpur this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies); -@@ -668,7 +668,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -656,7 +656,7 @@ public class ServerChunkCache extends ChunkSource { } } @@ -587,7 +589,7 @@ index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..7b3ba500f465b999ce11964b0e4e30f3 // Paper - optimise chunk tick iteration //this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing // Purpur // Paper start - optimise chunk tick iteration -@@ -686,8 +686,8 @@ public class ServerChunkCache extends ChunkSource { +@@ -674,8 +674,8 @@ public class ServerChunkCache extends ChunkSource { // Paper end - optimise chunk tick iteration //this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing // Purpur // Paper - optimise chunk tick iteration @@ -596,9 +598,9 @@ index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..7b3ba500f465b999ce11964b0e4e30f3 + //gameprofilerfiller.pop(); // Purpur + //gameprofilerfiller.pop(); // Purpur } - - // Pufferfish start - optimize mob spawning -@@ -893,7 +893,7 @@ public class ServerChunkCache extends ChunkSource { + } + +@@ -847,7 +847,7 @@ public class ServerChunkCache extends ChunkSource { @Override protected void doRunTask(Runnable task) { @@ -608,10 +610,10 @@ index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..7b3ba500f465b999ce11964b0e4e30f3 } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7954f1b26 100644 +index a84a9218838fb42c49a00c0d5f28e9e486fc7dac..f72af2feb74626abbdfbfd090c15357457810240 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -824,16 +824,16 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -830,16 +830,16 @@ public class ServerLevel extends Level implements WorldGenLevel { } public void tick(BooleanSupplier shouldKeepTicking) { @@ -631,7 +633,7 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 this.advanceWeatherCycle(); } -@@ -865,30 +865,30 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -871,30 +871,30 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickTime(); } @@ -669,7 +671,7 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 if (flag) { // this.timings.doSounds.startTiming(); // Spigot // Purpur this.runBlockEvents(); -@@ -896,7 +896,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -902,7 +902,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } this.handlingTick = false; @@ -678,7 +680,7 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 boolean flag1 = !paperConfig().unsupportedSettings.disableWorldTickingWhenEmpty || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players // Paper - restore this if (flag1) { -@@ -904,12 +904,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -910,12 +910,12 @@ public class ServerLevel extends Level implements WorldGenLevel { } if (flag1 || this.emptyTime++ < 300) { @@ -694,7 +696,7 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 } org.spigotmc.ActivationRange.activateEntities(this); // Spigot -@@ -920,9 +920,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -925,9 +925,9 @@ public class ServerLevel extends Level implements WorldGenLevel { if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed entity.discard(); } else if (!tickratemanager.isEntityFrozen(entity)) { @@ -706,19 +708,13 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 if (true || this.chunkSource.chunkMap.getDistanceManager().inEntityTickingRange(entity.chunkPosition().toLong())) { // Paper - now always true if in the ticking list Entity entity1 = entity.getVehicle(); -@@ -934,7 +934,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -939,22 +939,21 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.stopRiding(); } - gameprofilerfiller.push("tick"); + //gameprofilerfiller.push("tick"); // Purpur - // Pufferfish start - copied from this.guardEntityTick - try { - this.tickNonPassenger(entity); // Pufferfish - changed -@@ -949,20 +949,19 @@ public class ServerLevel extends Level implements WorldGenLevel { - // Paper end - } - // Pufferfish end + this.guardEntityTick(this::tickNonPassenger, entity); - gameprofilerfiller.pop(); + //gameprofilerfiller.pop(); // Purpur } @@ -739,7 +735,7 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 } @Override -@@ -1044,9 +1043,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1034,9 +1033,9 @@ public class ServerLevel extends Level implements WorldGenLevel { boolean flag = this.isRaining(); int j = chunkcoordintpair.getMinBlockX(); int k = chunkcoordintpair.getMinBlockZ(); @@ -750,8 +746,8 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 + //gameprofilerfiller.push("thunder"); // Purpur final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change - if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && /*this.random.nextInt(this.spigotConfig.thunderChance) == 0 &&*/ chunk.shouldDoLightning(this.random)) { // Spigot // Paper - Option to disable thunder // Pufferfish - replace random with shouldDoLightning -@@ -1085,7 +1084,7 @@ public class ServerLevel extends Level implements WorldGenLevel { + if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder +@@ -1075,7 +1074,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } @@ -760,7 +756,7 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow for (int l = 0; l < randomTickSpeed; ++l) { -@@ -1098,7 +1097,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1088,7 +1087,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } // Paper - Option to disable ice and snow @@ -769,7 +765,7 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 //timings.chunkTicksBlocks.startTiming(); // Paper // Purpur if (randomTickSpeed > 0) { // Paper start - optimize random block ticking -@@ -1134,7 +1133,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1124,7 +1123,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // Paper end - optimise random block ticking //timings.chunkTicksBlocks.stopTiming(); // Paper // Purpur @@ -778,7 +774,7 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 } @VisibleForTesting -@@ -1481,19 +1480,19 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1471,19 +1470,19 @@ public class ServerLevel extends Level implements WorldGenLevel { //try { // Purpur // Paper end - timings entity.setOldPosAndRot(); @@ -803,7 +799,7 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 //} finally { timer.stopTiming(); } // Paper - timings // Purpur Iterator iterator = entity.getPassengers().iterator(); -@@ -1522,12 +1521,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1512,12 +1511,12 @@ public class ServerLevel extends Level implements WorldGenLevel { // Paper end passenger.setOldPosAndRot(); ++passenger.tickCount; @@ -820,7 +816,7 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 // Paper start - EAR 2 if (isActive) { passenger.rideTick(); -@@ -1539,7 +1538,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1529,7 +1528,7 @@ public class ServerLevel extends Level implements WorldGenLevel { vehicle.positionRider(passenger); } // Paper end - EAR 2 @@ -830,10 +826,10 @@ index 0d9ac7d3248686780b7482afab3059a09bba649a..00ac2902be93327c7dd1bf78ee5922d7 while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index c0c9265e8acda3cbf0b4f2c3dca3838265a312d3..d78c2348160795fcc9ff23b448e7d3c48f34c272 100644 +index 85f58f5449ee63a7f592971769b497e521921fcc..054a8aff30181d1a568ad931eb150fc2992cac97 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1240,7 +1240,7 @@ public class ServerPlayer extends Player { +@@ -1318,7 +1318,7 @@ public class ServerPlayer extends Player { PortalInfo shapedetectorshape = this.findDimensionEntryPoint(worldserver); if (shapedetectorshape != null) { @@ -842,7 +838,7 @@ index c0c9265e8acda3cbf0b4f2c3dca3838265a312d3..d78c2348160795fcc9ff23b448e7d3c4 worldserver = shapedetectorshape.world; // CraftBukkit if (worldserver == null) { } else // CraftBukkit - empty to fall through to null to event if (resourcekey == LevelStem.OVERWORLD && worldserver.getTypeKey() == LevelStem.NETHER) { // CraftBukkit -@@ -1263,8 +1263,8 @@ public class ServerPlayer extends Player { +@@ -1341,8 +1341,8 @@ public class ServerPlayer extends Player { worldserver = ((CraftWorld) exit.getWorld()).getHandle(); // CraftBukkit end @@ -853,7 +849,7 @@ index c0c9265e8acda3cbf0b4f2c3dca3838265a312d3..d78c2348160795fcc9ff23b448e7d3c4 if (true) { // CraftBukkit this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds -@@ -1282,7 +1282,7 @@ public class ServerPlayer extends Player { +@@ -1360,7 +1360,7 @@ public class ServerPlayer extends Player { this.connection.teleport(exit); // CraftBukkit - use internal teleport without event this.connection.resetPosition(); worldserver.addDuringPortalTeleport(this); @@ -863,10 +859,10 @@ index c0c9265e8acda3cbf0b4f2c3dca3838265a312d3..d78c2348160795fcc9ff23b448e7d3c4 this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities())); playerlist.sendLevelInfo(this, worldserver); diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 6d9dea1dbd47df98ea44881deb6b7493edbdbd5d..02e65b0bd212d46855baee48fab35dc95a88b43f 100644 +index 3a15085e0421f46800f779066d235ef21b463289..8368c5ff929df9d32cdb95cc2da0e9f7f3b85d2a 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -222,7 +222,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -265,7 +265,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack } protected void keepConnectionAlive() { @@ -875,7 +871,7 @@ index 6d9dea1dbd47df98ea44881deb6b7493edbdbd5d..02e65b0bd212d46855baee48fab35dc9 // Paper start - give clients a longer time to respond to pings as per pre 1.12.2 timings // This should effectively place the keepalive handling back to "as it was" before 1.12.2 long currentTime = Util.getMillis(); -@@ -258,7 +258,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -298,7 +298,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack } // Paper end - give clients a longer time to respond to pings as per pre 1.12.2 timings @@ -883,7 +879,7 @@ index 6d9dea1dbd47df98ea44881deb6b7493edbdbd5d..02e65b0bd212d46855baee48fab35dc9 + //this.server.getProfiler().pop(); // Purpur } - public void suspendFlushing() { + private boolean checkIfClosed(long time) { diff --git a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java index f14113eef226e906c0d21641e74a27471254909d..0c25f3ed0a8a538edc7cadd3476100c9b3631f7a 100644 --- a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java @@ -1089,19 +1085,19 @@ index a715ecf4a8ac91d3e5e5c6269d89e54b2c1cd279..223c3665126c576eddb1a8f7c9f5bc60 }; } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2b7b546d0 100644 +index 68e8f9913055219486ce19d95dcf9d7c76e08082..2c3ad553272ad651e6ca26917719e6d9fffdef68 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -861,7 +861,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -897,7 +897,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end public void baseTick() { - this.level().getProfiler().push("entityBaseTick"); + //this.level().getProfiler().push("entityBaseTick"); // Purpur if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups - this.feetBlockState = null; + this.inBlockState = null; if (this.isPassenger() && this.getVehicle().isRemoved()) { -@@ -922,7 +922,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -958,7 +958,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } this.firstTick = false; @@ -1110,7 +1106,7 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 } public void setSharedFlagOnFire(boolean onFire) { -@@ -1141,7 +1141,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -1175,7 +1175,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -1119,7 +1115,7 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) { movement = movement.multiply(this.stuckSpeedMultiplier); this.stuckSpeedMultiplier = Vec3.ZERO; -@@ -1150,7 +1150,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -1184,7 +1184,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper start - ignore movement changes while inactive. if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && movementType == MoverType.SELF) { setDeltaMovement(Vec3.ZERO); @@ -1128,7 +1124,7 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 return; } // Paper end -@@ -1171,8 +1171,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -1205,8 +1205,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z); } @@ -1139,7 +1135,7 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 boolean flag = !Mth.equal(movement.x, vec3d1.x); boolean flag1 = !Mth.equal(movement.z, vec3d1.z); -@@ -1191,7 +1191,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -1225,7 +1225,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition); if (this.isRemoved()) { @@ -1148,7 +1144,7 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 } else { if (this.horizontalCollision) { Vec3 vec3d2 = this.getDeltaMovement(); -@@ -1329,7 +1329,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -1363,7 +1363,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.setRemainingFireTicks(-this.getFireImmuneTicks()); } @@ -1157,7 +1153,7 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 } } // Paper start - detailed watchdog information -@@ -3205,7 +3205,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -3258,7 +3258,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey); if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit @@ -1166,7 +1162,7 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 this.portalTime = i; // Paper start - Add EntityPortalReadyEvent io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER); -@@ -3223,7 +3223,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -3276,7 +3276,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } // Paper - Add EntityPortalReadyEvent // CraftBukkit end @@ -1175,7 +1171,7 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 } this.isInsidePortal = false; -@@ -3697,14 +3697,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -3736,14 +3736,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Paper end - Fix item duplication and teleport issues if (this.level() instanceof ServerLevel && !this.isRemoved()) { @@ -1192,7 +1188,7 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit if (shapedetectorshape == null) { -@@ -3743,7 +3743,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -3782,7 +3782,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.unRide(); // CraftBukkit end @@ -1201,7 +1197,7 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 // Paper start - Fix item duplication and teleport issues if (this instanceof Mob) { ((Mob) this).dropLeash(true, true); // Paper drop lead -@@ -3770,10 +3770,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -3809,10 +3809,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } this.removeAfterChangingDimensions(); @@ -1215,10 +1211,10 @@ index ec6187bc3f445acb86e69161ab1b82248b6e99e0..ac1f4576476a800adf484912baaea9f2 } } else { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 839f280eeb18e01712a18b595b1a13abfab6f45b..e64d2425f6b5cec9a72bcbf451284fcbb3ebce06 100644 +index 484eff80394a55088f3cef726a8263e28accd6fe..def30f8c79a4244116f1b9d9ae1a9d06d0a38bce 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -410,7 +410,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -423,7 +423,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } super.baseTick(); @@ -1227,7 +1223,7 @@ index 839f280eeb18e01712a18b595b1a13abfab6f45b..e64d2425f6b5cec9a72bcbf451284fcb if (this.fireImmune() || this.level().isClientSide) { this.clearFire(); } -@@ -513,7 +513,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -526,7 +526,7 @@ public abstract class LivingEntity extends Entity implements Attackable { this.yHeadRotO = this.yHeadRot; this.yRotO = this.getYRot(); this.xRotO = this.getXRot(); @@ -1236,7 +1232,7 @@ index 839f280eeb18e01712a18b595b1a13abfab6f45b..e64d2425f6b5cec9a72bcbf451284fcb } public boolean canSpawnSoulSpeedParticle() { -@@ -3187,10 +3187,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3226,10 +3226,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.run += (f3 - this.run) * 0.3F; @@ -1250,7 +1246,7 @@ index 839f280eeb18e01712a18b595b1a13abfab6f45b..e64d2425f6b5cec9a72bcbf451284fcb // Paper start - stop large pitch and yaw changes from crashing the server this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F; -@@ -3202,7 +3202,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3241,7 +3241,7 @@ public abstract class LivingEntity extends Entity implements Attackable { this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F; // Paper end @@ -1259,7 +1255,7 @@ index 839f280eeb18e01712a18b595b1a13abfab6f45b..e64d2425f6b5cec9a72bcbf451284fcb this.animStep += f2; if (this.isFallFlying()) { ++this.fallFlyTicks; -@@ -3497,19 +3497,19 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3464,19 +3464,19 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.setDeltaMovement(d0, d1, d2); @@ -1284,7 +1280,7 @@ index 839f280eeb18e01712a18b595b1a13abfab6f45b..e64d2425f6b5cec9a72bcbf451284fcb if (this.jumping && this.isAffectedByFluids()) { double d3; -@@ -3536,8 +3536,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3503,8 +3503,8 @@ public abstract class LivingEntity extends Entity implements Attackable { this.noJumpDelay = 0; } @@ -1295,7 +1291,7 @@ index 839f280eeb18e01712a18b595b1a13abfab6f45b..e64d2425f6b5cec9a72bcbf451284fcb this.xxa *= 0.98F; this.zza *= 0.98F; this.updateFallFlying(); -@@ -3564,8 +3564,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3529,8 +3529,8 @@ public abstract class LivingEntity extends Entity implements Attackable { this.travel(vec3d1); } @@ -1306,7 +1302,7 @@ index 839f280eeb18e01712a18b595b1a13abfab6f45b..e64d2425f6b5cec9a72bcbf451284fcb if (!this.level().isClientSide && !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API int i = this.getTicksFrozen(); -@@ -3582,15 +3582,15 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3547,15 +3547,15 @@ public abstract class LivingEntity extends Entity implements Attackable { this.hurt(this.damageSources().freeze(), 1.0F); } @@ -1326,10 +1322,10 @@ index 839f280eeb18e01712a18b595b1a13abfab6f45b..e64d2425f6b5cec9a72bcbf451284fcb // Purpur start if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 4182a146dcad83d141cd5bacdbfc39d912360c40..dd275ece5887f5215cb785564af27152b29b370e 100644 +index ee98efa69d67cd22eb5722cf68f3b7063e2595c8..56da8a4600688efd1987d82d4fcad1757e33f4f2 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -368,13 +368,13 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -376,13 +376,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti @Override public void baseTick() { super.baseTick(); @@ -1345,7 +1341,7 @@ index 4182a146dcad83d141cd5bacdbfc39d912360c40..dd275ece5887f5215cb785564af27152 incrementTicksSinceLastInteraction(); // Purpur } -@@ -705,7 +705,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -747,7 +747,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti @Override public void aiStep() { super.aiStep(); @@ -1354,7 +1350,7 @@ index 4182a146dcad83d141cd5bacdbfc39d912360c40..dd275ece5887f5215cb785564af27152 if (!this.level().isClientSide && this.canPickUpLoot() && this.isAlive() && !this.dead && (this.level().purpurConfig.entitiesPickUpLootBypassMobGriefing || this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { Vec3i baseblockposition = this.getPickupReach(); List list = this.level().getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ())); -@@ -725,7 +725,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -767,7 +767,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti } } @@ -1363,78 +1359,77 @@ index 4182a146dcad83d141cd5bacdbfc39d912360c40..dd275ece5887f5215cb785564af27152 } protected Vec3i getPickupReach() { -@@ -937,46 +937,46 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -992,44 +992,44 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti return; } // Paper end - Allow nerfed mobs to jump and float -- this.level().getProfiler().push("sensing"); -+ //this.level().getProfiler().push("sensing"); // Purpur +- ProfilerFiller gameprofilerfiller = this.level().getProfiler(); ++ //ProfilerFiller gameprofilerfiller = this.level().getProfiler(); // Purpur + +- gameprofilerfiller.push("sensing"); ++ //gameprofilerfiller.push("sensing"); // Purpur this.sensing.tick(); -- this.level().getProfiler().pop(); -+ //this.level().getProfiler().pop(); // Purpur - int i = this.level().getServer().getTickCount() + this.getId(); +- gameprofilerfiller.pop(); ++ //gameprofilerfiller.pop(); // Purpur + int i = this.tickCount + this.getId(); if (i % 2 != 0 && this.tickCount > 1) { -- this.level().getProfiler().push("targetSelector"); -+ //this.level().getProfiler().push("targetSelector"); // Purpur - if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking +- gameprofilerfiller.push("targetSelector"); ++ //gameprofilerfiller.push("targetSelector"); // Purpur this.targetSelector.tickRunningGoals(false); -- this.level().getProfiler().pop(); -- this.level().getProfiler().push("goalSelector"); -+ //this.level().getProfiler().pop(); // Purpur -+ //this.level().getProfiler().push("goalSelector"); // Purpur - if (this.goalSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking +- gameprofilerfiller.pop(); +- gameprofilerfiller.push("goalSelector"); ++ //gameprofilerfiller.pop(); // Purpur ++ //gameprofilerfiller.push("goalSelector"); // Purpur this.goalSelector.tickRunningGoals(false); -- this.level().getProfiler().pop(); -+ //this.level().getProfiler().pop(); // Purpur +- gameprofilerfiller.pop(); ++ //gameprofilerfiller.pop(); // Purpur } else { -- this.level().getProfiler().push("targetSelector"); -+ //this.level().getProfiler().push("targetSelector"); // Purpur - if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking +- gameprofilerfiller.push("targetSelector"); ++ //gameprofilerfiller.push("targetSelector"); // Purpur this.targetSelector.tick(); -- this.level().getProfiler().pop(); -- this.level().getProfiler().push("goalSelector"); -+ //this.level().getProfiler().pop(); // Purpur -+ //this.level().getProfiler().push("goalSelector"); // Purpur - if (this.goalSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking +- gameprofilerfiller.pop(); +- gameprofilerfiller.push("goalSelector"); ++ //gameprofilerfiller.pop(); // Purpur ++ //gameprofilerfiller.push("goalSelector"); // Purpur this.goalSelector.tick(); -- this.level().getProfiler().pop(); -+ //this.level().getProfiler().pop(); // Purpur +- gameprofilerfiller.pop(); ++ //gameprofilerfiller.pop(); // Purpur } -- this.level().getProfiler().push("navigation"); -+ //this.level().getProfiler().push("navigation"); // Purpur +- gameprofilerfiller.push("navigation"); ++ //gameprofilerfiller.push("navigation"); // Purpur this.navigation.tick(); -- this.level().getProfiler().pop(); -- this.level().getProfiler().push("mob tick"); -+ //this.level().getProfiler().pop(); // Purpur -+ //this.level().getProfiler().push("mob tick"); // Purpur +- gameprofilerfiller.pop(); +- gameprofilerfiller.push("mob tick"); ++ //gameprofilerfiller.pop(); // Purpur ++ //gameprofilerfiller.push("mob tick"); // Purpur this.customServerAiStep(); -- this.level().getProfiler().pop(); -- this.level().getProfiler().push("controls"); -- this.level().getProfiler().push("move"); -+ //this.level().getProfiler().pop(); // Purpur -+ //this.level().getProfiler().push("controls"); // Purpur -+ //this.level().getProfiler().push("move"); // Purpur +- gameprofilerfiller.pop(); +- gameprofilerfiller.push("controls"); +- gameprofilerfiller.push("move"); ++ //gameprofilerfiller.pop(); // Purpur ++ //gameprofilerfiller.push("controls"); // Purpur ++ //gameprofilerfiller.push("move"); // Purpur this.moveControl.tick(); -- this.level().getProfiler().popPush("look"); -+ //this.level().getProfiler().popPush("look"); // Purpur +- gameprofilerfiller.popPush("look"); ++ //gameprofilerfiller.popPush("look"); // Purpur this.lookControl.tick(); -- this.level().getProfiler().popPush("jump"); -+ //this.level().getProfiler().popPush("jump"); // Purpur +- gameprofilerfiller.popPush("jump"); ++ //gameprofilerfiller.popPush("jump"); // Purpur this.jumpControl.tick(); -- this.level().getProfiler().pop(); -- this.level().getProfiler().pop(); -+ //this.level().getProfiler().pop(); // Purpur -+ //this.level().getProfiler().pop(); // Purpur +- gameprofilerfiller.pop(); +- gameprofilerfiller.pop(); ++ //gameprofilerfiller.pop(); // Purpur ++ //gameprofilerfiller.pop(); // Purpur this.sendDebugPackets(); } diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -index d78e1f6191738d426968efc24e734f04b0fc7edb..a2cca3d528625d49411a94e2b6ec578fec9b10da 100644 +index 74d4f653d5c7f1923c59019effd78337402f7025..b4e4670536f6dcea109c029d75d9710cb386f1d0 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -@@ -104,8 +104,8 @@ public class GoalSelector { +@@ -87,8 +87,8 @@ public class GoalSelector { } public void tick() { @@ -1445,10 +1440,10 @@ index d78e1f6191738d426968efc24e734f04b0fc7edb..a2cca3d528625d49411a94e2b6ec578f for (WrappedGoal wrappedGoal : this.availableGoals) { if (wrappedGoal.isRunning() && (goalContainsAnyFlags(wrappedGoal, this.goalTypes) || !wrappedGoal.canContinueToUse())) { // Paper - Perf: optimize goal types by removing streams -@@ -122,8 +122,8 @@ public class GoalSelector { - } +@@ -97,8 +97,8 @@ public class GoalSelector { } + this.lockedFlags.entrySet().removeIf(entry -> !entry.getValue().isRunning()); - profilerFiller.pop(); - profilerFiller.push("goalUpdate"); + //profilerFiller.pop(); // Purpur @@ -1456,7 +1451,7 @@ index d78e1f6191738d426968efc24e734f04b0fc7edb..a2cca3d528625d49411a94e2b6ec578f for (WrappedGoal wrappedGoal2 : this.availableGoals) { // Paper start -@@ -143,13 +143,13 @@ public class GoalSelector { +@@ -118,13 +118,13 @@ public class GoalSelector { } } @@ -1473,7 +1468,7 @@ index d78e1f6191738d426968efc24e734f04b0fc7edb..a2cca3d528625d49411a94e2b6ec578f for (WrappedGoal wrappedGoal : this.availableGoals) { if (wrappedGoal.isRunning() && (tickAll || wrappedGoal.requiresUpdateEveryTick())) { -@@ -157,7 +157,7 @@ public class GoalSelector { +@@ -132,7 +132,7 @@ public class GoalSelector { } } @@ -1483,7 +1478,7 @@ index d78e1f6191738d426968efc24e734f04b0fc7edb..a2cca3d528625d49411a94e2b6ec578f public Set getAvailableGoals() { diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index e3a7eaf31ab19cc9f23a0c87649b74bb42976cb4..e12cf130678bda7c1f5873cb03172a698e18fc85 100644 +index 2e9991e6b3c05584002744a2ee2579b1dba218b2..544920a31b649985333f82beafa94a3392f5853e 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -172,12 +172,12 @@ public abstract class PathNavigation { @@ -1518,16 +1513,16 @@ index 51772f03a3469b11e7166ec6f3a1b9c64a606221..02f2f46ccc48bb4d9bd08555818b0489 this.seen.add(i); } else { diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -index 09f796ec491f21520e1fcc454249e4696dad3b1b..9bf06cf7b3706f8883e1a0ceac8b1aebb52ba475 100644 +index 09502b15c20f401c3b56ecedc4d3b515384d654f..bca7b7192debb3a34a08047010a2438e7b7e2a78 100644 --- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java +++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -@@ -259,13 +259,13 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS - private int behaviorTick = 0; // Pufferfish +@@ -252,13 +252,13 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS + @Override protected void customServerAiStep() { - this.level().getProfiler().push("allayBrain"); + //this.level().getProfiler().push("allayBrain"); // Purpur - if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider + //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Purpur - TODO: Pufferfish this.getBrain().tick((ServerLevel) this.level(), this); - this.level().getProfiler().pop(); - this.level().getProfiler().push("allayActivityUpdate"); @@ -1540,16 +1535,16 @@ index 09f796ec491f21520e1fcc454249e4696dad3b1b..9bf06cf7b3706f8883e1a0ceac8b1aeb } diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index e73d7b47327da59dbf49c2160acd0b3ebb2a4232..e3f72230e94b15a401e45cf8c10a1890d3278431 100644 +index ea1515f189bf3bc4cfef4524fb40f0d826f68cc0..d330f79e860662bc93a1703215e66e6564d181b9 100644 --- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -@@ -315,13 +315,13 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder optional = this.getBrain().getMemory(MemoryModuleType.PLAY_DEAD_TICKS); diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -index baca84088350c82569fb7969136c65bbc4c52f5b..8616a8c09a21f576a07daaa93ebf64e0f03d0c88 100644 +index ed67fcd2b67bfe581863cc6748692c3348f6c883..24a1663cf1cd3f888981a13907811b55bdbf6133 100644 --- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -@@ -160,14 +160,14 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl +@@ -151,14 +151,14 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl @Override protected void customServerAiStep() { @@ -1585,16 +1580,16 @@ index baca84088350c82569fb7969136c65bbc4c52f5b..8616a8c09a21f576a07daaa93ebf64e0 } diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -index 907cdc32c30291f5668c806b874da0fbe0754738..37f1d3c656997906cef57d9dbefc226d04fc65fe 100644 +index b0f8115b328eda1e3571051870b5310c5a7e115a..ee8c232ddaa518377bdfa54e83ffc04f7a2f2c9a 100644 --- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java +++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -@@ -239,13 +239,13 @@ public class Frog extends Animal implements VariantHolder { - private int behaviorTick = 0; // Pufferfish +@@ -237,13 +237,13 @@ public class Frog extends Animal implements VariantHolder> { + @Override protected void customServerAiStep() { - this.level().getProfiler().push("frogBrain"); + //this.level().getProfiler().push("frogBrain"); // Purpur - if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider + //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Purpur - TODO: Pufferfish this.getBrain().tick((ServerLevel)this.level(), this); - this.level().getProfiler().pop(); - this.level().getProfiler().push("frogActivityUpdate"); @@ -1607,16 +1602,17 @@ index 907cdc32c30291f5668c806b874da0fbe0754738..37f1d3c656997906cef57d9dbefc226d } diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java -index c19513b3b35bbb05c3159606caacee0559366610..2a9c2a69a0589e4e7b7c79d3716376b360a2eba1 100644 +index b98a34357e59168bbb22c967b86a449fc91f47f0..09c4cf772df4644413e40055fedcdf42ee8064fd 100644 --- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -120,12 +120,12 @@ public class Tadpole extends AbstractFish { - private int behaviorTick = 0; // Pufferfish +@@ -122,13 +122,13 @@ public class Tadpole extends AbstractFish { + @Override protected void customServerAiStep() { - this.level().getProfiler().push("tadpoleBrain"); + //this.level().getProfiler().push("tadpoleBrain"); // Purpur - if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider + //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Purpur - TODO: Pufferfish + this.getBrain().tick((ServerLevel) this.level(), this); - this.level().getProfiler().pop(); - this.level().getProfiler().push("tadpoleActivityUpdate"); + //this.level().getProfiler().pop(); // Purpur @@ -1628,16 +1624,16 @@ index c19513b3b35bbb05c3159606caacee0559366610..2a9c2a69a0589e4e7b7c79d3716376b3 } diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index f7730ec3a6c8818baf2a7a738e5a49a56d17c0e8..566f117ba6742ba17ffb8a2673a8c320c39549f7 100644 +index 79c27b5717fec000ea94138ebc76dbabf5b2eeaf..4e855055abe4d300b6b126e8a9deecaab5827a33 100644 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -@@ -226,13 +226,13 @@ public class Goat extends Animal { - private int behaviorTick = 0; // Pufferfish +@@ -224,13 +224,13 @@ public class Goat extends Animal { + @Override protected void customServerAiStep() { - this.level().getProfiler().push("goatBrain"); + //this.level().getProfiler().push("goatBrain"); // Purpur - if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider + //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Purpur - TODO: Pufferfish this.getBrain().tick((ServerLevel) this.level(), this); - this.level().getProfiler().pop(); - this.level().getProfiler().push("goatActivityUpdate"); @@ -1650,10 +1646,10 @@ index f7730ec3a6c8818baf2a7a738e5a49a56d17c0e8..566f117ba6742ba17ffb8a2673a8c320 } diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 4d1071546f523c63b9c981e90a09393e9e4400fa..5e7d76dcdc170b809ab82f6e2259c9b4d3d741be 100644 +index 0cc5b9e44dd6f1e0afdbb62ef41aa749c0c79b18..21bdcbd51d9f440e0734750b40cefa4c08cdaf5f 100644 --- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -517,11 +517,11 @@ public class Sniffer extends Animal { +@@ -504,11 +504,11 @@ public class Sniffer extends Animal { @Override protected void customServerAiStep() { @@ -1669,10 +1665,10 @@ index 4d1071546f523c63b9c981e90a09393e9e4400fa..5e7d76dcdc170b809ab82f6e2259c9b4 } diff --git a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java -index c1125279b80bad8d7b6b273e709c412a0a578318..abafb15ab1294e11810798795bd103fb8bd5f64a 100644 +index 451762b3cd023b8c5828f68e2778aada9c50ab85..f9bb83f35a41e5b076ae438af613a97b8e60c0c3 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java -@@ -273,10 +273,10 @@ public class Zoglin extends Monster implements Enemy, HoglinBase { +@@ -266,10 +266,10 @@ public class Zoglin extends Monster implements Enemy, HoglinBase { @Override protected void customServerAiStep() { @@ -1686,10 +1682,10 @@ index c1125279b80bad8d7b6b273e709c412a0a578318..abafb15ab1294e11810798795bd103fb } diff --git a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java -index b5ef8d9e55656100085a4d9858c3530bb08d3c16..aa27c014ce53e2dd49f02d413d5c4d763261a803 100644 +index 796ce24185ab9e80864116f9523c4289fcaad243..82391c84789c27353212d3142c036cc5aedb98f9 100644 --- a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java +++ b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java -@@ -202,10 +202,10 @@ public class Breeze extends Monster { +@@ -226,11 +226,11 @@ public class Breeze extends Monster { @Override protected void customServerAiStep() { @@ -1697,23 +1693,24 @@ index b5ef8d9e55656100085a4d9858c3530bb08d3c16..aa27c014ce53e2dd49f02d413d5c4d76 + //this.level().getProfiler().push("breezeBrain"); // Purpur this.getBrain().tick((ServerLevel)this.level(), this); - this.level().getProfiler().popPush("breezeActivityUpdate"); -- this.level().getProfiler().pop(); + //this.level().getProfiler().popPush("breezeActivityUpdate"); // Purpur + BreezeAi.updateActivity(this); +- this.level().getProfiler().pop(); + //this.level().getProfiler().pop(); // Purpur super.customServerAiStep(); } diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java -index 4ba5cb5bf7d82ddfd888f5da9f0b111f9102bed8..cfa7ec9b5b3125cb80b591e80f8d42815c25f568 100644 +index a69a4d860cf537322cdf96bfd42e55d3fc684dd1..757d2b7bcb83f5bdcddf85a00e90288f3b82a2d6 100644 --- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -195,10 +195,10 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { - private int behaviorTick; // Pufferfish +@@ -192,10 +192,10 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { + @Override protected void customServerAiStep() { - this.level().getProfiler().push("hoglinBrain"); + //this.level().getProfiler().push("hoglinBrain"); // Purpur - if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider + //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Purpur - TODO: Pufferfish this.getBrain().tick((ServerLevel)this.level(), this); - this.level().getProfiler().pop(); + //this.level().getProfiler().pop(); // Purpur @@ -1721,16 +1718,16 @@ index 4ba5cb5bf7d82ddfd888f5da9f0b111f9102bed8..cfa7ec9b5b3125cb80b591e80f8d4281 if (this.isConverting()) { this.timeInOverworld++; diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -index 141fa7d4e1b81e90f4d63a3459c9a72bc595d30b..1422c0f4ff6a3e61f229574cd7b50971bdbd8451 100644 +index 811b622945ecf67cff1992c3cdd4fcd84f33fb68..1b5977aa14d9a7254e7692bb152cc2808d52107a 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -335,10 +335,10 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento - private int behaviorTick; // Pufferfish +@@ -328,10 +328,10 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento + @Override protected void customServerAiStep() { - this.level().getProfiler().push("piglinBrain"); + //this.level().getProfiler().push("piglinBrain"); // Purpur - if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider + //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Purpur - TODO: Pufferfish this.getBrain().tick((ServerLevel) this.level(), this); - this.level().getProfiler().pop(); + //this.level().getProfiler().pop(); // Purpur @@ -1738,10 +1735,10 @@ index 141fa7d4e1b81e90f4d63a3459c9a72bc595d30b..1422c0f4ff6a3e61f229574cd7b50971 super.customServerAiStep(); } diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java -index 5ae1b1de412aeacbbc5e04299e94351d34631b4c..40f6af92d1fc58a6115fc16b02d296aef897b607 100644 +index 71d2501e88a99819ef305fa8715418aad65ec81d..407a0f27719d3944b3a005c664d80246ea1c7cf4 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java -@@ -145,10 +145,10 @@ public class PiglinBrute extends AbstractPiglin { +@@ -138,10 +138,10 @@ public class PiglinBrute extends AbstractPiglin { @Override protected void customServerAiStep() { @@ -1755,16 +1752,16 @@ index 5ae1b1de412aeacbbc5e04299e94351d34631b4c..40f6af92d1fc58a6115fc16b02d296ae PiglinBruteAi.maybePlayActivitySound(this); super.customServerAiStep(); diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -index 384e7b29215cadfa40af07a183a9c9c6a5b4a80a..bf7ef72a7d92db8f11789a69583270644de0dac7 100644 +index 9f5325444cc4f64fc88f85794fbad09ddd4f7860..0bb577ec9ba0d23a741ccf067ac35f6be68312ca 100644 --- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -@@ -302,10 +302,10 @@ public class Warden extends Monster implements VibrationSystem { +@@ -299,9 +299,10 @@ public class Warden extends Monster implements VibrationSystem { protected void customServerAiStep() { ServerLevel worldserver = (ServerLevel) this.level(); - worldserver.getProfiler().push("wardenBrain"); + //worldserver.getProfiler().push("wardenBrain"); // Purpur - if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish ++ //if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - TODO: Move to Ridables patch this.getBrain().tick(worldserver, this); - this.level().getProfiler().pop(); + //this.level().getProfiler().pop(); // Purpur @@ -1772,10 +1769,10 @@ index 384e7b29215cadfa40af07a183a9c9c6a5b4a80a..bf7ef72a7d92db8f11789a6958327064 if ((this.tickCount + this.getId()) % 120 == 0) { Warden.applyDarknessAround(worldserver, this.position(), this, 20); diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index ef7c67f591ca4a3c73b87a7c44b37ad0b51d875c..50202286a0d83f7fe5331eb669d999718a9082cf 100644 +index dcf580d852ede8ea01f5d91944a224ec6eca73e4..4be218129188c1be8736940170a861adc10fdb7d 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -344,7 +344,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -341,7 +341,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } protected void customServerAiStep(boolean inactive) { // Purpur - not final // Paper end @@ -1784,20 +1781,20 @@ index ef7c67f591ca4a3c73b87a7c44b37ad0b51d875c..50202286a0d83f7fe5331eb669d99971 // Purpur start if (this.level().purpurConfig.villagerLobotomizeEnabled) { // treat as inactive if lobotomized -@@ -356,7 +356,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -357,7 +357,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler this.getBrain().tick((ServerLevel) this.level(), this); // Paper - } else if (this.isLobotomized && shouldRestock()) restock(); - // Purpur end + } + // Purpur end*/ // Purpur - TODO: Pufferfish - this.level().getProfiler().pop(); + //this.level().getProfiler().pop(); // Purpur if (this.assignProfessionWhenSpawned) { this.assignProfessionWhenSpawned = false; } diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 90a82bd7977ebe520bdcc2ab99e11452d5cf4a21..5dcfb077fc58a92f32425aaafb82d6b41d488e13 100644 +index feb470e8036ecfcd838cff05a0dc1d43cc96ae3c..6b6340ae8ca3f81f08f9038b63ebc419e003cf6b 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -675,7 +675,7 @@ public class Explosion { +@@ -681,7 +681,7 @@ public class Explosion { } if (flag1) { @@ -1806,7 +1803,7 @@ index 90a82bd7977ebe520bdcc2ab99e11452d5cf4a21..5dcfb077fc58a92f32425aaafb82d6b4 List> list = new ArrayList(); Util.shuffle(this.toBlow, this.level.random); -@@ -751,7 +751,7 @@ public class Explosion { +@@ -757,7 +757,7 @@ public class Explosion { Block.popResource(this.level, (BlockPos) pair.getSecond(), (ItemStack) pair.getFirst()); } @@ -1816,10 +1813,10 @@ index 90a82bd7977ebe520bdcc2ab99e11452d5cf4a21..5dcfb077fc58a92f32425aaafb82d6b4 if (this.fire) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index ea9b33eb48d8610943d122811cc49d211bc22d86..311c853f2150247350ab6ccb2dd92d58dbfc645c 100644 +index 4d00d72d66adfb282d354e22703552b333138694..eda2f8cc034cf46293be1be117a60cf8b663c303 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1314,9 +1314,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1303,9 +1303,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } protected void tickBlockEntities() { @@ -1831,7 +1828,7 @@ index ea9b33eb48d8610943d122811cc49d211bc22d86..311c853f2150247350ab6ccb2dd92d58 //this.timings.tileEntityPending.startTiming(); // Spigot // Purpur this.tickingBlockEntities = true; if (!this.pendingBlockEntityTickers.isEmpty()) { -@@ -1357,7 +1357,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1346,7 +1346,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { //this.timings.tileEntityTick.stopTiming(); // Spigot // Purpur this.tickingBlockEntities = false; co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper @@ -1840,7 +1837,7 @@ index ea9b33eb48d8610943d122811cc49d211bc22d86..311c853f2150247350ab6ccb2dd92d58 this.spigotConfig.currentPrimedTnt = 0; // Spigot } -@@ -1567,7 +1567,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1561,7 +1561,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @Override public List getEntities(@Nullable Entity except, AABB box, Predicate predicate) { @@ -1849,7 +1846,7 @@ index ea9b33eb48d8610943d122811cc49d211bc22d86..311c853f2150247350ab6ccb2dd92d58 List list = Lists.newArrayList(); ((ServerLevel)this).getEntityLookup().getEntities(except, box, list, predicate); // Paper - optimise this call return list; -@@ -1586,7 +1586,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1580,7 +1580,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public void getEntities(EntityTypeTest filter, AABB box, Predicate predicate, List result, int limit) { @@ -1858,20 +1855,19 @@ index ea9b33eb48d8610943d122811cc49d211bc22d86..311c853f2150247350ab6ccb2dd92d58 // Paper start - optimise this call //TODO use limit if (filter instanceof net.minecraft.world.entity.EntityType entityTypeTest) { -@@ -1845,7 +1845,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1835,6 +1835,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public ProfilerFiller getProfiler() { -- if (gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish -+ if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur ++ //if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur // Purpur - TODO: Pufferfish return (ProfilerFiller) this.profiler.get(); } diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 78eb2d8ba58f2937c1145147e2d9e7de802e541e..d657de0bcc0684d1ba49ddad4db35e0e23fac108 100644 +index 2812505185df691e8f08932aa0bba162a7d9db86..35e94c06361795d032f995e8282f8b35c075dae7 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -132,7 +132,7 @@ public final class NaturalSpawner { +@@ -127,7 +127,7 @@ public final class NaturalSpawner { } public static void spawnForChunk(ServerLevel world, LevelChunk chunk, NaturalSpawner.SpawnState info, boolean spawnAnimals, boolean spawnMonsters, boolean rareSpawn) { @@ -1880,7 +1876,7 @@ index 78eb2d8ba58f2937c1145147e2d9e7de802e541e..d657de0bcc0684d1ba49ddad4db35e0e //world.timings.mobSpawn.startTiming(); // Spigot // Purpur MobCategory[] aenumcreaturetype = NaturalSpawner.SPAWNING_CATEGORIES; int i = aenumcreaturetype.length; -@@ -187,7 +187,7 @@ public final class NaturalSpawner { +@@ -182,7 +182,7 @@ public final class NaturalSpawner { } //world.timings.mobSpawn.stopTiming(); // Spigot // Purpur @@ -1890,10 +1886,10 @@ index 78eb2d8ba58f2937c1145147e2d9e7de802e541e..d657de0bcc0684d1ba49ddad4db35e0e // Paper start - Add mobcaps commands diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 8b1f5d290efbebe5fb6fc90b6031356ea3e4cef3..97724cbd6c1bf172379e98d4a3f6e8cda5cda823 100644 +index e8d14bf4120dd9861e4ccb8bd6c14e175343c55d..fd637415625fdabcac07e120e9168d09c06141d4 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -457,11 +457,11 @@ public class LevelChunk extends ChunkAccess { +@@ -443,11 +443,11 @@ public class LevelChunk extends ChunkAccess { if (LightEngine.hasDifferentLightProperties(this, blockposition, iblockdata1, iblockdata)) { ProfilerFiller gameprofilerfiller = this.level.getProfiler(); @@ -1908,7 +1904,7 @@ index 8b1f5d290efbebe5fb6fc90b6031356ea3e4cef3..97724cbd6c1bf172379e98d4a3f6e8cd } boolean flag3 = iblockdata1.hasBlockEntity(); -@@ -1174,9 +1174,9 @@ public class LevelChunk extends ChunkAccess { +@@ -1158,9 +1158,9 @@ public class LevelChunk extends ChunkAccess { if (LevelChunk.this.isTicking(blockposition)) { try { @@ -1920,7 +1916,7 @@ index 8b1f5d290efbebe5fb6fc90b6031356ea3e4cef3..97724cbd6c1bf172379e98d4a3f6e8cd //this.blockEntity.tickTimer.startTiming(); // Spigot // Purpur BlockState iblockdata = LevelChunk.this.getBlockState(blockposition); -@@ -1193,7 +1193,7 @@ public class LevelChunk extends ChunkAccess { +@@ -1177,7 +1177,7 @@ public class LevelChunk extends ChunkAccess { // Paper end - Remove the Block Entity if it's invalid } @@ -1930,7 +1926,7 @@ index 8b1f5d290efbebe5fb6fc90b6031356ea3e4cef3..97724cbd6c1bf172379e98d4a3f6e8cd if (throwable instanceof ThreadDeath) throw throwable; // Paper // Paper start - Prevent block entity and entity crashes diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java -index d1e1f12451058f7f276f8277536a4c0a4d736601..2046ac397f5c46cc45f233e36abbdbe717753fc7 100644 +index 18bbb3f8f99849333ff4bc020c8ce758a69312a5..404080976208c30e9e95e5bee47c2a749e709a45 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java @@ -53,8 +53,8 @@ public class PathFinder { diff --git a/patches/unapplied-server/0262-Add-more-logger-output-for-invalid-movement-kicks.patch b/patches/server/0258-Add-more-logger-output-for-invalid-movement-kicks.patch similarity index 91% rename from patches/unapplied-server/0262-Add-more-logger-output-for-invalid-movement-kicks.patch rename to patches/server/0258-Add-more-logger-output-for-invalid-movement-kicks.patch index 38adc0de0..f46d7935a 100644 --- a/patches/unapplied-server/0262-Add-more-logger-output-for-invalid-movement-kicks.patch +++ b/patches/server/0258-Add-more-logger-output-for-invalid-movement-kicks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add more logger output for invalid movement kicks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fdbdaa1d8d5760c5c661cbeca803e8ff8ec46aac..872be72e24017fdcb3060f6e4e9a92c342d59fc1 100644 +index 5ae8b009e5ba2fc896e7f52b864aecafe4e892d4..f86096f74b9ff401d8b1add64912bdf69c576139 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -733,6 +733,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -753,6 +753,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl if (packet.getId() == this.awaitingTeleport) { if (this.awaitingPositionFromClient == null) { this.disconnect(Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause @@ -16,7 +16,7 @@ index fdbdaa1d8d5760c5c661cbeca803e8ff8ec46aac..872be72e24017fdcb3060f6e4e9a92c3 return; } -@@ -1364,8 +1365,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1334,8 +1335,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleMovePlayer(ServerboundMovePlayerPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); diff --git a/patches/unapplied-server/0263-Add-Bee-API.patch b/patches/server/0259-Add-Bee-API.patch similarity index 89% rename from patches/unapplied-server/0263-Add-Bee-API.patch rename to patches/server/0259-Add-Bee-API.patch index 8180a08fe..b09f65216 100644 --- a/patches/unapplied-server/0263-Add-Bee-API.patch +++ b/patches/server/0259-Add-Bee-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Bee API diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index c2dae3636145105ecb3ae950e07095f278f72ac2..997ab942be9f742804041b07d607e7dd6473ba96 100644 +index 221c0051c7a0e20c1b7a464df26eb63c4e997eee..539170813921de2dfcd7ef84dd7512d73cd27e68 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -814,6 +814,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -797,6 +797,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { if (optional.isPresent()) { Bee.this.savedFlowerPos = (BlockPos) optional.get(); Bee.this.navigation.moveTo((double) Bee.this.savedFlowerPos.getX() + 0.5D, (double) Bee.this.savedFlowerPos.getY() + 0.5D, (double) Bee.this.savedFlowerPos.getZ() + 0.5D, 1.2000000476837158D); @@ -16,7 +16,7 @@ index c2dae3636145105ecb3ae950e07095f278f72ac2..997ab942be9f742804041b07d607e7dd return true; } else { Bee.this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(Bee.this.random, 20, 60); -@@ -870,6 +871,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -853,6 +854,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.pollinating = false; Bee.this.navigation.stop(); Bee.this.remainingCooldownBeforeLocatingNewFlower = 200; @@ -24,7 +24,7 @@ index c2dae3636145105ecb3ae950e07095f278f72ac2..997ab942be9f742804041b07d607e7dd } @Override -@@ -916,6 +918,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -899,6 +901,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.setWantedPos(); } diff --git a/patches/unapplied-server/0264-Debug-Marker-API.patch b/patches/server/0260-Debug-Marker-API.patch similarity index 94% rename from patches/unapplied-server/0264-Debug-Marker-API.patch rename to patches/server/0260-Debug-Marker-API.patch index d677dbccf..495a63065 100644 --- a/patches/unapplied-server/0264-Debug-Marker-API.patch +++ b/patches/server/0260-Debug-Marker-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Debug Marker API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 14e60675d23f9696fd8f64eb026fcd0b82b498f0..659450d3538cc1499fd427868159e8c32b007dd2 100644 +index b113e54cbe8262b7d0d8bae156d00baf04486b32..dcb9d516e8078da4a51a716080ef9a442f6cdb67 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1600,6 +1600,42 @@ public final class CraftServer implements Server { @@ -52,10 +52,10 @@ index 14e60675d23f9696fd8f64eb026fcd0b82b498f0..659450d3538cc1499fd427868159e8c3 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 06abe25b335606b42ac2a7b5551f0c9e7143a474..69c12d9049af908380c48c7f13d3d5c7220f8e39 100644 +index b7a02ae4eda06cab8ffd1220259a061558981dec..226ff7c6048b510be2e71ecc5d5ff3581092aa5e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2420,6 +2420,42 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2428,6 +2428,42 @@ public class CraftWorld extends CraftRegionAccessor implements World { public float getLocalDifficultyAt(Location location) { return getHandle().getCurrentDifficultyAt(io.papermc.paper.util.MCUtil.toBlockPosition(location)).getEffectiveDifficulty(); } @@ -99,10 +99,10 @@ index 06abe25b335606b42ac2a7b5551f0c9e7143a474..69c12d9049af908380c48c7f13d3d5c7 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4a04c56371a2d9772fb542ffac5b9b98cbf1e86a..9d2b39e871c83ab7af9c2cbde08e560006fcb005 100644 +index 0b278aaf675693e4babac5d551087285b59f8f5c..10f879310af7c0f31a65d59bf0bbb33ed2cdaeb5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3508,5 +3508,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3565,5 +3565,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetIdleTimer() { getHandle().resetLastActionTime(); } diff --git a/patches/unapplied-server/0265-mob-spawning-option-to-ignore-creative-players.patch b/patches/server/0261-mob-spawning-option-to-ignore-creative-players.patch similarity index 94% rename from patches/unapplied-server/0265-mob-spawning-option-to-ignore-creative-players.patch rename to patches/server/0261-mob-spawning-option-to-ignore-creative-players.patch index 015722f81..1de4d2a1c 100644 --- a/patches/unapplied-server/0265-mob-spawning-option-to-ignore-creative-players.patch +++ b/patches/server/0261-mob-spawning-option-to-ignore-creative-players.patch @@ -5,10 +5,10 @@ Subject: [PATCH] mob spawning option to ignore creative players diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index d657de0bcc0684d1ba49ddad4db35e0e23fac108..a2026900948e9157cb35ba0183dc3af20c63214f 100644 +index 35e94c06361795d032f995e8282f8b35c075dae7..0f90a6803851eba51e164772c984b1cd1193d882 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -258,7 +258,7 @@ public final class NaturalSpawner { +@@ -253,7 +253,7 @@ public final class NaturalSpawner { blockposition_mutableblockposition.set(l, i, i1); double d0 = (double) l + 0.5D; double d1 = (double) i1 + 0.5D; diff --git a/patches/unapplied-server/0266-Add-skeleton-bow-accuracy-option.patch b/patches/server/0262-Add-skeleton-bow-accuracy-option.patch similarity index 95% rename from patches/unapplied-server/0266-Add-skeleton-bow-accuracy-option.patch rename to patches/server/0262-Add-skeleton-bow-accuracy-option.patch index 8306cc224..ea00f2812 100644 --- a/patches/unapplied-server/0266-Add-skeleton-bow-accuracy-option.patch +++ b/patches/server/0262-Add-skeleton-bow-accuracy-option.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add skeleton bow accuracy option diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -index cb378b343f721c16868a6673aba59856574c7133..a00646bc8a9caefe56e48b7682e8fb0c464b81fa 100644 +index 8515e6360c1630385884a60f652f65fdefeaf540..e80307198b051cbcd9f72b36e459276848dcb4c9 100644 --- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -@@ -182,7 +182,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo +@@ -183,7 +183,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo double d2 = target.getZ() - this.getZ(); double d3 = Math.sqrt(d0 * d0 + d2 * d2); diff --git a/patches/unapplied-server/0267-Allay-respect-item-NBT.patch b/patches/server/0263-Allay-respect-item-NBT.patch similarity index 94% rename from patches/unapplied-server/0267-Allay-respect-item-NBT.patch rename to patches/server/0263-Allay-respect-item-NBT.patch index 9faf279ca..c209860d2 100644 --- a/patches/unapplied-server/0267-Allay-respect-item-NBT.patch +++ b/patches/server/0263-Allay-respect-item-NBT.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allay respect item NBT diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -index 9bf06cf7b3706f8883e1a0ceac8b1aebb52ba475..c783ce59ea766e6c46a3313628b961f27e01ee8b 100644 +index bca7b7192debb3a34a08047010a2438e7b7e2a78..53765198483e137d411e227119e4f912964aefe3 100644 --- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java +++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -@@ -406,9 +406,31 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -399,9 +399,31 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS @Override public boolean wantsToPickUp(ItemStack stack) { diff --git a/patches/unapplied-server/0268-Add-death-screen-API.patch b/patches/server/0264-Add-death-screen-API.patch similarity index 87% rename from patches/unapplied-server/0268-Add-death-screen-API.patch rename to patches/server/0264-Add-death-screen-API.patch index d8f90eb6d..7975b0a84 100644 --- a/patches/unapplied-server/0268-Add-death-screen-API.patch +++ b/patches/server/0264-Add-death-screen-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add death screen API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9d2b39e871c83ab7af9c2cbde08e560006fcb005..fb2d05e43df3bfb72b1f6e325736dd3cbc6c3096 100644 +index 10f879310af7c0f31a65d59bf0bbb33ed2cdaeb5..90338017ebcb2a690dff7dad57aa6fbb95e0ff93 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3546,5 +3546,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3603,5 +3603,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (this.getHandle().connection == null) return; this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestClearMarkersDebugPayload())); } diff --git a/patches/unapplied-server/0270-Implement-ram-and-rambar-commands.patch b/patches/server/0265-Implement-ram-and-rambar-commands.patch similarity index 96% rename from patches/unapplied-server/0270-Implement-ram-and-rambar-commands.patch rename to patches/server/0265-Implement-ram-and-rambar-commands.patch index ab9ceaac5..3c1d70723 100644 --- a/patches/unapplied-server/0270-Implement-ram-and-rambar-commands.patch +++ b/patches/server/0265-Implement-ram-and-rambar-commands.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement ram and rambar commands diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 48a4f26eec06777b4ae165db6566c1f6198527fd..b6cc108c2d4361e6f415cfc3ff8c7699a8e222f4 100644 +index d3c42c19a051fb3a670e541fc746b55717192a91..13dfb3e506d50c0b191baf5d05bbfc28c20be0ae 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -256,6 +256,8 @@ public class Commands { +@@ -258,6 +258,8 @@ public class Commands { org.purpurmc.purpur.command.UptimeCommand.register(this.dispatcher); // Purpur org.purpurmc.purpur.command.TPSBarCommand.register(this.dispatcher); // Purpur org.purpurmc.purpur.command.CompassCommand.register(this.dispatcher); // Purpur @@ -18,10 +18,10 @@ index 48a4f26eec06777b4ae165db6566c1f6198527fd..b6cc108c2d4361e6f415cfc3ff8c7699 if (environment.includeIntegrated) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index d78c2348160795fcc9ff23b448e7d3c48f34c272..305b90d10a499e9731f5178433fb10207e428091 100644 +index 054a8aff30181d1a568ad931eb150fc2992cac97..4404380383e9e78a70c4195dbb49aff76515441a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -284,6 +284,7 @@ public class ServerPlayer extends Player { +@@ -301,6 +301,7 @@ public class ServerPlayer extends Player { public boolean purpurClient = false; // Purpur private boolean tpsBar = false; // Purpur private boolean compassBar = false; // Purpur @@ -29,23 +29,23 @@ index d78c2348160795fcc9ff23b448e7d3c48f34c272..305b90d10a499e9731f5178433fb1020 // Paper start - replace player chunk loader private final java.util.concurrent.atomic.AtomicReference viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1)); -@@ -571,6 +572,7 @@ public class ServerPlayer extends Player { - } +@@ -611,6 +612,7 @@ public class ServerPlayer extends Player { + }); } + if (nbt.contains("Purpur.RamBar")) { this.ramBar = nbt.getBoolean("Purpur.RamBar"); } // Purpur - if (nbt.contains("Purpur.TPSBar")) { this.tpsBar = nbt.getBoolean("Purpur.TPSBar"); } // Purpur + if (nbt.contains("Purpur.TPSBar")) { this.tpsBar = nbt.getBoolean("Purpur.TPSBar"); } // Purpur - TODO: move back up if (nbt.contains("Purpur.CompassBar")) { this.compassBar = nbt.getBoolean("Purpur.CompassBar"); } // Purpur } -@@ -639,6 +641,7 @@ public class ServerPlayer extends Player { +@@ -689,6 +691,7 @@ public class ServerPlayer extends Player { + }); } - this.getBukkitEntity().setExtraData(nbt); // CraftBukkit + nbt.putBoolean("Purpur.RamBar", this.ramBar); // Purpur nbt.putBoolean("Purpur.TPSBar", this.tpsBar); // Purpur nbt.putBoolean("Purpur.CompassBar", this.compassBar); // Purpur } -@@ -2915,5 +2918,13 @@ public class ServerPlayer extends Player { +@@ -3024,5 +3027,13 @@ public class ServerPlayer extends Player { public void compassBar(boolean compassBar) { this.compassBar = compassBar; } @@ -60,7 +60,7 @@ index d78c2348160795fcc9ff23b448e7d3c48f34c272..305b90d10a499e9731f5178433fb1020 // Purpur end } diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index b55a4366f69a1f259d5d7aed01764aec14a1dbb2..5313ba91ffc625b27d5bb99395f0e719829f6bda 100644 +index d038e62a0151e3b5c9dee06f1b2682684d0b496e..b94f7b882405345f6154383beaef8d89673726c9 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -182,6 +182,8 @@ public class PurpurConfig { diff --git a/patches/unapplied-server/0273-Configurable-block-blast-resistance.patch b/patches/server/0266-Configurable-block-blast-resistance.patch similarity index 78% rename from patches/unapplied-server/0273-Configurable-block-blast-resistance.patch rename to patches/server/0266-Configurable-block-blast-resistance.patch index 3504b073e..efd300477 100644 --- a/patches/unapplied-server/0273-Configurable-block-blast-resistance.patch +++ b/patches/server/0266-Configurable-block-blast-resistance.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable block blast resistance diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 63c4d52c348d9297a24abb17e105b2f4c7758740..d38d8fc7ef22fb68e867cc29dab1171c9aa6ac35 100644 +index 3c1091f2a729b7d06ba6e21c37f788edb2ad1775..031fc626d2075cbe0941fecc188406712ab9953f 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -84,7 +84,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -86,7 +86,7 @@ public abstract class BlockBehaviour implements FeatureElement { protected static final Direction[] UPDATE_SHAPE_ORDER = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP}; public final boolean hasCollision; @@ -18,12 +18,12 @@ index 63c4d52c348d9297a24abb17e105b2f4c7758740..d38d8fc7ef22fb68e867cc29dab1171c protected final SoundType soundType; protected final float friction; diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 88763ca8cc31bda23f8f31d2bc990fb4a85c9955..b13635ec623c80b1c32f2a6c11680dae899e8ec7 100644 +index b94f7b882405345f6154383beaef8d89673726c9..b0e560b1efa0368949fa0e3a6706807d9dbfca20 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -@@ -578,4 +578,19 @@ public class PurpurConfig { - private static void fixProjectileLootingTransfer() { - fixProjectileLootingTransfer = getBoolean("settings.fix-projectile-looting-transfer", fixProjectileLootingTransfer); +@@ -497,4 +497,19 @@ public class PurpurConfig { + String setPattern = getString("settings.username-valid-characters", defaultPattern); + usernameValidCharactersPattern = java.util.regex.Pattern.compile(setPattern == null || setPattern.isBlank() ? defaultPattern : setPattern); } + + private static void blastResistanceSettings() { diff --git a/patches/unapplied-server/0274-Configurable-block-fall-damage-modifiers.patch b/patches/server/0267-Configurable-block-fall-damage-modifiers.patch similarity index 93% rename from patches/unapplied-server/0274-Configurable-block-fall-damage-modifiers.patch rename to patches/server/0267-Configurable-block-fall-damage-modifiers.patch index a5a16d4a8..feb5dfd24 100644 --- a/patches/unapplied-server/0274-Configurable-block-fall-damage-modifiers.patch +++ b/patches/server/0267-Configurable-block-fall-damage-modifiers.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable block fall damage modifiers diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java -index 58d4554785d066962acad59d983d15e6419c4869..83fa72b5a8fde431e7035fe5cacc50e33ae506bf 100644 +index 9084e11df829fb24489773d15435a3a3570135fe..fe37651b9d5a1f786944c39de0c8a438951b4303 100644 --- a/src/main/java/net/minecraft/world/level/block/BedBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java -@@ -183,7 +183,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock +@@ -182,7 +182,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock @Override public void fallOn(Level world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { @@ -18,7 +18,7 @@ index 58d4554785d066962acad59d983d15e6419c4869..83fa72b5a8fde431e7035fe5cacc50e3 @Override diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 34b4c19220e73efad9ff22f3798ee7fbbd5a1968..284149925440f413d23a9ec3ce704e70a74f4c08 100644 +index 49dad044ac21bbfe2e60be76757ada4750b607b4..c5215d3a65856db760089f9e3dc38426c70e75ba 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -96,6 +96,10 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -32,7 +32,7 @@ index 34b4c19220e73efad9ff22f3798ee7fbbd5a1968..284149925440f413d23a9ec3ce704e70 // Paper start public final boolean isDestroyable() { return io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPermanentBlockBreakExploits || -@@ -522,7 +526,7 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -514,7 +518,7 @@ public class Block extends BlockBehaviour implements ItemLike { } public void fallOn(Level world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { @@ -54,10 +54,10 @@ index ef364aa171a48482a45bc18cfe730ec20c3f7be6..74971d90506aa253d5ee821b5390fb25 } } diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index b13635ec623c80b1c32f2a6c11680dae899e8ec7..bc001cac7d478baf5118ec746de8d2d2eba2ba5c 100644 +index b0e560b1efa0368949fa0e3a6706807d9dbfca20..384d07ffdbae9b764d5313fa8d172f95d1c1aebd 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -@@ -593,4 +593,50 @@ public class PurpurConfig { +@@ -512,4 +512,50 @@ public class PurpurConfig { block.explosionResistance = blastResistance.floatValue(); }); } diff --git a/patches/unapplied-server/0275-Language-API.patch b/patches/server/0268-Language-API.patch similarity index 88% rename from patches/unapplied-server/0275-Language-API.patch rename to patches/server/0268-Language-API.patch index fa7b7a005..32b0743ed 100644 --- a/patches/unapplied-server/0275-Language-API.patch +++ b/patches/server/0268-Language-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Language API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 659450d3538cc1499fd427868159e8c32b007dd2..dabaf0cff6dafe8ca411996e67ead9a2cf84dfb8 100644 +index dcb9d516e8078da4a51a716080ef9a442f6cdb67..8d754bf77cb88d8ddf964f3221183e4097f06d13 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -400,6 +400,20 @@ public final class CraftServer implements Server { +@@ -403,6 +403,20 @@ public final class CraftServer implements Server { this.serverTickManager = new CraftServerTickManager(console.tickRateManager()); Bukkit.setServer(this); diff --git a/patches/unapplied-server/0276-Milk-Keeps-Beneficial-Effects.patch b/patches/server/0269-Milk-Keeps-Beneficial-Effects.patch similarity index 94% rename from patches/unapplied-server/0276-Milk-Keeps-Beneficial-Effects.patch rename to patches/server/0269-Milk-Keeps-Beneficial-Effects.patch index 51cad8b58..f0f24129a 100644 --- a/patches/unapplied-server/0276-Milk-Keeps-Beneficial-Effects.patch +++ b/patches/server/0269-Milk-Keeps-Beneficial-Effects.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Milk Keeps Beneficial Effects diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index e64d2425f6b5cec9a72bcbf451284fcbb3ebce06..d6705dce3bc8c1964184fe425386b3f3c0a8202e 100644 +index def30f8c79a4244116f1b9d9ae1a9d06d0a38bce..319e33285b9ba1c65bab9cf2266a15aa0f24d002 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1133,6 +1133,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1154,6 +1154,7 @@ public abstract class LivingEntity extends Entity implements Attackable { for (flag = false; iterator.hasNext(); flag = true) { // CraftBukkit start MobEffectInstance effect = (MobEffectInstance) iterator.next(); @@ -17,7 +17,7 @@ index e64d2425f6b5cec9a72bcbf451284fcbb3ebce06..d6705dce3bc8c1964184fe425386b3f3 if (event.isCancelled()) { continue; diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -index 21a7cc86245d2440b8fc757d3664a29de293f7b0..b133c186d2d1412aa623ba3db68091bc69c282a5 100644 +index 62f5e5cfe5745deced2811d14d0c7ebb2c2c6948..c1e573758539a151452b12466339ccf8b39c7d38 100644 --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java @@ -115,7 +115,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill diff --git a/patches/unapplied-server/0277-MC-121706-Fix-mobs-not-looking-up-and-down-when-stra.patch b/patches/server/0270-MC-121706-Fix-mobs-not-looking-up-and-down-when-stra.patch similarity index 100% rename from patches/unapplied-server/0277-MC-121706-Fix-mobs-not-looking-up-and-down-when-stra.patch rename to patches/server/0270-MC-121706-Fix-mobs-not-looking-up-and-down-when-stra.patch diff --git a/patches/unapplied-server/0278-Add-log-suppression-for-LibraryLoader.patch b/patches/server/0271-Add-log-suppression-for-LibraryLoader.patch similarity index 94% rename from patches/unapplied-server/0278-Add-log-suppression-for-LibraryLoader.patch rename to patches/server/0271-Add-log-suppression-for-LibraryLoader.patch index e636b97ae..2722dbce3 100644 --- a/patches/unapplied-server/0278-Add-log-suppression-for-LibraryLoader.patch +++ b/patches/server/0271-Add-log-suppression-for-LibraryLoader.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add log suppression for LibraryLoader diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index bc001cac7d478baf5118ec746de8d2d2eba2ba5c..5343628ea71c14fba785a0b36ef4abd05b6f63c3 100644 +index 384d07ffdbae9b764d5313fa8d172f95d1c1aebd..c7159eb65efaac72091fe3b9e7e63f9c778c15aa 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -470,11 +470,14 @@ public class PurpurConfig { diff --git a/patches/unapplied-server/0279-Add-option-to-allow-creeper-to-encircle-target-when-.patch b/patches/server/0272-Add-option-to-allow-creeper-to-encircle-target-when-.patch similarity index 100% rename from patches/unapplied-server/0279-Add-option-to-allow-creeper-to-encircle-target-when-.patch rename to patches/server/0272-Add-option-to-allow-creeper-to-encircle-target-when-.patch diff --git a/patches/unapplied-server/0280-Fire-Immunity-API.patch b/patches/server/0273-Fire-Immunity-API.patch similarity index 79% rename from patches/unapplied-server/0280-Fire-Immunity-API.patch rename to patches/server/0273-Fire-Immunity-API.patch index d96bf9aab..2a3980e0f 100644 --- a/patches/unapplied-server/0280-Fire-Immunity-API.patch +++ b/patches/server/0273-Fire-Immunity-API.patch @@ -5,18 +5,18 @@ Subject: [PATCH] Fire Immunity API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index ac1f4576476a800adf484912baaea9f2b7b546d0..a2f5027910b4d690eff73aaab7e991807b91df78 100644 +index 2c3ad553272ad651e6ca26917719e6d9fffdef68..7a27388b5155e7b2478b0daa02cb616829a5d4a2 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -427,6 +427,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - public boolean activatedPriorityReset = false; // Pufferfish - DAB - public int activatedPriority = gg.pufferfish.pufferfish.PufferfishConfig.maximumActivationPrio; // Pufferfish - DAB (golf score) - public final BlockPos.MutableBlockPos cachedBlockPos = new BlockPos.MutableBlockPos(); // Pufferfish - reduce entity allocations +@@ -427,6 +427,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + private UUID originWorld; + public boolean freezeLocked = false; // Paper - Freeze Tick Lock API + public boolean fixedPose = false; // Paper - Expand Pose API + public @Nullable Boolean immuneToFire = null; // Purpur - Fire immune API public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -1827,7 +1828,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -1878,7 +1879,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean fireImmune() { @@ -25,7 +25,7 @@ index ac1f4576476a800adf484912baaea9f2b7b546d0..a2f5027910b4d690eff73aaab7e99180 } public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) { -@@ -2524,6 +2525,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -2575,6 +2576,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess nbttagcompound.putBoolean("Paper.FreezeLock", true); } // Paper end @@ -37,7 +37,7 @@ index ac1f4576476a800adf484912baaea9f2b7b546d0..a2f5027910b4d690eff73aaab7e99180 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); -@@ -2671,6 +2677,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -2722,6 +2728,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess freezeLocked = nbt.getBoolean("Paper.FreezeLock"); } // Paper end @@ -50,7 +50,7 @@ index ac1f4576476a800adf484912baaea9f2b7b546d0..a2f5027910b4d690eff73aaab7e99180 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index b6ecb58718b7de7ba9c90236f3dc11715652daa9..7121de7f623b4a57937a9c60c8fc0f4307e538dc 100644 +index 3c674ecd3b80501047b4593e8872034287defd2e..0ed18542fd8e2a992dc56a5f421eaa840e0af193 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -84,6 +84,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/unapplied-server/0281-Add-option-to-teleport-to-spawn-on-nether-ceiling-da.patch b/patches/server/0274-Add-option-to-teleport-to-spawn-on-nether-ceiling-da.patch similarity index 93% rename from patches/unapplied-server/0281-Add-option-to-teleport-to-spawn-on-nether-ceiling-da.patch rename to patches/server/0274-Add-option-to-teleport-to-spawn-on-nether-ceiling-da.patch index 6384b858d..95a0d2dde 100644 --- a/patches/unapplied-server/0281-Add-option-to-teleport-to-spawn-on-nether-ceiling-da.patch +++ b/patches/server/0274-Add-option-to-teleport-to-spawn-on-nether-ceiling-da.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to teleport to spawn on nether ceiling damage diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index a2f5027910b4d690eff73aaab7e991807b91df78..f2c6b52fe7fbb05afa0074684cd195f6ae598f1f 100644 +index 7a27388b5155e7b2478b0daa02cb616829a5d4a2..3aae4fa4176c0bf170f4532ae187e3122c142a6a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -936,6 +936,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -972,6 +972,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v) && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { // Paper end - Configurable nether ceiling damage diff --git a/patches/unapplied-server/0282-Added-got-ram-event.patch b/patches/server/0275-Added-got-ram-event.patch similarity index 86% rename from patches/unapplied-server/0282-Added-got-ram-event.patch rename to patches/server/0275-Added-got-ram-event.patch index 64bcba860..9809d3a17 100644 --- a/patches/unapplied-server/0282-Added-got-ram-event.patch +++ b/patches/server/0275-Added-got-ram-event.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added got ram event diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index 566f117ba6742ba17ffb8a2673a8c320c39549f7..9d356b08279fd611fb9a7d25be6ede59998a9799 100644 +index 4e855055abe4d300b6b126e8a9deecaab5827a33..6a3c68839d3b993c82fabd4e17f53e38ce9c38f7 100644 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -@@ -429,6 +429,7 @@ public class Goat extends Animal { +@@ -427,6 +427,7 @@ public class Goat extends Animal { // Paper start - Goat ram API public void ram(net.minecraft.world.entity.LivingEntity entity) { diff --git a/patches/unapplied-server/0283-Log-skipped-entity-s-position.patch b/patches/server/0276-Log-skipped-entity-s-position.patch similarity index 86% rename from patches/unapplied-server/0283-Log-skipped-entity-s-position.patch rename to patches/server/0276-Log-skipped-entity-s-position.patch index aa49315a4..19da920bc 100644 --- a/patches/unapplied-server/0283-Log-skipped-entity-s-position.patch +++ b/patches/server/0276-Log-skipped-entity-s-position.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Log skipped entity's position diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index d52af9fa2ca4a07f3499dfee5fe5a7c7b9239cad..a9e2a758669550530eb29475ba99fe42e520f6ae 100644 +index 3097529a9066841a58c899ce55b3bc0cd6af7e88..8120f39a9689dae1233b243b74825e9ff110eac3 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -619,6 +619,12 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -625,6 +625,12 @@ public class EntityType implements FeatureElement, EntityTypeT entity.load(nbt); }, () -> { EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id")); diff --git a/patches/unapplied-server/0284-End-Crystal-Cramming.patch b/patches/server/0277-End-Crystal-Cramming.patch similarity index 96% rename from patches/unapplied-server/0284-End-Crystal-Cramming.patch rename to patches/server/0277-End-Crystal-Cramming.patch index e1fbb7d55..63bfa1843 100644 --- a/patches/unapplied-server/0284-End-Crystal-Cramming.patch +++ b/patches/server/0277-End-Crystal-Cramming.patch @@ -5,7 +5,7 @@ Subject: [PATCH] End Crystal Cramming diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java -index 24ad1bae912fa6ee82ea8b6bdbb0af664dc1006c..34f5006f72ec357c474a19f22ee339e3a1dc786f 100644 +index 8c6ce06a1845832c8b0de654657788d2daf6b71b..15ca426701f1fc821da94a4dee577fdbc4f8ff8d 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java @@ -100,6 +100,7 @@ public class EndCrystal extends Entity { diff --git a/patches/unapplied-server/0285-Option-to-allow-beacon-effects-when-covered-by-tinte.patch b/patches/server/0278-Option-to-allow-beacon-effects-when-covered-by-tinte.patch similarity index 91% rename from patches/unapplied-server/0285-Option-to-allow-beacon-effects-when-covered-by-tinte.patch rename to patches/server/0278-Option-to-allow-beacon-effects-when-covered-by-tinte.patch index 2a53548ca..a923faa04 100644 --- a/patches/unapplied-server/0285-Option-to-allow-beacon-effects-when-covered-by-tinte.patch +++ b/patches/server/0278-Option-to-allow-beacon-effects-when-covered-by-tinte.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option to allow beacon effects when covered by tinted glass diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 4a0bca08585fae3620da108f6a4cc07e500e5e03..428773361d12ecbcf3a6bf790aedfe12a384f511 100644 +index 37ce2605c8803d8d87770bf6a95a83aa975b99fe..39d4e47b1408dd7c0174a6cf8b4ebac63d590a53 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -174,6 +174,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -178,6 +178,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name int j = pos.getY(); int k = pos.getZ(); BlockPos blockposition1; @@ -16,7 +16,7 @@ index 4a0bca08585fae3620da108f6a4cc07e500e5e03..428773361d12ecbcf3a6bf790aedfe12 if (blockEntity.lastCheckY < j) { blockposition1 = pos; -@@ -207,6 +208,9 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -211,6 +212,9 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } } } else { @@ -26,7 +26,7 @@ index 4a0bca08585fae3620da108f6a4cc07e500e5e03..428773361d12ecbcf3a6bf790aedfe12 if (tileentitybeacon_beaconcolortracker == null || iblockdata1.getLightBlock(world, blockposition1) >= 15 && !iblockdata1.is(Blocks.BEDROCK)) { blockEntity.checkingBeamSections.clear(); blockEntity.lastCheckY = l; -@@ -226,7 +230,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -230,7 +234,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name blockEntity.levels = BeaconBlockEntity.updateBase(world, i, j, k); } diff --git a/patches/unapplied-server/0286-Add-attribute-clamping-and-armor-limit-config.patch b/patches/server/0279-Add-attribute-clamping-and-armor-limit-config.patch similarity index 76% rename from patches/unapplied-server/0286-Add-attribute-clamping-and-armor-limit-config.patch rename to patches/server/0279-Add-attribute-clamping-and-armor-limit-config.patch index 63c6d9a31..4a36a5b5b 100644 --- a/patches/unapplied-server/0286-Add-attribute-clamping-and-armor-limit-config.patch +++ b/patches/server/0279-Add-attribute-clamping-and-armor-limit-config.patch @@ -5,16 +5,19 @@ Subject: [PATCH] Add attribute clamping and armor limit config diff --git a/src/main/java/net/minecraft/world/damagesource/CombatRules.java b/src/main/java/net/minecraft/world/damagesource/CombatRules.java -index ccbfcef3e83b1bef364447657bfd08a92d615cf6..aa2331c6df4e79d4bb0add071a0b11d2a3a08b88 100644 +index ddc880ac0c8378bc1132be5deba746c1484c941c..7a8e4b9a9f2e1e5a9c38ad330c75df1f880d3e8b 100644 --- a/src/main/java/net/minecraft/world/damagesource/CombatRules.java +++ b/src/main/java/net/minecraft/world/damagesource/CombatRules.java -@@ -11,12 +11,12 @@ public class CombatRules { +@@ -12,7 +12,7 @@ public class CombatRules { - public static float getDamageAfterAbsorb(float damage, float armor, float armorToughness) { - float f = 2.0F + armorToughness / 4.0F; + public static float getDamageAfterAbsorb(float damage, DamageSource source, float armor, float armorToughnesss) { + float f = 2.0F + armorToughnesss / 4.0F; - float g = Mth.clamp(armor - damage / f, armor * 0.2F, 20.0F); + float g = Mth.clamp(armor - damage / f, armor * 0.2F, org.purpurmc.purpur.PurpurConfig.limitArmor ? 20F : Float.MAX_VALUE); // Purpur - return damage * (1.0F - g / 25.0F); + float h = g / 25.0F; + float i = EnchantmentHelper.calculateArmorBreach(source.getEntity(), h); + float j = 1.0F - i; +@@ -20,7 +20,7 @@ public class CombatRules { } public static float getDamageAfterMagicAbsorb(float damageDealt, float protection) { @@ -36,18 +39,13 @@ index f0703302e7dbbda88de8c648d20d87c55ed9b1e0..a913ebabaa5f443afa987b972355a8f8 } } diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 5343628ea71c14fba785a0b36ef4abd05b6f63c3..cd2c365bcaca0720dc543188a23ff585192cb76e 100644 +index c7159eb65efaac72091fe3b9e7e63f9c778c15aa..538239ed3d8ece17e219e097162eb66bff7d43c8 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -@@ -582,6 +582,16 @@ public class PurpurConfig { - fixProjectileLootingTransfer = getBoolean("settings.fix-projectile-looting-transfer", fixProjectileLootingTransfer); +@@ -501,6 +501,11 @@ public class PurpurConfig { + usernameValidCharactersPattern = java.util.regex.Pattern.compile(setPattern == null || setPattern.isBlank() ? defaultPattern : setPattern); } -+ public static boolean clampAttributes = true; -+ private static void clampAttributes() { -+ clampAttributes = getBoolean("settings.clamp-attributes", clampAttributes); -+ } -+ + public static boolean limitArmor = true; + private static void limitArmor() { + limitArmor = getBoolean("settings.limit-armor", limitArmor); diff --git a/patches/unapplied-server/0287-Config-to-remove-explosion-radius-clamp.patch b/patches/server/0280-Config-to-remove-explosion-radius-clamp.patch similarity index 91% rename from patches/unapplied-server/0287-Config-to-remove-explosion-radius-clamp.patch rename to patches/server/0280-Config-to-remove-explosion-radius-clamp.patch index 471a6ae75..6eb9e20bd 100644 --- a/patches/unapplied-server/0287-Config-to-remove-explosion-radius-clamp.patch +++ b/patches/server/0280-Config-to-remove-explosion-radius-clamp.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Config to remove explosion radius clamp diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 5dcfb077fc58a92f32425aaafb82d6b41d488e13..9b5da37a532595541eaac0a4607aff9045a20ff3 100644 +index 6b6340ae8ca3f81f08f9038b63ebc419e003cf6b..ed31528ddfec06e723827a505daeca5938dba865 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -97,7 +97,7 @@ public class Explosion { +@@ -98,7 +98,7 @@ public class Explosion { this.hitPlayers = Maps.newHashMap(); this.level = world; this.source = entity; @@ -17,7 +17,7 @@ index 5dcfb077fc58a92f32425aaafb82d6b41d488e13..9b5da37a532595541eaac0a4607aff90 this.x = x; this.y = y; this.z = z; -@@ -425,7 +425,7 @@ public class Explosion { +@@ -426,7 +426,7 @@ public class Explosion { public void explode() { // CraftBukkit start diff --git a/patches/unapplied-server/0288-bonemealable-sugarcane-cactus-and-netherwart.patch b/patches/server/0281-bonemealable-sugarcane-cactus-and-netherwart.patch similarity index 94% rename from patches/unapplied-server/0288-bonemealable-sugarcane-cactus-and-netherwart.patch rename to patches/server/0281-bonemealable-sugarcane-cactus-and-netherwart.patch index 448204a4d..9988211a0 100644 --- a/patches/unapplied-server/0288-bonemealable-sugarcane-cactus-and-netherwart.patch +++ b/patches/server/0281-bonemealable-sugarcane-cactus-and-netherwart.patch @@ -5,7 +5,7 @@ Subject: [PATCH] bonemealable sugarcane, cactus, and netherwart diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java -index 84b04419d2cb536ac42ec5373cc74cc29418755c..02ea708a5b5df9f753194cdc9312fc830af85c68 100644 +index 9200d75b05ce535f7b7f5c1572cd8f6261c6955b..066181ed274a492762baebf05bf51ac7848878cc 100644 --- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java @@ -23,7 +23,7 @@ import net.minecraft.world.phys.shapes.CollisionContext; @@ -18,7 +18,7 @@ index 84b04419d2cb536ac42ec5373cc74cc29418755c..02ea708a5b5df9f753194cdc9312fc83 public static final MapCodec CODEC = simpleCodec(CactusBlock::new); public static final IntegerProperty AGE = BlockStateProperties.AGE_15; @@ -134,4 +134,34 @@ public class CactusBlock extends Block { - public boolean isPathfindable(BlockState state, BlockGetter world, BlockPos pos, PathComputationType type) { + protected boolean isPathfindable(BlockState state, PathComputationType type) { return false; } + @@ -53,7 +53,7 @@ index 84b04419d2cb536ac42ec5373cc74cc29418755c..02ea708a5b5df9f753194cdc9312fc83 + // Purpur end } diff --git a/src/main/java/net/minecraft/world/level/block/NetherWartBlock.java b/src/main/java/net/minecraft/world/level/block/NetherWartBlock.java -index 464a9d2e4c694d5d4aae6c2d3e8a5fad0111e910..13eb4dffd60ea7902d620f484df5e3f2c4688402 100644 +index da1c7999ca64199387054de46489d3ff4a299289..b8355ea1de26c4b6905f477fb4e110f1762447b4 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherWartBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NetherWartBlock.java @@ -16,7 +16,7 @@ import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -89,7 +89,7 @@ index 464a9d2e4c694d5d4aae6c2d3e8a5fad0111e910..13eb4dffd60ea7902d620f484df5e3f2 // Purpur end } diff --git a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java -index 04957d461d0e968d443737068aaeec1d0bce78b2..7a283fbe4663cb321739f8e42ade4039d84e462b 100644 +index c48c622e92cedeaa46b929c7adfedec98dd5a3fb..6449b5c424443b5f0ee7e3fce803449418fbed2a 100644 --- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.material.FluidState; diff --git a/patches/unapplied-server/0289-Add-PreExplodeEvents.patch b/patches/server/0282-Add-PreExplodeEvents.patch similarity index 86% rename from patches/unapplied-server/0289-Add-PreExplodeEvents.patch rename to patches/server/0282-Add-PreExplodeEvents.patch index cde070b54..4fc6f26f6 100644 --- a/patches/unapplied-server/0289-Add-PreExplodeEvents.patch +++ b/patches/server/0282-Add-PreExplodeEvents.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PreExplodeEvents diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 9b5da37a532595541eaac0a4607aff9045a20ff3..0be03430d8257d918b7cf646af518473ae027399 100644 +index ed31528ddfec06e723827a505daeca5938dba865..58aa5059c484c9e8acf429a3ae4f07d83594f991 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -429,6 +429,23 @@ public class Explosion { +@@ -430,6 +430,23 @@ public class Explosion { return; } // CraftBukkit end @@ -29,6 +29,6 @@ index 9b5da37a532595541eaac0a4607aff9045a20ff3..0be03430d8257d918b7cf646af518473 + } + //Purpur end + - this.level.gameEvent(this.source, GameEvent.EXPLODE, new Vec3(this.x, this.y, this.z)); + this.level.gameEvent(this.source, (Holder) GameEvent.EXPLODE, new Vec3(this.x, this.y, this.z)); Set set = Sets.newHashSet(); boolean flag = true; diff --git a/patches/unapplied-server/0290-Improve-output-of-plugins-command.patch b/patches/server/0283-Improve-output-of-plugins-command.patch similarity index 100% rename from patches/unapplied-server/0290-Improve-output-of-plugins-command.patch rename to patches/server/0283-Improve-output-of-plugins-command.patch diff --git a/patches/unapplied-server/0291-Add-mending-multiplier.patch b/patches/server/0284-Add-mending-multiplier.patch similarity index 93% rename from patches/unapplied-server/0291-Add-mending-multiplier.patch rename to patches/server/0284-Add-mending-multiplier.patch index af6e76b7b..c6cc8341f 100644 --- a/patches/unapplied-server/0291-Add-mending-multiplier.patch +++ b/patches/server/0284-Add-mending-multiplier.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add mending multiplier diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index 373a932b80be18b8a47ef849ce837dbfbba6f9cb..9a3210e34decb4096533c58f36687e31330198c4 100644 +index ce608784e0e35b67dde377436aaf42c956ce0644..f5debc8ddc496cd3e2d8b253511ee5cc9a723b38 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -@@ -360,13 +360,15 @@ public class ExperienceOrb extends Entity { +@@ -366,13 +366,15 @@ public class ExperienceOrb extends Entity { } } diff --git a/patches/unapplied-server/0292-Make-GUI-Great-Again.patch b/patches/server/0285-Make-GUI-Great-Again.patch similarity index 96% rename from patches/unapplied-server/0292-Make-GUI-Great-Again.patch rename to patches/server/0285-Make-GUI-Great-Again.patch index 4445c7f52..758d27fe1 100644 --- a/patches/unapplied-server/0292-Make-GUI-Great-Again.patch +++ b/patches/server/0285-Make-GUI-Great-Again.patch @@ -96,10 +96,10 @@ index 0000000000000000000000000000000000000000..15a226e3854d731f7724025ea3459c8a + } +} diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 85b861e21d8798a883ecbd0a09cc25f87e801b7b..5ca6af93362d205438f8321ee2461ae7f8160df1 100644 +index 0d2d254fc2795f0ec844029bd4c05cdf6dc94207..775c5de4f5094260096cef6723dd50dfe2cb0c81 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -99,6 +99,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -110,6 +110,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface return; } // Paper start - Use TerminalConsoleAppender @@ -108,7 +108,7 @@ index 85b861e21d8798a883ecbd0a09cc25f87e801b7b..5ca6af93362d205438f8321ee2461ae7 /* jline.console.ConsoleReader bufferedreader = DedicatedServer.this.reader; diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java -index 7704a5951ac3d02020ed0f40d76500dd6ba005af..0dec2f3762aa55cfaa7af5b357f0fe243a3b2cc6 100644 +index 759062d219ff490a3cb19e710c4d18e3e08288e0..8f74c2ec5252b6265549589310d742337c91cb2c 100644 --- a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java +++ b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java @@ -43,6 +43,11 @@ public class MinecraftServerGui extends JComponent { @@ -200,7 +200,7 @@ index 7704a5951ac3d02020ed0f40d76500dd6ba005af..0dec2f3762aa55cfaa7af5b357f0fe24 + } + }); + // Purpur end - jtextarea.addFocusListener(new FocusAdapter() { + jtextarea.addFocusListener(new FocusAdapter() { // CraftBukkit - decompile error public void focusGained(FocusEvent focusevent) {} }); @@ -210,7 +248,7 @@ public class MinecraftServerGui extends JComponent { @@ -398,14 +398,14 @@ index 0000000000000000000000000000000000000000..d75fb5e77eff27d86135ed7d605dbc25 + } +} diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 675cd61221e807aadf28322b46c3daa1370241b5..0769f5c4711a3b7f59489e611ed01ad8367e5db1 100644 +index d2a75850af9c6ad2aca66a5f994f1b587d73eac4..a056aa167887abef9e6d531a9edd2cda433567d2 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -2,7 +2,16 @@ - + -- +- + + + diff --git a/patches/unapplied-server/0294-Shears-can-defuse-TNT.patch b/patches/server/0286-Shears-can-defuse-TNT.patch similarity index 95% rename from patches/unapplied-server/0294-Shears-can-defuse-TNT.patch rename to patches/server/0286-Shears-can-defuse-TNT.patch index 81402150c..7f454b077 100644 --- a/patches/unapplied-server/0294-Shears-can-defuse-TNT.patch +++ b/patches/server/0286-Shears-can-defuse-TNT.patch @@ -8,10 +8,10 @@ Shears can now defuse TNT. Each world can have a configured chance for the TNT t By default the option is disabled to avoid breaking any possible vanilla mechanics. diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java -index e712bd07ea2946167782473a536e0c72fab4bccd..6d934405cd18d63943171448743cafd5c52026e2 100644 +index f1f352ec0e51f5db59254841a06c176c5a876fc9..ded6bacd7baf7e7c8aa225825c345aefd8d42aa9 100644 --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java -@@ -200,4 +200,29 @@ public class PrimedTnt extends Entity implements TraceableEntity { +@@ -193,4 +193,29 @@ public class PrimedTnt extends Entity implements TraceableEntity { return !level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid(); } // Paper end - Option to prevent TNT from moving in water diff --git a/patches/unapplied-server/0295-Explorer-Map-API.patch b/patches/server/0287-Explorer-Map-API.patch similarity index 66% rename from patches/unapplied-server/0295-Explorer-Map-API.patch rename to patches/server/0287-Explorer-Map-API.patch index a4ae1c0b2..c5d511c0f 100644 --- a/patches/unapplied-server/0295-Explorer-Map-API.patch +++ b/patches/server/0287-Explorer-Map-API.patch @@ -5,22 +5,22 @@ Subject: [PATCH] Explorer Map API diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java -index d8dd99ec8bf7444c5a3c426db3a9c13e334dc0ff..8d3c1897044f9a2bbe1911e1a72dc9a00fb246df 100644 +index ce461b1a8d7fab87ae28e30205f6fab67f1808b6..4704080612cb9d3f6338d158aba8078332b57c58 100644 --- a/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java -@@ -235,6 +235,7 @@ public class MapItem extends ComplexItem { - MapItemSavedData worldmap = MapItem.getSavedData(map, world); - - if (worldmap != null) { +@@ -195,6 +195,7 @@ public class MapItem extends ComplexItem { + public static void renderBiomePreviewMap(ServerLevel world, ItemStack map) { + MapItemSavedData mapItemSavedData = getSavedData(map, world); + if (mapItemSavedData != null) { + worldmap.isExplorerMap = true; // Purpur - if (world.dimension() == worldmap.dimension) { - int i = 1 << worldmap.scale; - int j = worldmap.centerX; + if (world.dimension() == mapItemSavedData.dimension) { + int i = 1 << mapItemSavedData.scale; + int j = mapItemSavedData.centerX; diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index 45269115e63cfc3bd7dc740a5694e2cc7c35bcb1..e1498d496aa01c433b6fa198608e33916eadecf3 100644 +index cf8ae635fce7ea66d4e1ab1dc05575f035fa95ef..e26f6215ca42885cb0635a3183a8df93a924ba7f 100644 --- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -@@ -67,6 +67,7 @@ public class MapItemSavedData extends SavedData { +@@ -79,6 +79,7 @@ public class MapItemSavedData extends SavedData { private final Map frameMarkers = Maps.newHashMap(); private int trackedDecorationCount; private org.bukkit.craftbukkit.map.RenderData vanillaRender = new org.bukkit.craftbukkit.map.RenderData(); // Paper @@ -29,10 +29,10 @@ index 45269115e63cfc3bd7dc740a5694e2cc7c35bcb1..e1498d496aa01c433b6fa198608e3391 // CraftBukkit start public final CraftMapView mapView; diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java -index 15e9dd8844f893de5e8372b847c9e8295d6f69ca..b4b105c0190502328d5aeb680dd8e67c2875618f 100644 +index 0cbbd915631904fe8c6effefb92895422b33eff6..aef19cfbecb4ddfc8dc71c4f3b2a011364c12dc2 100644 --- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java +++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java -@@ -46,4 +46,10 @@ public class CraftMapRenderer extends MapRenderer { +@@ -47,4 +47,10 @@ public class CraftMapRenderer extends MapRenderer { } } diff --git a/patches/unapplied-server/0296-Option-Ocelot-Spawn-Under-Sea-Level.patch b/patches/server/0288-Option-Ocelot-Spawn-Under-Sea-Level.patch similarity index 93% rename from patches/unapplied-server/0296-Option-Ocelot-Spawn-Under-Sea-Level.patch rename to patches/server/0288-Option-Ocelot-Spawn-Under-Sea-Level.patch index 82a355e1d..5fe1444e3 100644 --- a/patches/unapplied-server/0296-Option-Ocelot-Spawn-Under-Sea-Level.patch +++ b/patches/server/0288-Option-Ocelot-Spawn-Under-Sea-Level.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option Ocelot Spawn Under Sea Level diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java -index af275fc579d66bb098c08e88e4186846a1174c02..3c5f25300d1c7800144a459cc8bf598352a62a35 100644 +index 5668aca08732e317c7bccacf1cfaae7d8666bce6..07dc8a43f4e8c54a94696b84896d32f66a207ad3 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java +++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java -@@ -295,7 +295,7 @@ public class Ocelot extends Animal { +@@ -293,7 +293,7 @@ public class Ocelot extends Animal { if (world.isUnobstructed(this) && !world.containsAnyLiquid(this.getBoundingBox())) { BlockPos blockposition = this.blockPosition(); diff --git a/patches/unapplied-server/0297-add-an-option-for-piglins-to-ignore-gold-trimmed-arm.patch b/patches/server/0289-add-an-option-for-piglins-to-ignore-gold-trimmed-arm.patch similarity index 86% rename from patches/unapplied-server/0297-add-an-option-for-piglins-to-ignore-gold-trimmed-arm.patch rename to patches/server/0289-add-an-option-for-piglins-to-ignore-gold-trimmed-arm.patch index cca01ecf0..c0e4a8146 100644 --- a/patches/unapplied-server/0297-add-an-option-for-piglins-to-ignore-gold-trimmed-arm.patch +++ b/patches/server/0289-add-an-option-for-piglins-to-ignore-gold-trimmed-arm.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add an option for piglins to ignore gold-trimmed armor diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java -index 4f4f557b7f4232ec3b90dda43c6bed30521318ba..dd4313e0507d3adda0ec84c79f1af13ecc2d7ef3 100644 +index e25af9af8f87e6762716749c367658bf6bda9e34..8c209106c9f09f7d3e661c6fa3cffccf08e73182 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java -@@ -599,20 +599,33 @@ public class PiglinAi { +@@ -597,20 +597,33 @@ public class PiglinAi { Iterator iterator = iterable.iterator(); Item item; @@ -23,8 +23,8 @@ index 4f4f557b7f4232ec3b90dda43c6bed30521318ba..dd4313e0507d3adda0ec84c79f1af13e + itemstack = (ItemStack) iterator.next(); // Purpur item = itemstack.getItem(); -- } while (!(item instanceof ArmorItem) || ((ArmorItem) item).getMaterial() != ArmorMaterials.GOLD); -+ } while (!(item instanceof ArmorItem) || ((ArmorItem) item).getMaterial() != ArmorMaterials.GOLD && (!entity.level().purpurConfig.piglinIgnoresArmorWithGoldTrim || !isWearingGoldTrim(entity, itemstack))); // Purpur +- } while (!(item instanceof ArmorItem) || !((ArmorItem) item).getMaterial().is(ArmorMaterials.GOLD)); ++ } while (!(item instanceof ArmorItem) || !((ArmorItem) item).getMaterial().is(ArmorMaterials.GOLD) && (!entity.level().purpurConfig.piglinIgnoresArmorWithGoldTrim || !isWearingGoldTrim(entity, itemstack))); return true; } diff --git a/patches/unapplied-server/0298-Add-option-for-always-showing-item-in-player-death-m.patch b/patches/server/0290-Add-option-for-always-showing-item-in-player-death-m.patch similarity index 64% rename from patches/unapplied-server/0298-Add-option-for-always-showing-item-in-player-death-m.patch rename to patches/server/0290-Add-option-for-always-showing-item-in-player-death-m.patch index 54306ecc1..43ecdf2ef 100644 --- a/patches/unapplied-server/0298-Add-option-for-always-showing-item-in-player-death-m.patch +++ b/patches/server/0290-Add-option-for-always-showing-item-in-player-death-m.patch @@ -5,36 +5,36 @@ Subject: [PATCH] Add option for always showing item in player death messages diff --git a/src/main/java/net/minecraft/world/damagesource/CombatTracker.java b/src/main/java/net/minecraft/world/damagesource/CombatTracker.java -index 925654e40a170d1a4af0b9fcde1b9b359f833064..bf06bb78d060bb54d9aaade3605d42ce837d598b 100644 +index 357a79d72a2de02a019595e457fe432bf409e516..4fb025a63628eb60509d90b680922a0220104bcb 100644 --- a/src/main/java/net/minecraft/world/damagesource/CombatTracker.java +++ b/src/main/java/net/minecraft/world/damagesource/CombatTracker.java -@@ -53,7 +53,7 @@ public class CombatTracker { +@@ -54,7 +54,7 @@ public class CombatTracker { private Component getMessageForAssistedFall(Entity attacker, Component attackerDisplayName, String itemDeathTranslationKey, String deathTranslationKey) { ItemStack itemStack = attacker instanceof LivingEntity livingEntity ? livingEntity.getMainHandItem() : ItemStack.EMPTY; -- return !itemStack.isEmpty() && itemStack.hasCustomHoverName() -+ return !itemStack.isEmpty() && (org.purpurmc.purpur.PurpurConfig.playerDeathsAlwaysShowItem || itemStack.hasCustomHoverName()) // Purpur +- return !itemStack.isEmpty() && itemStack.has(DataComponents.CUSTOM_NAME) ++ return !itemStack.isEmpty() && (org.purpurmc.purpur.PurpurConfig.playerDeathsAlwaysShowItem || itemStack.has(DataComponents.CUSTOM_NAME)) // Purpur ? Component.translatable(itemDeathTranslationKey, this.mob.getDisplayName(), attackerDisplayName, itemStack.getDisplayName()) : Component.translatable(deathTranslationKey, this.mob.getDisplayName(), attackerDisplayName); } diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -index 41651c877246f38c73cc9c81b37a0b86e5054cb9..a1724d2d545aa808ea380f910c0190658fc7881b 100644 +index b6881d7f02ad4e9e45e947eaec54f0c6b8ff957a..b206d65750fee0a42b805de24ecbb90078ffabff 100644 --- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java +++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -@@ -196,7 +196,7 @@ public class DamageSource { +@@ -197,7 +197,7 @@ public class DamageSource { ItemStack itemstack1 = itemstack; -- return !itemstack1.isEmpty() && itemstack1.hasCustomHoverName() ? Component.translatable(s + ".item", killed.getDisplayName(), ichatbasecomponent, itemstack1.getDisplayName()) : Component.translatable(s, killed.getDisplayName(), ichatbasecomponent); -+ return !itemstack1.isEmpty() && (org.purpurmc.purpur.PurpurConfig.playerDeathsAlwaysShowItem || itemstack1.hasCustomHoverName()) ? Component.translatable(s + ".item", killed.getDisplayName(), ichatbasecomponent, itemstack1.getDisplayName()) : Component.translatable(s, killed.getDisplayName(), ichatbasecomponent); +- return !itemstack1.isEmpty() && itemstack1.has(DataComponents.CUSTOM_NAME) ? Component.translatable(s + ".item", killed.getDisplayName(), ichatbasecomponent, itemstack1.getDisplayName()) : Component.translatable(s, killed.getDisplayName(), ichatbasecomponent); ++ return !itemstack1.isEmpty() && (org.purpurmc.purpur.PurpurConfig.playerDeathsAlwaysShowItem || itemstack1.has(DataComponents.CUSTOM_NAME)) ? Component.translatable(s + ".item", killed.getDisplayName(), ichatbasecomponent, itemstack1.getDisplayName()) : Component.translatable(s, killed.getDisplayName(), ichatbasecomponent); } } diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index cd2c365bcaca0720dc543188a23ff585192cb76e..776d397fc31db121fa933a2ae2b4f1589fc10247 100644 +index 538239ed3d8ece17e219e097162eb66bff7d43c8..ecb9b15939ab8ff6cfa7e15457701428019b443a 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -@@ -652,4 +652,9 @@ public class PurpurConfig { +@@ -566,4 +566,9 @@ public class PurpurConfig { block.fallDistanceMultiplier = fallDistanceMultiplier.floatValue(); }); } diff --git a/patches/unapplied-server/0299-place-end-crystal-on-any-block.patch b/patches/server/0291-place-end-crystal-on-any-block.patch similarity index 93% rename from patches/unapplied-server/0299-place-end-crystal-on-any-block.patch rename to patches/server/0291-place-end-crystal-on-any-block.patch index 5003d9f9b..87405372a 100644 --- a/patches/unapplied-server/0299-place-end-crystal-on-any-block.patch +++ b/patches/server/0291-place-end-crystal-on-any-block.patch @@ -5,10 +5,10 @@ Subject: [PATCH] place end crystal on any block diff --git a/src/main/java/net/minecraft/world/item/EndCrystalItem.java b/src/main/java/net/minecraft/world/item/EndCrystalItem.java -index faa3f62d22266a3c32d6c95c3ffebd4aa3880739..0cf62b1f64afa56c319392eafe0d444b7c5662c7 100644 +index dd1bdb4bb87a3a59c229ba76b36841d199717624..54607cea2622f259aedfe425b60e2317e4167bf9 100644 --- a/src/main/java/net/minecraft/world/item/EndCrystalItem.java +++ b/src/main/java/net/minecraft/world/item/EndCrystalItem.java -@@ -26,7 +26,7 @@ public class EndCrystalItem extends Item { +@@ -27,7 +27,7 @@ public class EndCrystalItem extends Item { BlockPos blockposition = context.getClickedPos(); BlockState iblockdata = world.getBlockState(blockposition); diff --git a/patches/unapplied-server/0300-Add-hover-lines-API.patch b/patches/server/0292-Add-hover-lines-API.patch similarity index 88% rename from patches/unapplied-server/0300-Add-hover-lines-API.patch rename to patches/server/0292-Add-hover-lines-API.patch index 453474d45..47c1dd61e 100644 --- a/patches/unapplied-server/0300-Add-hover-lines-API.patch +++ b/patches/server/0292-Add-hover-lines-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add hover lines API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 71aac5d4cf29cea9daa378fc8ac584750de4d1ca..0496871db7437322d3932ca3d3504d84af832d90 100644 +index 6e2a6ce5cf456bd9f6c8c18a58f08e2285dc77ed..b27d16e74c3f99aa693b38590c1fb62db8204509 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -596,4 +596,17 @@ public final class CraftItemFactory implements ItemFactory { +@@ -619,4 +619,17 @@ public final class CraftItemFactory implements ItemFactory { return CraftItemStack.asCraftMirror(enchanted); } // Paper end - enchantWithLevels API diff --git a/patches/unapplied-server/0301-Add-option-to-disable-the-copper-oxidation-proximity.patch b/patches/server/0293-Add-option-to-disable-the-copper-oxidation-proximity.patch similarity index 100% rename from patches/unapplied-server/0301-Add-option-to-disable-the-copper-oxidation-proximity.patch rename to patches/server/0293-Add-option-to-disable-the-copper-oxidation-proximity.patch diff --git a/patches/unapplied-server/0302-register-minecraft-debug-commands.patch b/patches/server/0294-register-minecraft-debug-commands.patch similarity index 85% rename from patches/unapplied-server/0302-register-minecraft-debug-commands.patch rename to patches/server/0294-register-minecraft-debug-commands.patch index be6a9283d..d1d70ac86 100644 --- a/patches/unapplied-server/0302-register-minecraft-debug-commands.patch +++ b/patches/server/0294-register-minecraft-debug-commands.patch @@ -5,10 +5,10 @@ Subject: [PATCH] register minecraft debug commands diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index b6cc108c2d4361e6f415cfc3ff8c7699a8e222f4..b203394ed62807e7d5df433830993f1d2ee14939 100644 +index 13dfb3e506d50c0b191baf5d05bbfc28c20be0ae..f9d0e8ee9414b3897f268ba78a1469ddf868f51a 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -221,8 +221,8 @@ public class Commands { +@@ -222,8 +222,8 @@ public class Commands { JfrCommand.register(this.dispatcher); } @@ -17,13 +17,13 @@ index b6cc108c2d4361e6f415cfc3ff8c7699a8e222f4..b203394ed62807e7d5df433830993f1d + if (org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands || SharedConstants.IS_RUNNING_IN_IDE) { // Purpur + if (!org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands) TestCommand.register(this.dispatcher); // Purpur ResetChunksCommand.register(this.dispatcher); - RaidCommand.register(this.dispatcher); + RaidCommand.register(this.dispatcher, commandRegistryAccess); DebugPathCommand.register(this.dispatcher); diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index bc391d27399d8c22e78735ca39aa8ab45efb6413..4ef8eaad4485a2ee920f80556f9dda04e59d2b2a 100644 +index 5443013060b62e3bfcc51cddca96d1c0bc59fe72..868932a170c3052e49dc69c2e8eb3ac9c405b45f 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -130,6 +130,10 @@ public class Main { +@@ -133,6 +133,10 @@ public class Main { // Paper start - load config files early for access below if needed org.bukkit.configuration.file.YamlConfiguration bukkitConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("bukkit-settings")); org.bukkit.configuration.file.YamlConfiguration spigotConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("spigot-settings")); @@ -35,10 +35,10 @@ index bc391d27399d8c22e78735ca39aa8ab45efb6413..4ef8eaad4485a2ee920f80556f9dda04 if (optionset.has("initSettings")) { // CraftBukkit diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 776d397fc31db121fa933a2ae2b4f1589fc10247..efe25d3894f3ad000257c72d9a5e06ef22446d41 100644 +index ecb9b15939ab8ff6cfa7e15457701428019b443a..ea383b56c5985069fb55e5a2252510e45783df7a 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -@@ -657,4 +657,9 @@ public class PurpurConfig { +@@ -571,4 +571,9 @@ public class PurpurConfig { private static void playerDeathsAlwaysShowItem() { playerDeathsAlwaysShowItem = getBoolean("settings.player-deaths-always-show-item", playerDeathsAlwaysShowItem); } diff --git a/patches/unapplied-server/0303-Configurable-villager-search-radius.patch b/patches/server/0295-Configurable-villager-search-radius.patch similarity index 100% rename from patches/unapplied-server/0303-Configurable-villager-search-radius.patch rename to patches/server/0295-Configurable-villager-search-radius.patch