Skip to content

Commit

Permalink
Improved stitching and automatic biome selection. Bumped version to 4.1.
Browse files Browse the repository at this point in the history
All default biomes are set by default. Renamed some texture sets.
  • Loading branch information
Hunternif committed Feb 4, 2015
1 parent 39a89b3 commit dab30fe
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 43 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {

apply plugin: 'forge'

version = "4.0.1a-1.7.10"
version = "4.1-1.7.10"
group= "hunternif.mc.atlas" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "antiqueatlas"

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hunternif/mc/atlas/AntiqueAtlasMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class AntiqueAtlasMod {
public static final String ID = "antiqueatlas";
public static final String NAME = "Antique Atlas";
public static final String CHANNEL = ID;
public static final String VERSION = "4.0.1a-1.7.10";
public static final String VERSION = "4.1-1.7.10";

@Instance(ID)
public static AntiqueAtlasMod instance;
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/hunternif/mc/atlas/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ private void registerDefaultTextureSets(TextureSetMap map) {
map.register(ICE);
map.register(SHORE);
map.register(ROCK_SHORE);
map.register(SAND);
map.register(DESERT);
map.register(PLAINS);
map.register(HILLS);
map.register(SAND_HILLS);
map.register(DESERT_HILLS);

map.register(ICE_SPIKES);
map.register(SNOW_PINES);
Expand Down Expand Up @@ -130,7 +130,7 @@ private void registerDefaultTextureSets(TextureSetMap map) {
map.register(PINES_HILLS);
map.register(SAVANNA);
map.register(SAVANNA_CLIFFS);
map.register(SAVANNA_PLATEAU_M);
map.register(PLATEAU_SAVANNA_M);
map.register(MESA);
map.register(BRYCE);
map.register(PLATEAU_MESA);
Expand Down Expand Up @@ -163,19 +163,19 @@ private void assignVanillaBiomeTextures() {
api.setBiomeTexture(beach, SHORE);
api.setBiomeTexture(coldBeach, SHORE);
api.setBiomeTexture(stoneBeach, ROCK_SHORE);
api.setBiomeTexture(desert, SAND);
api.setBiomeTexture(desert.biomeID + 128, SAND);
api.setBiomeTexture(desertHills, SAND_HILLS);
api.setBiomeTexture(desert, DESERT);
api.setBiomeTexture(desert.biomeID + 128, DESERT);
api.setBiomeTexture(desertHills, DESERT_HILLS);
api.setBiomeTexture(plains, PLAINS);
api.setBiomeTexture(plains.biomeID + 128, SUNFLOWERS);
api.setBiomeTexture(icePlains, SNOW);
api.setBiomeTexture(icePlains.biomeID + 128, ICE_SPIKES); // this is a biome mutation
api.setBiomeTexture(iceMountains, SNOW_HILLS);
api.setBiomeTexture(extremeHills, MOUNTAINS);
api.setBiomeTexture(extremeHillsEdge, MOUNTAINS);
api.setBiomeTexture(extremeHills.biomeID + 128, MOUNTAINS_SNOW_CAPS);
api.setBiomeTexture(extremeHillsPlus, MOUNTAINS_ALL);
api.setBiomeTexture(extremeHillsPlus.biomeID + 128, MOUNTAINS_SNOW_CAPS);
api.setBiomeTexture(iceMountains, SNOW_HILLS);
api.setBiomeTexture(forest, FOREST);
api.setBiomeTexture(forest.biomeID + 128, FOREST_FLOWERS);
api.setBiomeTexture(forestHills, FOREST_HILLS);
Expand All @@ -191,8 +191,10 @@ private void assignVanillaBiomeTextures() {
api.setBiomeTexture(jungleEdge, JUNGLE_EDGE);
api.setBiomeTexture(jungleEdge.biomeID + 128, JUNGLE_EDGE_HILLS);
api.setBiomeTexture(taiga, PINES);
api.setBiomeTexture(taiga.biomeID + 128, PINES_HILLS);
api.setBiomeTexture(taigaHills, PINES_HILLS);
api.setBiomeTexture(coldTaiga, SNOW_PINES);
api.setBiomeTexture(coldTaiga.biomeID + 128, SNOW_PINES_HILLS);
api.setBiomeTexture(coldTaigaHills, SNOW_PINES_HILLS);
api.setBiomeTexture(megaTaiga, MEGA_TAIGA);
api.setBiomeTexture(megaTaiga.biomeID + 128, MEGA_SPRUCE);
Expand All @@ -213,7 +215,7 @@ private void assignVanillaBiomeTextures() {
api.setBiomeTexture(mesaPlateau.biomeID + 128, PLATEAU_MESA_LOW);
api.setBiomeTexture(mesaPlateau_F.biomeID + 128, PLATEAU_MESA_TREES_LOW);
api.setBiomeTexture(savannaPlateau, PLATEAU_SAVANNA);
api.setBiomeTexture(savannaPlateau.biomeID + 128, SAVANNA_PLATEAU_M);
api.setBiomeTexture(savannaPlateau.biomeID + 128, PLATEAU_SAVANNA_M);
}

/** Load default marker textures. */
Expand Down
125 changes: 98 additions & 27 deletions src/main/java/hunternif/mc/atlas/client/BiomeTextureMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,49 +71,120 @@ private void autoRegister(int biomeID) {
return;
}
List<Type> types = Arrays.asList(BiomeDictionary.getTypesForBiome(biome));
// 1. Swamp
if (types.contains(Type.SWAMP)) {
setTexture(biomeID, SWAMP);
} else if (types.contains(Type.WATER)) {
// Water + trees = swamp
if (types.contains(Type.FOREST) || types.contains(Type.JUNGLE) || types.contains(Type.SWAMP)) {
if (types.contains(Type.HILLS)) {
setTexture(biomeID, SWAMP_HILLS);
} else {
setTexture(biomeID, SWAMP);
}
}
// 2. Water
else if (types.contains(Type.WATER)) {
// Water + trees = swamp
if (types.contains(Type.FOREST) || types.contains(Type.JUNGLE)) {
if (types.contains(Type.HILLS)) {
setTexture(biomeID, SWAMP_HILLS);
} else {
setTexture(biomeID, SWAMP);
}
} else if (types.contains(Type.SNOWY)){
setTexture(biomeID, ICE);
} else {
setTexture(biomeID, WATER);
}
} else if (types.contains(Type.MOUNTAIN)) {
setTexture(biomeID, MOUNTAINS);
} else if (types.contains(Type.HILLS)) {
if (types.contains(Type.FOREST)) {
// Frozen forest automatically counts as pines:
if (types.contains(Type.SNOWY)) {
setTexture(biomeID, PINES_HILLS);
} else {
setTexture(biomeID, DENSE_FOREST_HILLS);
}
} else if (types.contains(Type.JUNGLE)) {
}
// 3. Shore
else if (types.contains(Type.BEACH)){
if (types.contains(Type.MOUNTAIN)) {
setTexture(biomeID, ROCK_SHORE);
} else {
setTexture(biomeID, SHORE);
}
}
// 4. Jungle
else if (types.contains(Type.JUNGLE)) {
if (types.contains(Type.MOUNTAIN)) {
setTexture(biomeID, JUNGLE_CLIFFS);
} else if (types.contains(Type.HILLS)) {
setTexture(biomeID, JUNGLE_HILLS);
} else {
setTexture(biomeID, HILLS);
setTexture(biomeID, JUNGLE);
}
} else if (types.contains(Type.JUNGLE)) {
setTexture(biomeID, JUNGLE);
} else if (types.contains(Type.FOREST)) {
// Frozen forest automatically counts as pines:
if (types.contains(Type.SNOWY)) {
}
// 5. Savanna
else if (types.contains(Type.SAVANNA)) {
if (types.contains(Type.MOUNTAIN) || types.contains(Type.HILLS)) {
setTexture(biomeID, SAVANNA_CLIFFS);
} else {
setTexture(biomeID, SAVANNA);
}
}
// 6. Pines
else if (types.contains(Type.CONIFEROUS)) {
if (types.contains(Type.MOUNTAIN) || types.contains(Type.HILLS)) {
setTexture(biomeID, PINES_HILLS);
} else {
setTexture(biomeID, PINES);
}
}
// 7. Mesa
else if (types.contains(Type.MESA)) {
if (types.contains(Type.MOUNTAIN)) {
setTexture(biomeID, BRYCE);
} else {
setTexture(biomeID, DENSE_FOREST);
setTexture(biomeID, MESA);
}
} else if (types.contains(Type.SANDY) || types.contains(Type.WASTELAND)) {
}
// 8. General forest
else if (types.contains(Type.FOREST)) {
// Frozen forest automatically counts as pines:
if (types.contains(Type.SNOWY)) {
setTexture(biomeID, SNOW);
if (types.contains(Type.HILLS)) {
setTexture(biomeID, SNOW_PINES_HILLS);
} else {
setTexture(biomeID, SNOW_PINES);
}
} else {
setTexture(biomeID, SAND);
// All unknown forests are dense:
if (types.contains(Type.HILLS)) {
setTexture(biomeID, DENSE_FOREST_HILLS);
} else {
setTexture(biomeID, DENSE_FOREST);
}
}
}
// 9. Various plains
else if (types.contains(Type.PLAINS) || types.contains(Type.WASTELAND)) {
if (types.contains(Type.SNOWY) || types.contains(Type.COLD)) {
if (types.contains(Type.MOUNTAIN)) {
setTexture(biomeID, MOUNTAINS_SNOW_CAPS);
} else if (types.contains(Type.HILLS)) {
setTexture(biomeID, SNOW_HILLS);
} else {
setTexture(biomeID, SNOW);
}
} else {
if (types.contains(Type.HILLS) || types.contains(Type.MOUNTAIN)) {
setTexture(biomeID, DESERT_HILLS);
} else {
setTexture(biomeID, DESERT);
}
}
}
// 10. General mountains
else if (types.contains(Type.MOUNTAIN)) {
setTexture(biomeID, MOUNTAINS_NAKED);
}
// 11. General hills
else if (types.contains(Type.HILLS)) {
if (types.contains(Type.SNOWY) || types.contains(Type.COLD)) {
setTexture(biomeID, SNOW_HILLS);
} else if (types.contains(Type.SANDY)) {
setTexture(biomeID, DESERT_HILLS);
} else {
setTexture(biomeID, HILLS);
}
} else if (types.contains(Type.BEACH)){
setTexture(biomeID, SHORE);
} else {
setTexture(biomeID, defaultTexture);
}
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/hunternif/mc/atlas/client/TextureSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class TextureSet {
public static final TextureSet ICE = standard("ICE", TILE_ICE_NOBORDER);
public static final TextureSet SHORE = new TextureSetShore("SHORE", TILE_SHORE, TILE_SHORE2, TILE_SHORE3);
public static final TextureSet ROCK_SHORE = new TextureSetShore("ROCK_SHORE", TILE_ROCK_SHORE);
public static final TextureSet SAND = standard("SAND", TILE_SAND, TILE_SAND, TILE_SAND2, TILE_SAND2,
public static final TextureSet DESERT = standard("DESERT", TILE_SAND, TILE_SAND, TILE_SAND2, TILE_SAND2,
TILE_SAND3, TILE_SAND3, TILE_CACTI, TILE_SAND_BUSHES, TILE_SAND_BUSHES);
public static final TextureSet PLAINS = standard("PLAINS", TILE_GRASS, TILE_GRASS2, TILE_GRASS3, TILE_GRASS4);
public static final TextureSet SUNFLOWERS = standard("SUNFLOWERS", TILE_SUNFLOWERS, TILE_SUNFLOWERS2, TILE_GRASS3, TILE_GRASS4);
Expand All @@ -37,7 +37,7 @@ public class TextureSet {
TILE_MOUNTAINS3, TILE_MOUNTAINS4, TILE_SNOW_CAPS, TILE_SNOW_CAPS);

public static final TextureSet HILLS = standard("HILLS", TILE_HILLS);
public static final TextureSet SAND_HILLS = standard("SAND_HILLS", TILE_HILLS, TILE_HILLS, TILE_HILLS, TILE_HILLS_BUSHES, TILE_HILLS_CACTI);
public static final TextureSet DESERT_HILLS = standard("DESERT_HILLS", TILE_HILLS, TILE_HILLS, TILE_HILLS, TILE_HILLS_BUSHES, TILE_HILLS_CACTI);
public static final TextureSet FOREST = standard("FOREST", TILE_FOREST, TILE_FOREST2, TILE_FOREST3);
public static final TextureSet FOREST_HILLS = standard("FOREST_HILLS", TILE_FOREST_HILLS, TILE_FOREST_HILLS2, TILE_FOREST_HILLS3);
public static final TextureSet FOREST_FLOWERS = standard("FOREST_FLOWERS", TILE_FOREST_FLOWERS, TILE_FOREST_FLOWERS2, TILE_FOREST_FLOWERS3);
Expand All @@ -61,9 +61,6 @@ public class TextureSet {
TILE_GRASS3, TILE_GRASS3, TILE_GRASS4, TILE_GRASS4, TILE_SAVANNA, TILE_SAVANNA2, TILE_SAVANNA3);
public static final TextureSet SAVANNA_CLIFFS = standard("SAVANNA_CLIFFS", TILE_CLIFFS,
TILE_SAVANNA_CLIFFS, TILE_SAVANNA_CLIFFS2, TILE_SAVANNA_CLIFFS3);
public static final TextureSet SAVANNA_PLATEAU_M = standard("SAVANNA_PLATEAU_M",
TILE_PLATEAU_GRASS, TILE_PLATEAU_GRASS2, TILE_PLATEAU_GRASS3, TILE_PLATEAU_SAVANNA2, TILE_PLATEAU_SAVANNA3,
TILE_CLIFFS_CLOUDS, TILE_SAVANNA_CLIFFS_CLOUDS, TILE_SAVANNA_CLIFFS_CLOUDS2, TILE_SAVANNA_CLIFFS_CLOUDS3);
public static final TextureSet MESA = standard("MESA", TILE_MESA, TILE_MESA2, TILE_MESA3, TILE_MESA4, TILE_SAND_BUSHES);
public static final TextureSet BRYCE = standard("BRYCE", TILE_BRYCE, TILE_BRYCE2, TILE_BRYCE3, TILE_BRYCE4);
public static final TextureSet PLATEAU_MESA = standard("PLATEAU_MESA", TILE_PLATEAU_MESA, TILE_PLATEAU_MESA2);
Expand All @@ -73,6 +70,9 @@ public class TextureSet {
public static final TextureSet PLATEAU_SAVANNA = standard("PLATEAU_SAVANNA", TILE_PLATEAU_GRASS, TILE_PLATEAU_GRASS,
TILE_PLATEAU_GRASS2, TILE_PLATEAU_GRASS2, TILE_PLATEAU_GRASS3, TILE_PLATEAU_GRASS3,
TILE_PLATEAU_SAVANNA, TILE_PLATEAU_SAVANNA2, TILE_PLATEAU_SAVANNA3);
public static final TextureSet PLATEAU_SAVANNA_M = standard("PLATEAU_SAVANNA_M",
TILE_PLATEAU_GRASS, TILE_PLATEAU_GRASS2, TILE_PLATEAU_GRASS3, TILE_PLATEAU_SAVANNA2, TILE_PLATEAU_SAVANNA3,
TILE_CLIFFS_CLOUDS, TILE_SAVANNA_CLIFFS_CLOUDS, TILE_SAVANNA_CLIFFS_CLOUDS2, TILE_SAVANNA_CLIFFS_CLOUDS3);

public static final TextureSet MEGA_SPRUCE = standard("MEGA_SPRUCE", TILE_MEGA_SPRUCE, TILE_MEGA_SPRUCE2);
public static final TextureSet MEGA_SPRUCE_HILLS = standard("MEGA_SPRUCE_HILLS", TILE_MEGA_SPRUCE_HILLS, TILE_MEGA_SPRUCE_HILLS2);
Expand All @@ -94,7 +94,9 @@ public class TextureSet {
SNOW.stitchTo(SNOW_PINES, SNOW_HILLS, ICE_SPIKES, SNOW_PINES_HILLS);
SNOW_PINES.stitchTo(SNOW, SNOW_HILLS, ICE_SPIKES, SNOW_PINES_HILLS);
stitchMutually(MOUNTAINS, MOUNTAINS_NAKED, MOUNTAINS_SNOW_CAPS, MOUNTAINS_ALL);
SAND.stitchTo(MESA, BRYCE);
DESERT.stitchTo(MESA, BRYCE);
stitchMutually(PLATEAU_MESA, PLATEAU_MESA_TREES, PLATEAU_SAVANNA, PLATEAU_SAVANNA_M);
stitchMutually(PLATEAU_MESA_LOW, PLATEAU_MESA_TREES_LOW);
}

/** Name of the texture pack to write in the config file. */
Expand Down

0 comments on commit dab30fe

Please sign in to comment.