Search in sources :

Example 1 with MobSpawnInfo

use of net.minecraft.world.biome.MobSpawnInfo in project Spackenmobs by ACGaming.

the class SpackenmobsEntities method addSpawn.

@SubscribeEvent(priority = EventPriority.HIGH)
public static void addSpawn(BiomeLoadingEvent event) {
    Biome biome = ForgeRegistries.BIOMES.getValue(event.getName());
    if (biome != null) {
        MobSpawnInfo info = biome.getMobSettings();
        List<MobSpawnInfo.Spawners> monster_spawns = event.getSpawns().getSpawner(EntityClassification.MONSTER);
        List<MobSpawnInfo.Spawners> creature_spawns = event.getSpawns().getSpawner(EntityClassification.CREATURE);
        for (Spawners entry : info.getMobs(EntityClassification.MONSTER)) {
            registerSpawn(monster_spawns, entry, ConfigurationHandler.SPAWN.apored_weight.get(), ConfigurationHandler.SPAWN.apored_min.get(), ConfigurationHandler.SPAWN.apored_max.get(), EntityType.SKELETON, SpackenmobsRegistry.APORED.get());
            registerSpawn(monster_spawns, entry, ConfigurationHandler.SPAWN.bakamitai_creeper_weight.get(), ConfigurationHandler.SPAWN.bakamitai_creeper_min.get(), ConfigurationHandler.SPAWN.bakamitai_creeper_max.get(), EntityType.CREEPER, SpackenmobsRegistry.BAKAMITAI_CREEPER.get());
            registerSpawn(monster_spawns, entry, ConfigurationHandler.SPAWN.drachenlord_weight.get(), ConfigurationHandler.SPAWN.drachenlord_min.get(), ConfigurationHandler.SPAWN.drachenlord_max.get(), EntityType.PIGLIN, SpackenmobsRegistry.DRACHENLORD.get());
            registerSpawn(monster_spawns, entry, ConfigurationHandler.SPAWN.islamist_weight.get(), ConfigurationHandler.SPAWN.islamist_min.get(), ConfigurationHandler.SPAWN.islamist_max.get(), EntityType.CREEPER, SpackenmobsRegistry.ISLAMIST.get());
            registerSpawn(monster_spawns, entry, ConfigurationHandler.SPAWN.marcell_davis_weight.get(), ConfigurationHandler.SPAWN.marcell_davis_min.get(), ConfigurationHandler.SPAWN.marcell_davis_max.get(), EntityType.ZOMBIE, SpackenmobsRegistry.MARCELLDAVIS.get());
            registerSpawn(monster_spawns, entry, ConfigurationHandler.SPAWN.mr_bean_weight.get(), ConfigurationHandler.SPAWN.mr_bean_min.get(), ConfigurationHandler.SPAWN.mr_bean_max.get(), EntityType.ZOMBIE, SpackenmobsRegistry.MRBEAN.get());
            registerSpawn(monster_spawns, entry, ConfigurationHandler.SPAWN.schalker_weight.get(), ConfigurationHandler.SPAWN.schalker_min.get(), ConfigurationHandler.SPAWN.schalker_max.get(), EntityType.SHULKER, SpackenmobsRegistry.SCHALKER.get());
            registerSpawn(monster_spawns, entry, ConfigurationHandler.SPAWN.smava_creeper_weight.get(), ConfigurationHandler.SPAWN.smava_creeper_min.get(), ConfigurationHandler.SPAWN.smava_creeper_max.get(), EntityType.CREEPER, SpackenmobsRegistry.SMAVA_CREEPER.get());
        }
        for (Spawners entry : info.getMobs(EntityClassification.CREATURE)) {
            registerSpawn(creature_spawns, entry, ConfigurationHandler.SPAWN.holzstammhuhn_weight.get(), ConfigurationHandler.SPAWN.holzstammhuhn_min.get(), ConfigurationHandler.SPAWN.holzstammhuhn_max.get(), EntityType.CHICKEN, SpackenmobsRegistry.HOLZSTAMMHUHN.get());
            registerSpawn(creature_spawns, entry, ConfigurationHandler.SPAWN.gisela_weight.get(), ConfigurationHandler.SPAWN.gisela_min.get(), ConfigurationHandler.SPAWN.gisela_max.get(), EntityType.SHEEP, SpackenmobsRegistry.GISELA.get());
            registerSpawn(creature_spawns, entry, ConfigurationHandler.SPAWN.jens_weight.get(), ConfigurationHandler.SPAWN.jens_min.get(), ConfigurationHandler.SPAWN.jens_max.get(), EntityType.PIG, SpackenmobsRegistry.JENS.get());
            registerSpawn(creature_spawns, entry, ConfigurationHandler.SPAWN.friedrich_weight.get(), ConfigurationHandler.SPAWN.friedrich_min.get(), ConfigurationHandler.SPAWN.friedrich_max.get(), EntityType.COW, SpackenmobsRegistry.FRIEDRICH_LIECHTENSTEIN.get());
            registerSpawn(creature_spawns, entry, ConfigurationHandler.SPAWN.mztewolf_weight.get(), ConfigurationHandler.SPAWN.mztewolf_min.get(), ConfigurationHandler.SPAWN.mztewolf_max.get(), EntityType.WOLF, SpackenmobsRegistry.MZTEWOLF.get());
        // registerSpawn(creature_spawns, entry, ConfigurationHandler.SPAWN.dagibee_weight.get(), ConfigurationHandler.SPAWN.dagibee_min.get(), ConfigurationHandler.SPAWN.dagibee_max.get(), EntityType.BEE, SpackenmobsRegistry.DAGIBEE.get());
        }
    }
}
Also used : Biome(net.minecraft.world.biome.Biome) Spawners(net.minecraft.world.biome.MobSpawnInfo.Spawners) MobSpawnInfo(net.minecraft.world.biome.MobSpawnInfo) SubscribeEvent(net.minecraftforge.eventbus.api.SubscribeEvent)

Aggregations

Biome (net.minecraft.world.biome.Biome)1 MobSpawnInfo (net.minecraft.world.biome.MobSpawnInfo)1 Spawners (net.minecraft.world.biome.MobSpawnInfo.Spawners)1 SubscribeEvent (net.minecraftforge.eventbus.api.SubscribeEvent)1