Paper/Spigot-Server-Patches/0010-Configurable-baby-zombie-movement-speed.patch

39 Zeilen
1.9 KiB
Diff

2014-08-06 01:45:22 +02:00
From 0b2f0d7f6919abe5727ca0e0e52301664183e237 Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
2014-08-06 01:45:22 +02:00
Date: Tue, 5 Aug 2014 17:18:23 -0500
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
2014-08-06 01:45:22 +02:00
index f732579..41e59ba 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
2014-08-06 01:45:22 +02:00
@@ -17,7 +17,8 @@ public class EntityZombie extends EntityMonster {
protected static final IAttribute bp = (new AttributeRanged("zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
private static final UUID bq = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
- private static final AttributeModifier br = new AttributeModifier(bq, "Baby speed boost", 0.5D, 1);
2014-08-06 01:45:22 +02:00
+ // PaperSpigot - Configurable baby zombie movement speed
+ private static final AttributeModifier br = new AttributeModifier(bq, "Baby speed boost", org.github.paperspigot.PaperSpigotConfig.babyZombieMovementSpeed, 1);
private final PathfinderGoalBreakDoor bs = new PathfinderGoalBreakDoor(this);
private int bt;
private boolean bu = 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
index 7ea1617..f4acbb3 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;
2014-08-06 01:45:22 +02:00
+ private static void babyZombieMovementSpeed()
+ {
2014-08-06 01:45:22 +02:00
+ babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D); // Player moves at 0.1F, for reference
+ }
}
--
1.9.1