3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00
Paper/Spigot-Server-Patches/0009-Configurable-baby-zombie-movement-speed.patch
2015-03-08 05:17:04 -05:00

38 Zeilen
2.0 KiB
Diff

From 3a58172910a843143496837f4de1a5185c337360 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 7 Mar 2015 20:41:55 -0600
Subject: [PATCH] Configurable baby zombie movement speed
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 2c0c74c..e915f68 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -16,7 +16,7 @@ public class EntityZombie extends EntityMonster {
protected static final IAttribute a = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
- private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, 1);
+ private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", org.github.paperspigot.PaperSpigotConfig.babyZombieMovementSpeed, 1); // PaperSpigot - Configurable baby zombie movement speed
private final PathfinderGoalBreakDoor bm = new PathfinderGoalBreakDoor(this);
private int bn;
private boolean bo = false;
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
index fa41614..c2003a3 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -137,4 +137,10 @@ public class PaperSpigotConfig
config.addDefault( path, def );
return config.getString( path, config.getString( path ) );
}
+
+ public static double babyZombieMovementSpeed;
+ private static void babyZombieMovementSpeed()
+ {
+ babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D ); // Player moves at 0.1F, for reference
+ }
}
--
1.9.1