-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Bug] Single player crash #43
Comments
Same here.
|
I have investigated this issue happening on my server. This happens when a My server was crashing because a Pig was riding a Crocodile from Alex's Mobs, which can have a custom PathNavigator. Likely because when crocodiles attack mobs they are forced into riding the crocodile. I guess the chunk unloaded before the Pig had been killed, then whenever the chunk got loaded again, it crashed the server. As a quick and dirty workaround I compiled an edited version of this mod that changes This issue is also present in the Pam's Harvestcraft 2 Trees mod, I haven't checked any of the others Pam's mods. |
This bug is causing my server to crash. Hopefully we can get an update to fix this? |
Would it be possible for you @Mysteryem to share your patched build while there is still no official fix? This crash is frustrating some players on my server and I'm unfortunately not very good at Java. |
Unfortunately, this project's license prohibits sharing any such files, regardless of whether it's a compiled build or edited source code. The source code is visible (which helps with finding the cause of bugs like this), but this is not an open source project by any means. |
@Mysteryem Since I'm not familiar with Java, could you please elaborate on a detailed guide? I wonder why Pam's mod wants to getPathNavigator since there's no need for Pam's mod, a farming mod, to modify or read mob data. If this is something that can be done by simply extracting the jar file, edit the code, recompile it in zip format and rename it to jar I would be very much grateful. It's a little disappointing that the two authors wouldn't collaborate on this. |
@JuicyCosmos In order for mobs like pigs and sheep to follow players when they hold fruit/veg/seeds from Pam's mods an AI task is added to pigs/sheep/etc. that makes them follow after players when they hold out the correct fruit/veg/seeds for that animal. This AI task is built on top of the AI task that vanilla Minecraft uses for making mobs follow you when you hold out wheat/carrots/etc. which has the check that getNavigator() returns a PathNavigator of a valid type. You might wonder why then that same vanilla AI task doesn't crash on its own and that's because, as far as I can tell, the vanilla AI tasks get added before the entity they're riding gets set so it avoids the issue entirely since there is no ridden entity at that time. To make the modifications you would need to edit the source code in this repository and recompile the mod from the source code yourself, which would require a basic understanding of programming and Java and how to set your choice of IDE for minecraft mod development, my previous comment should already be enough for someone who knows what they're doing to make. It would be too much work for me to teach someone up to that level
A better solution, which would fix more mods than this would be to either work with Forge to alter the vanilla |
@Mysteryem Thanks for shedding more light on the issue! I had minimal programming experience only with the surface level Python they taught in the uni, though I aim to learn more about programming in the future. |
@JuicyCosmos Yes, when paired with Alex's Mobs (or another mod that brings this issue to the surface), SimpleFarming used to run into the same issue, as did Quark. Both I would describe as workarounds, since in both cases, the entity that would have caused the crash never gets given the AI goal it's supposed to have, though it's unlikely to be noticeable in most circumstances. Using mixins to alter the vanilla TempGoal class in mods like SimpleFarming and Quark would probably not be a very good idea, because then you'd have a bunch of mods all modifying the same vanilla code (Mixin may be designed to handle this better than everyone writing their own coremods, but I still wouldn't advise it), it would be more suited for a mod made specifically for performing that fix or a mod designed to fix a whole bunch of vanilla issues. As most of these mods are adding the AI goal in the |
Catches errors if a mob is riding another with custom ai and its chunk unloads. Mostly noticeable in the case of Alex's mobs.
Same error, same copy/paste fix.
Catches errors if a mob is riding another with custom ai and its chunk unloads. Mostly noticeable in the case of Alex's mobs. It even targets the right branch this time!
Using version 1.16.3-1.0.2 got this error on the log that crashes single player
The text was updated successfully, but these errors were encountered: