9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 18:09:17 +00:00

Fix build

This commit is contained in:
Dreeam
2023-12-17 21:18:57 -05:00
parent 1fa323987a
commit 63892fa700

View File

@@ -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