Java Wrapper for cubiomes
This repository has been archived on 2026-08-20. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Java 74.2%
  • C 25.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-05-11 21:47:08 +02:00
gradle/wrapper update gradle 2025-01-30 20:22:28 +01:00
src fix typo in BiomeID version history comment 2025-02-05 22:57:59 +01:00
.gitignore enable windows build 2024-06-29 02:56:53 +02:00
.gitmodules initial commit 2024-06-23 06:53:39 +02:00
build.gradle version 0.0.6 2025-01-30 20:57:26 +01:00
gradlew update gradle 2025-01-30 20:22:28 +01:00
gradlew.bat update gradle 2025-01-30 20:22:28 +01:00
LICENSE add license file 2024-07-01 00:17:22 +02:00
README.md Update README.md 2026-05-11 21:47:08 +02:00
settings.gradle initial commit 2024-06-23 06:53:39 +02:00

cubiomes-java

Note

I'm archiving this repository because cubiomes is no longer updated and the generated Java bindings in xpple/cubiomes work pretty well. On the downside function calls are a bit uglier, but on the upside all functions are available without additional work.

A Java wrapper for cubiomes using JNI. The goal is to be able to use it from within minecraft mods.

This project builds a native library that is included in the jar and extracted at runtime. The library is compiled for x86_64 Linux and Windows (see Cross Compiling for Windows).

So far, getBiomeAt, genBiomes, getStructurePos, isViableStructurePos and checkForBiomes can be used.

Javadoc

Gradle Setup for Mod Development

Add the repository and dependency (with include to copy it into the mod's jar).

repositories {
    // ...
    maven {
        name = "3po"
        url = "https://mvn.3po.ch/maven"
    }
}
dependencies {
    // ...
    include implementation("de.rasmusantons.cubiomes:cubiomes-java:0.0.6")
}

Usage

To get the biome at a specific location on a given seed:

Cubiomes cubiomes = new Cubiomes(MCVersion.MC_1_21);
cubiomes.applySeed(Dimension.DIM_OVERWORLD, 1234567890L);  // specify the dimension and the seed
BiomeID biome = cubiomes.getBiomeAt(1, 0, 63, 0);  // get the biome at (0, 63, 0) with a scale of 1

For more examples see CubiomesTest.java and the original cubiomes documentation. The BiomeID javadoc has code examples for converting between Minecraft's internal classes and Cubiomes biomes.

Cross Compiling for Windows

On Arch linux, install the group mingw-w64-toolchain and then download a missing header file (if using jdk21-openjdk):

sudo curl --create-dirs --output /usr/lib/jvm/java-21-openjdk/include/win32/jni_md.h https://raw.githubusercontent.com/openjdk/jdk/master/src/java.base/windows/native/include/jni_md.h
sudo chmod 755 /usr/lib/jvm/java-21-openjdk/include/win32

Build Setup on Windows

To be able to compile on windows, follow https://code.visualstudio.com/docs/cpp/config-mingw#_installing-the-mingww64-toolchain to install the MinGW toolchain, then add C:\msys64\usr\bin and C:\msys64\ucrt64\bin to the system path.