update getter names

This commit is contained in:
Németh Noel 2021-07-06 23:03:01 +02:00
parent da5abd3d4e
commit f29ed48da9
2 changed files with 3 additions and 5 deletions

View File

@ -523,8 +523,8 @@ public class Entity implements Viewable, Tickable, EventHandler<EntityEvent>, Da
if (this.hasPhysics) { if (this.hasPhysics) {
final CollisionUtils.PhysicsResult physicsResult = CollisionUtils.handlePhysics(this, deltaPos); final CollisionUtils.PhysicsResult physicsResult = CollisionUtils.handlePhysics(this, deltaPos);
this.onGround = physicsResult.isOnGround(); this.onGround = physicsResult.isOnGround();
newPosition = physicsResult.getNewPosition(); newPosition = physicsResult.newPosition();
newVelocity = physicsResult.getNewVelocity(); newVelocity = physicsResult.newVelocity();
} else { } else {
newVelocity = deltaPos; newVelocity = deltaPos;
newPosition = new Pos( newPosition = new Pos(

View File

@ -9,8 +9,6 @@ import net.minestom.server.entity.LivingEntity;
import net.minestom.server.instance.Chunk; import net.minestom.server.instance.Chunk;
import net.minestom.server.instance.Instance; import net.minestom.server.instance.Instance;
import net.minestom.server.instance.WorldBorder; import net.minestom.server.instance.WorldBorder;
import net.minestom.server.utils.Position;
import net.minestom.server.utils.Vector;
import net.minestom.server.utils.chunk.ChunkUtils; import net.minestom.server.utils.chunk.ChunkUtils;
import net.minestom.server.utils.coordinate.Point; import net.minestom.server.utils.coordinate.Point;
import net.minestom.server.utils.coordinate.Pos; import net.minestom.server.utils.coordinate.Pos;
@ -79,7 +77,7 @@ public class Navigator {
final CollisionUtils.PhysicsResult physicsResult = CollisionUtils.handlePhysics(entity, new Vec(speedX, speedY, speedZ)); final CollisionUtils.PhysicsResult physicsResult = CollisionUtils.handlePhysics(entity, new Vec(speedX, speedY, speedZ));
// Will move the entity during Entity#tick // Will move the entity during Entity#tick
entity.refreshPosition(physicsResult.getNewPosition()); entity.refreshPosition(physicsResult.newPosition());
} }
public void jump(float height) { public void jump(float height) {