Skip to content

Commit

Permalink
patch 2.4.1
Browse files Browse the repository at this point in the history
fixed wrong nether portal variants for 1.17-
fixed a crash when using nether or end biome filters with scale 1:4
fixed invalid warning when enabling reference exclusion with a radial area
changed maximum scale limit, increasing it to 1:4096
  • Loading branch information
Cubitect committed Sep 12, 2022
1 parent debd2f4 commit 36baaff
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 26 deletions.
2 changes: 1 addition & 1 deletion cubiomes
Submodule cubiomes updated 4 files
+44 −60 finders.c
+28 −61 layers.c
+2 −2 layers.h
+0 −9 tests.c
2 changes: 1 addition & 1 deletion src/aboutdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define VERS_MAJOR 2
#define VERS_MINOR 4
#define VERS_PATCH 0 // negative patch number designates a development version
#define VERS_PATCH 1 // negative patch number designates a development version

// returns +1 if newer, -1 if older and 0 if equal
inline int cmpVers(int major, int minor, int patch)
Expand Down
2 changes: 1 addition & 1 deletion src/mapview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ void MapView::wheelEvent(QWheelEvent *e)
{
const qreal ang = e->angleDelta().y() / 8; // e->delta() / 8;
blocks2pix *= pow(2, ang/100);
qreal scalemin = 128.0, scalemax = 1.0 / 1024.0;
qreal scalemin = 128.0, scalemax = 1.0 / 4096.0;
if (blocks2pix > scalemin) blocks2pix = scalemin;
if (blocks2pix < scalemax) blocks2pix = scalemax;
update();//repaint();
Expand Down
2 changes: 1 addition & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ testCondAt(
{
StructureVariant vt;
if (st == Ruined_Portal || st == Ruined_Portal_N)
id = getBiomeAt(&gen->g, 4, pc.x >> 2, 0, pc.z >> 2);
id = getBiomeAt(&gen->g, 4, (pc.x >> 2) + 2, 0, (pc.z >> 2) + 2);
getVariant(&vt, st, gen->mc, gen->seed, pc.x, pc.z, id);
if (!cond->isVariantOk(gen->mc, st, vt))
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/searchthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ bool SearchMaster::set(
return false;
}
}
if (c.skipref && c.x1 == 0 && c.x2 == 0 && c.z1 == 0 && c.z2 == 0)
if (c.skipref && c.rmax == 0 && c.x1 == 0 && c.x2 == 0 && c.z1 == 0 && c.z2 == 0)
{
QMessageBox::warning(parent, tr("Warning"),
tr("Condition %1 ignores its only location of size 1.")
Expand Down
29 changes: 8 additions & 21 deletions src/world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void getStructs(std::vector<VarPos> *out, const StructureConfig sconf,
}
else if (sconf.structType == Ruined_Portal || sconf.structType == Ruined_Portal_N)
{
id = getBiomeAt(&g, 4, p.x >> 2, 0, p.z >> 2);
id = getBiomeAt(&g, 4, (p.x >> 2) + 2, 0, (p.z >> 2) + 2);
}
else if (sconf.structType == Fortress)
{
Expand Down Expand Up @@ -554,38 +554,25 @@ void QWorld::setDim(int dim, int layeropt)
l.cells.swap(todel);
}

int pixs;
if (g.mc >= MC_1_18)
int pixs, lcnt;
if (g.mc >= MC_1_18 || dim != DIM_OVERWORLD)
{
pixs = 128;
lcnt = 6;
qual = 2.0;
}
else
{
pixs = 512;
lcnt = 5;
qual = 1.0;
}

activelv = -1;
lvb.clear();

if (dim == 0)
{
lvb.resize(5);
lvb[0].init4map(this, pixs, 1);
lvb[1].init4map(this, pixs, 4);
lvb[2].init4map(this, pixs, 16);
lvb[3].init4map(this, pixs, 64);
lvb[4].init4map(this, pixs, 256);
}
else
{
lvb.resize(4);
lvb[0].init4map(this, pixs, 1);
lvb[1].init4map(this, pixs, 4);
lvb[2].init4map(this, pixs, 16);
lvb[3].init4map(this, pixs, 64);
}
lvb.resize(lcnt);
for (int i = 0, scale = 1; i < lcnt; i++, scale *= 4)
lvb[i].init4map(this, pixs, scale);
}


Expand Down

0 comments on commit 36baaff

Please sign in to comment.