This commit is contained in:
Brian Neumann-Fopiano
2026-06-26 14:01:20 -04:00
parent f777ea6b18
commit 75e8c22268
26 changed files with 193 additions and 101 deletions
@@ -1,4 +1,4 @@
package art.arcane.iris.core.nms.v26_1_R1;
package art.arcane.iris.core.nms.v26_2_R1;
import com.mojang.serialization.MapCodec;
import art.arcane.iris.spi.IrisLogging;
@@ -1,4 +1,4 @@
package art.arcane.iris.core.nms.v26_1_R1;
package art.arcane.iris.core.nms.v26_2_R1;
import com.mojang.datafixers.util.Pair;
import com.mojang.serialization.MapCodec;
@@ -1,4 +1,4 @@
package art.arcane.iris.core.nms.v26_1_R1;
package art.arcane.iris.core.nms.v26_2_R1;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import art.arcane.iris.spi.IrisLogging;
@@ -812,11 +812,14 @@ public class NMSBinding implements INMSBinding {
int minY = craftChunkData.getMinHeight();
int height = craftChunkData.getMaxHeight() - minY;
int accessMinY = access.getMinY();
int accessMaxY = accessMinY + access.getHeight();
int yStart = Math.max(0, accessMinY - minY);
int yEnd = Math.min(height, accessMaxY - minY);
int baseX = access.getPos().getMinBlockX();
int baseZ = access.getPos().getMinBlockZ();
ChunkDataHunkHolder holder = data instanceof ChunkDataHunkHolder chunkDataHolder ? chunkDataHolder : null;
for (int z = 0; z < 16; z++) {
for (int y = 0; y < height; y++) {
for (int y = yStart; y < yEnd; y++) {
int blockY = y + minY;
int sectionIndex = (blockY - accessMinY) >> 4;
LevelChunkSection section = access.getSection(sectionIndex);
@@ -1108,7 +1111,7 @@ public class NMSBinding implements INMSBinding {
@Override
public DataVersion getDataVersion() {
return DataVersion.V26_1_2;
return DataVersion.V26_2;
}
@Override
@@ -1,4 +1,4 @@
package art.arcane.iris.core.nms.v26_1_R1;
package art.arcane.iris.core.nms.v26_2_R1;
import net.minecraft.core.Holder;
import net.minecraft.core.Registry;
+1 -1
View File
@@ -1,4 +1,4 @@
def apiVersion = '26.1'
def apiVersion = '26.2'
def mainClass = 'art.arcane.iris.Iris'
String volmLibCoordinate = providers.gradleProperty('volmLibCoordinate')
+14 -14
View File
@@ -28,8 +28,8 @@ plugins {
Properties rootProperties = new Properties()
file('../../gradle.properties').withInputStream { InputStream stream -> rootProperties.load(stream) }
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.1'))
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.1.2'))
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.2'))
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.2'))
String fabricLoaderVersion = providers.gradleProperty('fabricLoaderVersion').getOrElse(rootProperties.getProperty('fabricLoaderVersion', '0.19.3'))
Closure<String> irisArtifactName = { String platform, String targetVersion ->
return "Iris v${project.version} [${platform}] ${targetVersion}.jar"
@@ -100,18 +100,18 @@ configurations.create('jij') {
dependencies {
minecraft("com.mojang:minecraft:${minecraftVersion}")
implementation("net.fabricmc:fabric-loader:${fabricLoaderVersion}")
jij('net.fabricmc.fabric-api:fabric-api-base:2.0.3+ece063234c')
jij('net.fabricmc.fabric-api:fabric-registry-sync-v0:7.1.0+2fa62b4e4c')
jij('net.fabricmc.fabric-api:fabric-resource-loader-v1:2.0.10+7c44c7324c')
jij('net.fabricmc.fabric-api:fabric-lifecycle-events-v1:4.1.0+6d50a0854c')
jij('net.fabricmc.fabric-api:fabric-command-api-v2:3.0.5+e2bdee784c')
jij('net.fabricmc.fabric-api:fabric-events-interaction-v0:5.2.2+07b380be4c')
implementation('net.fabricmc.fabric-api:fabric-api-base:2.0.3+ece063234c')
implementation('net.fabricmc.fabric-api:fabric-registry-sync-v0:7.1.0+2fa62b4e4c')
implementation('net.fabricmc.fabric-api:fabric-resource-loader-v1:2.0.10+7c44c7324c')
implementation('net.fabricmc.fabric-api:fabric-lifecycle-events-v1:4.1.0+6d50a0854c')
implementation('net.fabricmc.fabric-api:fabric-command-api-v2:3.0.5+e2bdee784c')
implementation('net.fabricmc.fabric-api:fabric-events-interaction-v0:5.2.2+07b380be4c')
jij('net.fabricmc.fabric-api:fabric-api-base:2.0.4+ece063239e')
jij('net.fabricmc.fabric-api:fabric-registry-sync-v0:7.1.0+c7bd5b8e9e')
jij('net.fabricmc.fabric-api:fabric-resource-loader-v1:2.0.13+9edec1269e')
jij('net.fabricmc.fabric-api:fabric-lifecycle-events-v1:4.1.3+4575b05f9e')
jij('net.fabricmc.fabric-api:fabric-command-api-v2:3.1.0+00cb03469e')
jij('net.fabricmc.fabric-api:fabric-events-interaction-v0:5.2.6+8f57f7ee9e')
implementation('net.fabricmc.fabric-api:fabric-api-base:2.0.4+ece063239e')
implementation('net.fabricmc.fabric-api:fabric-registry-sync-v0:7.1.0+c7bd5b8e9e')
implementation('net.fabricmc.fabric-api:fabric-resource-loader-v1:2.0.13+9edec1269e')
implementation('net.fabricmc.fabric-api:fabric-lifecycle-events-v1:4.1.3+4575b05f9e')
implementation('net.fabricmc.fabric-api:fabric-command-api-v2:3.1.0+00cb03469e')
implementation('net.fabricmc.fabric-api:fabric-events-interaction-v0:5.2.6+8f57f7ee9e')
compileOnly('org.slf4j:slf4j-api:2.0.17')
compileOnly(libs.spigot) {
transitive = false
+3 -3
View File
@@ -28,9 +28,9 @@ plugins {
Properties rootProperties = new Properties()
file('../../gradle.properties').withInputStream { InputStream stream -> rootProperties.load(stream) }
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.1'))
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.1.2'))
String forgeVersion = providers.gradleProperty('forgeVersion').getOrElse(rootProperties.getProperty('forgeVersion', '26.1.2-64.0.9'))
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.2'))
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.2'))
String forgeVersion = providers.gradleProperty('forgeVersion').getOrElse(rootProperties.getProperty('forgeVersion', '26.2-65.0.0'))
Closure<String> loaderDisplayVersion = { String loaderVersion ->
String coordinatePrefix = "${minecraftVersion}-"
if (loaderVersion.startsWith(coordinatePrefix)) {
@@ -34,7 +34,7 @@ import net.minecraft.world.level.block.LeavesBlock;
import net.minecraft.world.level.block.PointedDripstoneBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.DripstoneThickness;
import net.minecraft.world.level.block.state.properties.SpeleothemThickness;
import net.minecraft.world.level.block.state.properties.Property;
import java.util.Arrays;
@@ -434,7 +434,7 @@ public final class ModdedBlockResolution {
public static boolean isUpdatable(BlockState state) {
return isStorage(state)
|| (state.getBlock() instanceof PointedDripstoneBlock
&& state.getValue(PointedDripstoneBlock.THICKNESS) == DripstoneThickness.TIP);
&& state.getValue(PointedDripstoneBlock.THICKNESS) == SpeleothemThickness.TIP);
}
public static boolean isFoliage(BlockState state) {
@@ -67,6 +67,7 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
@@ -246,7 +247,11 @@ public final class IrisModdedCommands {
IntegerArgumentType.getInteger(context, "z"), false, ModdedPregenMode.ASYNC, false))
.then(pregenStartFlag("gui", true, true, ModdedPregenMode.ASYNC, false))
.then(pregenStartFlag("sync", true, false, ModdedPregenMode.SYNC, false))
.then(pregenStartFlag("cached", true, false, ModdedPregenMode.SYNC, true))))))
.then(pregenStartFlag("cached", true, false, ModdedPregenMode.SYNC, true))))
.then(Commands.argument("dimension", StringArgumentType.greedyString()).suggests(DIMENSION_NAMES)
.executes((CommandContext<CommandSourceStack> context) -> pregenStart(context.getSource(),
IntegerArgumentType.getInteger(context, "radius"), 0, 0, false, ModdedPregenMode.ASYNC, false,
StringArgumentType.getString(context, "dimension"))))))
.then(Commands.literal("stop")
.executes((CommandContext<CommandSourceStack> context) -> pregenStop(context.getSource())))
.then(Commands.literal("x")
@@ -335,7 +340,20 @@ public final class IrisModdedCommands {
}
private static int pregenStart(CommandSourceStack source, int radius, int centerX, int centerZ, boolean gui, ModdedPregenMode mode, boolean cached) {
ServerLevel level = source.getLevel();
return pregenStart(source, radius, centerX, centerZ, gui, mode, cached, null);
}
private static int pregenStart(CommandSourceStack source, int radius, int centerX, int centerZ, boolean gui, ModdedPregenMode mode, boolean cached, String dimension) {
ServerLevel level;
if (dimension == null || dimension.isBlank()) {
level = source.getLevel();
} else {
level = resolveIrisLevel(source.getServer(), dimension);
if (level == null) {
fail(source, "No loaded Iris dimension matches '" + dimension + "'. Use a bare name (irisworld) or full id (irisworldgen:irisworld); see /iris info for loaded dimensions.");
return 0;
}
}
Engine engine = engineFor(level);
if (engine == null) {
fail(source, "This dimension is not generated by Iris.");
@@ -825,6 +843,29 @@ public final class IrisModdedCommands {
return count;
}
private static ServerLevel resolveIrisLevel(MinecraftServer server, String raw) {
String target = raw.trim().toLowerCase(Locale.ROOT);
boolean qualified = target.indexOf(':') >= 0;
for (ServerLevel level : server.getAllLevels()) {
if (!(level.getChunkSource().getGenerator() instanceof IrisModdedChunkGenerator)) {
continue;
}
String fullId = level.dimension().identifier().toString();
if (qualified) {
if (fullId.equals(target)) {
return level;
}
continue;
}
int separator = fullId.indexOf(':');
String path = separator >= 0 ? fullId.substring(separator + 1) : fullId;
if (path.equals(target)) {
return level;
}
}
return null;
}
private static CompletableFuture<Suggestions> suggestBiomeKeys(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) {
ModdedCommandFeedback.tab(context.getSource());
try {
@@ -90,6 +90,7 @@ public final class ModdedStudioCommands {
private static final String STUDIO_NAMESPACE = "irisworldgen";
private static final String STUDIO_PREFIX = "studio_";
private static final String DEFAULT_TEMPLATE = "example";
private static final UUID CONSOLE_OWNER = new UUID(0L, 0L);
private static final Map<UUID, String> STUDIOS = new ConcurrentHashMap<>();
private static final SuggestionProvider<CommandSourceStack> GENERATOR_KEYS = (CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) -> {
ModdedCommandFeedback.tab(context.getSource());
@@ -291,19 +292,19 @@ public final class ModdedStudioCommands {
return STUDIO_NAMESPACE + ":" + STUDIO_PREFIX + base;
}
private static String studioConsoleDimensionId() {
return STUDIO_NAMESPACE + ":" + STUDIO_PREFIX + "console";
}
private static int open(CommandSourceStack source, String pack, long seed) {
ServerPlayer player = source.getPlayer();
if (player == null) {
IrisModdedCommands.fail(source, "This command can only be used by players (a studio teleports you into the dimension).");
return 0;
}
if (pack == null || pack.isBlank()) {
IrisModdedCommands.fail(source, "Provide a dimension pack: /iris studio open <pack> [seed]");
return 0;
}
ServerPlayer player = source.getPlayer();
UUID owner = player == null ? CONSOLE_OWNER : player.getUUID();
String dimensionId = player == null ? studioConsoleDimensionId() : studioDimensionId(player);
MinecraftServer server = source.getServer();
UUID owner = player.getUUID();
String dimensionId = studioDimensionId(player);
IrisModdedCommands.ok(source, "Opening studio for '" + pack + "' (seed " + seed + ")...");
Thread thread = new Thread(() -> openAsync(source, server, owner, dimensionId, pack, seed), "Iris Studio Open");
thread.setDaemon(true);
@@ -329,13 +330,45 @@ public final class ModdedStudioCommands {
server.execute(() -> IrisModdedCommands.fail(source, "Pack '" + pack + "' has no dimensions/" + pack + ".json"));
return;
}
server.execute(() -> injectAndTeleport(source, server, owner, dimensionId, pack, seed));
server.execute(() -> {
if (owner.equals(CONSOLE_OWNER)) {
injectConsole(source, server, dimensionId, pack, seed);
} else {
injectAndTeleport(source, server, owner, dimensionId, pack, seed);
}
});
} catch (Throwable e) {
LOGGER.error("Iris studio open failed for {}", pack, e);
server.execute(() -> IrisModdedCommands.fail(source, "Studio open failed: " + e.getClass().getSimpleName() + (e.getMessage() == null ? "" : " - " + e.getMessage())));
}
}
private static void injectConsole(CommandSourceStack source, MinecraftServer server, String dimensionId, String pack, long seed) {
ModdedDimensionManager.Handle handle;
try {
handle = ModdedDimensionManager.create(server, dimensionId, pack, seed);
} catch (Throwable e) {
LOGGER.error("Iris console studio injection failed for {} ({})", dimensionId, pack, e);
IrisModdedCommands.fail(source, "Studio injection failed: " + e.getClass().getSimpleName() + (e.getMessage() == null ? "" : " - " + e.getMessage()));
return;
}
STUDIOS.put(CONSOLE_OWNER, dimensionId);
ServerLevel studio = handle.level();
int surface = studio.getMaxY();
try {
Engine engine = IrisModdedCommands.engineFor(studio);
if (engine != null) {
surface = engine.getMinHeight() + engine.getHeight(8, 8, false) + 2;
}
} catch (Throwable e) {
LOGGER.error("Iris console studio surface probe failed for {}", dimensionId, e);
}
IrisModdedCommands.ok(source, "Console studio open: " + dimensionId + " now runs '" + pack + "' seed " + seed + " (transient; not written to iris-dimensions.json and cleared on restart).");
IrisModdedCommands.ok(source, "Enter it with: /execute in " + dimensionId + " run tp @s 8.5 " + surface + " 8.5");
IrisModdedCommands.ok(source, "Pregen it with: /iris pregen start <radius> " + dimensionId);
IrisModdedCommands.ok(source, "Remove it with: /iris studio close");
}
private static void injectAndTeleport(CommandSourceStack source, MinecraftServer server, UUID owner, String dimensionId, String pack, long seed) {
ServerPlayer player = server.getPlayerList().getPlayer(owner);
if (player == null) {
@@ -366,12 +399,8 @@ public final class ModdedStudioCommands {
private static int close(CommandSourceStack source) {
ServerPlayer player = source.getPlayer();
if (player == null) {
IrisModdedCommands.fail(source, "This command can only be used by players.");
return 0;
}
MinecraftServer server = source.getServer();
UUID owner = player.getUUID();
UUID owner = player == null ? CONSOLE_OWNER : player.getUUID();
String dimensionId = STUDIOS.remove(owner);
if (dimensionId == null) {
IrisModdedCommands.fail(source, "You do not have an open studio. Use /iris studio open <pack> first.");
@@ -420,6 +449,9 @@ public final class ModdedStudioCommands {
}
private static String ownerName(MinecraftServer server, UUID owner) {
if (owner.equals(CONSOLE_OWNER)) {
return "console";
}
ServerPlayer player = server.getPlayerList().getPlayer(owner);
return player == null ? owner.toString() : player.getScoreboardName();
}
+3 -3
View File
@@ -28,9 +28,9 @@ plugins {
Properties rootProperties = new Properties()
file('../../gradle.properties').withInputStream { InputStream stream -> rootProperties.load(stream) }
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.1'))
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.1.2'))
String neoForgeVersion = providers.gradleProperty('neoForgeVersion').getOrElse(rootProperties.getProperty('neoForgeVersion', '26.1.2.75'))
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.2'))
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.2'))
String neoForgeVersion = providers.gradleProperty('neoForgeVersion').getOrElse(rootProperties.getProperty('neoForgeVersion', '26.2.0.6-beta'))
Closure<String> irisArtifactName = { String platform, String targetVersion ->
return "Iris v${project.version} [${platform}] ${targetVersion}.jar"
}
+5 -5
View File
@@ -41,16 +41,16 @@ plugins {
}
group = 'art.arcane'
version = providers.gradleProperty('irisVersion').getOrElse('4.0.0-26.1')
version = providers.gradleProperty('irisVersion').getOrElse('4.0.0-26.2')
project(':core') {
group = 'art.arcane'
version = rootProject.version
}
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse('26.1.2')
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse('26.2')
String fabricLoaderVersion = providers.gradleProperty('fabricLoaderVersion').getOrElse('0.19.3')
String forgeVersion = providers.gradleProperty('forgeVersion').getOrElse('26.1.2-64.0.9')
String neoForgeVersion = providers.gradleProperty('neoForgeVersion').getOrElse('26.1.2.75')
String forgeVersion = providers.gradleProperty('forgeVersion').getOrElse('26.2-65.0.0')
String neoForgeVersion = providers.gradleProperty('neoForgeVersion').getOrElse('26.2.0.6-beta')
String volmLibCoordinate = providers.gradleProperty('volmLibCoordinate')
.orElse('com.github.VolmitSoftware:VolmLib:master-SNAPSHOT')
.get()
@@ -101,7 +101,7 @@ registerCustomOutputTaskUnix('CrazyDev22LT', '/home/julian/Desktop/server/plugin
// ==============================================================
def nmsBindings = [
v26_1_R1: '26.1.2.build.66-stable',
v26_2_R1: '26.2.build.25-alpha',
]
Class nmsTypeClass = Class.forName('NMSBinding$Type')
nmsBindings.each { key, value ->
@@ -28,7 +28,7 @@ import java.util.List;
import java.util.Set;
public class INMS {
private static final Version CURRENT = new Version(26, 1, 2, "v26_1_R1");
private static final Version CURRENT = new Version(26, 2, 0, "v26_2_R1");
private static final List<Version> REVISION = List.of(
CURRENT
@@ -85,7 +85,7 @@ public class INMS {
MinecraftVersion detectedVersion = getMinecraftVersion();
String serverVersion = detectedVersion == null ? Bukkit.getServer().getVersion() : detectedVersion.value();
throw new IllegalStateException("Iris requires Minecraft 26.1.2. Detected server version: " + serverVersion);
throw new IllegalStateException("Iris requires Minecraft 26.2. Detected server version: " + serverVersion);
}
private static String getTag(List<Version> versions, String def) {
@@ -37,7 +37,11 @@ import art.arcane.volmlib.util.math.Vector3d;
import art.arcane.volmlib.util.nbt.mca.palette.MCABiomeContainer;
import art.arcane.volmlib.util.nbt.mca.palette.MCAPaletteAccess;
import art.arcane.volmlib.util.nbt.tag.CompoundTag;
import org.bukkit.*;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.WorldCreator;
import org.bukkit.block.Biome;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
@@ -197,7 +201,7 @@ public interface INMSBinding {
Color getBiomeColor(Location location, BiomeColor type);
default DataVersion getDataVersion() {
return DataVersion.V26_1_2;
return DataVersion.V26_2;
}
default int getSpawnChunkCount(World world) {
@@ -13,7 +13,7 @@ import java.util.function.Supplier;
@Getter
public enum DataVersion {
UNSUPPORTED("0.0.0", 0, () -> null),
V26_1_2("26.1.2", 101, DataFixerV1217::new);
V26_2("26.2", 107, DataFixerV1217::new);
private static final KMap<DataVersion, IDataFixer> cache = new KMap<>();
@Getter(AccessLevel.NONE)
private final Supplier<IDataFixer> constructor;
@@ -94,7 +94,7 @@ public final class Tasks {
} else if (parts.length >= 2) {
supportedVersions = parts[1];
} else {
supportedVersions = "26.1.2";
supportedVersions = "26.2";
}
if (!(INMS.get() instanceof NMSBinding1X)) {
@@ -114,7 +114,11 @@ public final class EngineBukkitOps {
try {
Runnable tileTask = () -> {
chunk.iterate(TileWrapper.class, (x, y, z, v) -> {
Block block = c.getBlock(x & 15, y + engine.getWorld().minHeight(), z & 15);
int worldY = y + engine.getWorld().minHeight();
if (worldY < c.getWorld().getMinHeight() || worldY >= c.getWorld().getMaxHeight()) {
return;
}
Block block = c.getBlock(x & 15, worldY, z & 15);
if (!TileData.setTileState(block, v.getData())) {
NamespacedKey blockTypeKey = KeyedType.getKey(block.getType());
NamespacedKey tileTypeKey = KeyedType.getKey(v.getData().getMaterial());
@@ -127,7 +131,11 @@ public final class EngineBukkitOps {
Runnable customTask = () -> {
chunk.iterate(Identifier.class, (x, y, z, v) -> {
IrisServices.get(ExternalDataSVC.class).processUpdate(engine, c.getBlock(x & 15, y + engine.getWorld().minHeight(), z & 15), v);
int worldY = y + engine.getWorld().minHeight();
if (worldY < c.getWorld().getMinHeight() || worldY >= c.getWorld().getMaxHeight()) {
return;
}
IrisServices.get(ExternalDataSVC.class).processUpdate(engine, c.getBlock(x & 15, worldY, z & 15), v);
});
};
@@ -246,6 +254,10 @@ public final class EngineBukkitOps {
}
public static void update(Engine engine, int x, int y, int z, Chunk c, MantleChunk<Matter> mc, RNG rf) {
World world = c.getWorld();
if (y < world.getMinHeight() || y >= world.getMaxHeight()) {
return;
}
Block block = c.getBlock(x, y, z);
BlockData data = block.getBlockData();
engine.blockUpdatedMetric();
@@ -22,7 +22,7 @@ import static org.mockito.Mockito.mockingDetails;
public class IrisRuntimeSchedulerModeRoutingTest {
@Test
public void autoResolvesToPaperLikeOnPurpurBranding() {
installServer("Purpur", "git-Purpur-2562 (MC: 26.1.2)");
installServer("Purpur", "git-Purpur-2562 (MC: 26.2)");
IrisSettings.IrisSettingsPregen pregen = new IrisSettings.IrisSettingsPregen();
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.AUTO;
@@ -32,7 +32,7 @@ public class IrisRuntimeSchedulerModeRoutingTest {
@Test
public void autoResolvesToFoliaWhenBrandingContainsFolia() {
installServer("Folia", "git-Folia-123 (MC: 26.1.2)");
installServer("Folia", "git-Folia-123 (MC: 26.2)");
IrisSettings.IrisSettingsPregen pregen = new IrisSettings.IrisSettingsPregen();
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.AUTO;
@@ -42,7 +42,7 @@ public class IrisRuntimeSchedulerModeRoutingTest {
@Test
public void autoResolvesToPaperLikeOnCanvasBranding() {
installServer("Canvas", "git-Canvas-101 (MC: 26.1.2)");
installServer("Canvas", "git-Canvas-101 (MC: 26.2)");
IrisSettings.IrisSettingsPregen pregen = new IrisSettings.IrisSettingsPregen();
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.AUTO;
@@ -52,7 +52,7 @@ public class IrisRuntimeSchedulerModeRoutingTest {
@Test
public void explicitModeBypassesAutoDetection() {
installServer("Purpur", "git-Purpur-2562 (MC: 26.1.2)");
installServer("Purpur", "git-Purpur-2562 (MC: 26.2)");
IrisSettings.IrisSettingsPregen pregen = new IrisSettings.IrisSettingsPregen();
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.FOLIA;
@@ -8,8 +8,8 @@ import static org.junit.Assert.assertTrue;
public class PaperLibBootstrapTest {
@Test
public void isModernVersionSchemeAcceptsMajorVersionAboveOne() {
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.1.2-R0.1-SNAPSHOT"));
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.1.2"));
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.2-R0.1-SNAPSHOT"));
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.2"));
assertTrue(PaperLibBootstrap.isModernVersionScheme("27.0.0-R0.1-SNAPSHOT"));
}
@@ -10,22 +10,22 @@ import static org.junit.Assert.assertTrue;
public class INMSBindingProbeCodesTest {
@Test
public void skipsSyntheticBukkitBindingWhenNmsIsEnabled() {
List<String> probeCodes = NmsBindingProbeSupport.getBindingProbeCodes("BUKKIT", false, List.of("v26_1_R1"));
List<String> probeCodes = NmsBindingProbeSupport.getBindingProbeCodes("BUKKIT", false, List.of("v26_2_R1"));
assertEquals(List.of("v26_1_R1"), probeCodes);
assertEquals(List.of("v26_2_R1"), probeCodes);
}
@Test
public void leavesBukkitFallbackEmptyWhenNmsIsDisabled() {
List<String> probeCodes = NmsBindingProbeSupport.getBindingProbeCodes("BUKKIT", true, List.of("v26_1_R1"));
List<String> probeCodes = NmsBindingProbeSupport.getBindingProbeCodes("BUKKIT", true, List.of("v26_2_R1"));
assertTrue(probeCodes.isEmpty());
}
@Test
public void keepsConcreteBindingCodesAsPrimaryProbe() {
List<String> probeCodes = NmsBindingProbeSupport.getBindingProbeCodes("v26_1_R1", false, List.of("v26_1_R1"));
List<String> probeCodes = NmsBindingProbeSupport.getBindingProbeCodes("v26_2_R1", false, List.of("v26_2_R1"));
assertEquals(List.of("v26_1_R1"), probeCodes);
assertEquals(List.of("v26_2_R1"), probeCodes);
}
}
@@ -18,50 +18,50 @@ public class MinecraftVersionTest {
@Test
public void detectsMinecraftVersionFromPurpurDecoratedVersion() {
Server server = mock(Server.class);
doReturn("git-Purpur-2570 (MC: 26.1.2)").when(server).getVersion();
doReturn("26.1.2.build.2570-experimental").when(server).getBukkitVersion();
doReturn("git-Purpur-2570 (MC: 26.2)").when(server).getVersion();
doReturn("26.2.build.2570-experimental").when(server).getBukkitVersion();
MinecraftVersion version = MinecraftVersion.detect(server);
assertEquals("26.1.2", version.value());
assertEquals("26.2", version.value());
assertEquals(26, version.major());
assertEquals(1, version.minor());
assertEquals(2, version.patch());
assertEquals(2, version.minor());
assertEquals(0, version.patch());
}
@Test
public void prefersRuntimeMinecraftVersionMethodWhenPresent() {
PaperLikeServer server = mock(PaperLikeServer.class);
doReturn("26.1.2").when(server).getMinecraftVersion();
doReturn("26.1.2-2570-e64b1b2 (MC: 26.1.2)").when(server).getVersion();
doReturn("26.1.2.build.2570-experimental").when(server).getBukkitVersion();
doReturn("26.2").when(server).getMinecraftVersion();
doReturn("26.2-2570-e64b1b2 (MC: 26.2)").when(server).getVersion();
doReturn("26.2.build.2570-experimental").when(server).getBukkitVersion();
MinecraftVersion version = MinecraftVersion.detect(server);
assertEquals("26.1.2", version.value());
assertEquals("26.2", version.value());
assertEquals(26, version.major());
assertEquals(1, version.minor());
assertEquals(2, version.patch());
assertEquals(2, version.minor());
assertEquals(0, version.patch());
}
@Test
public void rejectsPurpurApiBuildNumbersAsMinecraftVersion() {
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.1.2.build.2570-experimental");
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.2.build.2570-experimental");
assertNull(version);
}
@Test
public void parsesStandardBukkitSnapshotVersion() {
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.1.2-R0.1-SNAPSHOT");
assertEquals("26.1.2", version.value());
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.2-R0.1-SNAPSHOT");
assertEquals("26.2", version.value());
assertEquals(26, version.major());
assertEquals(1, version.minor());
assertEquals(2, version.patch());
assertEquals(2, version.minor());
assertEquals(0, version.patch());
}
@Test
public void comparesMajorBeforeMinor() {
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.1.2-R0.1-SNAPSHOT");
assertFalse(version.isAtLeast(26, 1, 3));
assertTrue(version.isAtLeast(26, 1, 2));
assertTrue(version.isSameRelease(26, 1, 2));
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.2-R0.1-SNAPSHOT");
assertFalse(version.isAtLeast(26, 2, 1));
assertTrue(version.isAtLeast(26, 2, 0));
assertTrue(version.isSameRelease(26, 2, 0));
}
}
@@ -1,28 +1,28 @@
Paper 26.1.2
Paper 26.2
/iris create matrix-paper overworld
/iris std o overworld
close Studio world
benchmark create/unload
Purpur 26.1.2
Purpur 26.2
/iris create matrix-purpur overworld
/iris std o overworld
close Studio world
benchmark create/unload
Canvas 26.1.2
Canvas 26.2
/iris create matrix-canvas overworld
/iris std o overworld
close Studio world
benchmark create/unload
Folia 26.1.2
Folia 26.2
/iris create matrix-folia overworld
/iris std o overworld
close Studio world
benchmark create/unload
Spigot 26.1.2
Spigot 26.2
/iris create matrix-spigot overworld
/iris std o overworld
close Studio world
+4 -4
View File
@@ -23,8 +23,8 @@ org.gradle.configureondemand=false
nmsTools.repo-url=https://repo.codemc.org/repository/nms/
nmsTools.specialSourceVersion=1.11.4
irisVersion=4.0.0-26.1
minecraftVersion=26.1.2
irisVersion=4.0.0-26.2
minecraftVersion=26.2
fabricLoaderVersion=0.19.3
forgeVersion=26.1.2-64.0.9
neoForgeVersion=26.1.2.75
forgeVersion=26.2-65.0.0
neoForgeVersion=26.2.0.6-beta
+2 -2
View File
@@ -13,9 +13,9 @@ grgit = "5.3.2" # https://github.com/ajoberstar/grgit
# Core Libraries
lombok = "1.18.44"
spigot = "26.1.2-R0.1-SNAPSHOT" # https://hub.spigotmc.org/nexus/repository/snapshots/org/spigotmc/spigot-api/maven-metadata.xml
spigot = "26.2-R0.1-SNAPSHOT" # https://hub.spigotmc.org/nexus/repository/snapshots/org/spigotmc/spigot-api/maven-metadata.xml
log4j = "2.19.0" # https://central.sonatype.com/artifact/org.apache.logging.log4j/log4j-api
adventure-api = "4.24.0" # https://github.com/KyoriPowered/adventure
adventure-api = "5.1.1" # https://github.com/KyoriPowered/adventure
adventure-platform = "4.4.1" # https://github.com/KyoriPowered/adventure-platform
annotations = "26.0.2" # https://central.sonatype.com/artifact/org.jetbrains/annotations
+1 -1
View File
@@ -46,7 +46,7 @@ tasks.named('run', JavaExec).configure {
}
String probePack = providers.gradleProperty('probePack')
.orElse('/Users/brianfopiano/Developer/RemoteGit/[Minecraft Server]/consumers/plugin-consumers/instances/purpur-26.1.2/plugins/Iris/packs/overworld')
.orElse('/Users/brianfopiano/Developer/RemoteGit/[Minecraft Server]/consumers/plugin-consumers/instances/purpur-26.2/plugins/Iris/packs/overworld')
.get()
String probeRadius = providers.gradleProperty('probeRadius').orElse('2').get()
+1 -1
View File
@@ -72,4 +72,4 @@ include(':core', ':core:agent')
include(':probe')
include(':spi')
include(':adapters:bukkit:plugin')
include(':adapters:bukkit:nms:v26_1_R1')
include(':adapters:bukkit:nms:v26_2_R1')