aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0028-Configurable-baby-zombie-movement-speed.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0028-Configurable-baby-zombie-movement-speed.patch')
-rw-r--r--patches/server/0028-Configurable-baby-zombie-movement-speed.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/server/0028-Configurable-baby-zombie-movement-speed.patch b/patches/server/0028-Configurable-baby-zombie-movement-speed.patch
new file mode 100644
index 0000000000..a7c6ba5835
--- /dev/null
+++ b/patches/server/0028-Configurable-baby-zombie-movement-speed.patch
@@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Zach Brown <[email protected]>
+Date: Tue, 1 Mar 2016 13:09:16 -0600
+Subject: [PATCH] Configurable baby zombie movement speed
+
+
+diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+index 6845a8e13cdc9dd03015ac53b2a62dd706def5cd..3836d9255ac326a7220e1decd2e9d98be7884c17 100644
+--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
++++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+@@ -77,7 +77,7 @@ import org.bukkit.event.entity.EntityTransformEvent;
+ public class Zombie extends Monster {
+
+ private static final ResourceLocation SPEED_MODIFIER_BABY_ID = ResourceLocation.withDefaultNamespace("baby");
+- private static final AttributeModifier SPEED_MODIFIER_BABY = new AttributeModifier(Zombie.SPEED_MODIFIER_BABY_ID, 0.5D, AttributeModifier.Operation.ADD_MULTIPLIED_BASE);
++ private final AttributeModifier babyModifier = new AttributeModifier(Zombie.SPEED_MODIFIER_BABY_ID, this.level().paperConfig().entities.behavior.babyZombieMovementModifier, AttributeModifier.Operation.ADD_MULTIPLIED_BASE); // Paper - Make baby speed configurable
+ private static final ResourceLocation REINFORCEMENT_CALLER_CHARGE_ID = ResourceLocation.withDefaultNamespace("reinforcement_caller_charge");
+ private static final AttributeModifier ZOMBIE_REINFORCEMENT_CALLEE_CHARGE = new AttributeModifier(ResourceLocation.withDefaultNamespace("reinforcement_callee_charge"), -0.05000000074505806D, AttributeModifier.Operation.ADD_VALUE);
+ private static final ResourceLocation LEADER_ZOMBIE_BONUS_ID = ResourceLocation.withDefaultNamespace("leader_zombie_bonus");
+@@ -186,9 +186,9 @@ public class Zombie extends Monster {
+ if (this.level() != null && !this.level().isClientSide) {
+ AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
+
+- attributemodifiable.removeModifier(Zombie.SPEED_MODIFIER_BABY_ID);
++ attributemodifiable.removeModifier(this.babyModifier.id()); // Paper - Make baby speed configurable
+ if (baby) {
+- attributemodifiable.addTransientModifier(Zombie.SPEED_MODIFIER_BABY);
++ attributemodifiable.addTransientModifier(this.babyModifier); // Paper - Make baby speed configurable
+ }
+ }
+