mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-26 19:18:12 +01:00
Automatically set the new instance of an entity when adding it to an instance
This commit is contained in:
parent
9b465830e0
commit
2fd7f2b310
@ -274,6 +274,8 @@ public abstract class Instance implements BlockModifier, DataContainer {
|
||||
lastInstance.removeEntity(entity); // If entity is in another instance, remove it from there and add it to this
|
||||
}
|
||||
|
||||
entity.setInstance(this);
|
||||
|
||||
long[] visibleChunksEntity = ChunkUtils.getChunksInRange(entity.getPosition(), MinecraftServer.ENTITY_VIEW_DISTANCE);
|
||||
boolean isPlayer = entity instanceof Player;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user