Merge pull request #390 from Moulberry/new-block-api_respawn-fix

Fix dimension
This commit is contained in:
TheMode 2021-08-04 17:01:53 +02:00 committed by GitHub
commit 1f0faca4e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -568,6 +568,10 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
super.setInstance(instance, spawnPosition);
if (dimensionChange) {
sendDimension(instance.getDimensionType());
}
if (updateChunks) {
// Warning: loop to remove once `refreshVisibleChunks` manage it
this.viewableChunks.forEach(chunk ->
@ -576,9 +580,6 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
}
if (dimensionChange || firstSpawn) {
if (dimensionChange) {
sendDimension(instance.getDimensionType());
}
synchronizePosition(true); // So the player doesn't get stuck
this.inventory.update();
}