private List<EntityType> getSpawnableEntities(EnumCreatureType creatureType) { List<EntityType> entityTypes = new ArrayList<EntityType>(); for (BiomeBase.BiomeMeta meta : (List<BiomeBase.BiomeMeta>) biomeBase.getMobs(creatureType)) { entityTypes.add(EntityType.fromId(ENTITY_CLASS_ID_MAP.get(meta.b))); } return entityTypes; }
public void changeBlockBiome(Location location) { int x = location.getBlockX(); int z = location.getBlockZ(); World world = ((CraftWorld) location.getWorld()).getHandle(); if (world.isLoaded(new BlockPosition(x, 0, z))) { Chunk chunk = world.getChunkAtWorldCoords(new BlockPosition(x, 0, z)); if (chunk != null) { byte[] biomevals = chunk.getBiomeIndex(); biomevals[((z & 0xF) << 4) | (x & 0xF)] = (byte) BiomeBase.a(biomeBase); } } }
/** * Gets the spawn list of the given biome for the given category. * * @param biome The biome. * @param type The category. * @return The spawn list for the given category. */ public static List<WeightedMobSpawnGroup> getListFromMinecraftBiome( BiomeBase biome, EntityCategory type) { Collection<BiomeMeta> mobList = biome.getMobs(toEnumCreatureType(type)); return fromMinecraftList(mobList); }
public float getTemperature() { return biomeBase.getTemperature(); }
public float getHumidity() { return biomeBase.getHumidity(); }