mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Use proper method for refreshing position
This commit is contained in:
parent
8b35e0db9a
commit
ce8e14ede1
@ -531,7 +531,7 @@ public class Entity implements Viewable, Tickable, EventHandler<EntityEvent>, Da
|
||||
|
||||
// Apply the position if changed
|
||||
if (!finalVelocityPosition.samePoint(position)) {
|
||||
refreshCoordinate(finalVelocityPosition);
|
||||
refreshPosition((Pos) finalVelocityPosition, true);
|
||||
sendPositionUpdate(true);
|
||||
}
|
||||
|
||||
@ -1318,7 +1318,6 @@ public class Entity implements Viewable, Tickable, EventHandler<EntityEvent>, Da
|
||||
* @param newPosition the new position
|
||||
*/
|
||||
private void refreshCoordinate(Point newPosition) {
|
||||
position = position.withCoord(newPosition);
|
||||
if (hasPassenger()) {
|
||||
for (Entity passenger : getPassengers()) {
|
||||
passenger.refreshCoordinate(newPosition);
|
||||
|
Loading…
Reference in New Issue
Block a user