@Override protected List<String> getLines() { //noinspection ConstantConditions return ForgeRegistries.BIOMES.getValuesCollection().stream() .map(b -> String.join(",", b.getRegistryName().toString(), getBiomeName(b), b.getTempCategory().name() , Boolean.toString(b.isHighHumidity()), Float.toString(b.getHeightVariation()), b.topBlock.getBlock().getRegistryName().toString() , BiomeDictionary.getTypes(b).stream().map(BiomeDictionary.Type::getName).collect(Collectors.joining("|")), b.getBiomeClass().toString())) .sorted(Comparator.naturalOrder()).collect(Collectors.toList()); }
public static boolean isRainingAt(World world, BlockPos pos) { Biome biome = world.getBiome(pos); Weather weather = HFApi.calendar.getWeather(world); return (weather.isRain() || (weather.isSnow() && biome.isHighHumidity())) && world.canBlockSeeSky(pos) && world.getPrecipitationHeight(pos).getY() <= pos.getY() && world.getBiome(pos).canRain(); } }
@SubscribeEvent public void getGrassColor(GetGrassColor event) { if (!event.getBiome().canRain() || event.getBiome().isHighHumidity()) return; int grass = HFTrackers.getCalendar(MCClientHelper.getWorld()).getSeasonData().grassColor; if (grass != 0) { event.setNewColor(CalendarHelper.getBlendedColour(grassToBlend, event.getOriginalColor(), grass)); } } }
@SubscribeEvent public void getFoliageColor(GetFoliageColor event) { if (!event.getBiome().canRain() || event.getBiome().isHighHumidity()) return; if (HFApi.calendar.getDate(MCClientHelper.getWorld()).getSeason() == Season.AUTUMN) { event.setNewColor(0xFF9900); } else { int leaves = HFTrackers.getCalendar(MCClientHelper.getWorld()).getSeasonData().leavesColor; if (leaves != 0) { event.setNewColor(CalendarHelper.getBlendedColour(leavesToBlend, event.getOriginalColor(), leaves)); } } }
@Override public boolean canSnowAt(@Nonnull BlockPos pos, boolean checkLight) { Biome biome = world.getBiome(pos); if (!biome.canRain() || biome.isHighHumidity()) { return super.canSnowAt(pos, checkLight); } else if (biome.isSnowyBiome()) { Weather weather = HFApi.calendar.getWeather(world); return !weather.isRain() && super.canSnowAt(pos, checkLight); } else { Weather weather = HFApi.calendar.getWeather(world); float f = biome.getFloatTemperature(pos); if (weather.isSnow() && f > 0.15F) { if (!checkLight) { return true; } else { if (pos.getY() >= 0 && pos.getY() < 256 && world.getLightFor(EnumSkyBlock.BLOCK, pos) < 10) { IBlockState iblockstate = world.getBlockState(pos); if (iblockstate.getBlock() != Blocks.SNOW_LAYER && iblockstate.getBlock().isReplaceable(world, pos) && Blocks.SNOW_LAYER.canPlaceBlockAt(world, pos)) { HFApi.tickable.addTickable(world, pos, SnowLoader.INSTANCE); return true; } } return false; } } else return super.canSnowAt(pos, checkLight); } }
if (k2 != l2) { Biome biome = mc.world.getBiome(blockpos$mutableblockpos); if (biome.canRain() && !biome.isHighHumidity()) { if (weather == Weather.BLIZZARD) { fogTarget = -20000;
@Override public boolean canBlockFreeze(@Nonnull BlockPos pos, boolean byWater) { Biome biome = world.getBiome(pos); if (!biome.canRain() || biome.isHighHumidity()) { return super.canBlockFreeze(pos, byWater); } else if (biome.isSnowyBiome()) {
renderer.random.setSeed((long)(l1 * l1 * 3121 + l1 * 45238971 ^ k1 * k1 * 418711 + k1 * 13761)); blockpos$mutableblockpos.setPos(l1, k2, k1); if ((!weather.isSnow() && !biome.isSnowyBiome()) || biome.isHighHumidity()) { if (j1 != 0) { if (j1 >= 0) {