Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modular Golems Glowing Incompatibility #293

Open
The-Zekenator opened this issue Jun 29, 2024 · 3 comments
Open

Modular Golems Glowing Incompatibility #293

The-Zekenator opened this issue Jun 29, 2024 · 3 comments

Comments

@The-Zekenator
Copy link

The-Zekenator commented Jun 29, 2024

Describe the bug
This mod and Modular Golems (https://www.curseforge.com/minecraft/mc-mods/modulargolems) appear to have conflicting behavior regarding a glowing effect that MG uses when mousing over one of its golems.

To Reproduce [Optional]
Steps to reproduce the behavior:

  1. Have Modular Golems, L2 Library, and Crossroads and Essentials installed.
  2. Spawn a golem from MG.
  3. Mouse over it with any wand that targets a golem or an enemy (Command Wand, Retrieval Wand, etc). The golem or entity will begin glowing.
  4. The glow will not fade, no matter what you do until you log back out or switch dimensions.

Expected behavior [Optional]
Normally, Modular Golems should have the glow fade after a few moments. But with Crossroads installed, the glowing effect persists forever, until entity death or logging out and back in. I'm not sure why this occurs. It appears to be a Crossroads-specific problem as Essentials does not cause this. Since Crossroads from my play with it appears to be a tech mod, I'm not sure why it would interfere with this.

Additional context [Optional]
I've tested this alone with just the four mods involved and in a modpack with about 230 mods. This incorrect behavior is present in both contexts.

Modular Golem's source code is available here, if that helps (https://github.com/Minecraft-LightLand/ModularGolems).

@lcy0x1
Copy link

lcy0x1 commented Jun 29, 2024

I’m the dev of ModularGolems. The point of conflict is here: https://github.com/Minecraft-LightLand/L2Library/blob/1.19/src/main/java/dev/xkmc/l2library/mixin/EntityMixin.java

I mixin into Entity class to make isCurrentlyGlowing return true for some entities. Did crossroad cache this value somehow? My mixin should return true only when player is pointing at them with a specific item.

@Da-Technomancer
Copy link
Member

@lcy0x1 Crossroads does cache this value.
Ironically, the caching was added specifically to prevent breaking other mods' glowing effect (Crossroads also makes entities glow on the client side under certain circumstances, the thinking was that if both CR and another mod made an entity glow, without caching CR would cancel the other mods' glowing prematurely). I did not account for mixins totally changing how glowing is implemented in entities.

Point of conflict from the CR side: https://github.com/Crossroads-Development/Crossroads/blob/1.20.1/src/main/java/com/Da_Technomancer/crossroads/EventHandlerClient.java#L203-L225

@lcy0x1
Copy link

lcy0x1 commented Sep 3, 2024

I don't think mods should set glowing flags on client. Instead, using mixins to return true under certain circumstances is more reasonable and compatible than just setting a flag. You can just add a mixin to return true for isGlowing when the entity has the tag you adds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants