DragonSurvivalTeam / DragonSurvival

Other
51 stars 39 forks source link

[1.20.1 Bug]: Invisible Dragons Not Affected By Glowing #564

Open ByThePowerOfScience opened 4 weeks ago

ByThePowerOfScience commented 4 weeks ago

■ Your Discord ID or other contacts

discord@abadhaiku

■ Dragon Survival version

1.20.1-11.06.2024

■ Forge/Neoforge version

Forge 47.2.0 1.20.1

■ Single game or server?

Single-player (Default)

■ Describe the bug

Dragons under the effects of Invisibility cannot be affected by Glowing, nor do other items that detect invisibility (such as the Ring of Invisibility from Iron's Spellbooks) work on them.

■ Crash Report File and Logs

No response

ByThePowerOfScience commented 4 weeks ago

I found why the issue is occurring: https://github.com/DragonSurvivalTeam/DragonSurvival/blob/aa9e13ca9cf7505e73e0b7073cc19c358547eec3/src/main/java/by/dragonsurvivalteam/dragonsurvival/client/render/entity/dragon/DragonRenderer.java#L79-L81

Looks like dragons don't have a custom invisibility handler, instead they just don't render at all while invisible. I think Forge has a "custom invisibility handler" interface if I remember correctly, so you may want to take a look at that.

In the meantime, I'll probably just make it render with no alpha while invisible for my patch.