mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-28 02:59:12 +00:00
40 lines
2.5 KiB
Diff
40 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MartijnMuijsers <martijnmuijsers@live.nl>
|
|
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 <cryptite@gmail.com>
|
|
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 05168f8b8f542e73e7296a0b3f892d35924394ba..093f8f7be0a6005321a45c42d70d0e8fb295429f 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -3095,7 +3095,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 201f30774536966bda6f79b4db2fba6352829e10..dcbda08a6246b21b370a9005ed095d4413be6a81 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 {
|