mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
6d1a918378
This work is 100% unfinished. I am pushing it up so that we as a team can work on this update. Do not try to use this branch. You will fail.
47 lines
2.7 KiB
Diff
47 lines
2.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
|
Date: Tue, 1 Mar 2016 13:09:16 -0600
|
|
Subject: [PATCH] Configurable baby zombie movement speed
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 4a692ac1b..d44cacc7e 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
|
log("Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight);
|
|
|
|
}
|
|
+
|
|
+ public double babyZombieMovementSpeed;
|
|
+ private void babyZombieMovementSpeed() {
|
|
+ babyZombieMovementSpeed = getDouble("baby-zombie-movement-speed", 0.5D); // Player moves at 0.1F, for reference
|
|
+ log("Baby zombies will move at the speed of " + babyZombieMovementSpeed);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
index b24e73f2c..268e4d57b 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
|
|
|
protected static final IAttribute c = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
|
private static final UUID a = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
|
- private static final AttributeModifier b = new AttributeModifier(EntityZombie.a, "Baby speed boost", 0.5D, 1);
|
|
+ private final AttributeModifier babyModifier = new AttributeModifier(EntityZombie.a, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable
|
|
private static final DataWatcherObject<Boolean> bC = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
|
private static final DataWatcherObject<Integer> bD = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
|
|
private static final DataWatcherObject<Boolean> bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
|
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
|
if (this.world != null && !this.world.isClientSide) {
|
|
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
|
|
|
- attributeinstance.c(EntityZombie.b);
|
|
+ attributeinstance.c(this.babyModifier); // Paper
|
|
if (flag) {
|
|
- attributeinstance.b(EntityZombie.b);
|
|
+ attributeinstance.b(this.babyModifier); // Paper
|
|
}
|
|
}
|
|
|
|
--
|