Added 1.7.2 biomes and trees.

This commit is contained in:
wizjany 2013-12-24 18:15:24 -05:00
parent b3f2c10f79
commit d5831ea37b
4 changed files with 51 additions and 11 deletions

View File

@ -116,7 +116,7 @@
<dependency> <!-- Bukkit implementation --> <dependency> <!-- Bukkit implementation -->
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId> <artifactId>bukkit</artifactId>
<version>1.5.1-R0.2</version> <version>1.7.2-R0.2</version>
<scope>compile</scope> <scope>compile</scope>
<type>jar</type> <type>jar</type>
<optional>true</optional> <optional>true</optional>

View File

@ -30,7 +30,45 @@ public enum BukkitBiomeType implements BiomeType {
TAIGA_HILLS(Biome.TAIGA_HILLS), TAIGA_HILLS(Biome.TAIGA_HILLS),
SMALL_MOUNTAINS(Biome.SMALL_MOUNTAINS), SMALL_MOUNTAINS(Biome.SMALL_MOUNTAINS),
JUNGLE(Biome.JUNGLE), JUNGLE(Biome.JUNGLE),
JUNGLE_HILLS(Biome.JUNGLE_HILLS); JUNGLE_HILLS(Biome.JUNGLE_HILLS),
JUNGLE_EDGE(Biome.JUNGLE_EDGE),
DEEP_OCEAN(Biome.DEEP_OCEAN),
STONE_BEACH(Biome.STONE_BEACH),
COLD_BEACH(Biome.COLD_BEACH),
BIRCH_FOREST(Biome.BIRCH_FOREST),
BIRCH_FOREST_HILLS(Biome.BIRCH_FOREST_HILLS),
ROOFED_FOREST(Biome.ROOFED_FOREST),
COLD_TAIGA(Biome.COLD_TAIGA),
COLD_TAIGA_HILLS(Biome.COLD_TAIGA_HILLS),
MEGA_TAIGA(Biome.MEGA_TAIGA),
MEGA_TAIGA_HILLS(Biome.MEGA_TAIGA_HILLS),
EXTREME_HILLS_PLUS(Biome.EXTREME_HILLS_PLUS),
SAVANNA(Biome.SAVANNA),
SAVANNA_PLATEAU(Biome.SAVANNA_PLATEAU),
MESA(Biome.MESA),
MESA_PLATEAU_FOREST(Biome.MESA_PLATEAU_FOREST),
MESA_PLATEAU(Biome.MESA_PLATEAU),
SUNFLOWER_PLAINS(Biome.SUNFLOWER_PLAINS),
DESERT_MOUNTAINS(Biome.DESERT_MOUNTAINS),
FLOWER_FOREST(Biome.FLOWER_FOREST),
TAIGA_MOUNTAINS(Biome.TAIGA_MOUNTAINS),
SWAMPLAND_MOUNTAINS(Biome.SWAMPLAND_MOUNTAINS),
ICE_PLAINS_SPIKES(Biome.ICE_PLAINS_SPIKES),
JUNGLE_MOUNTAINS(Biome.JUNGLE_MOUNTAINS),
JUNGLE_EDGE_MOUNTAINS(Biome.JUNGLE_EDGE_MOUNTAINS),
COLD_TAIGA_MOUNTAINS(Biome.COLD_TAIGA_MOUNTAINS),
SAVANNA_MOUNTAINS(Biome.SAVANNA_MOUNTAINS),
SAVANNA_PLATEAU_MOUNTAINS(Biome.SAVANNA_PLATEAU_MOUNTAINS),
MESA_BRYCE(Biome.MESA_BRYCE),
MESA_PLATEAU_FOREST_MOUNTAINS(Biome.MESA_PLATEAU_FOREST_MOUNTAINS),
MESA_PLATEAU_MOUNTAINS(Biome.MESA_PLATEAU_MOUNTAINS),
BIRCH_FOREST_MOUNTAINS(Biome.BIRCH_FOREST_MOUNTAINS),
BIRCH_FOREST_HILLS_MOUNTAINS(Biome.BIRCH_FOREST_HILLS_MOUNTAINS),
ROOFED_FOREST_MOUNTAINS(Biome.ROOFED_FOREST_MOUNTAINS),
MEGA_SPRUCE_TAIGA(Biome.MEGA_SPRUCE_TAIGA),
EXTREME_HILLS_MOUNTAINS(Biome.EXTREME_HILLS_MOUNTAINS),
EXTREME_HILLS_PLUS_MOUNTAINS(Biome.EXTREME_HILLS_PLUS_MOUNTAINS),
MEGA_SPRUCE_TAIGA_HILLS(Biome.MEGA_SPRUCE_TAIGA_HILLS);
private Biome bukkitBiome; private Biome bukkitBiome;

View File

@ -876,14 +876,6 @@ public class BukkitWorld extends LocalWorld {
new EnumMap<TreeGenerator.TreeType, TreeType>(TreeGenerator.TreeType.class); new EnumMap<TreeGenerator.TreeType, TreeType>(TreeGenerator.TreeType.class);
static { static {
// Mappings for new TreeType values not yet in Bukkit
treeTypeMapping.put(TreeGenerator.TreeType.SWAMP, TreeType.TREE);
treeTypeMapping.put(TreeGenerator.TreeType.JUNGLE_BUSH, TreeType.TREE);
try {
treeTypeMapping.put(TreeGenerator.TreeType.SHORT_JUNGLE, TreeType.valueOf("SMALL_JUNGLE"));
} catch (IllegalArgumentException e) {
treeTypeMapping.put(TreeGenerator.TreeType.SHORT_JUNGLE, TreeType.TREE);
}
for (TreeGenerator.TreeType type : TreeGenerator.TreeType.values()) { for (TreeGenerator.TreeType type : TreeGenerator.TreeType.values()) {
try { try {
TreeType bukkitType = TreeType.valueOf(type.name()); TreeType bukkitType = TreeType.valueOf(type.name());
@ -893,6 +885,7 @@ public class BukkitWorld extends LocalWorld {
} }
} }
// Other mappings for WE-specific values // Other mappings for WE-specific values
treeTypeMapping.put(TreeGenerator.TreeType.SHORT_JUNGLE, TreeType.SMALL_JUNGLE);
treeTypeMapping.put(TreeGenerator.TreeType.RANDOM, TreeType.BROWN_MUSHROOM); treeTypeMapping.put(TreeGenerator.TreeType.RANDOM, TreeType.BROWN_MUSHROOM);
treeTypeMapping.put(TreeGenerator.TreeType.RANDOM_REDWOOD, TreeType.REDWOOD); treeTypeMapping.put(TreeGenerator.TreeType.RANDOM_REDWOOD, TreeType.REDWOOD);
treeTypeMapping.put(TreeGenerator.TreeType.PINE, TreeType.REDWOOD); treeTypeMapping.put(TreeGenerator.TreeType.PINE, TreeType.REDWOOD);

View File

@ -56,11 +56,20 @@ public class TreeGenerator {
} }
}, },
JUNGLE("Jungle", "jungle"), JUNGLE("Jungle", "jungle"),
SHORT_JUNGLE("Short jungle", "shortjungle", "smalljungle"), SMALL_JUNGLE("Small jungle", "shortjungle", "smalljungle"),
SHORT_JUNGLE("Short jungle") {
public boolean generate(EditSession editSession, Vector pos) throws MaxChangedBlocksException {
return SMALL_JUNGLE.generate(editSession, pos);
}
},
JUNGLE_BUSH("Jungle bush", "junglebush", "jungleshrub"), JUNGLE_BUSH("Jungle bush", "junglebush", "jungleshrub"),
RED_MUSHROOM("Red Mushroom", "redmushroom", "redgiantmushroom"), RED_MUSHROOM("Red Mushroom", "redmushroom", "redgiantmushroom"),
BROWN_MUSHROOM("Brown Mushroom", "brownmushroom", "browngiantmushroom"), BROWN_MUSHROOM("Brown Mushroom", "brownmushroom", "browngiantmushroom"),
SWAMP("Swamp", "swamp", "swamptree"), SWAMP("Swamp", "swamp", "swamptree"),
ACACIA("Acacia", "acacia"),
DARK_OAK("Dark Oak", "darkoak"),
MEGA_REDWOOD("Mega Redwood", "megaredwood"),
TALL_BIRCH("Tall Birch", "tallbirch"),
RANDOM("Random", "rand", "random" ) { RANDOM("Random", "rand", "random" ) {
public boolean generate(EditSession editSession, Vector pos) throws MaxChangedBlocksException { public boolean generate(EditSession editSession, Vector pos) throws MaxChangedBlocksException {
TreeType[] choices = new TreeType[] { TreeType[] choices = new TreeType[] {