/** * Creates an instance that provides access to the default settings of the * vanilla biome with the given id. * * @param biomeId The id of the biome. * @return The settings. */ public static MojangSettings fromId(int biomeId) { return fromBiomeBase(Biome.getBiomeForId(biomeId)); }
/** If unknown biome, auto-registers a texture set. If null, returns default set. */ public TextureSet getTextureSet(Tile tile) { if (tile == null) return defaultTexture; if (tile.biomeID >= 0) { Biome biome = Biome.getBiomeForId(tile.biomeID); checkRegistration(biome); return biomeTextureMap.getOrDefault(biome, defaultTexture); } else { checkRegistration(tile.biomeID); return pseudoBiomeTextureMap.get(tile.biomeID); } }
@Override public void setBiomeTexture(int biomeID, TextureSet textureSet) { BiomeTextureMap.instance().setTexture(Biome.getBiomeForId(biomeID), textureSet); }
Biome biome1 = Biome.getBiomeForId((int)p_175330_2_ + 2); return biome1 != null ? biome1.getBiomeName() : "?"; Biome biome = Biome.getBiomeForId((int)p_175330_2_); return biome != null ? biome.getBiomeName() : "?";
if (topBlock == Blocks.WATER && !swampBiomes.contains(Biome.getBiomeForId(biomeID))) { int occurrence = biomeOccurrences.getOrDefault(waterPoolBiomeID, 0) + priorityWaterPool; biomeOccurrences.put(waterPoolBiomeID, occurrence); if (biomeID >= 0 && Biome.getBiomeForId(biomeID) != null) { int occurrence = biomeOccurrences.getOrDefault(biomeID, 0) + priorityForBiome(Biome.getBiomeForId(biomeID)); biomeOccurrences.put(biomeID, occurrence);
@Override public void setBiomeTexture(int biomeID, String textureSetName, ResourceLocation... textures) { TextureSet set = new TextureSet(textureSetName, textures); TextureSetMap.instance().register(set); BiomeTextureMap.instance().setTexture(Biome.getBiomeForId(biomeID), set); }
if (biomeID >= 0 && biomeID < biomesCount && Biome.getBiomeForId(biomeID) != null) { biomeOccurrences[biomeID] += priorityForBiome(Biome.getBiomeForId(biomeID));
@Override @SideOnly(Side.CLIENT) protected void process(EntityPlayer player, Side side) { for (Entry<String, Integer> entry : nameToIdMap.entrySet()) { String tileName = entry.getKey(); int id = entry.getValue(); // Remove old texture mapping int oldID = ExtTileIdMap.instance().getPseudoBiomeID(tileName); if (oldID != ExtTileIdMap.NOT_FOUND && oldID != id) { BiomeTextureMap.instance().setTexture(Biome.getBiomeForId(oldID), null); } ExtTileIdMap.instance().setPseudoBiomeID(tileName, id); // Register new texture mapping TextureSet texture = ExtTileTextureMap.instance().getTexture(tileName); BiomeTextureMap.instance().setTexture(id, texture); } MinecraftForge.EVENT_BUS.post(new TileIdRegisteredEvent(nameToIdMap)); } }
if (biomeID >= 0 && biomeID < biomesCount && Biome.getBiomeForId(biomeID) != null) { biomeOccurrences[biomeID] += priorityForBiome(Biome.getBiomeForId(biomeID));
if (biomeId <= -1 || Biome.getBiomeForId(biomeId) == null) { sender.sendMessage(new TextComponentString(TextFormatting.RED + "Invalid Biome ID")); return; Biome biome = Biome.getBiomeForId(biomeId); String biomeName = getBiomeName(biome); sender.sendMessage(new TextComponentString(