Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion biomenoise.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "tables/btree19.h"
#include "tables/btree20.h"
#include "tables/btree21wd.h"
#include "tables/btree262.h"

#include <stdlib.h>
#include <string.h>
Expand Down Expand Up @@ -1453,11 +1454,17 @@ int climateToBiome(int mc, const uint64_t np[6], uint64_t *dat)
btree21wd_steps, &btree21wd_param[0][0], btree21wd_nodes, btree21wd_order,
sizeof(btree21wd_nodes) / sizeof(uint64_t)
};
static const BiomeTree btree262 = {
btree262_steps, &btree262_param[0][0], btree262_nodes, btree262_order,
sizeof(btree262_nodes) / sizeof(uint64_t)
};

const BiomeTree *bt;
int idx;

if (mc >= MC_1_21_WD)
if (mc >= MC_26_2)
bt = &btree262;
else if (mc >= MC_1_21_WD)
bt = &btree21wd;
else if (mc >= MC_1_20_6)
bt = &btree20;
Expand Down
3 changes: 3 additions & 0 deletions biomes.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ int biomeExists(int mc, int id)
if (id >= small_end_islands && id <= end_barrens)
return 1;

if (id == sulfur_caves)
return mc >= MC_26_2;

if (id == pale_garden)
return mc >= MC_1_21_WD;

Expand Down
6 changes: 5 additions & 1 deletion biomes.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ enum MCVersion
MC_1_21_1,
MC_1_21_3,
MC_1_21_WD, // Winter Drop, version TBA
MC_26_1,
MC_26_2,
MC_1_21 = MC_1_21_WD,
MC_NEWEST = MC_1_21,
MC_NEWEST = MC_26_2,
};

enum Dimension
Expand Down Expand Up @@ -173,6 +175,8 @@ enum BiomeID
cherry_grove = 185,
// 1.21 Winter Drop
pale_garden = 186,
// 26.2 Chaos Cubed
sulfur_caves = 187,
};


Expand Down
12 changes: 12 additions & 0 deletions finders.c
Original file line number Diff line number Diff line change
Expand Up @@ -5470,6 +5470,10 @@ static const int g_biome_para_range_21wd_diff[][13] = {
{pale_garden , -1500, 2000, 3000, IMAX, 300, IMAX, -7799, 500, IMIN, IMAX, 2666, IMAX},
{-1,0,0,0,0,0,0,0,0,0,0,0,0}};

static const int g_biome_para_range_262_diff[][13] = {
{sulfur_caves , IMIN, IMAX, IMIN, IMAX, IMIN, IMAX, IMIN, IMAX, 2000, 9000, IMIN,-9500},
{-1,0,0,0,0,0,0,0,0,0,0,0,0}};


/**
* Gets the min/max parameter values within which a biome change can occur.
Expand Down Expand Up @@ -5508,6 +5512,14 @@ const int *getBiomeParaLimits(int mc, int id)
if (mc <= MC_1_17)
return NULL;
int i;
if (mc > MC_26_1)
{
for (i = 0; g_biome_para_range_262_diff[i][0] != -1; i++)
{
if (g_biome_para_range_262_diff[i][0] == id)
return &g_biome_para_range_262_diff[i][1];
}
}
if (mc > MC_1_21_3)
{
for (i = 0; g_biome_para_range_21wd_diff[i][0] != -1; i++)
Expand Down
Loading