Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Dec 18, 2023
1 parent 1fa3239 commit 63892fa
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions patches/server/0042-Configurable-zombie-movement-speed.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,30 @@ Subject: [PATCH] Configurable 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 007e75ec5a6a8f1522e7f0d105507834028eb819..ef788ff5b2c7e0550ee60054cbceb2bf81f5d086 100644
index 007e75ec5a6a8f1522e7f0d105507834028eb819..643af4fe74c7c9d69e3817ee53484c07d61122fe 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -185,9 +185,16 @@ public class Zombie extends Monster {
@@ -128,6 +128,7 @@ public class Zombie extends Monster {
@Override
public void initAttributes() {
this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombieMaxHealth);
+ this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.zombieMovementSpeed); // Leaf start - Configurable zombie movement speed
}

public boolean jockeyOnlyBaby() {
@@ -185,9 +186,15 @@ public class Zombie extends Monster {
this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR));
}

- public static AttributeSupplier.Builder createAttributes() {
- return Monster.createMonsterAttributes().add(Attributes.FOLLOW_RANGE, 35.0D).add(Attributes.MOVEMENT_SPEED, 0.23000000417232513D).add(Attributes.ATTACK_DAMAGE, 3.0D).add(Attributes.ARMOR, 2.0D).add(Attributes.SPAWN_REINFORCEMENTS_CHANCE);
- }
+ // Leaf start - Configurable zombie movement speed
+ public AttributeSupplier.Builder createAttributes() {
public static AttributeSupplier.Builder createAttributes() {
- return Monster.createMonsterAttributes().add(Attributes.FOLLOW_RANGE, 35.0D).add(Attributes.MOVEMENT_SPEED, 0.23000000417232513D).add(Attributes.ATTACK_DAMAGE, 3.0D).add(Attributes.ARMOR, 2.0D).add(Attributes.SPAWN_REINFORCEMENTS_CHANCE);
+ return Monster.createMonsterAttributes()
+ .add(Attributes.FOLLOW_RANGE, 35.0D)
+ .add(Attributes.MOVEMENT_SPEED, this.level().purpurConfig.zombieMovementSpeed)
+ .add(Attributes.ATTACK_DAMAGE, 3.0D)
+ .add(Attributes.ARMOR, 2.0D)
+ .add(Attributes.SPAWN_REINFORCEMENTS_CHANCE);
+ }
}
+ // Leaf end

@Override
Expand Down

0 comments on commit 63892fa

Please sign in to comment.