-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash with SereneSeasons mod (#1)
- Loading branch information
Showing
11 changed files
with
133 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package hantonik.fbp.util; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
import net.fabricmc.loader.api.FabricLoader; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.core.Holder; | ||
import net.minecraft.world.level.biome.Biome; | ||
import sereneseasons.season.SeasonHooksClient; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public final class FBPUtils { | ||
public static Biome.Precipitation getPrecipitationAtLevelRenderer(Holder<Biome> biome, BlockPos pos) { | ||
return FabricLoader.getInstance().isModLoaded("sereneseasons") ? SeasonHooksClient.getPrecipitationAtLevelRendererHook(biome, pos) : biome.value().getPrecipitationAt(pos); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package hantonik.fbp.util; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.core.Holder; | ||
import net.minecraft.world.level.biome.Biome; | ||
import net.minecraftforge.fml.ModList; | ||
import sereneseasons.season.SeasonHooksClient; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public final class FBPUtils { | ||
public static Biome.Precipitation getPrecipitationAtLevelRenderer(Holder<Biome> biome, BlockPos pos) { | ||
return ModList.get().isLoaded("sereneseasons") ? SeasonHooksClient.getPrecipitationAtLevelRendererHook(biome, pos) : biome.value().getPrecipitationAt(pos); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package hantonik.fbp.util; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.core.Holder; | ||
import net.minecraft.world.level.biome.Biome; | ||
import net.neoforged.fml.ModList; | ||
import sereneseasons.season.SeasonHooksClient; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public final class FBPUtils { | ||
public static Biome.Precipitation getPrecipitationAtLevelRenderer(Holder<Biome> biome, BlockPos pos) { | ||
return ModList.get().isLoaded("sereneseasons") ? SeasonHooksClient.getPrecipitationAtLevelRendererHook(biome, pos) : biome.value().getPrecipitationAt(pos); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters