From 61c96f08efb654524a1c8be02dc0546c6ec9c5f9 Mon Sep 17 00:00:00 2001 From: fullwall Date: Mon, 3 Apr 2017 01:25:27 +0800 Subject: [PATCH] Lower default movement speed for slimes --- .../citizensnpcs/nms/v1_11_R1/util/PlayerControllerMove.java | 4 +++- .../nms/v1_11_R1/util/PlayerlistTrackerEntry.java | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerControllerMove.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerControllerMove.java index 5da9c5ad7..ce261f641 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerControllerMove.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerControllerMove.java @@ -90,7 +90,9 @@ public class PlayerControllerMove extends ControllerMove { this.a.yaw = a(this.a.yaw, f, 90.0F); NMS.setHeadYaw(a.getBukkitEntity(), this.a.yaw); AttributeInstance speed = this.a.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); - speed.setValue(0.1D * this.e); + if (!(this.a instanceof EntitySlime)) { + speed.setValue(0.1D * this.e); + } float movement = (float) (this.e * speed.getValue()) * 10; this.a.l(movement); this.a.bf = movement; diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerlistTrackerEntry.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerlistTrackerEntry.java index 1abf54e47..d22c844c3 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerlistTrackerEntry.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerlistTrackerEntry.java @@ -31,7 +31,6 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { && ((entityplayer.x().getPlayerChunkMap().a(entityplayer, tracker.ab, tracker.ad)) || (tracker.attachedToPlayer))) { if ((tracker instanceof SkinnableEntity)) { - SkinnableEntity skinnable = (SkinnableEntity) tracker; Player player = skinnable.getBukkitEntity();