Package com.cryptomorin.xseries
Enum XBiome
- All Implemented Interfaces:
Serializable
,Comparable<XBiome>
,java.lang.constant.Constable
public enum XBiome extends Enum<XBiome>
XBiome - Cross-version support for biome names.
Biomes: https://minecraft.gamepedia.com/Biome Biome: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Biome.html
Biomes: https://minecraft.gamepedia.com/Biome Biome: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Biome.html
- Version:
- 1.1.1
- Author:
- Crypto Morin
- See Also:
Biome
-
Nested Class Summary
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and Type Method Description boolean
anyMatchLegacy(String biome)
Checks if the given string matches any of this biome's legacy biome names.static boolean
contains(String biome)
Checks if XBiome enum and the legacy names contains a biome with this name.static Optional<XBiome>
matchXBiome(String biome)
Parses the XBiome with the given name.static XBiome
matchXBiome(org.bukkit.block.Biome biome)
Parses the XBiome with the given bukkit biome.org.bukkit.block.Biome
parseBiome()
Parses the XBiome as aBiome
based on the server version.CompletableFuture<Void>
setBiome(org.bukkit.Chunk chunk)
Sets the biome of the chunk.CompletableFuture<Void>
setBiome(org.bukkit.Location start, org.bukkit.Location end)
Change the biome in the selected region.static XBiome
valueOf(String name)
Returns the enum constant of this type with the specified name.static XBiome[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BADLANDS
-
BADLANDS_PLATEAU
-
BEACH
-
BIRCH_FOREST
-
BIRCH_FOREST_HILLS
-
COLD_OCEAN
-
DARK_FOREST
-
DARK_FOREST_HILLS
-
DEEP_COLD_OCEAN
-
DEEP_FROZEN_OCEAN
-
DEEP_LUKEWARM_OCEAN
-
DEEP_OCEAN
-
DEEP_WARM_OCEAN
-
DESERT
-
DESERT_HILLS
-
DESERT_LAKES
-
END_BARRENS
-
END_HIGHLANDS
-
END_MIDLANDS
-
ERODED_BADLANDS
-
FLOWER_FOREST
-
FOREST
-
FROZEN_OCEAN
-
FROZEN_RIVER
-
GIANT_SPRUCE_TAIGA
-
GIANT_SPRUCE_TAIGA_HILLS
-
GIANT_TREE_TAIGA
-
GIANT_TREE_TAIGA_HILLS
-
GRAVELLY_MOUNTAINS
-
ICE_SPIKES
-
JUNGLE
-
JUNGLE_EDGE
-
JUNGLE_HILLS
-
LUKEWARM_OCEAN
-
MODIFIED_BADLANDS_PLATEAU
-
MODIFIED_GRAVELLY_MOUNTAINS
-
MODIFIED_JUNGLE
-
MODIFIED_JUNGLE_EDGE
-
MODIFIED_WOODED_BADLANDS_PLATEAU
-
MOUNTAINS
-
MOUNTAIN_EDGE
-
MUSHROOM_FIELDS
-
MUSHROOM_FIELD_SHORE
-
SOUL_SAND_VALLEY
-
CRIMSON_FOREST
-
WARPED_FOREST
-
BASALT_DELTAS
-
NETHER_WASTES
-
OCEAN
-
PLAINS
-
RIVER
-
SAVANNA
-
SAVANNA_PLATEAU
-
SHATTERED_SAVANNA
-
SHATTERED_SAVANNA_PLATEAU
-
SMALL_END_ISLANDS
-
SNOWY_BEACH
-
SNOWY_MOUNTAINS
-
SNOWY_TAIGA
-
SNOWY_TAIGA_HILLS
-
SNOWY_TAIGA_MOUNTAINS
-
SNOWY_TUNDRA
-
STONE_SHORE
-
SUNFLOWER_PLAINS
-
SWAMP
-
SWAMP_HILLS
-
TAIGA
-
TAIGA_HILLS
-
TAIGA_MOUNTAINS
-
TALL_BIRCH_FOREST
-
TALL_BIRCH_HILLS
-
THE_END
-
THE_VOID
-
WARM_OCEAN
-
WOODED_BADLANDS_PLATEAU
-
WOODED_HILLS
-
WOODED_MOUNTAINS
-
BAMBOO_JUNGLE
-
BAMBOO_JUNGLE_HILLS
-
-
Field Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
contains
Checks if XBiome enum and the legacy names contains a biome with this name.- Parameters:
biome
- name of the biome- Returns:
- true if XBiome enum has this biome.
- Since:
- 1.0.0
-
matchXBiome
Parses the XBiome with the given name.- Parameters:
biome
- the name of the biome.- Returns:
- a matched XBiome.
- Since:
- 1.0.0
-
matchXBiome
Parses the XBiome with the given bukkit biome.- Parameters:
biome
- the Bukkit biome.- Returns:
- a matched biome.
- Throws:
IllegalArgumentException
- may be thrown as an unexpected exception.- Since:
- 1.0.0
-
anyMatchLegacy
Checks if the given string matches any of this biome's legacy biome names.- Parameters:
biome
- the biome name to check- Returns:
- true if it's one of the legacy names.
- Since:
- 1.0.0
-
parseBiome
Parses the XBiome as aBiome
based on the server version.- Returns:
- the vanilla biome.
- Since:
- 1.0.0
-
setBiome
Sets the biome of the chunk. If the chunk is not generated/loaded already, it'll be generated and loaded. Note that this doesn't send any update packets to the nearby clients.- Parameters:
chunk
- the chunk to change the biome.- Since:
- 1.0.0
-
setBiome
@Nonnull public CompletableFuture<Void> setBiome(@Nonnull org.bukkit.Location start, @Nonnull org.bukkit.Location end)Change the biome in the selected region. Unloaded chunks will be ignored. Note that this doesn't send any update packets to the nearby clients.- Parameters:
start
- the start position.end
- the end position.- Since:
- 1.0.0
-