Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.meepshadow.mysticsbiomes.core.MysticsBiomes;
- import net.minecraft.entity.EntityClassification;
- import net.minecraft.entity.EntityType;
- import net.minecraft.util.RegistryKey;
- import net.minecraft.util.ResourceLocation;
- import net.minecraft.util.registry.Registry;
- import net.minecraft.world.biome.*;
- import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilders;
- import net.minecraftforge.common.BiomeManager;
- import net.minecraftforge.fml.RegistryObject;
- import net.minecraftforge.registries.DeferredRegister;
- import net.minecraftforge.registries.ForgeRegistries;
- public class ModBiomes {
- public static ResourceLocation STRAWBERRY_FIELD_LOC = new ResourceLocation(MysticsBiomes.MOD_ID,"strawberry_field");
- public static RegistryKey<Biome> STRAWBERRY_FIELD;
- public static final DeferredRegister<Biome> BIOMES = DeferredRegister.create(ForgeRegistries.BIOMES, MysticsBiomes.MOD_ID);
- public static final RegistryObject<Biome> makeStrawberryFieldBiome = BIOMES.register("strawberry_field", ModBiomes::makeStrawberryFieldBiome);
- public static Biome makeStrawberryFieldBiome(){
- MobSpawnInfo.Builder spawns = new MobSpawnInfo.Builder();
- spawns.withSpawner(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.RABBIT, 100, 2, 4));
- spawns.withSpawner(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.COW, 50, 1, 3));
- spawns.withSpawner(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.HORSE, 50, 1, 6));
- BiomeGenerationSettings.Builder builder = (new BiomeGenerationSettings.Builder()).withSurfaceBuilder(ConfiguredSurfaceBuilders.field_244178_j);
- DefaultBiomeFeatures.withMonsterRoom(builder);
- DefaultBiomeFeatures.withOverworldOres(builder);
- return (new Biome.Builder()).precipitation(Biome.RainType.NONE).category(Biome.Category.PLAINS).depth(0.1F).scale(0.2F).temperature(0.5F).downfall(0.4F).setEffects((new BiomeAmbience.Builder()).setWaterColor(4159204).setWaterFogColor(329011).setFogColor(0xbec4ee).withSkyColor(0xbec4ee).setMoodSound(MoodSoundAmbience.DEFAULT_CAVE).build()).withMobSpawnSettings(spawns.copy()).withGenerationSettings(builder.build()).build();
- }
- public static void setupBiomes() {
- STRAWBERRY_FIELD = RegistryKey.getOrCreateKey(Registry.BIOME_KEY, STRAWBERRY_FIELD_LOC);
- BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(STRAWBERRY_FIELD, 10));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement