diff --git a/src/main/java/net/citizensnpcs/npc/entity/nonliving/FallingBlockController.java b/src/main/java/net/citizensnpcs/npc/entity/nonliving/FallingBlockController.java index 5fc46d0ed..b60496a23 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/nonliving/FallingBlockController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/nonliving/FallingBlockController.java @@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity.nonliving; import net.citizensnpcs.api.event.NPCPushEvent; import net.citizensnpcs.api.npc.NPC; +import net.citizensnpcs.api.util.Messaging; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; @@ -112,10 +113,19 @@ public class FallingBlockController extends AbstractEntityController { public void h() { if (npc != null) { npc.update(); + if (Math.abs(motX) > EPSILON || Math.abs(motY) > EPSILON || Math.abs(motZ) > EPSILON) { + motX *= 0.98; + motY *= 0.98; + motZ *= 0.98; + move(motX, motY, motZ); + Messaging.log(motX, motY, motZ); + } } else { super.h(); } } + + private static final double EPSILON = 0.001; } public static class FallingBlockNPC extends CraftFallingSand implements NPCHolder {