Last active
July 29, 2020 22:07
-
-
Save CorgiTaco/577bf84da9f33dd06b7a9fdeecb5129f to your computer and use it in GitHub Desktop.
An example biome in 1.16.2
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
package voronoiaoc.byg.common.biomes.biomes; | |
import net.minecraft.entity.EntityType; | |
import net.minecraft.entity.SpawnGroup; | |
import net.minecraft.sound.BiomeMoodSound; | |
import net.minecraft.world.biome.*; | |
import net.minecraft.world.gen.feature.DefaultBiomeFeatures; | |
import net.minecraft.world.gen.surfacebuilder.ConfiguredSurfaceBuilder; | |
import net.minecraft.world.gen.surfacebuilder.SurfaceBuilder; | |
import voronoiaoc.byg.common.biomes.BiomeHelper; | |
import voronoiaoc.byg.common.biomes.BiomeTools; | |
import voronoiaoc.byg.common.world.feature.biomefeatures.BYGFeatures; | |
import voronoiaoc.byg.common.world.feature.biomefeatures.BYGTreeFeatures; | |
import voronoiaoc.byg.core.byglists.BYGBiomeList; | |
import javax.annotation.Nullable; | |
import java.util.Optional; | |
import java.util.Random; | |
public class AncientForest extends Biome implements BiomeTools { | |
static final ConfiguredSurfaceBuilder<?> SURFACE_BUILDER = new ConfiguredSurfaceBuilder<>(SurfaceBuilder.DEFAULT, SurfaceBuilder.GRASS_CONFIG); | |
static final Precipitation PRECIPATATION = Precipitation.RAIN; | |
static final Category CATEGORY = Category.FOREST; | |
static final float DEPTH = 0.2F; | |
static final float SCALE = 0.05F; | |
static final float TEMPERATURE = 0.8F; | |
static final float DOWNFALL = 0.8F; | |
static final int WATER_COLOR = 4159204; | |
static final int WATER_FOG_COLOR = 329011; | |
static final String PARENT = null; | |
static final Weather WEATHER = new Weather(PRECIPATATION, TEMPERATURE, TemperatureModifier.NONE, DOWNFALL); | |
static final SpawnSettings.class_5496 SPAWN_SETTINGS = new SpawnSettings.class_5496(); | |
static final GenerationSettings.class_5495 GENERATION_SETTINGS = (new GenerationSettings.class_5495()).method_30996(SURFACE_BUILDER); | |
public AncientForest() { | |
super(WEATHER, CATEGORY, DEPTH, SCALE, (new BiomeEffects.Builder()).waterColor(WATER_COLOR).waterFogColor(WATER_FOG_COLOR).fogColor(12638463).skyColor(BiomeHelper.calcSkyColor(0.8F)).moodSound(BiomeMoodSound.CAVE).build(), GENERATION_SETTINGS.method_30987(), SPAWN_SETTINGS.method_31007(), Optional.ofNullable(PARENT)); | |
} | |
@Nullable | |
@Override | |
public Biome getHill() { | |
BYGBiomeList.FLOWERING_ANCIENT_FOREST; | |
} | |
@Override | |
public Biome getRiver() { | |
return Biomes.RIVER; | |
} | |
static { | |
DefaultBiomeFeatures.addDefaultUndergroundStructures(GENERATION_SETTINGS); | |
BYGTreeFeatures.addAncientTrees(GENERATION_SETTINGS); | |
BYGTreeFeatures.addMeadowTrees(GENERATION_SETTINGS); | |
BYGTreeFeatures.addShrubs(GENERATION_SETTINGS); | |
BYGTreeFeatures.addHugeMushrooms(GENERATION_SETTINGS); | |
DefaultBiomeFeatures.addLandCarvers(GENERATION_SETTINGS); | |
DefaultBiomeFeatures.addDungeons(GENERATION_SETTINGS); | |
DefaultBiomeFeatures.addMineables(GENERATION_SETTINGS); | |
DefaultBiomeFeatures.addDefaultOres(GENERATION_SETTINGS); | |
DefaultBiomeFeatures.addDefaultDisks(GENERATION_SETTINGS); | |
DefaultBiomeFeatures.addDefaultMushrooms(GENERATION_SETTINGS); | |
DefaultBiomeFeatures.addDefaultVegetation(GENERATION_SETTINGS); | |
DefaultBiomeFeatures.addFrozenTopLayer(GENERATION_SETTINGS); | |
BYGFeatures.addGrass(GENERATION_SETTINGS); | |
BYGFeatures.addLolliPop(GENERATION_SETTINGS); | |
BYGFeatures.addBYGMushrooms(GENERATION_SETTINGS); | |
BYGFeatures.addFairyslipper(GENERATION_SETTINGS); | |
BYGFeatures.addFairyslipper(GENERATION_SETTINGS); | |
BYGFeatures.addBlackRose(GENERATION_SETTINGS); | |
BYGFeatures.addRose(GENERATION_SETTINGS); | |
BYGFeatures.addLushBlueberries(GENERATION_SETTINGS); | |
SPAWN_SETTINGS.method_31011(SpawnGroup.CREATURE, new SpawnSettings.SpawnEntry(EntityType.PIG, 10, 4, 4)); | |
SPAWN_SETTINGS.method_31011(SpawnGroup.CREATURE, new SpawnSettings.SpawnEntry(EntityType.WOLF, 8, 4, 4)); | |
SPAWN_SETTINGS.method_31011(SpawnGroup.CREATURE, new SpawnSettings.SpawnEntry(EntityType.RABBIT, 4, 2, 3)); | |
SPAWN_SETTINGS.method_31011(SpawnGroup.CREATURE, new SpawnSettings.SpawnEntry(EntityType.FOX, 8, 2, 4)); | |
SPAWN_SETTINGS.method_31011(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.BAT, 10, 8, 8)); | |
SPAWN_SETTINGS.method_31011(SpawnGroup.MONSTER, new SpawnSettings.SpawnEntry(EntityType.CAVE_SPIDER, 100, 4, 4)); | |
SPAWN_SETTINGS.method_31011(SpawnGroup.MONSTER, new SpawnSettings.SpawnEntry(EntityType.SLIME, 100, 4, 4)); | |
SPAWN_SETTINGS.method_31011(SpawnGroup.MONSTER, new SpawnSettings.SpawnEntry(EntityType.ENDERMAN, 10, 1, 4)); | |
SPAWN_SETTINGS.method_31011(SpawnGroup.MONSTER, new SpawnSettings.SpawnEntry(EntityType.WITCH, 5, 1, 1)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment