mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-01 21:11:33 +01:00
Fix dimension
This commit is contained in:
parent
e0cfd4c33c
commit
27d2219fb8
@ -568,6 +568,10 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
|||||||
|
|
||||||
super.setInstance(instance, spawnPosition);
|
super.setInstance(instance, spawnPosition);
|
||||||
|
|
||||||
|
if (dimensionChange) {
|
||||||
|
sendDimension(instance.getDimensionType());
|
||||||
|
}
|
||||||
|
|
||||||
if (updateChunks) {
|
if (updateChunks) {
|
||||||
// Warning: loop to remove once `refreshVisibleChunks` manage it
|
// Warning: loop to remove once `refreshVisibleChunks` manage it
|
||||||
this.viewableChunks.forEach(chunk ->
|
this.viewableChunks.forEach(chunk ->
|
||||||
@ -576,9 +580,6 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dimensionChange || firstSpawn) {
|
if (dimensionChange || firstSpawn) {
|
||||||
if (dimensionChange) {
|
|
||||||
sendDimension(instance.getDimensionType());
|
|
||||||
}
|
|
||||||
synchronizePosition(true); // So the player doesn't get stuck
|
synchronizePosition(true); // So the player doesn't get stuck
|
||||||
this.inventory.update();
|
this.inventory.update();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user