PaperSpigot-Parent/Spigot-Server-Patches/0009-Configurable-baby-zombie-movement-speed.patch

38 lines
2.0 KiB
Diff
Raw Normal View History

2015-05-28 07:11:18 +02:00
From 0b4987d924c62805d99df5922954b2cce6a3a81f Mon Sep 17 00:00:00 2001
2015-01-29 22:25:50 +01:00
From: Zach Brown <zach.brown@destroystokyo.com>
2015-03-08 02:16:09 +01:00
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
2015-05-28 07:11:18 +02:00
index 1a8d3d8..6d3b002 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
2015-03-08 02:16:09 +01:00
@@ -16,7 +16,7 @@ public class EntityZombie extends EntityMonster {
2015-03-08 02:16:09 +01:00
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;
2014-08-06 01:45:22 +02:00
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
2015-05-28 07:11:18 +02:00
index eef9722..0e9d57f 100644
2014-08-06 01:45:22 +02:00
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
2015-05-28 07:11:18 +02:00
@@ -138,4 +138,10 @@ public class PaperSpigotConfig
2014-08-06 01:45:22 +02:00
config.addDefault( path, def );
return config.getString( path, config.getString( path ) );
}
+
+ public static double babyZombieMovementSpeed;
2014-08-06 01:45:22 +02:00
+ private static void babyZombieMovementSpeed()
+ {
2015-03-08 02:16:09 +01:00
+ babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D ); // Player moves at 0.1F, for reference
+ }
}
--
2015-05-28 07:11:18 +02:00
2.4.1.windows.1