Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b04156b
Started migration to 1.21.11
OakLoaf Dec 9, 2025
349ce66
Adjusted list of supported versions
OakLoaf Dec 9, 2025
d342962
chore: update gradle to version 9.2.1 to allow jvm25
Bloeckchengrafik Dec 11, 2025
04554b8
chore: bump minestom to 1.21.10
Bloeckchengrafik Dec 11, 2025
2e2b315
ci: bump java version to 25-tem
Bloeckchengrafik Dec 11, 2025
e99ae48
build: address review comments
Bloeckchengrafik Dec 11, 2025
e870a9e
Merge branch 'master' into dev/1.21.11
duplexsystem Dec 19, 2025
f780450
Merge pull request #543 from everbuild-org/feat/minestom-ver-1.21.11
duplexsystem Dec 19, 2025
2120dde
WIP on master
duplexsystem Dec 19, 2025
9686372
feat: update minestom to 1.21.11
TheNick24 Dec 21, 2025
db93073
Merge pull request #545 from TheNick24/dev/1.21.11
duplexsystem Apr 28, 2026
b49b38f
feat: add extensible registry interface and integrate into config and…
Bloeckchengrafik May 12, 2026
fdf362a
feat: add additional data support for particles on Minestom platform
Sybsuper May 15, 2026
4f59ca4
refactor: rename `CliExtensibleRegistry` to `ExtensibleRegistry` for …
Bloeckchengrafik May 28, 2026
8f1a53f
refactor: move validatePathIsMember logic to NIO files API
Bloeckchengrafik May 28, 2026
47b17b1
refactor!: standardize property names to use kebab-case in Extensible…
Bloeckchengrafik May 28, 2026
2fd8c46
Merge pull request #561 from Sybsuper/feat/particles-additional-data
duplexsystem Sep 28, 2026
326ce61
Merge pull request #560 from everbuild-org/feat/extend-search-path
duplexsystem Sep 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
2 changes: 1 addition & 1 deletion .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up JDK 21
uses: actions/setup-java@v4.7.1
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
Expand Down
12 changes: 4 additions & 8 deletions buildSrc/src/main/kotlin/Utils.kt
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
import java.io.ByteArrayOutputStream
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.kotlin.dsl.support.serviceOf


var isPrerelease = false


fun Project.getGitHash(): String {
val stdout = ByteArrayOutputStream()
exec {
return providers.exec {
commandLine = mutableListOf("git", "rev-parse", "--short", "HEAD")
standardOutput = stdout
}
return stdout.toString().trim()
}.standardOutput.asText.get().trim()
}

fun Project.gitClone(name: String) {
val stdout = ByteArrayOutputStream()
exec {
providers.exec {
commandLine = mutableListOf("git", "clone", name)
standardOutput = stdout
}
}

Expand Down
18 changes: 9 additions & 9 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object Versions {
}

object Fabric {
const val fabricAPI = "0.134.1+${Mod.minecraft}"
const val fabricAPI = "0.140.0+${Mod.minecraft}"
const val cloud = "2.0.0-beta.13"
}
//
Expand All @@ -42,14 +42,14 @@ object Versions {
// }

object Mod {
const val mixin = "0.16.4+mixin.0.8.7"
const val mixin = "0.16.5+mixin.0.8.7"
const val mixinExtras = "0.5.0"

const val minecraft = "1.21.10"
const val yarn = "$minecraft+build.1"
const val fabricLoader = "0.18.2"
const val minecraft = "1.21.11"
const val yarn = "$minecraft+build.3"
const val fabricLoader = "0.18.3"

const val architecuryLoom = "1.11.451"
const val architecturyLoom = "1.13.463"
const val architecturyPlugin = "3.4.162"

}
Expand All @@ -60,9 +60,9 @@ object Versions {
// }

object Bukkit {
const val minecraft = "1.21.10"
const val minecraft = "1.21.11-rc3"
const val nms = "$minecraft-R0.1"
const val paperBuild = "$nms-20251012.013929-7"
const val paperBuild = "$nms-20251208.200020-2"
const val paper = paperBuild
const val paperLib = "1.0.8"
const val reflectionRemapper = "0.1.3"
Expand Down Expand Up @@ -96,6 +96,6 @@ object Versions {
}

object Minestom {
const val minestom = "2025.10.04-1.21.8"
const val minestom = "2025.12.20c-1.21.11"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
package com.dfsek.terra.registry;

import com.google.errorprone.annotations.MustBeClosed;
import org.intellij.lang.annotations.Pattern;
import org.jspecify.annotations.Nullable;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Objects;
import java.util.stream.Stream;


/**
* A file-discoverable registry that can be extended by system properties
* <br>
* The main use-case for this is to allow for customized locations of file-system-based key entries,
* such as putting config packs into custom locations.
* <br>
* Two system properties are used to define the search path:
* <br>
* <code>terra.registry.{searchPathName}.searchPath</code> is a list of "parent folder" paths (like the pack directory) that
* will be searched for contained files.
* <br>
* <code>terra.registry.{searchPathName}.extraPath</code> is a list of files that will be directly evaluated for membership and
* as such will be directly treated as members of the registry.
* <br>
* These system properties are formatted like UNIX-style paths, with each path separated by a colon (':') character.
*/
public interface ExtensibleRegistry {
/**
* Get a lowercase search path name for this registry that will get plugged into
* <br>
* <code>terra.registry.{searchPathName}.searchPath</code>
* <br>
* and
* <br>
* <code>terra.registry.{searchPathName}.extraPath</code>
*/
@Pattern("^[a-z._]+$")
String getRegistryName();

/**
* Check if a path may be a member of this registry heuristically.
*
* @param path Path to check
*
* @return True if the path is a member of this registry.
*/
boolean validatePathIsMember(Path path);

default @MustBeClosed Stream<Path> getMemberPaths(Path baseSearchPath) {
String basePropertyName = "terra.registry." + getRegistryName();

Stream<Path> searchPath = Stream.concat(
parseValidPaths(System.getProperty(basePropertyName + ".search-path")),
Stream.of(baseSearchPath)
);

Stream<Path> extraPath = parseValidPaths(System.getProperty(basePropertyName + ".extra-path"));

return Stream.concat(
searchPath
.filter(Files::isDirectory)
.flatMap(ExtensibleRegistry::listDirectory),
extraPath
)
.filter(this::validatePathIsMember);
}

private static Stream<Path> parseValidPaths(@Nullable String paths) {
return Stream.ofNullable(paths)
.flatMap(p -> Arrays.stream(p.split(":")))
.filter(v -> !v.isBlank())
.map(v -> {
try {
return Path.of(v).toAbsolutePath().normalize();
} catch (Exception e) {
return null;
}
})
.filter(Objects::nonNull);
}

private static Stream<Path> listDirectory(Path dir) {
try {
return Files.list(dir);
} catch(IOException e) {
return Stream.empty();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
import com.dfsek.terra.api.config.ConfigPack;
import com.dfsek.terra.api.util.reflection.TypeKey;
import com.dfsek.terra.config.pack.ConfigPackImpl;
import com.dfsek.terra.registry.ExtensibleRegistry;
import com.dfsek.terra.registry.OpenRegistryImpl;


/**
* Class to hold config packs
*/
public class ConfigRegistry extends OpenRegistryImpl<ConfigPack> {
public class ConfigRegistry extends OpenRegistryImpl<ConfigPack> implements ExtensibleRegistry {

public ConfigRegistry() {
super(TypeKey.of(ConfigPack.class));
Expand All @@ -45,7 +46,7 @@ public synchronized void loadAll(Platform platform) throws IOException, PackLoad
Path packsDirectory = platform.getDataFolder().toPath().resolve("packs");
Files.createDirectories(packsDirectory);
List<Exception> failedLoads = new CopyOnWriteArrayList<>();
try(Stream<Path> packs = Files.list(packsDirectory)) {
try(Stream<Path> packs = getMemberPaths(packsDirectory)) {
packs.parallel().forEach(path -> {
try {
ConfigPack pack = new ConfigPackImpl(path, platform);
Expand All @@ -60,6 +61,16 @@ public synchronized void loadAll(Platform platform) throws IOException, PackLoad
}
}

@Override
public String getRegistryName() {
return "config";
}

@Override
public boolean validatePathIsMember(Path path) {
return Files.isDirectory(path)|| path.getFileName().endsWith(".zip");
}

public static class PackLoadFailuresException extends Exception {
@Serial
private static final long serialVersionUID = 538998844645186306L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@
import com.dfsek.terra.api.config.MetaPack;
import com.dfsek.terra.api.util.reflection.TypeKey;
import com.dfsek.terra.config.pack.MetaPackImpl;
import com.dfsek.terra.registry.ExtensibleRegistry;
import com.dfsek.terra.registry.OpenRegistryImpl;
import com.dfsek.terra.registry.master.ConfigRegistry.PackLoadFailuresException;


/**
* Class to hold config packs
*/
public class MetaConfigRegistry extends OpenRegistryImpl<MetaPack> {
public class MetaConfigRegistry extends OpenRegistryImpl<MetaPack> implements ExtensibleRegistry {

public MetaConfigRegistry() {
super(TypeKey.of(MetaPack.class));
Expand All @@ -45,8 +46,8 @@ public void loadAll(Platform platform, ConfigRegistry configRegistry) throws IOE
Path packsDirectory = platform.getDataFolder().toPath().resolve("metapacks");
Files.createDirectories(packsDirectory);
List<IOException> failedLoads = new ArrayList<>();
try(Stream<Path> packs = Files.list(packsDirectory)) {
packs.forEach(path -> {
try(Stream<Path> paths = getMemberPaths(packsDirectory)) {
paths.forEach(path -> {
try {
MetaPack pack = new MetaPackImpl(path, platform, configRegistry);
registerChecked(pack.getRegistryKey(), pack);
Expand All @@ -59,4 +60,14 @@ public void loadAll(Platform platform, ConfigRegistry configRegistry) throws IOE
throw new PackLoadFailuresException(failedLoads);
}
}

@Override
public String getRegistryName() {
return "metaconfig";
}

@Override
public boolean validatePathIsMember(Path path) {
return Files.isDirectory(path) || path.getFileName().endsWith(".zip");
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=845952a9d6afa783db70bb3b0effaae45ae5542ca2bb7929619e8af49cb634cf
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
distributionSha256Sum=72f44c9f8ebcb1af43838f45ee5c4aa9c5444898b3468ab3f4af7b6076c5bc3f
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 1 addition & 4 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


public interface NMSInitializer {
List<String> SUPPORTED_VERSIONS = List.of("v1.21.9", "v1.21.10");
List<String> SUPPORTED_VERSIONS = List.of("v1.21.11");
String MINECRAFT_VERSION = VersionUtil.getMinecraftVersionInfo().toString();
String TERRA_PACKAGE = NMSInitializer.class.getPackageName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import net.minecraft.core.MappedRegistry;
import net.minecraft.core.RegistrationInfo;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.npc.VillagerType;
import net.minecraft.world.entity.npc.villager.VillagerType;
import net.minecraft.world.level.biome.Biome;
import org.bukkit.NamespacedKey;
import org.slf4j.Logger;
Expand All @@ -34,7 +34,7 @@
public class AwfulBukkitHacks {
private static final Logger LOGGER = LoggerFactory.getLogger(AwfulBukkitHacks.class);

private static final Map<ResourceLocation, List<ResourceLocation>> terraBiomeMap = new HashMap<>();
private static final Map<Identifier, List<Identifier>> terraBiomeMap = new HashMap<>();

public static void registerBiomes(ConfigRegistry configRegistry) {
try {
Expand All @@ -50,15 +50,15 @@ public static void registerBiomes(ConfigRegistry configRegistry) {
BukkitPlatformBiome platformBiome = (BukkitPlatformBiome) biome.getPlatformBiome();

NamespacedKey vanillaBukkitKey = platformBiome.getHandle().getKey();
ResourceLocation vanillaMinecraftKey = ResourceLocation.fromNamespaceAndPath(vanillaBukkitKey.getNamespace(),
Identifier vanillaMinecraftKey = Identifier.fromNamespaceAndPath(vanillaBukkitKey.getNamespace(),
vanillaBukkitKey.getKey());

VanillaBiomeProperties vanillaBiomeProperties = biome.getContext().get(VanillaBiomeProperties.class);

Biome platform = NMSBiomeInjector.createBiome(biomeRegistry.get(vanillaMinecraftKey).orElseThrow().value(),
vanillaBiomeProperties);

ResourceLocation delegateMinecraftKey = ResourceLocation.fromNamespaceAndPath("terra",
Identifier delegateMinecraftKey = Identifier.fromNamespaceAndPath("terra",
NMSBiomeInjector.createBiomeID(pack, key));
NamespacedKey delegateBukkitKey = NamespacedKey.fromString(delegateMinecraftKey.toString());
ResourceKey<Biome> delegateKey = ResourceKey.create(Registries.BIOME, delegateMinecraftKey);
Expand All @@ -75,7 +75,7 @@ public static void registerBiomes(ConfigRegistry configRegistry) {
Objects.requireNonNullElse(vanillaBiomeProperties.getVillagerType(),
villagerMap.getOrDefault(delegateKey, VillagerType.PLAINS)));

terraBiomeMap.computeIfAbsent(vanillaMinecraftKey, i -> new ArrayList<>()).add(delegateKey.location());
terraBiomeMap.computeIfAbsent(vanillaMinecraftKey, i -> new ArrayList<>()).add(delegateKey.identifier());

LOGGER.debug("Registered biome: " + delegateKey);
} catch(NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {
Expand All @@ -100,8 +100,8 @@ public static void registerBiomes(ConfigRegistry configRegistry) {
tb -> NMSBiomeInjector.getEntry(biomeRegistry, tb).ifPresentOrElse(
terra -> {
LOGGER.debug("{} (vanilla for {}): {}",
vanilla.unwrapKey().orElseThrow().location(),
terra.unwrapKey().orElseThrow().location(),
vanilla.unwrapKey().orElseThrow().identifier(),
terra.unwrapKey().orElseThrow().identifier(),
vanilla.tags().toList());
vanilla.tags()
.forEach(tag -> collect
Expand Down
Loading
Loading