Archived
0

удаление не используемых биомов

This commit is contained in:
2018-08-16 00:29:48 +03:00
parent dc9e3512e7
commit b4679a6536

View File

@@ -1,69 +1,12 @@
package mc.core.world;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import java.util.EnumSet;
@RequiredArgsConstructor
public enum Biome {
OCEAN(0, "Ocean", 0x0000cd),
PLAINS(1, "Plains", 0x008000),
DESERT(2, "Desert", 0xffe4b5),
EXTREME_HILLS(3, "Extreme hills", 0xffffff),
FOREST(4, "Forest", 0x006400),
TAIGA(5, "Taiga", 0xf0f8ff),
SWAMPLAND(6, "Swampland", 0x808000),
RIVER(7, "River", 0x0000cd),
HELL(8, "Hell", 0x800000),
SKY(9, "Sky", 0xffffff),
FROZEN_OCEAN(10, "Frozen ocean", 0xe0ffff),
FROZEN_RIVER(11, "Frozen river", 0xe0ffff),
ICE_PLAINS(12, "Ice plains", 0xfffafa),
ICE_MOUNTAINS(13, "Ice mountains", 0xfffafa),
MUSHROOM_ISLAND(14, "Mushroom island", 0xffffff),
MUSHROOM_ISLAND_SHORE(15, "Mushroom island shore", 0xffffff),
BEACH(16, "Beach", 0xffffff),
DESERT_HILLS(17, "Desert hills", 0xffe4b5),
FOREST_HILLS(18, "Forest hills", 0x006400),
TAIGA_HILLS(19, "Taiga hills", 0xf0f8ff),
EXTREME_HILLS_ED(20, "Extreme hills edge", 0xffffff),
JUNGLE(21, "Jungle", 0xadff2f),
JUNGLE_HILLS(22, "Jungle hills", 0xadff2f),
JUNGLE_HILLS_2(23, "Jungle hills", 0xadff2f), //WTF?
DEEP_OCEAN(24, "Deep ocean", 0x000080),
STONE_BEACH(25, "Stone beach", 0xffffff),
COLD_BEACH(26, "Cold beach", 0xffffff),
BIRCH_FOREST(27, "Birch forest", 0xffffff),
BIRCH_FOREST_HILLS(28, "Birch forest hills", 0xffffff),
DARK_FOREST(29, "Dark forest", 0xffffff),
COLD_TAIGA(30, "Cold taiga", 0xffffff),
COLD_TAIGA_HILLS(31, "Cold taiga hills", 0xffffff),
MEGA_TAIGA(32, "Mega taiga", 0xffffff),
MEGA_TAIGA_HILLS(33, "Mega taiga hills", 0xffffff),
EXTREME_HILLS_PLUS(34, "Extreme hills plus", 0xffffff),
SAVANNA(35, "Savana", 0xcd8513),
SAVANNA_PLATO(36, "Savana plato", 0x8b4513),
VOID(127, "Void", 0xffffff);
PLAINS(1);
@Getter
private final int id;
@Getter
private final String name;
@Getter
private final int color;
private final static EnumSet<Biome> waterBiomes = EnumSet.of(OCEAN, RIVER, FROZEN_OCEAN, FROZEN_RIVER, DEEP_OCEAN);
Biome(int id, String name, int color) {
this.id = id;
this.name = name;
this.color = color;
}
public static Biome getById(int id) {
return Biome.values()[id];
}
public static boolean isWaterBiome (Biome biome) {
return waterBiomes.contains(biome);
}
}