Warden heartbeat only plays when the warden is visible
Treetrain1 opened this issue ยท 3 comments
When the warden is culled, the heartbeat sounds do not play
2022-09-24.13-29-25.mp4
Huh, that's an interesting one. Yea will have to check where that sound gets generated. Honestly kinda weird that the sound gets generated clientside, not server side(like most other mob sounds).
this is cause the the sound gets played in the Entity#tick
method of the warden but this mod calls Entity#aiStep
to tick the entities. This also causes some issues with mods that do similiar stuff. Is there a reason aiStep
instead of tick
is called? Its in your ClientWorldMixin
The goal is to reduce the amount of just general "stuff" the client does to non-visible entities. tick
is the full thing, that we don't want to call. If no one sees it, there is no reason to animate them fully(since it's clientside, it doesn't affect anything else). So far this has only caused 3 current issues: falling sand doesn't fall when not visible(not a real issue, unless it falls upwards cough Hermitcraft), this heartbeat problem that is fixable(because Mojang apparently calculates that sound clientside, unlike any other mob?!?) and with Create Minecarts, that had their hitbox initialization happening during the client tick, which never happened, since the entity had an invalid hitbox(this got fixed on Creates end in newer versions).
In case it actually causes some bigger issues in combination with another mod, it can also be fully turned off in the config.