Skip to content

Commit

Permalink
Check if dimension is overworld-like for environmental modifier altit…
Browse files Browse the repository at this point in the history
…ude rather than going by overworld biome tags
  • Loading branch information
Forstride committed Jan 6, 2024
1 parent 4885d5e commit 888de91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private static TemperatureLevel getBiomeTemperatureLevel(Level level, BlockPos p
Holder<Biome> biome = level.getBiome(pos);
float biomeTemperature = biome.value().getBaseTemperature();

if (!biome.is(BiomeTags.IS_OVERWORLD) || (pos.getY() > ModConfig.temperature.environmentalModifierAltitude || level.canSeeSky(pos)))
if (!level.dimensionType().natural() || (pos.getY() > ModConfig.temperature.environmentalModifierAltitude || level.canSeeSky(pos)))
{
if (biome.is(ModTags.Biomes.ICY_BIOMES)) return TemperatureLevel.ICY;
else if (biome.is(ModTags.Biomes.COLD_BIOMES)) return TemperatureLevel.COLD;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static TemperatureLevel seasonModifier(Level level, BlockPos pos, Temper
Holder<Biome> biome = level.getBiome(pos);

// Only adjust if above the environmental modifier altitude
if (biome.is(BiomeTags.IS_OVERWORLD) && pos.getY() <= ModConfig.temperature.environmentalModifierAltitude && !level.canSeeSky(pos))
if (level.dimensionType().natural() && pos.getY() <= ModConfig.temperature.environmentalModifierAltitude && !level.canSeeSky(pos))
return current;

// Check if biome uses seasonal effects
Expand Down

0 comments on commit 888de91

Please sign in to comment.