azalea-rs / azalea

A collection of Rust crates for making Minecraft bots, clients, and tools.
https://azalea.matdoes.dev
MIT License
361 stars 48 forks source link

Removing entity from Chunk it's not in #135

Open ProfessorQu opened 5 months ago

ProfessorQu commented 5 months ago

When an entity goes outside the render distance of the bot while another player is present it will occasionally trigger this warning message:

WARN azalea_entity::plugin::indexing: Tried to remove entity 3v3 from chunk ChunkPos { x: 0, z: 0 } but the entity was not there.

The warning comes from this line. It triggers in the cases of:

It's not a huge deal but I saw it and thought I'd see what I could come up with.

SzczurekYT commented 5 months ago

Actually it spams a lot of these.

ProfessorQu commented 5 months ago

Yeah it seems to scale with the number of entities, so in a normal world it spams it a bunch, but in a void world it just does it once for each entity that goes out of range or dies