Closed xxMattewxx closed 1 year ago
After writing a few more tests, looks like Extreme Hills Edge is also wrong. The following code outputs both Mushroom Field Shore and Extreme Hills Edge as different to vanilla output:
#include "./cubiomes-master/finders.h"
#include <sstream>
int validBiomes[] = {
plains, desert, extremeHills, forest, taiga,
icePlains, iceMountains, mushroomIsland, desertHills, forestHills,
taigaHills, extremeHillsEdge, jungle, jungleHills, jungleEdge,
stoneBeach, birchForest, birchForestHills, roofedForest, coldTaiga,
coldTaigaHills, megaTaiga, megaTaigaHills, extremeHillsPlus, savanna,
savannaPlateau, mesa, mesaPlateau_F, mesaPlateau, sunflower_plains,
desert_lakes, gravelly_mountains, flower_forest, taiga_mountains, ice_spikes,
modified_jungle, modified_jungle_edge, tall_birch_forest, tall_birch_hills,
dark_forest_hills, snowy_taiga_mountains, giant_spruce_taiga, giant_spruce_taiga_hills,
modified_gravelly_mountains, shattered_savanna, shattered_savanna_plateau, eroded_badlands,
modified_wooded_badlands_plateau, modified_badlands_plateau
};
int invalidBiomes[] = {
ocean, swampland, river, frozenOcean, frozenRiver,
mushroomIslandShore, beach, deepOcean, coldBeach, swamp_hills
};
void assert(int id, bool actual, bool expected) {
printf("-> Biome ID %d %s | Expected %d, got %d\n", id, actual == expected ? "passed" : "rejected", expected, actual);
if(actual != expected) exit(1);
}
int main(int argc, char** argv) {
Generator g;
setupGenerator(&g, MC_1_12_2, 0);
printf("Performing valid biome list check...\n");
for(int i = 0; i < sizeof(validBiomes) / sizeof(*validBiomes); i++) {
assert(validBiomes[i], isStrongholdBiome(MC_1_12, validBiomes[i]), true);
}
printf("Performing invalid biome list check...\n");
for(int i = 0; i < sizeof(invalidBiomes) / sizeof(*invalidBiomes); i++) {
assert(invalidBiomes[i], isStrongholdBiome(MC_1_12, invalidBiomes[i]), false);
}
return 0;
}
The mushroom_field_shore was indeed wrong for versions up to 1.12, and is fixed now. However, mountain_edge does not generate after version 1.7.
Passing the test now, tysm! (weird that the game includes mountain_edge in the valid biome list despite not actually generating it, but then again it also considers Hell and The End as valid ones lol)
Not sure about other MC versions, but Mushroom Island Shore isn't considered a valid stronghold biome in MC 1.12. Code below outputs start stronghold chunk as (60, 87), with the correct being (59, 89):
Adding
To the finders.c "is valid stronghold biome" function fixes the issue.