mirror of
https://github.com/PaperMC/Paper.git
synced 2025-04-12 08:57:39 +02: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:
parent
ce30016218
commit
4519857817
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue