Java Code Examples for net.minecraft.world.biome.BiomeGenBase#getSpawnableList()
The following examples show how to use
net.minecraft.world.biome.BiomeGenBase#getSpawnableList() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChunkProviderTCOuter.java From Gadomancy with GNU Lesser General Public License v3.0 | 4 votes |
public List getPossibleCreatures(EnumCreatureType p_73155_1_, int p_73155_2_, int p_73155_3_, int p_73155_4_) { BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(p_73155_2_, p_73155_4_); return biomegenbase.getSpawnableList(p_73155_1_); }
Example 2
Source File: CommonProxy.java From Et-Futurum with The Unlicense | 4 votes |
public void registerEntities() { if (EtFuturum.enableBanners) GameRegistry.registerTileEntity(TileEntityBanner.class, Utils.getUnlocalisedName("banner")); if (EtFuturum.enableArmourStand) ModEntityList.registerEntity(EntityArmourStand.class, "wooden_armorstand", 0, EtFuturum.instance, 64, 1, true); if (EtFuturum.enableEndermite) ModEntityList.registerEntity(EntityEndermite.class, "endermite", 1, EtFuturum.instance, 64, 1, true, 1447446, 7237230); if (EtFuturum.enableChorusFruit) GameRegistry.registerTileEntity(TileEntityEndRod.class, Utils.getUnlocalisedName("end_rod")); if (EtFuturum.enableTippedArrows) ModEntityList.registerEntity(EntityTippedArrow.class, "tipped_arrow", 2, EtFuturum.instance, 64, 20, true); if (EtFuturum.enableBrewingStands) GameRegistry.registerTileEntity(TileEntityNewBrewingStand.class, Utils.getUnlocalisedName("brewing_stand")); if (EtFuturum.enableColourfulBeacons) GameRegistry.registerTileEntity(TileEntityNewBeacon.class, Utils.getUnlocalisedName("beacon")); if (EtFuturum.enableRabbit) { ModEntityList.registerEntity(EntityRabbit.class, "rabbit", 3, EtFuturum.instance, 80, 3, true, 10051392, 7555121); List<BiomeGenBase> biomes = new LinkedList<BiomeGenBase>(); label: for (BiomeGenBase biome : BiomeGenBase.getBiomeGenArray()) if (biome != null) // Check if pigs can spawn on this biome for (Object obj : biome.getSpawnableList(EnumCreatureType.creature)) if (obj instanceof SpawnListEntry) { SpawnListEntry entry = (SpawnListEntry) obj; if (entry.entityClass == EntityPig.class) { biomes.add(biome); continue label; } } EntityRegistry.addSpawn(EntityRabbit.class, 10, 3, 3, EnumCreatureType.creature, biomes.toArray(new BiomeGenBase[biomes.size()])); } if (EtFuturum.enableLingeringPotions) { ModEntityList.registerEntity(EntityLingeringPotion.class, "lingering_potion", 4, EtFuturum.instance, 64, 10, true); ModEntityList.registerEntity(EntityLingeringEffect.class, "lingering_effect", 5, EtFuturum.instance, 64, 1, true); } if (EtFuturum.enableVillagerZombies) ModEntityList.registerEntity(EntityZombieVillager.class, "villager_zombie", 6, EtFuturum.instance, 80, 3, true, 44975, 7969893); if (EtFuturum.enableDragonRespawn) { ModEntityList.registerEntity(EntityPlacedEndCrystal.class, "end_crystal", 7, EtFuturum.instance, 256, Integer.MAX_VALUE, false); ModEntityList.registerEntity(EntityRespawnedDragon.class, "ender_dragon", 8, EtFuturum.instance, 160, 3, true); } if (EtFuturum.enableShearableGolems) ModEntityList.registerEntity(EntityNewSnowGolem.class, "snow_golem", 9, EtFuturum.instance, 80, 3, true); }
Example 3
Source File: MoCChunkProviderWyvernLair.java From mocreaturesdev with GNU General Public License v3.0 | 4 votes |
/** * Returns a list of creatures of the specified type that can spawn at the given location. */ public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) { BiomeGenBase var5 = this.worldObj.getBiomeGenForCoords(par2, par4); return var5 == null ? null : var5.getSpawnableList(par1EnumCreatureType); }