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

Gempire causes issues when ticking certain mobs #167

Open
TheCodingZombie opened this issue Jul 31, 2024 · 3 comments
Open

Gempire causes issues when ticking certain mobs #167

TheCodingZombie opened this issue Jul 31, 2024 · 3 comments

Comments

@TheCodingZombie
Copy link

TheCodingZombie commented Jul 31, 2024

So, apparently, Gempire has been causing issues when certain mods have certain mobs existing in the world. For example, Alex's Mobs causes the game to crash when paired with Gempire because of a Bone Snake issue, and Ice and Fire crashes when trying to tick the Stone Statue mob.

As of right now, I tested Gempire without these mods enabled, and they work perfectly fine, but I'd really rather not have to keep disabling mods just to play with Gempire.

Here's the crash report, in case you were curious

crash-2024-07-30_21.19.47-server.txt

@zetcipher
Copy link

I've experienced this issue as well, both with Alex's Mobs as well as Ice and Fire funnily enough. The issue seems to be with the OnEntitySpawn event in EventHandler.java.

On lines 51 and 61 in EventHandler.java, there's if statements checking the mob category of the newly spawned entity. If those pass, then Gempire wrongly assumes that the newly spawned entity must extend from Mob, when in fact this is not guaranteed.

Since the code in question doesn't even have anything to run in the event that the newly spawned mob doesn't extend from Mob, line 50 should probably be changed to check that the entity is an instance of Mob and not LivingEntity.

@zetcipher
Copy link

Update: I implemented this fix myself and haven't run into any more problems with it.

@TheCodingZombie
Copy link
Author

Where did you implement this fix?

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

No branches or pull requests

2 participants