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:
parent
1f4aeef600
commit
19f9cb156f
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ public class WrapperEntity implements Tickable {
|
||||||
this.passengers = ConcurrentHashMap.newKeySet();
|
this.passengers = ConcurrentHashMap.newKeySet();
|
||||||
this.location = new Location(0, 0, 0, 0, 0);
|
this.location = new Location(0, 0, 0, 0, 0);
|
||||||
this.viewerRules = new CopyOnWriteArrayList<>();
|
this.viewerRules = new CopyOnWriteArrayList<>();
|
||||||
|
this.velocity = Vector3d.zero();
|
||||||
}
|
}
|
||||||
|
|
||||||
public WrapperEntity(int entityId, EntityType entityType) {
|
public WrapperEntity(int entityId, EntityType entityType) {
|
||||||
|
|
Loading…
Reference in a new issue