mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
39 lines
2.0 KiB
Diff
39 lines
2.0 KiB
Diff
From f372b0402915aab3c5069327ff9e5e0a337a3978 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Fri, 28 Nov 2014 01:01:51 -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 3e6a101..b2d9e67 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
@@ -16,7 +16,8 @@ public class EntityZombie extends EntityMonster {
|
|
|
|
protected static final IAttribute b = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
|
private static final UUID c = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
|
- private static final AttributeModifier bk = new AttributeModifier(EntityZombie.c, "Baby speed boost", 0.5D, 1);
|
|
+ // PaperSpigot - Configurable baby zombie movement speed
|
|
+ private static final AttributeModifier bk = new AttributeModifier(EntityZombie.c, "Baby speed boost", org.github.paperspigot.PaperSpigotConfig.babyZombieMovementSpeed, 1);
|
|
private final PathfinderGoalBreakDoor bl = new PathfinderGoalBreakDoor(this);
|
|
private int bm;
|
|
private boolean bn = false;
|
|
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;
|
|
+ private static void babyZombieMovementSpeed()
|
|
+ {
|
|
+ babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D); // Player moves at 0.1F, for reference
|
|
+ }
|
|
}
|
|
--
|
|
1.9.5.msysgit.0
|
|
|