mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Set old position / rotation for newly created entities
Set the old pos/rot to be the same as the current pos/rot for new entities as the default value for the old pos/rot is zero. Fixes https://github.com/PaperMC/Folia/issues/302
This commit is contained in:
@@ -1072,6 +1072,14 @@
|
||||
@Override
|
||||
public CrashReportCategory fillReportDetails(CrashReport report) {
|
||||
CrashReportCategory crashReportCategory = super.fillReportDetails(report);
|
||||
@@ -1714,6 +_,7 @@
|
||||
final class EntityCallbacks implements LevelCallback<Entity> {
|
||||
@Override
|
||||
public void onCreated(Entity entity) {
|
||||
+ entity.setOldPosAndRot(); // Paper - update old pos / rot for new entities as it will default to Vec3.ZERO
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1723,24 +_,32 @@
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user