fix: initialize velocity variable for new wrapper entity

The velocity variable is never set in the class construction, resulting in null pointer exception if the getVelocityPacket method try to change it when is called, and the variable is not set before-hand using the setVelocity method.
This commit is contained in:
steve 2025-02-23 09:13:16 +01:00
parent 1f4aeef600
commit 19f9cb156f
No known key found for this signature in database
GPG key ID: 0F9283F0F2E9E304

View file

@ -52,6 +52,7 @@ public class WrapperEntity implements Tickable {
this.passengers = ConcurrentHashMap.newKeySet();
this.location = new Location(0, 0, 0, 0, 0);
this.viewerRules = new CopyOnWriteArrayList<>();
this.velocity = Vector3d.zero();
}
public WrapperEntity(int entityId, EntityType entityType) {