Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
13380f6
feat: integrate Minecraft 26.2-snapshot-8 support and relative build …
May 23, 2026
72519aa
fix: add sulfur_caves to underground biome mask for surface height wa…
May 24, 2026
7c7f100
Potential fix for pull request finding
linussztuka2011 May 27, 2026
07cb53b
Add GitHub Actions workflow for build and release
linussztuka2011 Jun 1, 2026
a9aba85
Fix Windows/MSVC compilation errors to make codebase cross-platform
Jun 1, 2026
9207639
fix(windows): resolve recursive nmake compilation failure by compilin…
linussztuka2011 Jun 1, 2026
87d9a51
fix(windows): use cubiomes_util.c wrapper to avoid naming collision w…
linussztuka2011 Jun 1, 2026
c9fa780
test: add automated integration test for sulfur_caves and MC_26_2_S8
Gemini-bot Jun 1, 2026
6b076b1
fix: quote CUPATH in QMAKE_PRE_LINK to support spaces in directory pa…
Gemini-bot Jun 1, 2026
6e8a13c
Merge pull request #4 from linussztuka2011/gemini-test-integration
linussztuka2011 Jun 1, 2026
9a371ed
test: AI integration verification for Issue #5 (#6)
linussztuka2011 Jun 1, 2026
3dba4b8
Revert "test: AI integration verification for Issue #5 (#6)" (#7)
linussztuka2011 Jun 1, 2026
5d363e5
Fix Windows release build by packaging required Qt DLLs via windeploy…
linussztuka2011 Jun 6, 2026
346ce4c
Fix ubuntu-latest Actions build by using system Qt toolchain (#11)
Copilot Jun 6, 2026
4958a9f
Update cubiomes submodule to fix Woodland Mansion and Pale Garden spa…
linussztuka2011 Jun 7, 2026
8baa19f
Fix sulfur_caves generation and filter out unassigned version ? entri…
linussztuka2011 Jun 9, 2026
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
76 changes: 76 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build and Release

on:
push:
tags:
- 'v*' # Startet den Build, sobald du ein Tag erstellst, das mit "v" beginnt (z.B. v1.0.0)

permissions:
contents: write

jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
qt-version: '5.15.2'
- os: windows-latest
qt-version: '5.15.2'

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive # Holt automatisch das wichtige "cubiomes" Submodul

- name: Install Qt
if: matrix.os == 'windows-latest'
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt-version }}
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
archives: 'qtbase qttools'

# Build für Linux (Ubuntu)
- name: Build (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev qtbase5-dev qt5-qmake qttools5-dev-tools
qmake cubiomes-viewer.pro
make
# Verpackt die ausführbare Datei (sucht im Root und im bin-Ordner)
if [ -f "cubiomes-viewer" ]; then
tar -czvf cubiomes-viewer-linux.tar.gz cubiomes-viewer
elif [ -f "bin/cubiomes-viewer" ]; then
tar -czvf cubiomes-viewer-linux.tar.gz bin/cubiomes-viewer
fi

# Build für Windows
- name: Build (Windows)
if: matrix.os == 'windows-latest'
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
qmake cubiomes-viewer.pro CONFIG+=release
nmake
mkdir cubiomes-viewer
copy release\cubiomes-viewer.exe cubiomes-viewer\ || copy debug\cubiomes-viewer.exe cubiomes-viewer\ || copy cubiomes-viewer.exe cubiomes-viewer\
windeployqt --dir cubiomes-viewer cubiomes-viewer\cubiomes-viewer.exe --compiler-runtime --no-translations --no-system-d3d-compiler --no-opengl-sw --no-angle
powershell "Compress-Archive -Path cubiomes-viewer -DestinationPath cubiomes-viewer-windows.zip"

# Lädt die fertigen Dateien automatisch in das GitHub-Release hoch
- name: Upload Release Assets
uses: softprops/action-gh-release@v2
with:
files: |
cubiomes-viewer-linux.tar.gz
cubiomes-viewer-windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion cubiomes
Submodule cubiomes updated 5 files
+15 −1 biomenoise.c
+3 −0 biomes.c
+4 −1 biomes.h
+13 −0 finders.c
+7 −0 util.c
45 changes: 36 additions & 9 deletions cubiomes-viewer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,32 @@ QT += core widgets
#QMAKE_CC = clang
#QMAKE_CXX = clang++

CHARSET = -finput-charset=UTF-8 -fexec-charset=UTF-8
QMAKE_CFLAGS = $$CHARSET -fwrapv -DSTRUCT_CONFIG_OVERRIDE=1
win32-msvc*: {
CHARSET = /utf-8
QMAKE_CFLAGS = $$CHARSET -DSTRUCT_CONFIG_OVERRIDE=1
} else {
CHARSET = -finput-charset=UTF-8 -fexec-charset=UTF-8
QMAKE_CFLAGS = $$CHARSET -fwrapv -DSTRUCT_CONFIG_OVERRIDE=1
}
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_RELEASE *= -O3 -g3

!win32-msvc*: {
QMAKE_CXXFLAGS_RELEASE *= -O3 -g3
greaterThan(QT_MAJOR_VERSION, 5) {
QMAKE_CXXFLAGS += -std=gnu++17
} else {
QMAKE_CXXFLAGS += -std=gnu++11
}
}
greaterThan(QT_MAJOR_VERSION, 5) {
QMAKE_CXXFLAGS += -std=gnu++17
DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x050F00
} else {
QMAKE_CXXFLAGS += -std=gnu++11
equals(QMAKE_CXX, g++) {
QMAKE_CXXFLAGS += -Wno-deprecated-copy
}
}

win32: {
win32-g++: {
CONFIG += static_gnu

# thank you nullprogram for dealing with the Windows UTF-16 nonsense
Expand All @@ -36,6 +46,8 @@ win32: {
QMAKE_EXTRA_TARGETS += libwinsane
PRE_TARGETDEPS += libwinsane
LIBS += $$LIBWINSANE/libwinsane.o
} else:win32 {
# On MSVC, skip libwinsane
} else {
DEFINES += "LUA_USE_POSIX=1"
}
Expand Down Expand Up @@ -65,9 +77,24 @@ CONFIG(debug, debug|release): {

# compile cubiomes
CUPATH = $$PWD/cubiomes
QMAKE_PRE_LINK += $(MAKE) -C $$CUPATH -f $$CUPATH/makefile CC=\"$$QMAKE_CC\" CFLAGS=\"$(CFLAGS) $$QMAKE_CFLAGS\" $$CUTARGET
QMAKE_CLEAN += $$CUPATH/*.o $$CUPATH/libcubiomes.a
LIBS += $$CUPATH/libcubiomes.a -lm

win32-msvc*: {
# On MSVC compile cubiomes directly as part of the project
INCLUDEPATH += $$CUPATH
SOURCES += \
$$CUPATH/noise.c \
$$CUPATH/biomes.c \
$$CUPATH/layers.c \
$$CUPATH/biomenoise.c \
$$CUPATH/generator.c \
$$CUPATH/finders.c \
src/cubiomes_util.c \
$$CUPATH/quadbase.c
} else {
QMAKE_PRE_LINK += $(MAKE) -C \"$$CUPATH\" -f makefile CC=\"$$QMAKE_CC\" CFLAGS=\"$(CFLAGS) $$QMAKE_CFLAGS\" $$CUTARGET
QMAKE_CLEAN += $$CUPATH/*.o $$CUPATH/libcubiomes.a
LIBS += $$CUPATH/libcubiomes.a -lm
}

LUAPATH = $$PWD/lua/src

Expand Down
3 changes: 2 additions & 1 deletion src/conditiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,8 @@ bool ConditionDialog::warnIfBad(Condition cond)
uint64_t underground =
(1ULL << (dripstone_caves-128)) |
(1ULL << (lush_caves-128)) |
(1ULL << (deep_dark-128));
(1ULL << (deep_dark-128)) |
(1ULL << (sulfur_caves-128));
Comment on lines 942 to +946
if ((m & underground) && cond.y > 246)
{
int button = warn(this, tr("Bad Surface Height"),
Expand Down
2 changes: 2 additions & 0 deletions src/cubiomes_util.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Wrapper to compile cubiomes' util.c with a unique object name to avoid conflict with src/util.cpp
#include "cubiomes/util.c"
5 changes: 4 additions & 1 deletion src/formsearchcontrol.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include "formsearchcontrol.h"
#include "ui_formsearchcontrol.h"

#include <cstddef>


#include "mainwindow.h"
#include "message.h"
#include "rangedialog.h"
Expand Down Expand Up @@ -643,7 +646,7 @@ int FormSearchControl::searchResultsAdd(std::vector<uint64_t> seeds, bool counto
sthread.stopSearch();
discarded = true;
}
if (n + (ssize_t)seeds.size() > config.maxMatching)
if (n + (std::ptrdiff_t)seeds.size() > config.maxMatching)
{
sthread.stopSearch();
discarded = true;
Expand Down
2 changes: 2 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,8 @@ void MainWindow::setMCList(bool experimental)
QStringList mclist;
for (int mc = MC_NEWEST; mc > MC_UNDEF; mc--)
{
if (strcmp(mc2str(mc), "?") == 0)
continue;
if (!experimental && mc != wi.mc)
{
if (mc <= MC_1_0 || mc == MC_1_16_1 || mc == MC_1_19_2 || mc == MC_1_21_1 || mc == MC_1_21_WD)
Expand Down
2 changes: 2 additions & 0 deletions src/search.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define _USE_MATH_DEFINES
#include <cmath>
#include "search.h"

#include "config.h"
Expand Down
18 changes: 17 additions & 1 deletion src/search.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@
#include <QMap>
#include <atomic>

#ifdef _MSC_VER
#include <intrin.h>
static inline int __builtin_ctzll(unsigned long long mask)
{
unsigned long index;
if (_BitScanForward64(&index, mask))
return index;
return 64;
}
static inline int __builtin_popcountll(unsigned long long mask)
{
return (int)__popcnt64(mask);
}
#endif


enum
{
CAT_NONE,
Expand Down Expand Up @@ -634,7 +650,7 @@ struct /*__attribute__((packed))*/ Condition
float confidence;

// generated members - initialized when the search is started
uint8_t generated_start[0]; // address dummy
uint8_t generated_start; // address dummy
BiomeFilter bf;

// perform version upgrades
Expand Down
5 changes: 5 additions & 0 deletions src/seedtables.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

#include <inttypes.h>

#ifndef __GNUC__
#define __attribute__(x)
#endif


// Quad monument bases are too expensive to generate on the fly and there are
// so few of them that they can be hard coded, rather than loading from a file.
static const uint64_t g_qm_90[] = {
Expand Down
2 changes: 2 additions & 0 deletions src/tablocations.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define _USE_MATH_DEFINES
#include <cmath>
#include "tablocations.h"
#include "ui_tablocations.h"

Expand Down
2 changes: 2 additions & 0 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ QString getBiomeDisplay(int mc, int id)
case cherry_grove: return QApplication::translate("Biome", "Cherry Grove");
// 1.21.3 (Winter Drop Version TBA)
case pale_garden: return QApplication::translate("Biome", "Pale Garden");
// 26.2-snapshot-8
case sulfur_caves: return QApplication::translate("Biome", "Sulfur Caves");
}
const char *name = biome2str(mc, id);
return name ? name : "";
Expand Down
61 changes: 61 additions & 0 deletions test_sulfur.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#include "cubiomes/biomes.h"
#include "cubiomes/generator.h"
#include "cubiomes/finders.h"
#include "cubiomes/util.h"
#include <stdio.h>
#include <stdlib.h>

int main() {
printf("Starting automated verification for MC_26_2_S8 and sulfur_caves...\n");

// 1. Check if the version constant exists
int mc_version = MC_26_2_S8;
printf("MC_26_2_S8 version mapped successfully.\n");

// 2. Check if the biome constant exists
int biome_id = sulfur_caves;
if (biome_id == 187) {
printf("sulfur_caves ID correctly mapped to 187.\n");
} else {
printf("FAIL: sulfur_caves ID is %d (expected 187).\n", biome_id);
return 1;
}

// 3. Setup generator for the new version
Generator g;
setupGenerator(&g, mc_version, 0);
applySeed(&g, DIM_OVERWORLD, 123456789ULL);
printf("Generator setup successfully for MC_26_2_S8.\n");

// 4. Verify biome name translation string
const char* biome_str = biome2str(mc_version, biome_id);
if (biome_str != NULL) {
printf("Biome translation string: '%s'\n", biome_str);
} else {
printf("FAIL: Biome string translation missing.\n");
return 1;
}

// 5. Verify the existence of the parameter ranges in the multi-noise setup
// For Sulfur Caves, the parameter limits should be present.
double tmin, tmax;
// We do a rudimentary generation test at a specific coordinate just to ensure no crashes
int generated_biome = getBiomeAt(&g, 1, 0, -32, 0);
printf("Successfully sampled biome at spawn (y=-32): ID %d (%s)\n", generated_biome, biome2str(mc_version, generated_biome));

// 6. Explicitly test multi-noise climateToBiome parameter matching
printf("Testing climateToBiome matching for sulfur_caves...\n");
uint64_t np[6] = {1500, 0, 0, 0, 1500, 1500}; // temp=1500, humid=0, continental=0, erosion=0, depth=1500, weirdness=1500
uint64_t dat = 0;
extern int climateToBiome(int mc, const uint64_t np[6], uint64_t *dat);
int match_biome = climateToBiome(mc_version, np, &dat);
if (match_biome == sulfur_caves) {
printf("SUCCESS: climateToBiome correctly returned sulfur_caves for matching parameters.\n");
} else {
printf("FAIL: climateToBiome returned %d (%s) instead of sulfur_caves.\n", match_biome, biome2str(mc_version, match_biome));
return 1;
}

printf("\nAll automated tests PASSED. The implementation is robust and works perfectly!\n");
return 0;
}