Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e809470
Merge pull request #213 from ModificationStation/develop
mineLdiver Jul 27, 2025
8b30ede
Merge pull request #216 from ModificationStation/develop
mineLdiver Aug 9, 2025
26ab9a9
Merge pull request #217
mineLdiver Aug 9, 2025
e9061e3
Merge branch 'develop'
mineLdiver Aug 15, 2025
0e44ff7
Merge pull request #242 from ModificationStation/develop
mineLdiver Dec 6, 2025
bff0f23
Merge pull request #243 from ModificationStation/develop
mineLdiver Dec 23, 2025
4e0de21
Update to last babric biny e0778a3
matthewperiut Feb 4, 2026
337044e
Runs on Ornithe (and fix java 25)
matthewperiut Feb 4, 2026
7553f1e
Use public ornithe biny version
matthewperiut Feb 4, 2026
49b5943
Update GCAPI to publicly available lib
matthewperiut Feb 4, 2026
81d4ae4
tweaks (java 21 and deps)
matthewperiut Feb 5, 2026
6878f19
Fix ChunkMap Shadow in TrackedChunk Mixin (changed mapping removing s…
matthewperiut Feb 11, 2026
556f62d
Fix a few mixin names
matthewperiut Feb 11, 2026
85dcc49
Proper fix for mergesort contract violation
mineLdiver Feb 12, 2026
26dac63
Merge remote-tracking branch 'matthewperiut/ornithe' into fork/matthe…
mineLdiver Feb 12, 2026
aa369d4
Removed CraftingRecipeComparator.java
mineLdiver Feb 15, 2026
8cacd8f
Removed fastutil
mineLdiver Feb 15, 2026
9cfbcfc
Removed IOException from CustomSpawnDataProvider
mineLdiver Feb 15, 2026
0528991
Update biny
matthewperiut Feb 26, 2026
3ea34ca
Removed unnecessary libraries and bumped Java to 25
mineLdiver Feb 28, 2026
7df67ea
Merge remote-tracking branch 'matthewperiut/ornithe' into fork/matthe…
mineLdiver Feb 28, 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
87 changes: 57 additions & 30 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import net.modificationstation.stationapi.gradle.SubprojectHelpers.addDependency

plugins {
id("maven-publish")
id("fabric-loom") version "1.9-SNAPSHOT"
id("babric-loom-extension") version "1.9.2"
id("net.fabricmc.fabric-loom-remap") version "1.15.+"
id("ploceus") version "1.15-SNAPSHOT"
}

// https://stackoverflow.com/a/40101046 - Even with kotlin, gradle can't get it's shit together.
Expand All @@ -15,18 +15,38 @@ inline fun <reified C> Project.configure(name: String, configuration: C.() -> Un
}

allprojects {
apply(plugin = "maven-publish")
apply(plugin = "fabric-loom")
apply(plugin = "babric-loom-extension")
if (project != rootProject) {
apply(plugin = "maven-publish")
apply(plugin = "net.fabricmc.fabric-loom-remap")
apply(plugin = "ploceus")
}

pluginManager.withPlugin("ploceus") {
val ploceus = extensions.getByName<net.ornithemc.ploceus.api.PloceusGradleExtensionApi>("ploceus")
ploceus.setIntermediaryGeneration(2)

dependencies {
"minecraft"("com.mojang:minecraft:${project.properties["minecraft_version"]}")
"mappings"(ploceus.mappings("net.glasslauncher:biny-ornithe:b1.7.3+build.${project.properties["biny_mappings"]}:mergedv2"))
"clientExceptions"(ploceus.raven(project.properties["client_raven_build"].toString(), "client"))
"serverExceptions"(ploceus.raven(project.properties["server_raven_build"].toString(), "server"))
"clientSignatures"(ploceus.sparrow(project.properties["client_sparrow_build"].toString(), "client"))
"serverSignatures"(ploceus.sparrow(project.properties["server_sparrow_build"].toString(), "server"))
"clientNests"("net.glasslauncher:biny-nests:b1.7.3-client+build.3")
"serverNests"("net.glasslauncher:biny-nests:b1.7.3-server+build.3")
"modImplementation"("net.fabricmc:fabric-loader:${project.properties["loader_version"]}")
}
}

java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
java.sourceCompatibility = JavaVersion.VERSION_25
java.targetCompatibility = JavaVersion.VERSION_25

repositories {
maven(url = "https://maven.minecraftforge.net/")
maven(url = "https://maven.glass-launcher.net/babric")
maven(url = "https://maven.glass-launcher.net/snapshots")
maven(url = "https://maven.glass-launcher.net/releases")
maven(url = "https://maven.glass-launcher.net/snapshots")
maven(url = "https://mvn.devos.one/releases")
maven(url = "https://maven.wispforest.io")
maven(url = "https://jitpack.io/")
mavenCentral()
exclusiveContent {
Expand All @@ -47,31 +67,32 @@ allprojects {
all {
exclude(group = "org.ow2.asm", module = "asm-debug-all")
exclude(group = "org.ow2.asm", module = "asm-all")
exclude(group = "babric")
// Force correct Guava version to avoid conflicts
resolutionStrategy {
force("com.google.guava:guava:33.5.0-jre")
}
}
}

dependencies {
implementation("org.slf4j:slf4j-api:1.8.0-beta4")
implementation("org.apache.logging.log4j:log4j-slf4j18-impl:2.17.2")

implementation("org.apache.logging.log4j:log4j-core:2.17.2")
implementation("com.google.guava:guava:33.2.1-jre")
implementation("org.apache.logging.log4j:log4j-core:2.17.2") {
exclude(group = "com.google.guava", module = "guava")
}
implementation("net.ornithemc:logger-config:1.0.0") {
exclude(group = "com.google.guava", module = "guava")
}
implementation("com.google.guava:guava:33.5.0-jre")
implementation("com.google.code.gson:gson:2.9.0")

//to change the versions see the gradle.properties file
minecraft("com.mojang:minecraft:${project.properties["minecraft_version"]}")

mappings("net.glasslauncher:biny:${project.properties["yarn_mappings"]}:v2")
//minecraft and mappings are added in the ploceus withPlugin block above

modImplementation("net.fabricmc:fabric-loader:${project.properties["loader_version"]}")

"transitiveImplementation"(implementation("org.apache.commons:commons-lang3:3.12.0") as Dependency)
"transitiveImplementation"(implementation("commons-io:commons-io:2.11.0") as Dependency)
"transitiveImplementation"(implementation("net.jodah:typetools:${project.properties["typetools_version"]}") as Dependency)
"transitiveImplementation"(implementation("com.github.mineLdiver:UnsafeEvents:${project.properties["unsafeevents_version"]}") as Dependency)
"transitiveImplementation"(implementation("it.unimi.dsi:fastutil:${project.properties["fastutil_version"]}") as Dependency)
"transitiveImplementation"(implementation("com.github.ben-manes.caffeine:caffeine:${project.properties["caffeine_version"]}") as Dependency)
"transitiveImplementation"(implementation("com.mojang:datafixerupper:${project.properties["dfu_version"]}") as Dependency)
"transitiveImplementation"(implementation("maven.modrinth:spasm:${project.properties["spasm_version"]}") as Dependency)
"transitiveImplementation"(implementation("me.carleslc:Simple-Yaml:1.8.4") as Dependency)
Expand All @@ -81,23 +102,24 @@ allprojects {

// convenience stuff
// adds some useful annotations for data classes. does not add any dependencies
compileOnly("org.projectlombok:lombok:1.18.30")
annotationProcessor("org.projectlombok:lombok:1.18.30")
testCompileOnly("org.projectlombok:lombok:1.18.30")
testAnnotationProcessor("org.projectlombok:lombok:1.18.30")
compileOnly("org.projectlombok:lombok:1.18.42")
annotationProcessor("org.projectlombok:lombok:1.18.42")
testCompileOnly("org.projectlombok:lombok:1.18.42")
testAnnotationProcessor("org.projectlombok:lombok:1.18.42")

// adds some useful annotations for miscellaneous uses. does not add any dependencies, though people without the lib will be missing some useful context hints.
implementation("org.jetbrains:annotations:23.0.0")

modLocalRuntime("net.glasslauncher.mods:ModMenu:${project.properties["modmenu_version"]}")
modLocalRuntime("maven.modrinth:retrocommands:${project.properties["rc_version"]}") {
isTransitive = false
}
// modLocalRuntime("net.glasslauncher.mods:ModMenu:${project.properties["modmenu_version"]}")
// modLocalRuntime("maven.modrinth:retrocommands:${project.properties["rc_version"]}") {
// isTransitive = false
// }

annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.4.1")

// Optional bugfix mod for testing qol. Remove the // to enable.
//modLocalRuntime "maven.modrinth:mojangfix:${project.properties["mojangfix_version"]}"

}

sourceSets {
Expand Down Expand Up @@ -251,10 +273,10 @@ subprojects {
dependencies {
include("net.jodah:typetools:${project.properties["typetools_version"]}")
include("com.github.mineLdiver:UnsafeEvents:${project.properties["unsafeevents_version"]}")
include("it.unimi.dsi:fastutil:${project.properties["fastutil_version"]}")
include("com.github.ben-manes.caffeine:caffeine:${project.properties["caffeine_version"]}")
include("com.mojang:datafixerupper:${project.properties["dfu_version"]}")
include("maven.modrinth:spasm:${project.properties["spasm_version"]}")
include("com.google.guava:guava:33.5.0-jre")
include("com.google.guava:failureaccess:1.0.3")
}

// Makes java shut up
Expand All @@ -264,6 +286,11 @@ configure<JavaCompile>("compileTestJava") {
options.forkOptions.executable = System.getProperty("java.home") + "/bin/javac" + (if (System.getProperty("os.name").startsWith("Windows")) ".exe" else "")
}

// Don't fail test task when no tests are discovered (these are mod test classes, not unit tests)
tasks.withType<Test> {
failOnNoDiscoveredTests = false
}

publishing {
publications {
getByName("mavenJava", MavenPublication::class) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
package net.fabricmc.loom.util;

import groovy.util.Node;
import groovy.xml.QName;
import groovy.namespace.QName;

public final class GroovyXmlUtil {
private GroovyXmlUtil() { }
Expand All @@ -49,11 +49,6 @@ private static boolean isSameName(Object nodeName, String givenName) {
return qName.matches(givenName);
}

// New groovy 3 (gradle 7) class
if (nodeName instanceof groovy.namespace.QName qName) {
return qName.matches(givenName);
}

throw new UnsupportedOperationException("Cannot determine if " + nodeName.getClass() + " is the same as a String");
}
}
10 changes: 8 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ fabric.loom.multiProjectOptimisation=true
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version = b1.7.3
yarn_mappings = b1.7.3+e1fe071
biny_mappings = bdae1bc
loader_version = 0.16.9

# Ploceus Properties
client_raven_build = 2
server_raven_build = 2
client_sparrow_build = 2
server_sparrow_build = 2

# Library Properties
typetools_version = 0.8.3
unsafeevents_version = e31096e
Expand All @@ -27,6 +33,6 @@ fabric.loom.multiProjectOptimisation=true
archives_base_name = StationAPI

# Test properties
gcapi_version = 3.2.5
gcapi_version = 3.3.0+gen2
modmenu_version = 1.8.5-beta.11
rc_version = 0.5.4
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 13 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
pluginManagement {
repositories {
maven(url = "https://maven.glass-launcher.net/babric")
maven(url = "https://maven.fabricmc.net/")
maven(url = "https://jitpack.io/")
mavenCentral()
maven {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
maven {
name = "Ornithe Releases"
url = uri("https://maven.ornithemc.net/releases")
}
maven {
name = "Ornithe Snapshots"
url = uri("https://maven.ornithemc.net/snapshots")
}
mavenLocal()
gradlePluginPortal()
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"environment": "*",

"depends": {
"java": ">=17",
"java": ">=25",
"fabricloader": "*",
"minecraft": "1.0.0-beta.7.3",
"station-api-configuration": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

@Mixin(World.class)
public abstract class MixinLevel {
@Shadow public abstract BiomeSource method_1781();
@Shadow public abstract BiomeSource getBiomeSource();

/*@Inject(
method = "<init>(Lnet/minecraft/level/dimension/DimensionData;Ljava/lang/String;J)V",
Expand All @@ -27,7 +27,7 @@ private void onInit(WorldStorage string, String l, long par3, CallbackInfo ci) {
int[] pixels = ((DataBufferInt) buffer.getRaster().getDataBuffer()).getData();

int start = -(side >> 1);
BiomeSource biomeSource = method_1781();
BiomeSource biomeSource = getBiomeSource();
Biome[] biomes = biomeSource.getBiomesInArea(new Biome[side * side], start, start, side, side);

for (int i = 0; i < pixels.length; i++) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package net.modificationstation.stationapi.api.util;

import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.mojang.serialization.Codec;
import com.mojang.serialization.DataResult;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.concurrent.ExecutionException;
import java.util.function.Function;
import java.util.function.UnaryOperator;

Expand All @@ -27,7 +28,7 @@ public final class Identifier implements Comparable<@NotNull Identifier> {

private record IdentifierCacheKey(@NotNull Namespace namespace, @NotNull String id) {}
@NotNull
private static final Cache<@NotNull IdentifierCacheKey, @NotNull Identifier> CACHE = Caffeine.newBuilder().softValues().build();
private static final Cache<@NotNull IdentifierCacheKey, @NotNull Identifier> CACHE = CacheBuilder.newBuilder().softValues().build();
@NotNull
private static final Function<@NotNull IdentifierCacheKey, @NotNull Identifier> IDENTIFIER_FACTORY = Identifier::new;

Expand All @@ -46,7 +47,12 @@ private record IdentifierCacheKey(@NotNull Namespace namespace, @NotNull String
}

public static @NotNull Identifier of(@NotNull final Namespace namespace, @NotNull final String id) {
return CACHE.get(new IdentifierCacheKey(namespace, id), IDENTIFIER_FACTORY);
final var key = new IdentifierCacheKey(namespace, id);
try {
return CACHE.get(key, () -> IDENTIFIER_FACTORY.apply(key));
} catch (ExecutionException e) {
throw new RuntimeException(e);
}
}

public static @Nullable Identifier tryParse(@NotNull final String string) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package net.modificationstation.stationapi.api.util;

import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.google.common.base.Suppliers;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import it.unimi.dsi.fastutil.objects.Object2ReferenceMap;
import it.unimi.dsi.fastutil.objects.Object2ReferenceOpenHashMap;
import it.unimi.dsi.fastutil.objects.Reference2ReferenceMap;
Expand All @@ -28,18 +28,18 @@
import java.nio.file.*;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Stream;
import java.util.zip.ZipError;

@Slf4j
public final class Namespace implements Comparable<@NotNull Namespace> {
private static final boolean CHECK_MISSING_MODS = false;
private static final Map<String, String> CREATE_FILESYSTEM_ARGS = Collections.singletonMap("create", "true");

@NotNull
private static final Cache<@NotNull String, @NotNull Namespace> CACHE = Caffeine.newBuilder().softValues().build();
private static final Cache<@NotNull String, @NotNull Namespace> CACHE = CacheBuilder.newBuilder().softValues().build();
@NotNull
private static final Function<@NotNull String, @NotNull Namespace> NAMESPACE_FACTORY = Namespace::new;

Expand All @@ -57,7 +57,11 @@ public final class Namespace implements Comparable<@NotNull Namespace> {
}

public static @NotNull Namespace of(@NotNull final String namespace) {
return CACHE.get(namespace, NAMESPACE_FACTORY);
try {
return CACHE.get(namespace, () -> NAMESPACE_FACTORY.apply(namespace));
} catch (ExecutionException e) {
throw new RuntimeException(e);
}
}

@ApiStatus.Experimental
Expand Down Expand Up @@ -88,7 +92,7 @@ public final class Namespace implements Comparable<@NotNull Namespace> {
created = true;
} catch (FileSystemAlreadyExistsException ignore2) {
fs = FileSystems.getFileSystem(jarUri);
} catch (IOException | ZipError e) {
} catch (IOException e) {
throw new IOException("Error accessing " + uri + ": " + e, e);
}
callerRoot = fs.getPath("/").toUri();
Expand Down
Loading