mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-08 09:27:58 +01:00
Fix entity currentChunk being null
This commit is contained in:
parent
4932262750
commit
adfb487140
@ -462,6 +462,11 @@ public class Entity implements Viewable, EventHandler, DataContainer, Permission
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix current chunk being null if the entity has been spawned before
|
||||||
|
if (currentChunk == null) {
|
||||||
|
currentChunk = instance.getChunkAt(position);
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the entity chunk is loaded
|
// Check if the entity chunk is loaded
|
||||||
if (!ChunkUtils.isLoaded(currentChunk)) {
|
if (!ChunkUtils.isLoaded(currentChunk)) {
|
||||||
// No update for entities in unloaded chunk
|
// No update for entities in unloaded chunk
|
||||||
|
Loading…
Reference in New Issue
Block a user