necauqua / chiseled-me

A mod that can make you small to sneak into places
MIT License
15 stars 11 forks source link

Scale Entity Draw Distance with Entity Size #77

Closed CosmicCrowMC closed 3 years ago

CosmicCrowMC commented 3 years ago

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.

necauqua commented 3 years ago

I do scale something called entity render distance in code, it just seems to have no effect, so :shrug: 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

necauqua commented 3 years ago

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.

necauqua commented 3 years ago

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

necauqua commented 3 years ago

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

necauqua commented 3 years ago

Fixed in ede2651