Modded 26.3 datapacks

- The forced datapack, datapack commands, and world check render biomes and dimension types with the 26.3 data fixer and pack format 121
- Modded tests use the 26.3 feature, placement, spawner, sign, and biome resolver APIs
- The water spawn test binds a blocks_motion fixture so solid waterlogged blocks still obstruct spawns
This commit is contained in:
Brian Neumann-Fopiano committed 2026-09-29 02:48:58 -04:00
1 parent 94c7181aec
commit 92e5daa13e
12 files changed
+52 -39

No files matched your search

@@ -315,11 +315,11 @@ public final class ModdedForcedDatapack {
throw new IllegalStateException("SHA-256 is unavailable", missing);
}
digest.update((HASH_SALT + '|' + ModdedEngineBootstrap.loader().platformName()
+ '|' + DataVersion.V26_2.getPackFormat() + '\n').getBytes(StandardCharsets.UTF_8));
+ '|' + DataVersion.V26_3.getPackFormat() + '\n').getBytes(StandardCharsets.UTF_8));
String inputFingerprint = IrisDatapackCompiler.computeInputFingerprint(
compilationPackRoots(),
List.of(),
DataVersion.V26_2.get(),
DataVersion.V26_3.get(),
false
);
digest.update(inputFingerprint.getBytes(StandardCharsets.UTF_8));
@@ -328,7 +328,7 @@ public final class ModdedForcedDatapack {
private static void writeStagedPack(Path stagingDirectory) throws IOException {
Map<String, KSet<String>> seenBiomes = new LinkedHashMap<>();
IDataFixer fixer = DataVersion.V26_2.get();
IDataFixer fixer = DataVersion.V26_3.get();
int packCount = 0;
KList<String> presetIds = new KList<>();
@@ -679,7 +679,7 @@ public final class ModdedForcedDatapack {
}
static void writePackMeta(Path packDirectory) throws IOException {
int packFormat = DataVersion.V26_2.getPackFormat();
int packFormat = DataVersion.V26_3.getPackFormat();
String json = "{\n"
+ " \"pack\": {\n"
+ " \"description\": \"Iris world generation biomes and dimension types for installed packs.\",\n"
@@ -55,7 +55,7 @@ final class WorldCheckDimensionContract {
}
static Dimension expectedDimensionContract(IrisDimension dimension) {
JSONObject json = new JSONObject(dimension.getDimensionType().toJson(DataVersion.V26_2.get()));
JSONObject json = new JSONObject(dimension.getDimensionType().toJson(DataVersion.V26_3.get()));
return new Dimension(
json.getInt("min_y"),
json.getInt("height"),
@@ -165,7 +165,7 @@ public final class ModdedDatapackCommands {
IrisDimension dimension = engine.getDimension();
String json;
try {
json = dimension.getDimensionType().toJson(DataVersion.V26_2.get());
json = dimension.getDimensionType().toJson(DataVersion.V26_3.get());
} catch (Throwable e) {
ModdedIrisLog.error("Iris dimension type generation failed for {}", dimension.getLoadKey(), e);
IrisModdedCommands.fail(source, IrisLanguage.plain(ModdedCommandMessages.MODDED_DATAPACK_COMMANDS_DIMENSION_TYPE_GENERATION_FAILED, MessageArgument.untrusted("value", level.name()), MessageArgument.untrusted("value2", String.valueOf(e.getMessage()))));
@@ -187,7 +187,7 @@ public final class ModdedDatapackCommands {
}
File mcmeta = new File(worldDatapacksFolder(server), WORLD_PACK_NAME + "/pack.mcmeta");
int packFormat = DataVersion.V26_2.getPackFormat();
int packFormat = DataVersion.V26_3.getPackFormat();
String meta = "{\n"
+ " \"pack\": {\n"
+ " \"description\": \"Iris dimension types derived from the installed Iris packs.\",\n"
@@ -503,7 +503,7 @@ public final class ModdedPregenMethod implements PregeneratorMethod {
/**
* A dedicated server with {@code pause-when-empty-seconds > 0} returns from
* {@code MinecraftServer#tickServer} before {@code tickChildren} once it has been empty for that
* long (26.2 only keeps {@code tickConnection} plus the task/chunk-poll window alive). That
* long (26.3 only keeps {@code tickConnection} plus the task/chunk-poll window alive). That
* freezes every per-tick Iris service - world manager, scheduler, protocol sync, pregen HUD - and
* the loader's own generation hooks for the whole job, and console pregen on a default
* server.properties is always empty. The guard zeroes the setting for the duration of the job