File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
sakura-server/src/main/java/me/samsuik/sakura/entity Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 1111
1212@ NullMarked
1313public record EntityState (
14+ Vec3 oldPosition ,
1415 Vec3 position ,
1516 Vec3 momentum ,
1617 AABB bb ,
@@ -21,6 +22,7 @@ public record EntityState(
2122) {
2223 public static EntityState of (final Entity entity ) {
2324 return new EntityState (
25+ entity .oldPosition (),
2426 entity .position (),
2527 entity .getDeltaMovement (),
2628 entity .getBoundingBox (),
@@ -32,6 +34,7 @@ public static EntityState of(final Entity entity) {
3234 }
3335
3436 public void apply (final Entity entity ) {
37+ entity .setOldPosAndRot (this .oldPosition , 0.0f , 0.0f );
3538 entity .setPos (this .position );
3639 entity .setDeltaMovement (this .momentum );
3740 entity .setBoundingBox (this .bb );
You can’t perform that action at this time.
0 commit comments