Scale Entity Draw Distance with Entity Size
CosmicCrowMC opened this issue · 5 comments
It'd be nice if the distance you can see an entity from scales with their size if their size is >=1. I don't know how technically challenging this would be, but it would be great if you could see, say, a giant creeper from 256 blocks away instead of the current limit of 64 blocks. This would make the mod feel a lot more immersive because as it is, it's a bit jarring when a giant mob suddenly disappears from view. 1.16 has a similar Entity Distance feature, but that's for all mobs, not just big ones, so even if the mod is updated to 1.16, it'd probably be pretty laggy.
I do scale something called entity render distance in code, it just seems to have no effect, so 🤷
But yeah I'll look into that when updating, maybe new versions have it fixed, who know
Also yeah, even updating to 1.13 will be fun, I spent like a lot of time fighting dumb bugs/changes of new forge lol
update;
Ok during the mixin rewrite I found out that my patch that changed draw distance was actually pretty weird - mc code uses squared distance comparison to avoid making expensive square root calculation for no reason, but I only scale that number by the entity size once, instead of two times, which makes no sense, and also a lot of entities override that method with their own copy so for them this patch does not work anyway.
update2:
I figured out - mc automatically adjusts max render distance based on entity aabb size, so it should've worked perfectly by itself.
That weird patch disables this adjustment for small mobs, so they don't visibly disappear when you walk two blocks away.
Why big mobs disappear at such a short distance though is still under investigation lol
update3:
The issue was (quite obviously actually, I was just a bit dumb) server-size, the mob is getting completely unloaded on the client after certain distance, easily completely fixed in latest beta
Fixed in ede2651