mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-12 03:24:14 +00:00
ff
This commit is contained in:
+1
-1
@@ -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 com.mojang.serialization.MapCodec;
|
||||||
import art.arcane.iris.spi.IrisLogging;
|
import art.arcane.iris.spi.IrisLogging;
|
||||||
+1
-1
@@ -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.datafixers.util.Pair;
|
||||||
import com.mojang.serialization.MapCodec;
|
import com.mojang.serialization.MapCodec;
|
||||||
+6
-3
@@ -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 com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import art.arcane.iris.spi.IrisLogging;
|
import art.arcane.iris.spi.IrisLogging;
|
||||||
@@ -812,11 +812,14 @@ public class NMSBinding implements INMSBinding {
|
|||||||
int minY = craftChunkData.getMinHeight();
|
int minY = craftChunkData.getMinHeight();
|
||||||
int height = craftChunkData.getMaxHeight() - minY;
|
int height = craftChunkData.getMaxHeight() - minY;
|
||||||
int accessMinY = access.getMinY();
|
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 baseX = access.getPos().getMinBlockX();
|
||||||
int baseZ = access.getPos().getMinBlockZ();
|
int baseZ = access.getPos().getMinBlockZ();
|
||||||
ChunkDataHunkHolder holder = data instanceof ChunkDataHunkHolder chunkDataHolder ? chunkDataHolder : null;
|
ChunkDataHunkHolder holder = data instanceof ChunkDataHunkHolder chunkDataHolder ? chunkDataHolder : null;
|
||||||
for (int z = 0; z < 16; z++) {
|
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 blockY = y + minY;
|
||||||
int sectionIndex = (blockY - accessMinY) >> 4;
|
int sectionIndex = (blockY - accessMinY) >> 4;
|
||||||
LevelChunkSection section = access.getSection(sectionIndex);
|
LevelChunkSection section = access.getSection(sectionIndex);
|
||||||
@@ -1108,7 +1111,7 @@ public class NMSBinding implements INMSBinding {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataVersion getDataVersion() {
|
public DataVersion getDataVersion() {
|
||||||
return DataVersion.V26_1_2;
|
return DataVersion.V26_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
+1
-1
@@ -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.Holder;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
def apiVersion = '26.1'
|
def apiVersion = '26.2'
|
||||||
def mainClass = 'art.arcane.iris.Iris'
|
def mainClass = 'art.arcane.iris.Iris'
|
||||||
|
|
||||||
String volmLibCoordinate = providers.gradleProperty('volmLibCoordinate')
|
String volmLibCoordinate = providers.gradleProperty('volmLibCoordinate')
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ plugins {
|
|||||||
|
|
||||||
Properties rootProperties = new Properties()
|
Properties rootProperties = new Properties()
|
||||||
file('../../gradle.properties').withInputStream { InputStream stream -> rootProperties.load(stream) }
|
file('../../gradle.properties').withInputStream { InputStream stream -> rootProperties.load(stream) }
|
||||||
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.1'))
|
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.2'))
|
||||||
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.1.2'))
|
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.2'))
|
||||||
String fabricLoaderVersion = providers.gradleProperty('fabricLoaderVersion').getOrElse(rootProperties.getProperty('fabricLoaderVersion', '0.19.3'))
|
String fabricLoaderVersion = providers.gradleProperty('fabricLoaderVersion').getOrElse(rootProperties.getProperty('fabricLoaderVersion', '0.19.3'))
|
||||||
Closure<String> irisArtifactName = { String platform, String targetVersion ->
|
Closure<String> irisArtifactName = { String platform, String targetVersion ->
|
||||||
return "Iris v${project.version} [${platform}] ${targetVersion}.jar"
|
return "Iris v${project.version} [${platform}] ${targetVersion}.jar"
|
||||||
@@ -100,18 +100,18 @@ configurations.create('jij') {
|
|||||||
dependencies {
|
dependencies {
|
||||||
minecraft("com.mojang:minecraft:${minecraftVersion}")
|
minecraft("com.mojang:minecraft:${minecraftVersion}")
|
||||||
implementation("net.fabricmc:fabric-loader:${fabricLoaderVersion}")
|
implementation("net.fabricmc:fabric-loader:${fabricLoaderVersion}")
|
||||||
jij('net.fabricmc.fabric-api:fabric-api-base:2.0.3+ece063234c')
|
jij('net.fabricmc.fabric-api:fabric-api-base:2.0.4+ece063239e')
|
||||||
jij('net.fabricmc.fabric-api:fabric-registry-sync-v0:7.1.0+2fa62b4e4c')
|
jij('net.fabricmc.fabric-api:fabric-registry-sync-v0:7.1.0+c7bd5b8e9e')
|
||||||
jij('net.fabricmc.fabric-api:fabric-resource-loader-v1:2.0.10+7c44c7324c')
|
jij('net.fabricmc.fabric-api:fabric-resource-loader-v1:2.0.13+9edec1269e')
|
||||||
jij('net.fabricmc.fabric-api:fabric-lifecycle-events-v1:4.1.0+6d50a0854c')
|
jij('net.fabricmc.fabric-api:fabric-lifecycle-events-v1:4.1.3+4575b05f9e')
|
||||||
jij('net.fabricmc.fabric-api:fabric-command-api-v2:3.0.5+e2bdee784c')
|
jij('net.fabricmc.fabric-api:fabric-command-api-v2:3.1.0+00cb03469e')
|
||||||
jij('net.fabricmc.fabric-api:fabric-events-interaction-v0:5.2.2+07b380be4c')
|
jij('net.fabricmc.fabric-api:fabric-events-interaction-v0:5.2.6+8f57f7ee9e')
|
||||||
implementation('net.fabricmc.fabric-api:fabric-api-base:2.0.3+ece063234c')
|
implementation('net.fabricmc.fabric-api:fabric-api-base:2.0.4+ece063239e')
|
||||||
implementation('net.fabricmc.fabric-api:fabric-registry-sync-v0:7.1.0+2fa62b4e4c')
|
implementation('net.fabricmc.fabric-api:fabric-registry-sync-v0:7.1.0+c7bd5b8e9e')
|
||||||
implementation('net.fabricmc.fabric-api:fabric-resource-loader-v1:2.0.10+7c44c7324c')
|
implementation('net.fabricmc.fabric-api:fabric-resource-loader-v1:2.0.13+9edec1269e')
|
||||||
implementation('net.fabricmc.fabric-api:fabric-lifecycle-events-v1:4.1.0+6d50a0854c')
|
implementation('net.fabricmc.fabric-api:fabric-lifecycle-events-v1:4.1.3+4575b05f9e')
|
||||||
implementation('net.fabricmc.fabric-api:fabric-command-api-v2:3.0.5+e2bdee784c')
|
implementation('net.fabricmc.fabric-api:fabric-command-api-v2:3.1.0+00cb03469e')
|
||||||
implementation('net.fabricmc.fabric-api:fabric-events-interaction-v0:5.2.2+07b380be4c')
|
implementation('net.fabricmc.fabric-api:fabric-events-interaction-v0:5.2.6+8f57f7ee9e')
|
||||||
compileOnly('org.slf4j:slf4j-api:2.0.17')
|
compileOnly('org.slf4j:slf4j-api:2.0.17')
|
||||||
compileOnly(libs.spigot) {
|
compileOnly(libs.spigot) {
|
||||||
transitive = false
|
transitive = false
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ plugins {
|
|||||||
|
|
||||||
Properties rootProperties = new Properties()
|
Properties rootProperties = new Properties()
|
||||||
file('../../gradle.properties').withInputStream { InputStream stream -> rootProperties.load(stream) }
|
file('../../gradle.properties').withInputStream { InputStream stream -> rootProperties.load(stream) }
|
||||||
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.1'))
|
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.2'))
|
||||||
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.1.2'))
|
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.2'))
|
||||||
String forgeVersion = providers.gradleProperty('forgeVersion').getOrElse(rootProperties.getProperty('forgeVersion', '26.1.2-64.0.9'))
|
String forgeVersion = providers.gradleProperty('forgeVersion').getOrElse(rootProperties.getProperty('forgeVersion', '26.2-65.0.0'))
|
||||||
Closure<String> loaderDisplayVersion = { String loaderVersion ->
|
Closure<String> loaderDisplayVersion = { String loaderVersion ->
|
||||||
String coordinatePrefix = "${minecraftVersion}-"
|
String coordinatePrefix = "${minecraftVersion}-"
|
||||||
if (loaderVersion.startsWith(coordinatePrefix)) {
|
if (loaderVersion.startsWith(coordinatePrefix)) {
|
||||||
|
|||||||
+2
-2
@@ -34,7 +34,7 @@ import net.minecraft.world.level.block.LeavesBlock;
|
|||||||
import net.minecraft.world.level.block.PointedDripstoneBlock;
|
import net.minecraft.world.level.block.PointedDripstoneBlock;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
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.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 net.minecraft.world.level.block.state.properties.Property;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -434,7 +434,7 @@ public final class ModdedBlockResolution {
|
|||||||
public static boolean isUpdatable(BlockState state) {
|
public static boolean isUpdatable(BlockState state) {
|
||||||
return isStorage(state)
|
return isStorage(state)
|
||||||
|| (state.getBlock() instanceof PointedDripstoneBlock
|
|| (state.getBlock() instanceof PointedDripstoneBlock
|
||||||
&& state.getValue(PointedDripstoneBlock.THICKNESS) == DripstoneThickness.TIP);
|
&& state.getValue(PointedDripstoneBlock.THICKNESS) == SpeleothemThickness.TIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isFoliage(BlockState state) {
|
public static boolean isFoliage(BlockState state) {
|
||||||
|
|||||||
+43
-2
@@ -67,6 +67,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
@@ -246,7 +247,11 @@ public final class IrisModdedCommands {
|
|||||||
IntegerArgumentType.getInteger(context, "z"), false, ModdedPregenMode.ASYNC, false))
|
IntegerArgumentType.getInteger(context, "z"), false, ModdedPregenMode.ASYNC, false))
|
||||||
.then(pregenStartFlag("gui", true, true, ModdedPregenMode.ASYNC, false))
|
.then(pregenStartFlag("gui", true, true, ModdedPregenMode.ASYNC, false))
|
||||||
.then(pregenStartFlag("sync", true, false, ModdedPregenMode.SYNC, 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")
|
.then(Commands.literal("stop")
|
||||||
.executes((CommandContext<CommandSourceStack> context) -> pregenStop(context.getSource())))
|
.executes((CommandContext<CommandSourceStack> context) -> pregenStop(context.getSource())))
|
||||||
.then(Commands.literal("x")
|
.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) {
|
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);
|
Engine engine = engineFor(level);
|
||||||
if (engine == null) {
|
if (engine == null) {
|
||||||
fail(source, "This dimension is not generated by Iris.");
|
fail(source, "This dimension is not generated by Iris.");
|
||||||
@@ -825,6 +843,29 @@ public final class IrisModdedCommands {
|
|||||||
return count;
|
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) {
|
private static CompletableFuture<Suggestions> suggestBiomeKeys(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) {
|
||||||
ModdedCommandFeedback.tab(context.getSource());
|
ModdedCommandFeedback.tab(context.getSource());
|
||||||
try {
|
try {
|
||||||
|
|||||||
+45
-13
@@ -90,6 +90,7 @@ public final class ModdedStudioCommands {
|
|||||||
private static final String STUDIO_NAMESPACE = "irisworldgen";
|
private static final String STUDIO_NAMESPACE = "irisworldgen";
|
||||||
private static final String STUDIO_PREFIX = "studio_";
|
private static final String STUDIO_PREFIX = "studio_";
|
||||||
private static final String DEFAULT_TEMPLATE = "example";
|
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 Map<UUID, String> STUDIOS = new ConcurrentHashMap<>();
|
||||||
private static final SuggestionProvider<CommandSourceStack> GENERATOR_KEYS = (CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) -> {
|
private static final SuggestionProvider<CommandSourceStack> GENERATOR_KEYS = (CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) -> {
|
||||||
ModdedCommandFeedback.tab(context.getSource());
|
ModdedCommandFeedback.tab(context.getSource());
|
||||||
@@ -291,19 +292,19 @@ public final class ModdedStudioCommands {
|
|||||||
return STUDIO_NAMESPACE + ":" + STUDIO_PREFIX + base;
|
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) {
|
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()) {
|
if (pack == null || pack.isBlank()) {
|
||||||
IrisModdedCommands.fail(source, "Provide a dimension pack: /iris studio open <pack> [seed]");
|
IrisModdedCommands.fail(source, "Provide a dimension pack: /iris studio open <pack> [seed]");
|
||||||
return 0;
|
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();
|
MinecraftServer server = source.getServer();
|
||||||
UUID owner = player.getUUID();
|
|
||||||
String dimensionId = studioDimensionId(player);
|
|
||||||
IrisModdedCommands.ok(source, "Opening studio for '" + pack + "' (seed " + seed + ")...");
|
IrisModdedCommands.ok(source, "Opening studio for '" + pack + "' (seed " + seed + ")...");
|
||||||
Thread thread = new Thread(() -> openAsync(source, server, owner, dimensionId, pack, seed), "Iris Studio Open");
|
Thread thread = new Thread(() -> openAsync(source, server, owner, dimensionId, pack, seed), "Iris Studio Open");
|
||||||
thread.setDaemon(true);
|
thread.setDaemon(true);
|
||||||
@@ -329,13 +330,45 @@ public final class ModdedStudioCommands {
|
|||||||
server.execute(() -> IrisModdedCommands.fail(source, "Pack '" + pack + "' has no dimensions/" + pack + ".json"));
|
server.execute(() -> IrisModdedCommands.fail(source, "Pack '" + pack + "' has no dimensions/" + pack + ".json"));
|
||||||
return;
|
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) {
|
} catch (Throwable e) {
|
||||||
LOGGER.error("Iris studio open failed for {}", pack, 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())));
|
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) {
|
private static void injectAndTeleport(CommandSourceStack source, MinecraftServer server, UUID owner, String dimensionId, String pack, long seed) {
|
||||||
ServerPlayer player = server.getPlayerList().getPlayer(owner);
|
ServerPlayer player = server.getPlayerList().getPlayer(owner);
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
@@ -366,12 +399,8 @@ public final class ModdedStudioCommands {
|
|||||||
|
|
||||||
private static int close(CommandSourceStack source) {
|
private static int close(CommandSourceStack source) {
|
||||||
ServerPlayer player = source.getPlayer();
|
ServerPlayer player = source.getPlayer();
|
||||||
if (player == null) {
|
|
||||||
IrisModdedCommands.fail(source, "This command can only be used by players.");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
MinecraftServer server = source.getServer();
|
MinecraftServer server = source.getServer();
|
||||||
UUID owner = player.getUUID();
|
UUID owner = player == null ? CONSOLE_OWNER : player.getUUID();
|
||||||
String dimensionId = STUDIOS.remove(owner);
|
String dimensionId = STUDIOS.remove(owner);
|
||||||
if (dimensionId == null) {
|
if (dimensionId == null) {
|
||||||
IrisModdedCommands.fail(source, "You do not have an open studio. Use /iris studio open <pack> first.");
|
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) {
|
private static String ownerName(MinecraftServer server, UUID owner) {
|
||||||
|
if (owner.equals(CONSOLE_OWNER)) {
|
||||||
|
return "console";
|
||||||
|
}
|
||||||
ServerPlayer player = server.getPlayerList().getPlayer(owner);
|
ServerPlayer player = server.getPlayerList().getPlayer(owner);
|
||||||
return player == null ? owner.toString() : player.getScoreboardName();
|
return player == null ? owner.toString() : player.getScoreboardName();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ plugins {
|
|||||||
|
|
||||||
Properties rootProperties = new Properties()
|
Properties rootProperties = new Properties()
|
||||||
file('../../gradle.properties').withInputStream { InputStream stream -> rootProperties.load(stream) }
|
file('../../gradle.properties').withInputStream { InputStream stream -> rootProperties.load(stream) }
|
||||||
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.1'))
|
String irisVersion = providers.gradleProperty('irisVersion').getOrElse(rootProperties.getProperty('irisVersion', '4.0.0-26.2'))
|
||||||
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.1.2'))
|
String minecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse(rootProperties.getProperty('minecraftVersion', '26.2'))
|
||||||
String neoForgeVersion = providers.gradleProperty('neoForgeVersion').getOrElse(rootProperties.getProperty('neoForgeVersion', '26.1.2.75'))
|
String neoForgeVersion = providers.gradleProperty('neoForgeVersion').getOrElse(rootProperties.getProperty('neoForgeVersion', '26.2.0.6-beta'))
|
||||||
Closure<String> irisArtifactName = { String platform, String targetVersion ->
|
Closure<String> irisArtifactName = { String platform, String targetVersion ->
|
||||||
return "Iris v${project.version} [${platform}] ${targetVersion}.jar"
|
return "Iris v${project.version} [${platform}] ${targetVersion}.jar"
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -41,16 +41,16 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = 'art.arcane'
|
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') {
|
project(':core') {
|
||||||
group = 'art.arcane'
|
group = 'art.arcane'
|
||||||
version = rootProject.version
|
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 fabricLoaderVersion = providers.gradleProperty('fabricLoaderVersion').getOrElse('0.19.3')
|
||||||
String forgeVersion = providers.gradleProperty('forgeVersion').getOrElse('26.1.2-64.0.9')
|
String forgeVersion = providers.gradleProperty('forgeVersion').getOrElse('26.2-65.0.0')
|
||||||
String neoForgeVersion = providers.gradleProperty('neoForgeVersion').getOrElse('26.1.2.75')
|
String neoForgeVersion = providers.gradleProperty('neoForgeVersion').getOrElse('26.2.0.6-beta')
|
||||||
String volmLibCoordinate = providers.gradleProperty('volmLibCoordinate')
|
String volmLibCoordinate = providers.gradleProperty('volmLibCoordinate')
|
||||||
.orElse('com.github.VolmitSoftware:VolmLib:master-SNAPSHOT')
|
.orElse('com.github.VolmitSoftware:VolmLib:master-SNAPSHOT')
|
||||||
.get()
|
.get()
|
||||||
@@ -101,7 +101,7 @@ registerCustomOutputTaskUnix('CrazyDev22LT', '/home/julian/Desktop/server/plugin
|
|||||||
// ==============================================================
|
// ==============================================================
|
||||||
|
|
||||||
def nmsBindings = [
|
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')
|
Class nmsTypeClass = Class.forName('NMSBinding$Type')
|
||||||
nmsBindings.each { key, value ->
|
nmsBindings.each { key, value ->
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import java.util.List;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class INMS {
|
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(
|
private static final List<Version> REVISION = List.of(
|
||||||
CURRENT
|
CURRENT
|
||||||
@@ -85,7 +85,7 @@ public class INMS {
|
|||||||
|
|
||||||
MinecraftVersion detectedVersion = getMinecraftVersion();
|
MinecraftVersion detectedVersion = getMinecraftVersion();
|
||||||
String serverVersion = detectedVersion == null ? Bukkit.getServer().getVersion() : detectedVersion.value();
|
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) {
|
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.MCABiomeContainer;
|
||||||
import art.arcane.volmlib.util.nbt.mca.palette.MCAPaletteAccess;
|
import art.arcane.volmlib.util.nbt.mca.palette.MCAPaletteAccess;
|
||||||
import art.arcane.volmlib.util.nbt.tag.CompoundTag;
|
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.block.Biome;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
@@ -197,7 +201,7 @@ public interface INMSBinding {
|
|||||||
Color getBiomeColor(Location location, BiomeColor type);
|
Color getBiomeColor(Location location, BiomeColor type);
|
||||||
|
|
||||||
default DataVersion getDataVersion() {
|
default DataVersion getDataVersion() {
|
||||||
return DataVersion.V26_1_2;
|
return DataVersion.V26_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
default int getSpawnChunkCount(World world) {
|
default int getSpawnChunkCount(World world) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import java.util.function.Supplier;
|
|||||||
@Getter
|
@Getter
|
||||||
public enum DataVersion {
|
public enum DataVersion {
|
||||||
UNSUPPORTED("0.0.0", 0, () -> null),
|
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<>();
|
private static final KMap<DataVersion, IDataFixer> cache = new KMap<>();
|
||||||
@Getter(AccessLevel.NONE)
|
@Getter(AccessLevel.NONE)
|
||||||
private final Supplier<IDataFixer> constructor;
|
private final Supplier<IDataFixer> constructor;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public final class Tasks {
|
|||||||
} else if (parts.length >= 2) {
|
} else if (parts.length >= 2) {
|
||||||
supportedVersions = parts[1];
|
supportedVersions = parts[1];
|
||||||
} else {
|
} else {
|
||||||
supportedVersions = "26.1.2";
|
supportedVersions = "26.2";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(INMS.get() instanceof NMSBinding1X)) {
|
if (!(INMS.get() instanceof NMSBinding1X)) {
|
||||||
|
|||||||
@@ -114,7 +114,11 @@ public final class EngineBukkitOps {
|
|||||||
try {
|
try {
|
||||||
Runnable tileTask = () -> {
|
Runnable tileTask = () -> {
|
||||||
chunk.iterate(TileWrapper.class, (x, y, z, v) -> {
|
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())) {
|
if (!TileData.setTileState(block, v.getData())) {
|
||||||
NamespacedKey blockTypeKey = KeyedType.getKey(block.getType());
|
NamespacedKey blockTypeKey = KeyedType.getKey(block.getType());
|
||||||
NamespacedKey tileTypeKey = KeyedType.getKey(v.getData().getMaterial());
|
NamespacedKey tileTypeKey = KeyedType.getKey(v.getData().getMaterial());
|
||||||
@@ -127,7 +131,11 @@ public final class EngineBukkitOps {
|
|||||||
|
|
||||||
Runnable customTask = () -> {
|
Runnable customTask = () -> {
|
||||||
chunk.iterate(Identifier.class, (x, y, z, v) -> {
|
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) {
|
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);
|
Block block = c.getBlock(x, y, z);
|
||||||
BlockData data = block.getBlockData();
|
BlockData data = block.getBlockData();
|
||||||
engine.blockUpdatedMetric();
|
engine.blockUpdatedMetric();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import static org.mockito.Mockito.mockingDetails;
|
|||||||
public class IrisRuntimeSchedulerModeRoutingTest {
|
public class IrisRuntimeSchedulerModeRoutingTest {
|
||||||
@Test
|
@Test
|
||||||
public void autoResolvesToPaperLikeOnPurpurBranding() {
|
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();
|
IrisSettings.IrisSettingsPregen pregen = new IrisSettings.IrisSettingsPregen();
|
||||||
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.AUTO;
|
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.AUTO;
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ public class IrisRuntimeSchedulerModeRoutingTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void autoResolvesToFoliaWhenBrandingContainsFolia() {
|
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();
|
IrisSettings.IrisSettingsPregen pregen = new IrisSettings.IrisSettingsPregen();
|
||||||
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.AUTO;
|
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.AUTO;
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ public class IrisRuntimeSchedulerModeRoutingTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void autoResolvesToPaperLikeOnCanvasBranding() {
|
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();
|
IrisSettings.IrisSettingsPregen pregen = new IrisSettings.IrisSettingsPregen();
|
||||||
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.AUTO;
|
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.AUTO;
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ public class IrisRuntimeSchedulerModeRoutingTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void explicitModeBypassesAutoDetection() {
|
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();
|
IrisSettings.IrisSettingsPregen pregen = new IrisSettings.IrisSettingsPregen();
|
||||||
|
|
||||||
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.FOLIA;
|
pregen.runtimeSchedulerMode = IrisRuntimeSchedulerMode.FOLIA;
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import static org.junit.Assert.assertTrue;
|
|||||||
public class PaperLibBootstrapTest {
|
public class PaperLibBootstrapTest {
|
||||||
@Test
|
@Test
|
||||||
public void isModernVersionSchemeAcceptsMajorVersionAboveOne() {
|
public void isModernVersionSchemeAcceptsMajorVersionAboveOne() {
|
||||||
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.1.2-R0.1-SNAPSHOT"));
|
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.2-R0.1-SNAPSHOT"));
|
||||||
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.1.2"));
|
assertTrue(PaperLibBootstrap.isModernVersionScheme("26.2"));
|
||||||
assertTrue(PaperLibBootstrap.isModernVersionScheme("27.0.0-R0.1-SNAPSHOT"));
|
assertTrue(PaperLibBootstrap.isModernVersionScheme("27.0.0-R0.1-SNAPSHOT"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,22 +10,22 @@ import static org.junit.Assert.assertTrue;
|
|||||||
public class INMSBindingProbeCodesTest {
|
public class INMSBindingProbeCodesTest {
|
||||||
@Test
|
@Test
|
||||||
public void skipsSyntheticBukkitBindingWhenNmsIsEnabled() {
|
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
|
@Test
|
||||||
public void leavesBukkitFallbackEmptyWhenNmsIsDisabled() {
|
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());
|
assertTrue(probeCodes.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void keepsConcreteBindingCodesAsPrimaryProbe() {
|
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
|
@Test
|
||||||
public void detectsMinecraftVersionFromPurpurDecoratedVersion() {
|
public void detectsMinecraftVersionFromPurpurDecoratedVersion() {
|
||||||
Server server = mock(Server.class);
|
Server server = mock(Server.class);
|
||||||
doReturn("git-Purpur-2570 (MC: 26.1.2)").when(server).getVersion();
|
doReturn("git-Purpur-2570 (MC: 26.2)").when(server).getVersion();
|
||||||
doReturn("26.1.2.build.2570-experimental").when(server).getBukkitVersion();
|
doReturn("26.2.build.2570-experimental").when(server).getBukkitVersion();
|
||||||
|
|
||||||
MinecraftVersion version = MinecraftVersion.detect(server);
|
MinecraftVersion version = MinecraftVersion.detect(server);
|
||||||
assertEquals("26.1.2", version.value());
|
assertEquals("26.2", version.value());
|
||||||
assertEquals(26, version.major());
|
assertEquals(26, version.major());
|
||||||
assertEquals(1, version.minor());
|
assertEquals(2, version.minor());
|
||||||
assertEquals(2, version.patch());
|
assertEquals(0, version.patch());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void prefersRuntimeMinecraftVersionMethodWhenPresent() {
|
public void prefersRuntimeMinecraftVersionMethodWhenPresent() {
|
||||||
PaperLikeServer server = mock(PaperLikeServer.class);
|
PaperLikeServer server = mock(PaperLikeServer.class);
|
||||||
doReturn("26.1.2").when(server).getMinecraftVersion();
|
doReturn("26.2").when(server).getMinecraftVersion();
|
||||||
doReturn("26.1.2-2570-e64b1b2 (MC: 26.1.2)").when(server).getVersion();
|
doReturn("26.2-2570-e64b1b2 (MC: 26.2)").when(server).getVersion();
|
||||||
doReturn("26.1.2.build.2570-experimental").when(server).getBukkitVersion();
|
doReturn("26.2.build.2570-experimental").when(server).getBukkitVersion();
|
||||||
|
|
||||||
MinecraftVersion version = MinecraftVersion.detect(server);
|
MinecraftVersion version = MinecraftVersion.detect(server);
|
||||||
assertEquals("26.1.2", version.value());
|
assertEquals("26.2", version.value());
|
||||||
assertEquals(26, version.major());
|
assertEquals(26, version.major());
|
||||||
assertEquals(1, version.minor());
|
assertEquals(2, version.minor());
|
||||||
assertEquals(2, version.patch());
|
assertEquals(0, version.patch());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void rejectsPurpurApiBuildNumbersAsMinecraftVersion() {
|
public void rejectsPurpurApiBuildNumbersAsMinecraftVersion() {
|
||||||
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.1.2.build.2570-experimental");
|
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.2.build.2570-experimental");
|
||||||
assertNull(version);
|
assertNull(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void parsesStandardBukkitSnapshotVersion() {
|
public void parsesStandardBukkitSnapshotVersion() {
|
||||||
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.1.2-R0.1-SNAPSHOT");
|
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.2-R0.1-SNAPSHOT");
|
||||||
assertEquals("26.1.2", version.value());
|
assertEquals("26.2", version.value());
|
||||||
assertEquals(26, version.major());
|
assertEquals(26, version.major());
|
||||||
assertEquals(1, version.minor());
|
assertEquals(2, version.minor());
|
||||||
assertEquals(2, version.patch());
|
assertEquals(0, version.patch());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void comparesMajorBeforeMinor() {
|
public void comparesMajorBeforeMinor() {
|
||||||
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.1.2-R0.1-SNAPSHOT");
|
MinecraftVersion version = MinecraftVersion.fromBukkitVersion("26.2-R0.1-SNAPSHOT");
|
||||||
assertFalse(version.isAtLeast(26, 1, 3));
|
assertFalse(version.isAtLeast(26, 2, 1));
|
||||||
assertTrue(version.isAtLeast(26, 1, 2));
|
assertTrue(version.isAtLeast(26, 2, 0));
|
||||||
assertTrue(version.isSameRelease(26, 1, 2));
|
assertTrue(version.isSameRelease(26, 2, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -1,28 +1,28 @@
|
|||||||
Paper 26.1.2
|
Paper 26.2
|
||||||
/iris create matrix-paper overworld
|
/iris create matrix-paper overworld
|
||||||
/iris std o overworld
|
/iris std o overworld
|
||||||
close Studio world
|
close Studio world
|
||||||
benchmark create/unload
|
benchmark create/unload
|
||||||
|
|
||||||
Purpur 26.1.2
|
Purpur 26.2
|
||||||
/iris create matrix-purpur overworld
|
/iris create matrix-purpur overworld
|
||||||
/iris std o overworld
|
/iris std o overworld
|
||||||
close Studio world
|
close Studio world
|
||||||
benchmark create/unload
|
benchmark create/unload
|
||||||
|
|
||||||
Canvas 26.1.2
|
Canvas 26.2
|
||||||
/iris create matrix-canvas overworld
|
/iris create matrix-canvas overworld
|
||||||
/iris std o overworld
|
/iris std o overworld
|
||||||
close Studio world
|
close Studio world
|
||||||
benchmark create/unload
|
benchmark create/unload
|
||||||
|
|
||||||
Folia 26.1.2
|
Folia 26.2
|
||||||
/iris create matrix-folia overworld
|
/iris create matrix-folia overworld
|
||||||
/iris std o overworld
|
/iris std o overworld
|
||||||
close Studio world
|
close Studio world
|
||||||
benchmark create/unload
|
benchmark create/unload
|
||||||
|
|
||||||
Spigot 26.1.2
|
Spigot 26.2
|
||||||
/iris create matrix-spigot overworld
|
/iris create matrix-spigot overworld
|
||||||
/iris std o overworld
|
/iris std o overworld
|
||||||
close Studio world
|
close Studio world
|
||||||
|
|||||||
+4
-4
@@ -23,8 +23,8 @@ org.gradle.configureondemand=false
|
|||||||
|
|
||||||
nmsTools.repo-url=https://repo.codemc.org/repository/nms/
|
nmsTools.repo-url=https://repo.codemc.org/repository/nms/
|
||||||
nmsTools.specialSourceVersion=1.11.4
|
nmsTools.specialSourceVersion=1.11.4
|
||||||
irisVersion=4.0.0-26.1
|
irisVersion=4.0.0-26.2
|
||||||
minecraftVersion=26.1.2
|
minecraftVersion=26.2
|
||||||
fabricLoaderVersion=0.19.3
|
fabricLoaderVersion=0.19.3
|
||||||
forgeVersion=26.1.2-64.0.9
|
forgeVersion=26.2-65.0.0
|
||||||
neoForgeVersion=26.1.2.75
|
neoForgeVersion=26.2.0.6-beta
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ grgit = "5.3.2" # https://github.com/ajoberstar/grgit
|
|||||||
|
|
||||||
# Core Libraries
|
# Core Libraries
|
||||||
lombok = "1.18.44"
|
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
|
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
|
adventure-platform = "4.4.1" # https://github.com/KyoriPowered/adventure-platform
|
||||||
|
|
||||||
annotations = "26.0.2" # https://central.sonatype.com/artifact/org.jetbrains/annotations
|
annotations = "26.0.2" # https://central.sonatype.com/artifact/org.jetbrains/annotations
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ tasks.named('run', JavaExec).configure {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String probePack = providers.gradleProperty('probePack')
|
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()
|
.get()
|
||||||
String probeRadius = providers.gradleProperty('probeRadius').orElse('2').get()
|
String probeRadius = providers.gradleProperty('probeRadius').orElse('2').get()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -72,4 +72,4 @@ include(':core', ':core:agent')
|
|||||||
include(':probe')
|
include(':probe')
|
||||||
include(':spi')
|
include(':spi')
|
||||||
include(':adapters:bukkit:plugin')
|
include(':adapters:bukkit:plugin')
|
||||||
include(':adapters:bukkit:nms:v26_1_R1')
|
include(':adapters:bukkit:nms:v26_2_R1')
|
||||||
|
|||||||
Reference in New Issue
Block a user