From ceb96293bc789a56ad5d575653d6bd74f33b67db Mon Sep 17 00:00:00 2001 From: MartijnMuijsers Date: Wed, 30 Nov 2022 15:02:45 +0100 Subject: [PATCH] Ignore durability change equipment updates --- ...-durability-change-equipment-updates.patch | 39 +++++++++++++++++++ ...es-on-entities-with-fire-resistance.patch} | 4 +- ...> 0069-Player-canSee-by-entity-UUID.patch} | 0 ...-Spread-out-sending-all-player-info.patch} | 0 ...player-list-for-sending-player-info.patch} | 0 ...dSendEvent-if-there-are-no-listener.patch} | 0 ...73-Send-multiple-keep-alive-packets.patch} | 0 ...h => 0074-Specific-interval-TPS-API.patch} | 0 ....patch => 0075-5-second-TPS-average.patch} | 0 ...atch => 0076-Measure-last-tick-time.patch} | 0 ...PI.patch => 0077-Last-tick-time-API.patch} | 0 ...-Show-last-tick-time-in-tps-command.patch} | 0 ...-physics-check-before-vehicle-check.patch} | 0 ...080-Variable-main-thread-task-delay.patch} | 0 ... 0081-Reduce-RandomSource-instances.patch} | 0 ....patch => 0082-CPU-cores-estimation.patch} | 0 ... 0083-Add-centralized-AsyncExecutor.patch} | 0 ...=> 0084-Remove-Paper-async-executor.patch} | 0 ... 0085-Remove-Paper-cleaner-executor.patch} | 0 ... => 0086-Remove-background-executor.patch} | 0 ...h => 0087-Remove-bootstrap-executor.patch} | 0 ...0088-Remove-world-upgrade-executors.patch} | 0 ...> 0089-Remove-tab-complete-executor.patch} | 0 ...=> 0090-Remove-text-filter-executor.patch} | 0 24 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 patches/server/0067-Ignore-durability-change-equipment-updates.patch rename patches/server/{0067-Hide-flames-on-entities-with-fire-resistance.patch => 0068-Hide-flames-on-entities-with-fire-resistance.patch} (93%) rename patches/server/{0068-Player-canSee-by-entity-UUID.patch => 0069-Player-canSee-by-entity-UUID.patch} (100%) rename patches/server/{0069-Spread-out-sending-all-player-info.patch => 0070-Spread-out-sending-all-player-info.patch} (100%) rename patches/server/{0070-Optimize-player-list-for-sending-player-info.patch => 0071-Optimize-player-list-for-sending-player-info.patch} (100%) rename patches/server/{0071-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch => 0072-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch} (100%) rename patches/server/{0072-Send-multiple-keep-alive-packets.patch => 0073-Send-multiple-keep-alive-packets.patch} (100%) rename patches/server/{0073-Specific-interval-TPS-API.patch => 0074-Specific-interval-TPS-API.patch} (100%) rename patches/server/{0074-5-second-TPS-average.patch => 0075-5-second-TPS-average.patch} (100%) rename patches/server/{0075-Measure-last-tick-time.patch => 0076-Measure-last-tick-time.patch} (100%) rename patches/server/{0076-Last-tick-time-API.patch => 0077-Last-tick-time-API.patch} (100%) rename patches/server/{0077-Show-last-tick-time-in-tps-command.patch => 0078-Show-last-tick-time-in-tps-command.patch} (100%) rename patches/server/{0078-Collision-physics-check-before-vehicle-check.patch => 0079-Collision-physics-check-before-vehicle-check.patch} (100%) rename patches/server/{0079-Variable-main-thread-task-delay.patch => 0080-Variable-main-thread-task-delay.patch} (100%) rename patches/server/{0080-Reduce-RandomSource-instances.patch => 0081-Reduce-RandomSource-instances.patch} (100%) rename patches/server/{0081-CPU-cores-estimation.patch => 0082-CPU-cores-estimation.patch} (100%) rename patches/server/{0082-Add-centralized-AsyncExecutor.patch => 0083-Add-centralized-AsyncExecutor.patch} (100%) rename patches/server/{0083-Remove-Paper-async-executor.patch => 0084-Remove-Paper-async-executor.patch} (100%) rename patches/server/{0084-Remove-Paper-cleaner-executor.patch => 0085-Remove-Paper-cleaner-executor.patch} (100%) rename patches/server/{0085-Remove-background-executor.patch => 0086-Remove-background-executor.patch} (100%) rename patches/server/{0086-Remove-bootstrap-executor.patch => 0087-Remove-bootstrap-executor.patch} (100%) rename patches/server/{0087-Remove-world-upgrade-executors.patch => 0088-Remove-world-upgrade-executors.patch} (100%) rename patches/server/{0088-Remove-tab-complete-executor.patch => 0089-Remove-tab-complete-executor.patch} (100%) rename patches/server/{0089-Remove-text-filter-executor.patch => 0090-Remove-text-filter-executor.patch} (100%) diff --git a/patches/server/0067-Ignore-durability-change-equipment-updates.patch b/patches/server/0067-Ignore-durability-change-equipment-updates.patch new file mode 100644 index 0000000..2326e92 --- /dev/null +++ b/patches/server/0067-Ignore-durability-change-equipment-updates.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MartijnMuijsers +Date: Wed, 30 Nov 2022 15:01:42 +0100 +Subject: [PATCH] Ignore durability change equipment updates + +License: MIT (https://opensource.org/licenses/MIT) + +This patch is based on the following patch: +"Ignore durability change equipment updates" +By: Cryptite +As part of: Slice (https://github.com/Cryptite/Slice) +Licensed under: MIT (https://opensource.org/licenses/MIT) + +diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java +index 5926ea4a5ad74cfaf8a33ad8d14e60e21bae606b..9e39f6098f7a19ffe83a487e2181f3e45396a02a 100644 +--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java ++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +@@ -3097,7 +3097,7 @@ public abstract class LivingEntity extends Entity { + + ItemStack itemstack1 = this.getItemBySlot(enumitemslot); + +- if (!ItemStack.matches(itemstack1, itemstack)) { ++ if (this.level.galeConfig().smallOptimizations.processFullEquipmentChangeIfOnlyDurabilityChanged ? !ItemStack.matches(itemstack1, itemstack) : !ItemStack.isSameIgnoreDurability(itemstack1, itemstack)) { // Gale - Slice - ignore durability change equipment updates + // Paper start - PlayerArmorChangeEvent + if (this instanceof ServerPlayer && enumitemslot.getType() == EquipmentSlot.Type.ARMOR) { + final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); +diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +index 345ce3a53e3e7ee5a4dd9a632231edfe161cd821..158897f2500ee9231c0661d015f55e5216b07554 100644 +--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java ++++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +@@ -33,6 +33,8 @@ public class GaleWorldConfiguration extends ConfigurationPart { + public SmallOptimizations smallOptimizations; + public class SmallOptimizations extends ConfigurationPart { + ++ public boolean processFullEquipmentChangeIfOnlyDurabilityChanged = false; // Gale - Slice - ignore durability change equipment updates ++ + // Gale start - Airplane - reduce projectile chunk loading + public MaxProjectileChunkLoads maxProjectileChunkLoads; + public class MaxProjectileChunkLoads extends ConfigurationPart { diff --git a/patches/server/0067-Hide-flames-on-entities-with-fire-resistance.patch b/patches/server/0068-Hide-flames-on-entities-with-fire-resistance.patch similarity index 93% rename from patches/server/0067-Hide-flames-on-entities-with-fire-resistance.patch rename to patches/server/0068-Hide-flames-on-entities-with-fire-resistance.patch index 7a81831..22fbbee 100644 --- a/patches/server/0067-Hide-flames-on-entities-with-fire-resistance.patch +++ b/patches/server/0068-Hide-flames-on-entities-with-fire-resistance.patch @@ -30,10 +30,10 @@ index aa3b6f085e370079883d9928962bff8e9b187246..f76a16b40c9d365a618797b7f7bf0993 this.firstTick = false; diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java -index 345ce3a53e3e7ee5a4dd9a632231edfe161cd821..02d0697d7ead1383223ac16b5e45e7e6f035f542 100644 +index 158897f2500ee9231c0661d015f55e5216b07554..4c499898191b2017508b9550e5f769f2d0c97c59 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java -@@ -245,6 +245,7 @@ public class GaleWorldConfiguration extends ConfigurationPart { +@@ -247,6 +247,7 @@ public class GaleWorldConfiguration extends ConfigurationPart { public class GameplayMechanics extends ConfigurationPart { public boolean arrowMovementResetsDespawnCounter = true; // Gale - Purpur - make arrow movement resetting despawn counter configurable diff --git a/patches/server/0068-Player-canSee-by-entity-UUID.patch b/patches/server/0069-Player-canSee-by-entity-UUID.patch similarity index 100% rename from patches/server/0068-Player-canSee-by-entity-UUID.patch rename to patches/server/0069-Player-canSee-by-entity-UUID.patch diff --git a/patches/server/0069-Spread-out-sending-all-player-info.patch b/patches/server/0070-Spread-out-sending-all-player-info.patch similarity index 100% rename from patches/server/0069-Spread-out-sending-all-player-info.patch rename to patches/server/0070-Spread-out-sending-all-player-info.patch diff --git a/patches/server/0070-Optimize-player-list-for-sending-player-info.patch b/patches/server/0071-Optimize-player-list-for-sending-player-info.patch similarity index 100% rename from patches/server/0070-Optimize-player-list-for-sending-player-info.patch rename to patches/server/0071-Optimize-player-list-for-sending-player-info.patch diff --git a/patches/server/0071-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch b/patches/server/0072-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch similarity index 100% rename from patches/server/0071-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch rename to patches/server/0072-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch diff --git a/patches/server/0072-Send-multiple-keep-alive-packets.patch b/patches/server/0073-Send-multiple-keep-alive-packets.patch similarity index 100% rename from patches/server/0072-Send-multiple-keep-alive-packets.patch rename to patches/server/0073-Send-multiple-keep-alive-packets.patch diff --git a/patches/server/0073-Specific-interval-TPS-API.patch b/patches/server/0074-Specific-interval-TPS-API.patch similarity index 100% rename from patches/server/0073-Specific-interval-TPS-API.patch rename to patches/server/0074-Specific-interval-TPS-API.patch diff --git a/patches/server/0074-5-second-TPS-average.patch b/patches/server/0075-5-second-TPS-average.patch similarity index 100% rename from patches/server/0074-5-second-TPS-average.patch rename to patches/server/0075-5-second-TPS-average.patch diff --git a/patches/server/0075-Measure-last-tick-time.patch b/patches/server/0076-Measure-last-tick-time.patch similarity index 100% rename from patches/server/0075-Measure-last-tick-time.patch rename to patches/server/0076-Measure-last-tick-time.patch diff --git a/patches/server/0076-Last-tick-time-API.patch b/patches/server/0077-Last-tick-time-API.patch similarity index 100% rename from patches/server/0076-Last-tick-time-API.patch rename to patches/server/0077-Last-tick-time-API.patch diff --git a/patches/server/0077-Show-last-tick-time-in-tps-command.patch b/patches/server/0078-Show-last-tick-time-in-tps-command.patch similarity index 100% rename from patches/server/0077-Show-last-tick-time-in-tps-command.patch rename to patches/server/0078-Show-last-tick-time-in-tps-command.patch diff --git a/patches/server/0078-Collision-physics-check-before-vehicle-check.patch b/patches/server/0079-Collision-physics-check-before-vehicle-check.patch similarity index 100% rename from patches/server/0078-Collision-physics-check-before-vehicle-check.patch rename to patches/server/0079-Collision-physics-check-before-vehicle-check.patch diff --git a/patches/server/0079-Variable-main-thread-task-delay.patch b/patches/server/0080-Variable-main-thread-task-delay.patch similarity index 100% rename from patches/server/0079-Variable-main-thread-task-delay.patch rename to patches/server/0080-Variable-main-thread-task-delay.patch diff --git a/patches/server/0080-Reduce-RandomSource-instances.patch b/patches/server/0081-Reduce-RandomSource-instances.patch similarity index 100% rename from patches/server/0080-Reduce-RandomSource-instances.patch rename to patches/server/0081-Reduce-RandomSource-instances.patch diff --git a/patches/server/0081-CPU-cores-estimation.patch b/patches/server/0082-CPU-cores-estimation.patch similarity index 100% rename from patches/server/0081-CPU-cores-estimation.patch rename to patches/server/0082-CPU-cores-estimation.patch diff --git a/patches/server/0082-Add-centralized-AsyncExecutor.patch b/patches/server/0083-Add-centralized-AsyncExecutor.patch similarity index 100% rename from patches/server/0082-Add-centralized-AsyncExecutor.patch rename to patches/server/0083-Add-centralized-AsyncExecutor.patch diff --git a/patches/server/0083-Remove-Paper-async-executor.patch b/patches/server/0084-Remove-Paper-async-executor.patch similarity index 100% rename from patches/server/0083-Remove-Paper-async-executor.patch rename to patches/server/0084-Remove-Paper-async-executor.patch diff --git a/patches/server/0084-Remove-Paper-cleaner-executor.patch b/patches/server/0085-Remove-Paper-cleaner-executor.patch similarity index 100% rename from patches/server/0084-Remove-Paper-cleaner-executor.patch rename to patches/server/0085-Remove-Paper-cleaner-executor.patch diff --git a/patches/server/0085-Remove-background-executor.patch b/patches/server/0086-Remove-background-executor.patch similarity index 100% rename from patches/server/0085-Remove-background-executor.patch rename to patches/server/0086-Remove-background-executor.patch diff --git a/patches/server/0086-Remove-bootstrap-executor.patch b/patches/server/0087-Remove-bootstrap-executor.patch similarity index 100% rename from patches/server/0086-Remove-bootstrap-executor.patch rename to patches/server/0087-Remove-bootstrap-executor.patch diff --git a/patches/server/0087-Remove-world-upgrade-executors.patch b/patches/server/0088-Remove-world-upgrade-executors.patch similarity index 100% rename from patches/server/0087-Remove-world-upgrade-executors.patch rename to patches/server/0088-Remove-world-upgrade-executors.patch diff --git a/patches/server/0088-Remove-tab-complete-executor.patch b/patches/server/0089-Remove-tab-complete-executor.patch similarity index 100% rename from patches/server/0088-Remove-tab-complete-executor.patch rename to patches/server/0089-Remove-tab-complete-executor.patch diff --git a/patches/server/0089-Remove-text-filter-executor.patch b/patches/server/0090-Remove-text-filter-executor.patch similarity index 100% rename from patches/server/0089-Remove-text-filter-executor.patch rename to patches/server/0090-Remove-text-filter-executor.patch