Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 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
75de53d
Update README.md
linussztuka2011 Jun 21, 2026
ca6824f
Improve integration for Sulfur Caves and MC 26.2-snapshot-8 (#18)
linussztuka2011 Jul 2, 2026
b0acbca
Add ad-hoc codesign to macdeployqt (#19)
linussztuka2011 Jul 14, 2026
fce7c09
Complete integration of MC_26_2_S8 and new biomes (#15)
linussztuka2011 Jul 14, 2026
4034bbd
Fix Windows CI linker resolution in `windows-latest` build job (#20)
Copilot Jul 15, 2026
f504c86
Fix macOS arm64 Qt build break from missing `__yield` declaration (#22)
Copilot Jul 15, 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
108 changes: 108 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Build and Release

on:
push:
tags:
- 'v*'

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'
artifact: cubiomes-viewer-linux.tar.gz
- os: windows-latest
qt-version: '5.15.2'
artifact: cubiomes-viewer-windows.zip

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Qt (Windows)
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'

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

- name: Setup MSVC
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1

- name: Build (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev
qmake cubiomes-viewer.pro CONFIG+=release
make
ls -R
if [ -f "cubiomes-viewer" ]; then
tar -czvf cubiomes-viewer-linux.tar.gz cubiomes-viewer
elif [ -f "release/cubiomes-viewer" ]; then
tar -czvf cubiomes-viewer-linux.tar.gz -C release cubiomes-viewer
elif [ -f "bin/cubiomes-viewer" ]; then
tar -czvf cubiomes-viewer-linux.tar.gz -C bin cubiomes-viewer
else
echo "Executable not found!"
find . -maxdepth 2 -executable -type f
exit 1
fi

- name: Build (Windows)
if: matrix.os == 'windows-latest'
shell: cmd
run: |
if not defined VCToolsInstallDir (echo VCToolsInstallDir is not set & exit /b 1)
set "PATH=%VCToolsInstallDir%\bin\Hostx64\x64;%PATH%"
where link
qmake cubiomes-viewer.pro CONFIG+=release
nmake
dir /s
mkdir cubiomes-viewer
if exist release\cubiomes-viewer.exe (
copy release\cubiomes-viewer.exe cubiomes-viewer\
) else if exist debug\cubiomes-viewer.exe (
copy debug\cubiomes-viewer.exe cubiomes-viewer\
) else if exist cubiomes-viewer.exe (
copy cubiomes-viewer.exe cubiomes-viewer\
) else (
echo Executable not found!
dir /s *.exe
exit 1
)
windeployqt --dir cubiomes-viewer cubiomes-viewer\cubiomes-viewer.exe --compiler-runtime --no-translations --no-system-d3d-compiler --no-opengl-sw --no-angle
7z a -tzip "${{ matrix.artifact }}" cubiomes-viewer\

- name: Upload Release Assets
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.artifact }}
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/macos-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Deploy
working-directory: ${{env.SOURCE_DIR}}
run: |
macdeployqt ${{env.PROG}}.app -dmg -no-plugins
macdeployqt ${{env.PROG}}.app -dmg -no-plugins -codesign=-
- name: Test
working-directory: ${{env.SOURCE_DIR}}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ main releases up to 1.21.

## Download

Precompiled binaries can be found in the [releases section](https://github.com/Cubitect/cubiomes-viewer/releases)
Precompiled binaries can be found in the [releases section](https://github.com/linussztuka2011/cubiomes-viewer/releases)
on GitHub. This includes single file executables, which are statically
linked against [Qt](https://www.qt.io).

A Flatpak for the tool is available on
(Not updated, not forked) A Flatpak for the tool is available on
[Flathub](https://flathub.org/apps/details/com.github.cubitect.cubiomes-viewer).

For Arch Linux users, the tool may be found in the
(Not updated, not forked) For Arch Linux users, the tool may be found in the
[AUR](https://aur.archlinux.org/packages/cubiomes-viewer) thanks to
[JakobDev](https://github.com/JakobDev).

Expand Down
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
48 changes: 39 additions & 9 deletions cubiomes-viewer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,35 @@ 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
}
}
macx {
QMAKE_CXXFLAGS += -include arm_acle.h
}
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 +49,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 +80,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
9 changes: 7 additions & 2 deletions src/conditiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,13 @@ bool ConditionDialog::warnIfBad(Condition cond)
uint64_t underground =
(1ULL << (dripstone_caves-128)) |
(1ULL << (lush_caves-128)) |
(1ULL << (deep_dark-128));
if ((m & underground) && cond.y > 246)
(1ULL << (deep_dark-128)) |
(1ULL << (sulfur_caves-128));
Comment on lines 942 to +946
if (((m & underground) ||
((cond.type == F_BIOME_CENTER || cond.type == F_BIOME_CENTER_256) &&
(cond.biomeId == dripstone_caves || cond.biomeId == lush_caves ||
cond.biomeId == deep_dark || cond.biomeId == sulfur_caves))) &&
cond.y > 246)
{
int button = warn(this, tr("Bad Surface Height"),
tr("Cave biomes do not generate above Y = 246.\nThe sampling height should be lowered."),
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
4 changes: 3 additions & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,11 @@ 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)
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 || mc == MC_26_2_S8)
continue;
}
mclist.append(mc2str(mc));
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