MWall541 / Dragon-Mounts-Legacy

Github Repository for the Dragon Mounts: Legacy Minecraft Mod. Please Report any issues here!
GNU General Public License v3.0
38 stars 36 forks source link

No Guard for pre-mature breed querying causing NPE's #161

Closed Tursiops-G closed 1 year ago

Tursiops-G commented 1 year ago

Forge 1.20.1 - DML Version 1.15b2

When Dragon Mounts Legacy is used in combination with All Loot Drops AND Supplementaries, The result is an Exception in Server Tick Loop crash. If EITHER DML OR All Loot Drops OR Supplementaries is removed, No Crash. (Mixin Boondoggle?)

Run Log: https://paste.ee/p/17SjJ Crash Log: https://paste.ee/p/1ajYs Debug Log: https://paste.ee/p/qTZQ4

MWall541 commented 1 year ago

It seems All Loot Tables is keeping a loot table of entities on the first world load. It does this by creating dummy entities that all exist in the server. This is a problem since All Loot Tables has no idea how to assign a breed type to dragons.

This creates many issues. First off, all functionality of dragons that rely on a breed type will simply fail, causing a crash.

Another issue is that not every dragon breed type has the same loot table.

This is just a general issue with having the breed types be a dynamic registry, let alone have the loot tables also be apart of breeds.

Internally, I'm not happy with how "unassigned" a breed can be at creation time of a dragon. I want another solution as I realize it causes these kinds of issues.

I'll take blame for this now and will try to come up with a solution to the problem. Thank you for the report.

MWall541 commented 1 year ago

fixed with 0a4af08