diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/AttributeInstance.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/AttributeInstance.java.patch new file mode 100644 index 000000000..c315956cf --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/AttributeInstance.java.patch @@ -0,0 +1,27 @@ +--- a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java ++++ b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java +@@ -153,20 +_,20 @@ + double baseValue = this.getBaseValue(); + + for (AttributeModifier attributeModifier : this.getModifiersOrEmpty(AttributeModifier.Operation.ADD_VALUE)) { +- baseValue += attributeModifier.amount(); ++ baseValue += attributeModifier.amount(); // Paper - destroy speed API - diff on change + } + + double d = baseValue; + + for (AttributeModifier attributeModifier1 : this.getModifiersOrEmpty(AttributeModifier.Operation.ADD_MULTIPLIED_BASE)) { +- d += baseValue * attributeModifier1.amount(); ++ d += baseValue * attributeModifier1.amount(); // Paper - destroy speed API - diff on change + } + + for (AttributeModifier attributeModifier1 : this.getModifiersOrEmpty(AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)) { +- d *= 1.0 + attributeModifier1.amount(); ++ d *= 1.0 + attributeModifier1.amount(); // Paper - destroy speed API - diff on change + } + +- return this.attribute.value().sanitizeValue(d); ++ return this.attribute.value().sanitizeValue(d); // Paper - destroy speed API - diff on change + } + + private Collection getModifiersOrEmpty(AttributeModifier.Operation operation) { diff --git a/paper-server/patches/unapplied/net/minecraft/world/entity/ai/attributes/AttributeMap.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/AttributeMap.java.patch similarity index 96% rename from paper-server/patches/unapplied/net/minecraft/world/entity/ai/attributes/AttributeMap.java.patch rename to paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/AttributeMap.java.patch index 08b12ec88..f685d112e 100644 --- a/paper-server/patches/unapplied/net/minecraft/world/entity/ai/attributes/AttributeMap.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/AttributeMap.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java -@@ -162,4 +162,12 @@ +@@ -162,4 +_,12 @@ } } } diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch new file mode 100644 index 000000000..b6fa57baf --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch @@ -0,0 +1,38 @@ +--- a/net/minecraft/world/entity/ai/attributes/Attributes.java ++++ b/net/minecraft/world/entity/ai/attributes/Attributes.java +@@ -1,3 +_,4 @@ ++// mc-dev import + package net.minecraft.world.entity.ai.attributes; + + import net.minecraft.core.Holder; +@@ -10,7 +_,7 @@ + public static final Holder ARMOR_TOUGHNESS = register( + "armor_toughness", new RangedAttribute("attribute.name.armor_toughness", 0.0, 0.0, 20.0).setSyncable(true) + ); +- public static final Holder ATTACK_DAMAGE = register("attack_damage", new RangedAttribute("attribute.name.attack_damage", 2.0, 0.0, 2048.0)); ++ public static final Holder ATTACK_DAMAGE = register("attack_damage", new RangedAttribute("attribute.name.attack_damage", 2.0, 0.0, org.spigotmc.SpigotConfig.attackDamage)); // Spigot + public static final Holder ATTACK_KNOCKBACK = register("attack_knockback", new RangedAttribute("attribute.name.attack_knockback", 0.0, 0.0, 5.0)); + public static final Holder ATTACK_SPEED = register( + "attack_speed", new RangedAttribute("attribute.name.attack_speed", 4.0, 0.0, 1024.0).setSyncable(true) +@@ -49,10 +_,10 @@ + ); + public static final Holder LUCK = register("luck", new RangedAttribute("attribute.name.luck", 0.0, -1024.0, 1024.0).setSyncable(true)); + public static final Holder MAX_ABSORPTION = register( +- "max_absorption", new RangedAttribute("attribute.name.max_absorption", 0.0, 0.0, 2048.0).setSyncable(true) ++ "max_absorption", new RangedAttribute("attribute.name.max_absorption", 0.0, 0.0, org.spigotmc.SpigotConfig.maxAbsorption).setSyncable(true) // Spigot + ); + public static final Holder MAX_HEALTH = register( +- "max_health", new RangedAttribute("attribute.name.max_health", 20.0, 1.0, 1024.0).setSyncable(true) ++ "max_health", new RangedAttribute("attribute.name.max_health", 20.0, 1.0, org.spigotmc.SpigotConfig.maxHealth).setSyncable(true) // Spigot + ); + public static final Holder MINING_EFFICIENCY = register( + "mining_efficiency", new RangedAttribute("attribute.name.mining_efficiency", 0.0, 0.0, 1024.0).setSyncable(true) +@@ -61,7 +_,7 @@ + "movement_efficiency", new RangedAttribute("attribute.name.movement_efficiency", 0.0, 0.0, 1.0).setSyncable(true) + ); + public static final Holder MOVEMENT_SPEED = register( +- "movement_speed", new RangedAttribute("attribute.name.movement_speed", 0.7, 0.0, 1024.0).setSyncable(true) ++ "movement_speed", new RangedAttribute("attribute.name.movement_speed", 0.7, 0.0, org.spigotmc.SpigotConfig.movementSpeed).setSyncable(true) // Spigot + ); + public static final Holder OXYGEN_BONUS = register( + "oxygen_bonus", new RangedAttribute("attribute.name.oxygen_bonus", 0.0, 0.0, 1024.0).setSyncable(true) diff --git a/paper-server/patches/unapplied/net/minecraft/world/entity/ai/attributes/AttributeInstance.java.patch b/paper-server/patches/unapplied/net/minecraft/world/entity/ai/attributes/AttributeInstance.java.patch deleted file mode 100644 index d6d331322..000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/entity/ai/attributes/AttributeInstance.java.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -+++ b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -@@ -153,20 +153,20 @@ - double d = this.getBaseValue(); - - for (AttributeModifier attributeModifier : this.getModifiersOrEmpty(AttributeModifier.Operation.ADD_VALUE)) { -- d += attributeModifier.amount(); -+ d += attributeModifier.amount(); // Paper - destroy speed API - diff on change - } - - double e = d; - - for (AttributeModifier attributeModifier2 : this.getModifiersOrEmpty(AttributeModifier.Operation.ADD_MULTIPLIED_BASE)) { -- e += d * attributeModifier2.amount(); -+ e += d * attributeModifier2.amount(); // Paper - destroy speed API - diff on change - } - - for (AttributeModifier attributeModifier3 : this.getModifiersOrEmpty(AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)) { -- e *= 1.0 + attributeModifier3.amount(); -+ e *= 1.0 + attributeModifier3.amount(); // Paper - destroy speed API - diff on change - } - -- return this.attribute.value().sanitizeValue(e); -+ return attribute.value().sanitizeValue(e); // Paper - destroy speed API - diff on change - } - - private Collection getModifiersOrEmpty(AttributeModifier.Operation operation) { diff --git a/paper-server/patches/unapplied/net/minecraft/world/entity/ai/attributes/Attributes.java.patch b/paper-server/patches/unapplied/net/minecraft/world/entity/ai/attributes/Attributes.java.patch deleted file mode 100644 index 51565ac32..000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/entity/ai/attributes/Attributes.java.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/net/minecraft/world/entity/ai/attributes/Attributes.java -+++ b/net/minecraft/world/entity/ai/attributes/Attributes.java -@@ -1,3 +1,4 @@ -+// mc-dev import - package net.minecraft.world.entity.ai.attributes; - - import net.minecraft.core.Holder; -@@ -9,7 +10,7 @@ - - public static final Holder ARMOR = Attributes.register("armor", (new RangedAttribute("attribute.name.armor", 0.0D, 0.0D, 30.0D)).setSyncable(true)); - public static final Holder ARMOR_TOUGHNESS = Attributes.register("armor_toughness", (new RangedAttribute("attribute.name.armor_toughness", 0.0D, 0.0D, 20.0D)).setSyncable(true)); -- public static final Holder ATTACK_DAMAGE = Attributes.register("attack_damage", new RangedAttribute("attribute.name.attack_damage", 2.0D, 0.0D, 2048.0D)); -+ public static final Holder ATTACK_DAMAGE = Attributes.register("attack_damage", new RangedAttribute("attribute.name.attack_damage", 2.0D, 0.0D, org.spigotmc.SpigotConfig.attackDamage)); - public static final Holder ATTACK_KNOCKBACK = Attributes.register("attack_knockback", new RangedAttribute("attribute.name.attack_knockback", 0.0D, 0.0D, 5.0D)); - public static final Holder ATTACK_SPEED = Attributes.register("attack_speed", (new RangedAttribute("attribute.name.attack_speed", 4.0D, 0.0D, 1024.0D)).setSyncable(true)); - public static final Holder BLOCK_BREAK_SPEED = Attributes.register("block_break_speed", (new RangedAttribute("attribute.name.block_break_speed", 1.0D, 0.0D, 1024.0D)).setSyncable(true)); -@@ -24,11 +25,11 @@ - public static final Holder JUMP_STRENGTH = Attributes.register("jump_strength", (new RangedAttribute("attribute.name.jump_strength", 0.41999998688697815D, 0.0D, 32.0D)).setSyncable(true)); - public static final Holder KNOCKBACK_RESISTANCE = Attributes.register("knockback_resistance", new RangedAttribute("attribute.name.knockback_resistance", 0.0D, 0.0D, 1.0D)); - public static final Holder LUCK = Attributes.register("luck", (new RangedAttribute("attribute.name.luck", 0.0D, -1024.0D, 1024.0D)).setSyncable(true)); -- public static final Holder MAX_ABSORPTION = Attributes.register("max_absorption", (new RangedAttribute("attribute.name.max_absorption", 0.0D, 0.0D, 2048.0D)).setSyncable(true)); -- public static final Holder MAX_HEALTH = Attributes.register("max_health", (new RangedAttribute("attribute.name.max_health", 20.0D, 1.0D, 1024.0D)).setSyncable(true)); -+ public static final Holder MAX_ABSORPTION = Attributes.register("max_absorption", (new RangedAttribute("attribute.name.max_absorption", 0.0D, 0.0D, org.spigotmc.SpigotConfig.maxAbsorption)).setSyncable(true)); -+ public static final Holder MAX_HEALTH = Attributes.register("max_health", (new RangedAttribute("attribute.name.max_health", 20.0D, 1.0D, org.spigotmc.SpigotConfig.maxHealth)).setSyncable(true)); - public static final Holder MINING_EFFICIENCY = Attributes.register("mining_efficiency", (new RangedAttribute("attribute.name.mining_efficiency", 0.0D, 0.0D, 1024.0D)).setSyncable(true)); - public static final Holder MOVEMENT_EFFICIENCY = Attributes.register("movement_efficiency", (new RangedAttribute("attribute.name.movement_efficiency", 0.0D, 0.0D, 1.0D)).setSyncable(true)); -- public static final Holder MOVEMENT_SPEED = Attributes.register("movement_speed", (new RangedAttribute("attribute.name.movement_speed", 0.7D, 0.0D, 1024.0D)).setSyncable(true)); -+ public static final Holder MOVEMENT_SPEED = Attributes.register("movement_speed", (new RangedAttribute("attribute.name.movement_speed", 0.7D, 0.0D, org.spigotmc.SpigotConfig.movementSpeed)).setSyncable(true)); - public static final Holder OXYGEN_BONUS = Attributes.register("oxygen_bonus", (new RangedAttribute("attribute.name.oxygen_bonus", 0.0D, 0.0D, 1024.0D)).setSyncable(true)); - public static final Holder SAFE_FALL_DISTANCE = Attributes.register("safe_fall_distance", (new RangedAttribute("attribute.name.safe_fall_distance", 3.0D, -1024.0D, 1024.0D)).setSyncable(true)); - public static final Holder SCALE = Attributes.register("scale", (new RangedAttribute("attribute.name.scale", 1.0D, 0.0625D, 16.0D)).setSyncable(true).setSentiment(Attribute.Sentiment.NEUTRAL));