Snow! Real Magic! ⛄ (NeoForge)

Snow! Real Magic! ⛄ (NeoForge)

40M Downloads

Snow doesn't generate in winter on otherwise rainy biomes with Serene Seasons

VindSole opened this issue · 2 comments

commented

Mod loader

Fabric

Minecraft version

1.21

Mod version

11.0.1

Modloader version

Fabric Loader 0.15.11, Fabric API 0.100.4

Modpack info

No response

[IMPORTANT] If bug:

  • I have confirmed this bug is reproducible on a minimal setup, not a modpack with many other mods.

[IMPORTANT] If bug: The latest.log file, not the crash report

https://gist.github.com/VindSole/f26ba0cc818c42551cf7163651ae132a.js"

Issue description

On snowy biomes snow generates fine, but biomes on which it can start snowing instead of raining in cold seasons like winter, snow doesn't generate when using Serene Seasons alongside this mod.

image

commented

Hi,

I don't have experience with modding Minecraft, but it seems to me that the issue lies within the following function:

public static boolean coldEnoughToSnow(Level level, BlockPos pos, Holder<Biome> biome) {

Here is what I changed:

public static boolean coldEnoughToSnow(Level level, BlockPos pos, Holder<Biome> biome) {
    return SeasonHooks.coldEnoughToSnowSeasonal(level, pos); <-- what I changed to
    // return biome.value().coldEnoughToSnow(pos); <-- default return value
}

I'm not familiar with how mixins, dependencies, and other modding mechanics work in this context, so I added the dependency on the mod and created the function to directly call SereneSeasons.

Additionally, I'm not sure if this function does anything, because it returned false, but I changed it too:

public static boolean isWinter(Level level, BlockPos pos, Holder<Biome> biome) {

public static boolean isWinter(Level level, BlockPos pos, Holder<Biome> biome) {
    ISeasonState seasonState = SeasonHelper.getSeasonState(level);
    return seasonState.getSeason().equals(Season.WINTER);
    // return false; <-- default return value
}

It appears that Serene Seasons does not override the original coldEnoughToSnow method, leading SnowRealMagic to use the value from vanilla Minecraft. However, this is just my initial assessment; I might be mistaken as I haven't tested this thoroughly.

image

commented

Im sorry to ask i dumb question im new but how do i change the mod to use the code you did?