From 4ae4f176c57c433e3ee3e5db83def30843ae1604 Mon Sep 17 00:00:00 2001 From: austin Date: Sun, 8 Jun 2025 18:43:05 -0400 Subject: [PATCH] getPosition work --- docs/src/progress/renderertodo.md | 1 + src/main/java/electrosphere/entity/EntityUtils.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/progress/renderertodo.md b/docs/src/progress/renderertodo.md index 2998d220..2e3f6dd3 100644 --- a/docs/src/progress/renderertodo.md +++ b/docs/src/progress/renderertodo.md @@ -2135,6 +2135,7 @@ Fix cursor position setting Fix many places where entity position being set on vector fetched from getPosition - Fixed first person model placement update - Fixed skybox placement update +Undo getPosition new alloc to lower memory footprint diff --git a/src/main/java/electrosphere/entity/EntityUtils.java b/src/main/java/electrosphere/entity/EntityUtils.java index c57bf1a4..44511e7c 100644 --- a/src/main/java/electrosphere/entity/EntityUtils.java +++ b/src/main/java/electrosphere/entity/EntityUtils.java @@ -22,7 +22,7 @@ public class EntityUtils { * @return The position of the entity */ public static Vector3d getPosition(Entity e){ - return new Vector3d((Vector3d)e.getData(EntityDataStrings.DATA_STRING_POSITION)); + return (Vector3d)e.getData(EntityDataStrings.DATA_STRING_POSITION); } /**