Zaicon / InfiniteChestsV3

11 stars 16 forks source link

Key of Light / Dark - Multiple Issues #10

Open Puremin0rez opened 4 years ago

Puremin0rez commented 4 years ago

The Key of Light currently does not work at all - and the problem becomes quite obvious when looking at this line of code: https://github.com/Zaicon/InfiniteChestsV3/blob/master/InfiniteChestsV3/InfMain.cs#L373

The check is only looking for 3091, which is the Key of Night. Key of Light, 3092, was forgotten about.

The Key of Night works, but it only works when the current zone is Corruption / Crimson. This requirement does not exist in the vanilla game, and can be once again traced down to the same line of code: https://github.com/Zaicon/InfiniteChestsV3/blob/master/InfiniteChestsV3/InfMain.cs#L373

Edit: The error with Key of Light occurred with commit https://github.com/Zaicon/InfiniteChestsV3/commit/5e386cab5c84c0215b2d16754e1238a801f98ac6 (otherwise known as 1.4 update). The issue with key spawning being bound to zones however appears to have always existed.

mpql commented 4 years ago

Can confirm. I might try to fork and fix this myself; does anyone have the API call handy for checking if a world has corruption or crimson?

mpql commented 4 years ago

I believe I have fixed this issue. Here's a compiled release, if you'd like to check it out.

Puremin0rez commented 4 years ago

I believe I have fixed this issue. Here's a compiled release, if you'd like to check it out.

Thanks! Confirmed working.

While the randomization isn't exactly vanilla, this behavior is much preferred over the existing one.