mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
c97ce029e9
PaperMC believes that 1.16.2 is now ready for general release as we fixed the main issue plagueing the 1.16.x release, the MapLike data conversion issues. Until now, it was not safe for a server to convert a world to 1.16.2 without data conversion issues around villages and potentially other things. If you did, those MapLike errors meant something went wrong. This is now resolved. Big thanks to all those that helped, notably @BillyGalbreath and @Proximyst who did large parts of the update process with me. Please as always, backup your worlds and test before updating to 1.16.2! If you update to 1.16.2, there is no going back to an older build than this. --------------------------------- Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com> Co-authored-by: krolik-exe <69214078+krolik-exe@users.noreply.github.com> Co-authored-by: BillyGalbreath <BillyGalbreath@users.noreply.github.com> Co-authored-by: stonar96 <minecraft.stonar96@gmail.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Jason <jasonpenilla2@me.com> Co-authored-by: kashike <kashike@vq.lc> Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com> Co-authored-by: KennyTV <kennytv@t-online.de> Co-authored-by: commandblockguy <commandblockguy1@gmail.com> Co-authored-by: DigitalRegent <misterwener@gmail.com> Co-authored-by: ishland <ishlandmc@yeah.net>
52 lines
3.1 KiB
Diff
52 lines
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.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 098bd3fba867c0e4c6c58748aa6e2e632737a948..912611cf1aeccf5a82a789aab07d76723d4357cc 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -73,4 +73,15 @@ public class PaperWorldConfig {
|
|
log("Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight);
|
|
|
|
}
|
|
+
|
|
+ public double babyZombieMovementModifier;
|
|
+ private void babyZombieMovementModifier() {
|
|
+ babyZombieMovementModifier = getDouble("baby-zombie-movement-modifier", 0.5D);
|
|
+ if (PaperConfig.version < 20) {
|
|
+ babyZombieMovementModifier = getDouble("baby-zombie-movement-speed", 0.5D);
|
|
+ set("baby-zombie-movement-modifier", babyZombieMovementModifier);
|
|
+ }
|
|
+
|
|
+ log("Baby zombies will move at the speed of " + babyZombieMovementModifier);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
index ebf46a3c31913bf6ec2aa13b8c9bac1c590b7d84..12f954723ac2f0058081d810ce83aed99532caad 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
@@ -21,7 +21,7 @@ import org.bukkit.event.entity.EntityTransformEvent;
|
|
public class EntityZombie extends EntityMonster {
|
|
|
|
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, AttributeModifier.Operation.MULTIPLY_BASE);
|
|
+ private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE); private final AttributeModifier babyModifier = this.c; // Paper - remove static - Make baby speed configurable
|
|
private static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
|
private static final DataWatcherObject<Integer> bo = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
|
|
public static final DataWatcherObject<Boolean> DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
|
@@ -124,9 +124,9 @@ public class EntityZombie extends EntityMonster {
|
|
if (this.world != null && !this.world.isClientSide) {
|
|
AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
|
|
|
- attributemodifiable.removeModifier(EntityZombie.c);
|
|
+ attributemodifiable.removeModifier(this.babyModifier); // Paper
|
|
if (flag) {
|
|
- attributemodifiable.b(EntityZombie.c);
|
|
+ attributemodifiable.b(this.babyModifier); // Paper
|
|
}
|
|
}
|
|
|