DarkShadow44 / SereneSeasons

Minecraft mod that adds seasons with changing colors, temperature shifting, and more!
https://minecraft.curseforge.com/projects/serene-seasons
Other
14 stars 6 forks source link

Issues reported by makamys #17

Closed DarkShadow44 closed 1 year ago

DarkShadow44 commented 4 years ago

Split of off #15.

  1. It rains in deserts in MID_WET seasons (e.g. early spring), which shouldn't happen. The reason for this is that only deserty biomes use tropical seasons. Isn't this a mistake?
  2. In ColorTransformer and WeatherTransformer, a possibly null value is passed to the constructor of ClassReader, which can cause a NPE. I'm not sure if this causes any problems, but I've seen server crash logs that may have been caused by it. It would be safer to check if bytes is null first, and return null if it is.
DarkShadow44 commented 4 years ago

1) What exactly do you mean? Seems to be exactly how https://github.com/Glitchfiend/SereneSeasons/wiki/Wet-Season describes it. In MID_WET (in spring), it can rain in deserts.

2) Can bytes ever be null? We get that from forge...

makamys commented 4 years ago
  1. Oh, in that case it was only my misunderstanding, sorry. It doesn't rain in deserts on the 3.x.x branch, so I thought things weren't working as intended.
    • If a buggy mod loads a class that doesn't exist, the NullPointerException gets thrown in SS's transformer, so it looks like SS is at fault in the crash log. So it would be mostly to make crash logs less confusing.
    • Also, theoretically a mod could exist that deliberately loads a class that doesn't exist so it can supply its class bytes in its own transformer (replacing null with its own data).

    So the null case has to be handled to keep the transformer chain intact even in edge cases.

DarkShadow44 commented 1 year ago

Is fixed now

makamys commented 1 year ago

Is it? The two classes I mentioned haven't changed since I posted the issue.

(There's also PlantGrowthTransformer, I just noticed.)

DarkShadow44 commented 1 year ago

See https://github.com/DarkShadow44/SereneSeasons/commit/8b7a5d245bb68dd4c6a6262f86d19cad9abc652b Forgot about that transformer, thanks.