Wyrmroost

Wyrmroost

7M Downloads

Server crash when mods check if dragon has valid mate

WenXin20 opened this issue ยท 2 comments

commented

Minecraft v1.16.4
Forge v35.1.15
Wyrmroost v1.2.10
Pokecube AIO v3.5.0

Logs:
Crash Report

Steps to Reproduce:

  1. Find the pokecube-server.toml file in the serverconfig folder.
  2. Change both non_vanilla_pokemobs and vanilla_pokemobs to true.
  3. Find a Roost Stalker
  4. Crash

Description of issue:
The server crashes when another mod checks for a dragon's valid mate. In my case, it happened with Pokecube AIO if the config is changed to allow for non-vanilla pokemobs.

commented

I will add in an exception handling on my end, but this side should probably check if the cast is valid here:

https://github.com/WolfShotz/Wyrmroost/blob/master/src/main/java/com/github/wolfshotz/wyrmroost/entities/dragon/AbstractDragonEntity.java#L861-L868

Vanilla behaviour checks if the mate is the same class, before further processing.

commented

In my defense, I did not add any further checks since my custom breeding goal does this already. Though I will admit I was not thinking very "compatibility" wise. Will fix this.