Skip to content

Commit

Permalink
Avoid referencing SeasonHooks inside the TemperatureHelper mixin for …
Browse files Browse the repository at this point in the history
…Forge
  • Loading branch information
Adubbz committed Jan 3, 2024
1 parent f8a5279 commit 141b21b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import sereneseasons.api.season.Season;
import sereneseasons.api.season.SeasonHelper;
import sereneseasons.init.ModTags;
import sereneseasons.season.SeasonHooks;
import toughasnails.api.temperature.TemperatureHelper;
import toughasnails.api.temperature.TemperatureLevel;
import toughasnails.core.ToughAsNails;
Expand All @@ -28,6 +29,11 @@ public static void init()
}
}

public static boolean coldEnoughToSnowSeasonal(Level level, Holder<Biome> biome, BlockPos pos)
{
return SeasonHooks.coldEnoughToSnowSeasonal(level, biome, pos);
}

private static TemperatureLevel seasonModifier(Level level, BlockPos pos, TemperatureLevel current)
{
Holder<Biome> biome = level.getBiome(pos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import net.minecraftforge.fml.ModList;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import sereneseasons.season.SeasonHooks;
import toughasnails.forge.init.ModCompatibility;
import toughasnails.temperature.TemperatureHelperImpl;

@Mixin(value = TemperatureHelperImpl.class, remap = false)
Expand All @@ -22,7 +22,7 @@ private static boolean coldEnoughToSnow(Level level, Holder<Biome> biome, BlockP
{
if (ModList.get().isLoaded("sereneseasons"))
{
return SeasonHooks.coldEnoughToSnowSeasonal(level, biome, pos);
return ModCompatibility.coldEnoughToSnowSeasonal(level, biome, pos);
}
else
{
Expand Down

0 comments on commit 141b21b

Please sign in to comment.