From 8d5beddb65815d32fd0e13f1cfbbd4272cc8999f Mon Sep 17 00:00:00 2001 From: senseiwells <66843746+senseiwells@users.noreply.github.com> Date: Mon, 4 Sep 2023 07:06:22 +0100 Subject: [PATCH] Fix ElementHolder position delta always being zero (#86) --- .../java/eu/pb4/polymer/virtualentity/api/ElementHolder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer-virtual-entity/src/main/java/eu/pb4/polymer/virtualentity/api/ElementHolder.java b/polymer-virtual-entity/src/main/java/eu/pb4/polymer/virtualentity/api/ElementHolder.java index 7e5b8b29..ca1fbaae 100644 --- a/polymer-virtual-entity/src/main/java/eu/pb4/polymer/virtualentity/api/ElementHolder.java +++ b/polymer-virtual-entity/src/main/java/eu/pb4/polymer/virtualentity/api/ElementHolder.java @@ -162,7 +162,7 @@ protected void updatePosition() { var newPos = this.attachment.getPos(); if (!this.currentPos.equals(newPos)) { - var delta = newPos.subtract(newPos); + var delta = newPos.subtract(this.currentPos); this.notifyElementsOfPositionUpdate(newPos, delta); this.currentPos = newPos; this.currentChunkPos = null;