diff --git a/adapters/fabric/build.gradle b/adapters/fabric/build.gradle index c50dbc03c..42ed74232 100644 --- a/adapters/fabric/build.gradle +++ b/adapters/fabric/build.gradle @@ -41,6 +41,17 @@ java { } } +sourceSets { + main { + java { + srcDir '../modded-common/src/main/java' + } + resources { + srcDir '../modded-common/src/main/resources' + } + } +} + repositories { mavenCentral() maven { diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricModdedLoader.java b/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricModdedLoader.java new file mode 100644 index 000000000..13fb2a285 --- /dev/null +++ b/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricModdedLoader.java @@ -0,0 +1,60 @@ +/* + * Iris is a World Generator for Minecraft Servers + * Copyright (c) 2026 Arcane Arts (Volmit Software) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package art.arcane.iris.fabric; + +import art.arcane.iris.modded.ModdedLoader; +import net.fabricmc.loader.api.FabricLoader; +import net.fabricmc.loader.api.ModContainer; +import net.minecraft.server.MinecraftServer; + +import java.io.File; +import java.nio.file.Path; + +public final class FabricModdedLoader implements ModdedLoader { + @Override + public String platformName() { + return "fabric"; + } + + @Override + public String minecraftVersion() { + return FabricLoader.getInstance().getModContainer("minecraft") + .map((ModContainer container) -> container.getMetadata().getVersion().getFriendlyString()) + .orElse("unknown"); + } + + @Override + public MinecraftServer currentServer() { + Object instance = FabricLoader.getInstance().getGameInstance(); + return instance instanceof MinecraftServer server ? server : null; + } + + @Override + public Path configDir() { + return FabricLoader.getInstance().getConfigDir(); + } + + @Override + public File modJar() { + return FabricLoader.getInstance().getModContainer("irisworldgen") + .flatMap((ModContainer container) -> container.getOrigin().getPaths().stream().findFirst()) + .map((Path p) -> p.toFile()) + .orElse(null); + } +} diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/IrisFabricBootstrap.java b/adapters/fabric/src/main/java/art/arcane/iris/fabric/IrisFabricBootstrap.java index cd3204c36..79c28c7a7 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/IrisFabricBootstrap.java +++ b/adapters/fabric/src/main/java/art/arcane/iris/fabric/IrisFabricBootstrap.java @@ -18,6 +18,11 @@ package art.arcane.iris.fabric; +import art.arcane.iris.modded.IrisModdedChunkGenerator; +import art.arcane.iris.modded.ModdedEngineBootstrap; +import art.arcane.iris.modded.ModdedParityProbe; +import art.arcane.iris.modded.ModdedWorldCheck; +import art.arcane.iris.modded.ModdedWorldEngines; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; import net.fabricmc.loader.api.FabricLoader; @@ -31,14 +36,10 @@ import org.slf4j.LoggerFactory; public final class IrisFabricBootstrap implements ModInitializer { private static final Logger LOGGER = LoggerFactory.getLogger("Iris"); - private static final String[] CORE_SELF_TEST_CLASSES = { - "art.arcane.iris.engine.IrisEngine", - "art.arcane.iris.util.common.data.B", - "art.arcane.iris.core.loader.IrisData" - }; @Override public void onInitialize() { + ModdedEngineBootstrap.initialize(new FabricModdedLoader()); FabricLoader loader = FabricLoader.getInstance(); String modVersion = loader.getModContainer("irisworldgen") .map((ModContainer container) -> container.getMetadata().getVersion().getFriendlyString()) @@ -48,37 +49,22 @@ public final class IrisFabricBootstrap implements ModInitializer { .orElse("unknown"); LOGGER.info("Iris {} bootstrapping on Minecraft {} (Fabric)", modVersion, minecraftVersion); - int loadedClasses = 0; - for (String className : CORE_SELF_TEST_CLASSES) { - try { - Class.forName(className, true, IrisFabricBootstrap.class.getClassLoader()); - loadedClasses++; - } catch (Throwable error) { - LOGGER.error("Iris core self-test failed to initialize {}", className, error); - } - } - - if (loadedClasses != CORE_SELF_TEST_CLASSES.length) { - throw new IllegalStateException("Iris core self-test failed: only " + loadedClasses + " of " + CORE_SELF_TEST_CLASSES.length + " engine classes initialized"); - } - - LOGGER.info("Iris core loaded ({} classes ok)", loadedClasses); - - FabricEngineBootstrap.bind(); - Registry.register(BuiltInRegistries.CHUNK_GENERATOR, Identifier.fromNamespaceAndPath("irisworldgen", "iris"), IrisFabricChunkGenerator.CODEC); + ModdedEngineBootstrap.selfTest(IrisFabricBootstrap.class.getClassLoader()); + ModdedEngineBootstrap.bind(); + Registry.register(BuiltInRegistries.CHUNK_GENERATOR, Identifier.fromNamespaceAndPath("irisworldgen", "iris"), IrisModdedChunkGenerator.CODEC); LOGGER.info("Iris chunk generator registered as irisworldgen:iris"); - ServerLifecycleEvents.SERVER_STOPPING.register((MinecraftServer server) -> FabricWorldEngines.shutdown()); + ServerLifecycleEvents.SERVER_STOPPING.register((MinecraftServer server) -> ModdedWorldEngines.shutdown()); String parity = System.getProperty("iris.parity"); if (parity != null) { LOGGER.info("Iris parity probe armed: {}", parity); - FabricParityProbe.schedule(parity); + ModdedParityProbe.schedule(parity); } String worldCheck = System.getProperty("iris.worldcheck"); if (worldCheck != null) { LOGGER.info("Iris world check armed"); - FabricWorldCheck.schedule(); + ModdedWorldCheck.schedule(); } } } diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/IrisFabricChunkGenerator.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/IrisModdedChunkGenerator.java similarity index 93% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/IrisFabricChunkGenerator.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/IrisModdedChunkGenerator.java index 972cd0bca..c6e6da0c4 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/IrisFabricChunkGenerator.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/IrisModdedChunkGenerator.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.engine.framework.Engine; import art.arcane.iris.spi.IrisPlatforms; @@ -68,19 +68,19 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicBoolean; -public final class IrisFabricChunkGenerator extends ChunkGenerator { +public final class IrisModdedChunkGenerator extends ChunkGenerator { private static final Logger LOGGER = LoggerFactory.getLogger("Iris"); - public static final MapCodec CODEC = RecordCodecBuilder.mapCodec((RecordCodecBuilder.Instance instance) -> instance.group( - BiomeSource.CODEC.fieldOf("biome_source").forGetter((IrisFabricChunkGenerator generator) -> generator.biomeSource), - Codec.STRING.optionalFieldOf("dimension", "overworld").forGetter((IrisFabricChunkGenerator generator) -> generator.dimensionKey) - ).apply(instance, IrisFabricChunkGenerator::new)); + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec((RecordCodecBuilder.Instance instance) -> instance.group( + BiomeSource.CODEC.fieldOf("biome_source").forGetter((IrisModdedChunkGenerator generator) -> generator.biomeSource), + Codec.STRING.optionalFieldOf("dimension", "overworld").forGetter((IrisModdedChunkGenerator generator) -> generator.dimensionKey) + ).apply(instance, IrisModdedChunkGenerator::new)); private final String dimensionKey; private final ConcurrentHashMap> biomeHolders = new ConcurrentHashMap<>(); private final AtomicBoolean announced = new AtomicBoolean(false); private volatile Engine engine; - public IrisFabricChunkGenerator(BiomeSource biomeSource, String dimensionKey) { + public IrisModdedChunkGenerator(BiomeSource biomeSource, String dimensionKey) { super(biomeSource); this.dimensionKey = dimensionKey; } @@ -91,7 +91,7 @@ public final class IrisFabricChunkGenerator extends ChunkGenerator { } private ServerLevel boundLevel() { - MinecraftServer server = FabricEngineBootstrap.currentServer(); + MinecraftServer server = ModdedEngineBootstrap.currentServer(); if (server == null) { return null; } @@ -116,7 +116,7 @@ public final class IrisFabricChunkGenerator extends ChunkGenerator { if (level == null) { throw new IllegalStateException("Iris generator '" + dimensionKey + "' has no bound ServerLevel yet"); } - Engine created = FabricWorldEngines.get(level, dimensionKey); + Engine created = ModdedWorldEngines.get(level, dimensionKey); engine = created; return created; } @@ -139,7 +139,7 @@ public final class IrisFabricChunkGenerator extends ChunkGenerator { Engine generationEngine = engine(); ChunkPos pos = chunk.getPos(); if (announced.compareAndSet(false, true)) { - LOGGER.info("Iris generating {} through IrisFabricChunkGenerator (dim={} first chunk {},{})", + LOGGER.info("Iris generating {} through IrisModdedChunkGenerator (dim={} first chunk {},{})", dimensionKey, generationEngine.getDimension().getLoadKey(), pos.x(), pos.z()); } LOGGER.debug("Iris generating chunk {},{}", pos.x(), pos.z()); @@ -148,7 +148,7 @@ public final class IrisFabricChunkGenerator extends ChunkGenerator { int dimMaxY = generationEngine.getMaxHeight(); int height = dimMaxY - dimMinY; PlatformBlockState air = IrisPlatforms.get().registries().air(); - FabricBlockBuffer blocks = new FabricBlockBuffer(height, air); + ModdedBlockBuffer blocks = new ModdedBlockBuffer(height, air); Hunk biomes = Hunk.newArrayHunk(16, height, 16); try { generationEngine.generate(pos.getMinBlockX(), pos.getMinBlockZ(), blocks, biomes, false); @@ -192,7 +192,7 @@ public final class IrisFabricChunkGenerator extends ChunkGenerator { return raced != null ? raced : resolved; } - private void writeBlocks(ChunkAccess chunk, FabricBlockBuffer blocks, int dimMinY, int height) { + private void writeBlocks(ChunkAccess chunk, ModdedBlockBuffer blocks, int dimMinY, int height) { int chunkMinY = chunk.getMinY(); int chunkMaxY = chunkMinY + chunk.getHeight(); int from = Math.max(dimMinY, chunkMinY); @@ -226,14 +226,14 @@ public final class IrisFabricChunkGenerator extends ChunkGenerator { } private static final class HunkBiomeResolver implements BiomeResolver { - private final IrisFabricChunkGenerator generator; + private final IrisModdedChunkGenerator generator; private final Hunk biomes; private final Registry registry; private final ChunkPos pos; private final int dimMinY; private final int height; - private HunkBiomeResolver(IrisFabricChunkGenerator generator, Hunk biomes, Registry registry, ChunkPos pos, int dimMinY, int height) { + private HunkBiomeResolver(IrisModdedChunkGenerator generator, Hunk biomes, Registry registry, ChunkPos pos, int dimMinY, int height) { this.generator = generator; this.biomes = biomes; this.registry = registry; diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBiome.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBiome.java similarity index 80% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBiome.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBiome.java index eaa4c4210..18867b739 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBiome.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBiome.java @@ -16,29 +16,29 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.spi.PlatformBiome; import net.minecraft.world.level.biome.Biome; import java.util.concurrent.ConcurrentHashMap; -public final class FabricBiome implements PlatformBiome { - private static final ConcurrentHashMap CACHE = new ConcurrentHashMap<>(); +public final class ModdedBiome implements PlatformBiome { + private static final ConcurrentHashMap CACHE = new ConcurrentHashMap<>(); private final Biome biome; private final String key; private final String namespace; - private FabricBiome(Biome biome, String key) { + private ModdedBiome(Biome biome, String key) { this.biome = biome; this.key = key; int colon = key.indexOf(':'); this.namespace = colon >= 0 ? key.substring(0, colon) : "minecraft"; } - public static FabricBiome of(Biome biome, String key) { - return CACHE.computeIfAbsent(key, (String k) -> new FabricBiome(biome, k)); + public static ModdedBiome of(Biome biome, String key) { + return CACHE.computeIfAbsent(key, (String k) -> new ModdedBiome(biome, k)); } @Override diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBiomeWriter.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBiomeWriter.java similarity index 91% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBiomeWriter.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBiomeWriter.java index 750846fb2..8160c4807 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBiomeWriter.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBiomeWriter.java @@ -16,14 +16,14 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.spi.PlatformBiome; import art.arcane.iris.spi.PlatformBiomeWriter; import java.util.List; -public final class FabricBiomeWriter implements PlatformBiomeWriter { +public final class ModdedBiomeWriter implements PlatformBiomeWriter { @Override public int biomeIdFor(String key) { return 0; diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBlockBuffer.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBlockBuffer.java similarity index 93% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBlockBuffer.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBlockBuffer.java index 00d2eeaa5..7b1a5633c 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBlockBuffer.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBlockBuffer.java @@ -16,17 +16,17 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.spi.PlatformBlockState; import art.arcane.iris.util.project.hunk.Hunk; -public final class FabricBlockBuffer implements Hunk { +public final class ModdedBlockBuffer implements Hunk { private final PlatformBlockState[] data; private final PlatformBlockState air; private final int height; - public FabricBlockBuffer(int height, PlatformBlockState air) { + public ModdedBlockBuffer(int height, PlatformBlockState air) { this.data = new PlatformBlockState[16 * height * 16]; this.air = air; this.height = height; diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBlockResolution.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBlockResolution.java similarity index 96% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBlockResolution.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBlockResolution.java index 869e1b2fe..466ff1968 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBlockResolution.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBlockResolution.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.core.IrisSettings; import art.arcane.iris.spi.IrisLogging; @@ -44,7 +44,7 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -public final class FabricBlockResolution { +public final class ModdedBlockResolution { private static final Set FOLIAGE = blockSet( "poppy", "dandelion", "cornflower", "sweet_berry_bush", "crimson_roots", "warped_roots", "nether_sprouts", "allium", "azure_bluet", "blue_orchid", "oxeye_daisy", "lily_of_the_valley", @@ -84,7 +84,7 @@ public final class FabricBlockResolution { private static final BlockState AIR = Blocks.AIR.defaultBlockState(); private static long lastWarnMs; - private FabricBlockResolution() { + private ModdedBlockResolution() { } record Parsed(BlockState state, Map, Comparable> properties) { @@ -162,27 +162,27 @@ public final class FabricBlockResolution { return AIR; } - public static FabricBlockState getAir() { - return FabricBlockState.of(AIR, null); + public static ModdedBlockState getAir() { + return ModdedBlockState.of(AIR, null); } - public static FabricBlockState get(String bdxf) { + public static ModdedBlockState get(String bdxf) { Parsed parsed = resolveGet(bdxf); - return FabricBlockState.of(parsed.state(), parsed.properties()); + return ModdedBlockState.of(parsed.state(), parsed.properties()); } - public static FabricBlockState getNoCompat(String bdxf) { + public static ModdedBlockState getNoCompat(String bdxf) { Parsed parsed = resolveNoCompat(bdxf); - return FabricBlockState.of(parsed.state(), parsed.properties()); + return ModdedBlockState.of(parsed.state(), parsed.properties()); } - public static FabricBlockState getOrNull(String bdxf) { + public static ModdedBlockState getOrNull(String bdxf) { return getOrNull(bdxf, false); } - public static FabricBlockState getOrNull(String bdxf, boolean warn) { + public static ModdedBlockState getOrNull(String bdxf, boolean warn) { Parsed parsed = resolveOrNull(bdxf, warn); - return parsed == null ? null : FabricBlockState.of(parsed.state(), parsed.properties()); + return parsed == null ? null : ModdedBlockState.of(parsed.state(), parsed.properties()); } static Parsed resolveGet(String bdxf) { @@ -234,9 +234,9 @@ public final class FabricBlockResolution { return null; } - public static FabricBlockState strictParse(String key) { + public static ModdedBlockState strictParse(String key) { Parsed parsed = parseStrict(key); - return FabricBlockState.of(parsed.state(), parsed.properties()); + return ModdedBlockState.of(parsed.state(), parsed.properties()); } private static Parsed parseStrict(String key) { diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBlockState.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBlockState.java similarity index 82% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBlockState.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBlockState.java index 6315595f3..45425c505 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricBlockState.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedBlockState.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.spi.PlatformBlockState; import net.minecraft.core.registries.BuiltInRegistries; @@ -28,8 +28,8 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; -public final class FabricBlockState implements PlatformBlockState { - private static final ConcurrentHashMap CACHE = new ConcurrentHashMap<>(); +public final class ModdedBlockState implements PlatformBlockState { + private static final ConcurrentHashMap CACHE = new ConcurrentHashMap<>(); private final BlockState state; private final Map, Comparable> parsedProperties; @@ -43,16 +43,16 @@ public final class FabricBlockState implements PlatformBlockState { private volatile Boolean foliage; private volatile Boolean decorant; - private FabricBlockState(BlockState state, Map, Comparable> parsedProperties, String key) { + private ModdedBlockState(BlockState state, Map, Comparable> parsedProperties, String key) { this.state = state; this.parsedProperties = parsedProperties; this.key = key; this.namespace = parseNamespace(key); } - public static FabricBlockState of(BlockState state, Map, Comparable> parsedProperties) { + public static ModdedBlockState of(BlockState state, Map, Comparable> parsedProperties) { String key = serialize(state); - return CACHE.computeIfAbsent(key, (String k) -> new FabricBlockState(state, parsedProperties, k)); + return CACHE.computeIfAbsent(key, (String k) -> new ModdedBlockState(state, parsedProperties, k)); } public static String serialize(BlockState state) { @@ -80,7 +80,7 @@ public final class FabricBlockState implements PlatformBlockState { if (this == other) { return true; } - if (!(other instanceof FabricBlockState blockState)) { + if (!(other instanceof ModdedBlockState blockState)) { return false; } return state.equals(blockState.state); @@ -143,7 +143,7 @@ public final class FabricBlockState implements PlatformBlockState { public boolean isAir() { Boolean cached = air; if (cached == null) { - cached = FabricBlockResolution.isAir(state); + cached = ModdedBlockResolution.isAir(state); air = cached; } return cached; @@ -153,7 +153,7 @@ public final class FabricBlockState implements PlatformBlockState { public boolean isSolid() { Boolean cached = solid; if (cached == null) { - cached = FabricBlockResolution.isSolid(state); + cached = ModdedBlockResolution.isSolid(state); solid = cached; } return cached; @@ -163,7 +163,7 @@ public final class FabricBlockState implements PlatformBlockState { public boolean isOccluding() { Boolean cached = occluding; if (cached == null) { - cached = FabricBlockResolution.isOccluding(state); + cached = ModdedBlockResolution.isOccluding(state); occluding = cached; } return cached; @@ -178,7 +178,7 @@ public final class FabricBlockState implements PlatformBlockState { public boolean isFluid() { Boolean cached = fluid; if (cached == null) { - cached = FabricBlockResolution.isFluid(state); + cached = ModdedBlockResolution.isFluid(state); fluid = cached; } return cached; @@ -188,7 +188,7 @@ public final class FabricBlockState implements PlatformBlockState { public boolean isWater() { Boolean cached = water; if (cached == null) { - cached = FabricBlockResolution.isWater(state); + cached = ModdedBlockResolution.isWater(state); water = cached; } return cached; @@ -196,24 +196,24 @@ public final class FabricBlockState implements PlatformBlockState { @Override public boolean isWaterLogged() { - return FabricBlockResolution.isWaterLogged(state); + return ModdedBlockResolution.isWaterLogged(state); } @Override public boolean isLit() { - return FabricBlockResolution.isLit(state); + return ModdedBlockResolution.isLit(state); } @Override public boolean isUpdatable() { - return FabricBlockResolution.isUpdatable(state); + return ModdedBlockResolution.isUpdatable(state); } @Override public boolean isFoliage() { Boolean cached = foliage; if (cached == null) { - cached = FabricBlockResolution.isFoliage(state); + cached = ModdedBlockResolution.isFoliage(state); foliage = cached; } return cached; @@ -221,14 +221,14 @@ public final class FabricBlockState implements PlatformBlockState { @Override public boolean isFoliagePlantable() { - return FabricBlockResolution.isFoliagePlantable(state); + return ModdedBlockResolution.isFoliagePlantable(state); } @Override public boolean isDecorant() { Boolean cached = decorant; if (cached == null) { - cached = FabricBlockResolution.isDecorant(state); + cached = ModdedBlockResolution.isDecorant(state); decorant = cached; } return cached; @@ -236,37 +236,37 @@ public final class FabricBlockState implements PlatformBlockState { @Override public boolean isStorage() { - return FabricBlockResolution.isStorage(state); + return ModdedBlockResolution.isStorage(state); } @Override public boolean isStorageChest() { - return FabricBlockResolution.isStorageChest(state); + return ModdedBlockResolution.isStorageChest(state); } @Override public boolean isOre() { - return FabricBlockResolution.isOre(state); + return ModdedBlockResolution.isOre(state); } @Override public boolean isDeepSlate() { - return FabricBlockResolution.isDeepSlate(state); + return ModdedBlockResolution.isDeepSlate(state); } @Override public boolean isVineBlock() { - return FabricBlockResolution.isVineBlock(state); + return ModdedBlockResolution.isVineBlock(state); } @Override public boolean canPlaceOnto(PlatformBlockState onto) { - return FabricBlockResolution.canPlaceOnto(state.getBlock(), ((BlockState) onto.nativeHandle()).getBlock()); + return ModdedBlockResolution.canPlaceOnto(state.getBlock(), ((BlockState) onto.nativeHandle()).getBlock()); } @Override public boolean matches(PlatformBlockState other) { - if (!(other instanceof FabricBlockState blockState)) { + if (!(other instanceof ModdedBlockState blockState)) { return false; } if (state.getBlock() != blockState.state.getBlock()) { @@ -292,13 +292,13 @@ public final class FabricBlockState implements PlatformBlockState { @Override public boolean hasTileEntity() { - return FabricBlockResolution.hasTileEntity(state); + return ModdedBlockResolution.hasTileEntity(state); } @Override public PlatformBlockState withProperty(String name, String value) { String merged = mergeProperty(key, name, value); - return FabricBlockResolution.strictParse(merged); + return ModdedBlockResolution.strictParse(merged); } @Override diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricDecoratorHooks.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedDecoratorHooks.java similarity index 95% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricDecoratorHooks.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedDecoratorHooks.java index f3cabc57b..6f8ddd9f5 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricDecoratorHooks.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedDecoratorHooks.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.engine.decorator.DecoratorPlatformHooks; import art.arcane.iris.engine.mantle.EngineMantle; @@ -33,13 +33,13 @@ import net.minecraft.world.level.block.state.properties.Property; import java.util.LinkedHashMap; import java.util.Map; -public final class FabricDecoratorHooks implements DecoratorPlatformHooks.FaceFixer, DecoratorPlatformHooks.SurfaceSturdiness { +public final class ModdedDecoratorHooks implements DecoratorPlatformHooks.FaceFixer, DecoratorPlatformHooks.SurfaceSturdiness { private static final Direction[] CARTESIAN = {Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN}; private static final String[] FACE_NAMES = {"north", "east", "south", "west", "up", "down"}; @Override public PlatformBlockState fixFaces(PlatformBlockState state, Hunk hunk, int rX, int rZ, int x, int y, int z, EngineMantle mantle) { - FabricBlockState fabric = (FabricBlockState) state; + ModdedBlockState fabric = (ModdedBlockState) state; BlockState cloned = fabric.handle(); Map allowed = faceProperties(cloned); @@ -91,7 +91,7 @@ public final class FabricDecoratorHooks implements DecoratorPlatformHooks.FaceFi } } - return FabricBlockState.of(cloned, fabric.parsedProperties()); + return ModdedBlockState.of(cloned, fabric.parsedProperties()); } @Override diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricEngineBootstrap.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedEngineBootstrap.java similarity index 62% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricEngineBootstrap.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedEngineBootstrap.java index 6a930ed2d..8b4804893 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricEngineBootstrap.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedEngineBootstrap.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.engine.decorator.DecoratorPlatformHooks; import art.arcane.iris.engine.framework.Engine; @@ -29,33 +29,64 @@ import art.arcane.iris.engine.object.IrisObjectRotation; import art.arcane.iris.engine.object.TileData; import art.arcane.iris.spi.IrisPlatforms; import art.arcane.iris.spi.IrisServices; -import net.fabricmc.loader.api.FabricLoader; import net.minecraft.server.MinecraftServer; import org.bukkit.Chunk; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.player.PlayerTeleportEvent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import java.util.function.Supplier; - -public final class FabricEngineBootstrap { +public final class ModdedEngineBootstrap { + private static final Logger LOGGER = LoggerFactory.getLogger("Iris"); + private static final String[] CORE_SELF_TEST_CLASSES = { + "art.arcane.iris.engine.IrisEngine", + "art.arcane.iris.util.common.data.B", + "art.arcane.iris.core.loader.IrisData" + }; private static final Object LOCK = new Object(); - private static volatile FabricPlatform platform; + private static volatile ModdedLoader loader; + private static volatile ModdedPlatform platform; - private FabricEngineBootstrap() { + private ModdedEngineBootstrap() { + } + + public static void initialize(ModdedLoader moddedLoader) { + loader = moddedLoader; + } + + public static ModdedLoader loader() { + ModdedLoader bound = loader; + if (bound == null) { + throw new IllegalStateException("Iris modded loader is not initialized; the loader bootstrap must call ModdedEngineBootstrap.initialize first"); + } + return bound; } public static MinecraftServer currentServer() { - Object instance = FabricLoader.getInstance().getGameInstance(); - return instance instanceof MinecraftServer server ? server : null; + return loader().currentServer(); } - public static FabricPlatform bind() { - return bind(FabricEngineBootstrap::currentServer); + public static void selfTest(ClassLoader classLoader) { + int loadedClasses = 0; + for (String className : CORE_SELF_TEST_CLASSES) { + try { + Class.forName(className, true, classLoader); + loadedClasses++; + } catch (Throwable error) { + LOGGER.error("Iris core self-test failed to initialize {}", className, error); + } + } + + if (loadedClasses != CORE_SELF_TEST_CLASSES.length) { + throw new IllegalStateException("Iris core self-test failed: only " + loadedClasses + " of " + CORE_SELF_TEST_CLASSES.length + " engine classes initialized"); + } + + LOGGER.info("Iris core loaded ({} classes ok)", loadedClasses); } - public static FabricPlatform bind(Supplier server) { - FabricPlatform bound = platform; + public static ModdedPlatform bind() { + ModdedPlatform bound = platform; if (bound != null) { return bound; } @@ -63,12 +94,13 @@ public final class FabricEngineBootstrap { if (platform != null) { return platform; } - FabricPlatform created = new FabricPlatform(server); + ModdedLoader boundLoader = loader(); + ModdedPlatform created = new ModdedPlatform(boundLoader); IrisPlatforms.bind(created); - IrisObjectRotation.bindFallbackRotator(new FabricStateRotator()); - BlockDataMergeSupport.bindFallbackMerger(new FabricStateMerger()); - TileData.bindFallbackReader(new FabricTileReader(server)); - FabricDecoratorHooks decoratorHooks = new FabricDecoratorHooks(); + IrisObjectRotation.bindFallbackRotator(new ModdedStateRotator()); + BlockDataMergeSupport.bindFallbackMerger(new ModdedStateMerger()); + TileData.bindFallbackReader(new ModdedTileReader(boundLoader::currentServer)); + ModdedDecoratorHooks decoratorHooks = new ModdedDecoratorHooks(); DecoratorPlatformHooks.bind(decoratorHooks, decoratorHooks); IrisServices.register(PreservationRegistry.class, new InertPreservation()); IrisServices.register(EngineWorldManagerProvider.class, (EngineWorldManagerProvider) (Engine engine) -> new InertWorldManager()); diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricEntityType.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedEntityType.java similarity index 79% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricEntityType.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedEntityType.java index 5bac41a1f..f8629cbd7 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricEntityType.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedEntityType.java @@ -16,29 +16,29 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.spi.PlatformEntityType; import net.minecraft.world.entity.EntityType; import java.util.concurrent.ConcurrentHashMap; -public final class FabricEntityType implements PlatformEntityType { - private static final ConcurrentHashMap CACHE = new ConcurrentHashMap<>(); +public final class ModdedEntityType implements PlatformEntityType { + private static final ConcurrentHashMap CACHE = new ConcurrentHashMap<>(); private final EntityType type; private final String key; private final String namespace; - private FabricEntityType(EntityType type, String key) { + private ModdedEntityType(EntityType type, String key) { this.type = type; this.key = key; int colon = key.indexOf(':'); this.namespace = colon >= 0 ? key.substring(0, colon) : "minecraft"; } - public static FabricEntityType of(EntityType type, String key) { - return CACHE.computeIfAbsent(key, (String k) -> new FabricEntityType(type, k)); + public static ModdedEntityType of(EntityType type, String key) { + return CACHE.computeIfAbsent(key, (String k) -> new ModdedEntityType(type, k)); } @Override diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricItem.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedItem.java similarity index 80% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricItem.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedItem.java index 0dfa4e15e..b2f5d7414 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricItem.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedItem.java @@ -16,29 +16,29 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.spi.PlatformItem; import net.minecraft.world.item.Item; import java.util.concurrent.ConcurrentHashMap; -public final class FabricItem implements PlatformItem { - private static final ConcurrentHashMap CACHE = new ConcurrentHashMap<>(); +public final class ModdedItem implements PlatformItem { + private static final ConcurrentHashMap CACHE = new ConcurrentHashMap<>(); private final Item item; private final String key; private final String namespace; - private FabricItem(Item item, String key) { + private ModdedItem(Item item, String key) { this.item = item; this.key = key; int colon = key.indexOf(':'); this.namespace = colon >= 0 ? key.substring(0, colon) : "minecraft"; } - public static FabricItem of(Item item, String key) { - return CACHE.computeIfAbsent(key, (String k) -> new FabricItem(item, k)); + public static ModdedItem of(Item item, String key) { + return CACHE.computeIfAbsent(key, (String k) -> new ModdedItem(item, k)); } @Override diff --git a/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedLoader.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedLoader.java new file mode 100644 index 000000000..109b9a0bb --- /dev/null +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedLoader.java @@ -0,0 +1,36 @@ +/* + * Iris is a World Generator for Minecraft Servers + * Copyright (c) 2026 Arcane Arts (Volmit Software) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package art.arcane.iris.modded; + +import net.minecraft.server.MinecraftServer; + +import java.io.File; +import java.nio.file.Path; + +public interface ModdedLoader { + String platformName(); + + String minecraftVersion(); + + MinecraftServer currentServer(); + + Path configDir(); + + File modJar(); +} diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricParityProbe.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedParityProbe.java similarity index 95% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricParityProbe.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedParityProbe.java index 18423c48b..345dbea92 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricParityProbe.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedParityProbe.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.core.loader.IrisData; import art.arcane.iris.engine.IrisEngine; @@ -28,7 +28,6 @@ import art.arcane.iris.spi.IrisPlatforms; import art.arcane.iris.spi.PlatformBiome; import art.arcane.iris.spi.PlatformBlockState; import art.arcane.iris.util.project.hunk.Hunk; -import net.fabricmc.loader.api.FabricLoader; import net.minecraft.server.MinecraftServer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,7 +47,7 @@ import java.util.List; import java.util.Map; import java.util.TreeMap; -public final class FabricParityProbe { +public final class ModdedParityProbe { private static final Logger LOGGER = LoggerFactory.getLogger("Iris"); private static final String DIMENSION_KEY = "overworld"; private static final long SEED = 1337L; @@ -56,7 +55,7 @@ public final class FabricParityProbe { private static final String DEFAULT_EXPECTED = "922bbcbe766d"; private static final List REPORTED = Collections.synchronizedList(new ArrayList<>()); - private FabricParityProbe() { + private ModdedParityProbe() { } public static void schedule(String config) { @@ -69,8 +68,8 @@ public final class FabricParityProbe { long start = System.currentTimeMillis(); MinecraftServer server = null; while (System.currentTimeMillis() - start < 600000L) { - Object instance = FabricLoader.getInstance().getGameInstance(); - if (instance instanceof MinecraftServer candidate && candidate.isReady()) { + MinecraftServer candidate = ModdedEngineBootstrap.currentServer(); + if (candidate != null && candidate.isReady()) { server = candidate; break; } @@ -117,8 +116,8 @@ public final class FabricParityProbe { return false; } - FabricEngineBootstrap.bind(); - FabricPlatform.errorSink(REPORTED::add); + ModdedEngineBootstrap.bind(); + ModdedPlatform.errorSink(REPORTED::add); File workRoot = Files.createTempDirectory("iris-parity").toFile(); File pack = clonePack(packSource, workRoot); @@ -186,7 +185,7 @@ public final class FabricParityProbe { int cx = at[0]; int cz = at[1]; drainReported(); - FabricBlockBuffer blocks = new FabricBlockBuffer(height, airState); + ModdedBlockBuffer blocks = new ModdedBlockBuffer(height, airState); Hunk biomes = Hunk.newArrayHunk(16, height, 16); List failures = new ArrayList<>(); try { @@ -238,7 +237,7 @@ public final class FabricParityProbe { return match; } - private static void diffDeep(int cx, int cz, FabricBlockBuffer blocks, int height, int minY) { + private static void diffDeep(int cx, int cz, ModdedBlockBuffer blocks, int height, int minY) { String deepDir = System.getProperty("iris.parity.deep"); if (deepDir == null) { return; @@ -294,7 +293,7 @@ public final class FabricParityProbe { return targets; } - private static String hashChunk(int chunkX, int chunkZ, FabricBlockBuffer blocks, Hunk biomes, int height) { + private static String hashChunk(int chunkX, int chunkZ, ModdedBlockBuffer blocks, Hunk biomes, int height) { MessageDigest blockDigest = sha256(); MessageDigest biomeDigest = sha256(); Map blockCache = new HashMap<>(); diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricPlatform.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedPlatform.java similarity index 70% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricPlatform.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedPlatform.java index 4d82c7480..1200cb7bb 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricPlatform.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedPlatform.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.spi.IrisPlatform; import art.arcane.iris.spi.LogLevel; @@ -25,34 +25,31 @@ import art.arcane.iris.spi.PlatformCapabilities; import art.arcane.iris.spi.PlatformRegistries; import art.arcane.iris.spi.PlatformScheduler; import art.arcane.iris.spi.PlatformStructureHooks; -import net.fabricmc.loader.api.FabricLoader; -import net.fabricmc.loader.api.ModContainer; import net.minecraft.server.MinecraftServer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.function.Consumer; -import java.util.function.Supplier; -public final class FabricPlatform implements IrisPlatform { +public final class ModdedPlatform implements IrisPlatform { private static final Logger LOGGER = LoggerFactory.getLogger("Iris"); private static volatile Consumer ERROR_SINK = null; - private final Supplier server; - private final FabricRegistries registries; - private final FabricScheduler scheduler; - private final FabricCapabilities capabilities; - private final FabricStructureHooks structureHooks; - private final FabricBiomeWriter biomeWriter; + private final ModdedLoader loader; + private final ModdedRegistries registries; + private final ModdedScheduler scheduler; + private final ModdedCapabilities capabilities; + private final ModdedStructureHooks structureHooks; + private final ModdedBiomeWriter biomeWriter; - public FabricPlatform(Supplier server) { - this.server = server; - this.registries = new FabricRegistries(server); - this.scheduler = new FabricScheduler(); - this.capabilities = new FabricCapabilities(); - this.structureHooks = new FabricStructureHooks(server); - this.biomeWriter = new FabricBiomeWriter(); + public ModdedPlatform(ModdedLoader loader) { + this.loader = loader; + this.registries = new ModdedRegistries(loader::currentServer); + this.scheduler = new ModdedScheduler(); + this.capabilities = new ModdedCapabilities(); + this.structureHooks = new ModdedStructureHooks(loader::currentServer); + this.biomeWriter = new ModdedBiomeWriter(); } public static void errorSink(Consumer sink) { @@ -60,19 +57,17 @@ public final class FabricPlatform implements IrisPlatform { } public MinecraftServer server() { - return server.get(); + return loader.currentServer(); } @Override public String platformName() { - return "fabric"; + return loader.platformName(); } @Override public String minecraftVersion() { - return FabricLoader.getInstance().getModContainer("minecraft") - .map((ModContainer container) -> container.getMetadata().getVersion().getFriendlyString()) - .orElse("unknown"); + return loader.minecraftVersion(); } @Override @@ -102,7 +97,7 @@ public final class FabricPlatform implements IrisPlatform { @Override public File dataFolder() { - File folder = FabricLoader.getInstance().getConfigDir().resolve("iris").toFile(); + File folder = loader.configDir().resolve("iris").toFile(); folder.mkdirs(); return folder; } @@ -116,10 +111,8 @@ public final class FabricPlatform implements IrisPlatform { @Override public File pluginJar() { - return FabricLoader.getInstance().getModContainer("irisworldgen") - .flatMap((ModContainer container) -> container.getOrigin().getPaths().stream().findFirst()) - .map((java.nio.file.Path p) -> p.toFile()) - .orElse(new File(dataFolder(), "iris-fabric.jar")); + File jar = loader.modJar(); + return jar != null ? jar : new File(dataFolder(), "iris-" + loader.platformName() + ".jar"); } @Override @@ -167,7 +160,7 @@ public final class FabricPlatform implements IrisPlatform { } } - private static final class FabricCapabilities implements PlatformCapabilities { + private static final class ModdedCapabilities implements PlatformCapabilities { @Override public boolean customBiomes() { return true; diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricRegistries.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedRegistries.java similarity index 87% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricRegistries.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedRegistries.java index 8e82a99d4..99f906c76 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricRegistries.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedRegistries.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.spi.PlatformBiome; import art.arcane.iris.spi.PlatformBlockState; @@ -38,37 +38,37 @@ import java.util.List; import java.util.Locale; import java.util.function.Supplier; -public final class FabricRegistries implements PlatformRegistries { +public final class ModdedRegistries implements PlatformRegistries { private final Supplier server; - public FabricRegistries(Supplier server) { + public ModdedRegistries(Supplier server) { this.server = server; } @Override public PlatformBlockState block(String key) { - return FabricBlockResolution.get(key); + return ModdedBlockResolution.get(key); } @Override public PlatformBlockState blockOrNull(String key) { - return FabricBlockResolution.getOrNull(key); + return ModdedBlockResolution.getOrNull(key); } @Override public PlatformBlockState blockOrNull(String key, boolean warn) { - return FabricBlockResolution.getOrNull(key, warn); + return ModdedBlockResolution.getOrNull(key, warn); } @Override public PlatformBlockState air() { - return FabricBlockResolution.getAir(); + return ModdedBlockResolution.getAir(); } @Override public PlatformBlockState deepSlateOre(PlatformBlockState block, PlatformBlockState ore) { - BlockState result = FabricBlockResolution.toDeepSlateOre((BlockState) block.nativeHandle(), (BlockState) ore.nativeHandle()); - return FabricBlockState.of(result, null); + BlockState result = ModdedBlockResolution.toDeepSlateOre((BlockState) block.nativeHandle(), (BlockState) ore.nativeHandle()); + return ModdedBlockState.of(result, null); } @Override @@ -82,7 +82,7 @@ public final class FabricRegistries implements PlatformRegistries { return null; } Biome biome = registry.getValue(identifier); - return biome == null ? null : FabricBiome.of(biome, identifier.toString()); + return biome == null ? null : ModdedBiome.of(biome, identifier.toString()); } @Override @@ -96,7 +96,7 @@ public final class FabricRegistries implements PlatformRegistries { return null; } Item item = BuiltInRegistries.ITEM.getValue(identifier); - return FabricItem.of(item, identifier.toString()); + return ModdedItem.of(item, identifier.toString()); } @Override @@ -106,7 +106,7 @@ public final class FabricRegistries implements PlatformRegistries { return null; } EntityType type = BuiltInRegistries.ENTITY_TYPE.getValue(identifier); - return FabricEntityType.of(type, identifier.toString()); + return ModdedEntityType.of(type, identifier.toString()); } @Override diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricScheduler.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedScheduler.java similarity index 93% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricScheduler.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedScheduler.java index 28e98d46c..be564079e 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricScheduler.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedScheduler.java @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.spi.PlatformScheduler; import art.arcane.iris.spi.PlatformWorld; -public final class FabricScheduler implements PlatformScheduler { +public final class ModdedScheduler implements PlatformScheduler { @Override public void global(Runnable task) { task.run(); diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricStateMerger.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedStateMerger.java similarity index 78% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricStateMerger.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedStateMerger.java index 6a56b52a0..615461fc4 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricStateMerger.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedStateMerger.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.engine.object.BlockDataMergeSupport; import art.arcane.iris.spi.PlatformBlockState; @@ -25,28 +25,28 @@ import net.minecraft.world.level.block.state.properties.Property; import java.util.Map; -public final class FabricStateMerger implements BlockDataMergeSupport.StateMerger { +public final class ModdedStateMerger implements BlockDataMergeSupport.StateMerger { @Override public PlatformBlockState merge(PlatformBlockState base, PlatformBlockState update) { - FabricBlockState fabricBase = (FabricBlockState) base; - FabricBlockState fabricUpdate = (FabricBlockState) update; + ModdedBlockState fabricBase = (ModdedBlockState) base; + ModdedBlockState fabricUpdate = (ModdedBlockState) update; try { - return FabricBlockState.of(mergeStates(fabricBase.handle(), fabricUpdate.handle(), fabricUpdate.parsedProperties()), null); + return ModdedBlockState.of(mergeStates(fabricBase.handle(), fabricUpdate.handle(), fabricUpdate.parsedProperties()), null); } catch (IllegalArgumentException e) { - FabricBlockResolution.Parsed normalizedBase = FabricBlockResolution.resolveGet(FabricBlockState.serialize(fabricBase.handle())); - FabricBlockResolution.Parsed normalizedUpdate = FabricBlockResolution.resolveGet(FabricBlockState.serialize(fabricUpdate.handle())); + ModdedBlockResolution.Parsed normalizedBase = ModdedBlockResolution.resolveGet(ModdedBlockState.serialize(fabricBase.handle())); + ModdedBlockResolution.Parsed normalizedUpdate = ModdedBlockResolution.resolveGet(ModdedBlockState.serialize(fabricUpdate.handle())); if (normalizedBase != null && normalizedUpdate != null) { try { - return FabricBlockState.of(mergeStates(normalizedBase.state(), normalizedUpdate.state(), normalizedUpdate.properties()), null); + return ModdedBlockState.of(mergeStates(normalizedBase.state(), normalizedUpdate.state(), normalizedUpdate.properties()), null); } catch (IllegalArgumentException ignored) { - return FabricBlockState.of(normalizedUpdate.state(), normalizedUpdate.properties()); + return ModdedBlockState.of(normalizedUpdate.state(), normalizedUpdate.properties()); } } if (normalizedUpdate != null) { - return FabricBlockState.of(normalizedUpdate.state(), normalizedUpdate.properties()); + return ModdedBlockState.of(normalizedUpdate.state(), normalizedUpdate.properties()); } return update; diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricStateRotator.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedStateRotator.java similarity index 97% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricStateRotator.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedStateRotator.java index 99d05fffc..418741c7b 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricStateRotator.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedStateRotator.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.engine.object.IrisObjectRotation; import art.arcane.iris.spi.IrisLogging; @@ -37,7 +37,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -public final class FabricStateRotator implements IrisObjectRotation.StateRotator { +public final class ModdedStateRotator implements IrisObjectRotation.StateRotator { private static final String[] FACE_NAMES = {"north", "east", "south", "west", "up", "down"}; private static final String[] WALL_FACE_NAMES = {"north", "south", "east", "west"}; private static final int[][] ROTATION_CYCLE_MODS = { @@ -47,7 +47,7 @@ public final class FabricStateRotator implements IrisObjectRotation.StateRotator @Override public PlatformBlockState rotate(IrisObjectRotation rotation, PlatformBlockState state, int spinxx, int spinyy, int spinzz) { - FabricBlockState fabric = (FabricBlockState) state; + ModdedBlockState fabric = (ModdedBlockState) state; BlockState d = fabric.handle(); boolean deleted = false; @@ -75,7 +75,7 @@ public final class FabricStateRotator implements IrisObjectRotation.StateRotator if (facing.getPossibleValues().contains(t)) { d = apply(d, facing, t); - } else if (!FabricBlockResolution.isSolid(d.getBlock().defaultBlockState())) { + } else if (!ModdedBlockResolution.isSolid(d.getBlock().defaultBlockState())) { deleted = true; } } else if (rotationProperty != null) { @@ -168,7 +168,7 @@ public final class FabricStateRotator implements IrisObjectRotation.StateRotator return null; } - return d == fabric.handle() ? state : FabricBlockState.of(d, fabric.parsedProperties()); + return d == fabric.handle() ? state : ModdedBlockState.of(d, fabric.parsedProperties()); } private static Property findFacing(BlockState state) { diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricStructureHooks.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedStructureHooks.java similarity index 95% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricStructureHooks.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedStructureHooks.java index fa8debe45..978824977 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricStructureHooks.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedStructureHooks.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.spi.PlatformStructureHooks; import art.arcane.iris.spi.PlatformWorld; @@ -32,10 +32,10 @@ import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; -public final class FabricStructureHooks implements PlatformStructureHooks { +public final class ModdedStructureHooks implements PlatformStructureHooks { private final Supplier server; - public FabricStructureHooks(Supplier server) { + public ModdedStructureHooks(Supplier server) { this.server = server; } diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricTileData.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedTileData.java similarity index 90% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricTileData.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedTileData.java index 6650feb70..7545c5aba 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricTileData.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedTileData.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.engine.object.TileData; import art.arcane.volmlib.util.collection.KMap; @@ -24,11 +24,11 @@ import art.arcane.volmlib.util.collection.KMap; import java.io.DataOutputStream; import java.io.IOException; -public final class FabricTileData extends TileData { +public final class ModdedTileData extends TileData { private final byte[] raw; private final KMap tileProperties; - FabricTileData(byte[] raw, KMap tileProperties) { + ModdedTileData(byte[] raw, KMap tileProperties) { super(); this.raw = raw; this.tileProperties = tileProperties == null ? new KMap<>() : tileProperties; diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricTileReader.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedTileReader.java similarity index 96% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricTileReader.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedTileReader.java index ac6d2a0a9..3afc1afb2 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricTileReader.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedTileReader.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.engine.object.TileData; import art.arcane.volmlib.util.collection.KMap; @@ -37,13 +37,13 @@ import java.util.Arrays; import java.util.Locale; import java.util.function.Supplier; -public final class FabricTileReader implements TileData.TileReader { +public final class ModdedTileReader implements TileData.TileReader { private static final Gson GSON = new GsonBuilder().disableHtmlEscaping().setStrictness(Strictness.LENIENT).create(); private static final int DYE_COLOR_COUNT = 16; private final Supplier server; - public FabricTileReader(Supplier server) { + public ModdedTileReader(Supplier server) { this.server = server; } @@ -135,7 +135,7 @@ public final class FabricTileReader implements TileData.TileReader { if (properties == null) { throw new NullPointerException("properties is marked non-null but is null"); } - return new FabricTileData(replay.consumed(), properties); + return new ModdedTileData(replay.consumed(), properties); } catch (Throwable e) { replay.rewind(); return parseLegacy(din, replay); @@ -156,7 +156,7 @@ public final class FabricTileReader implements TileData.TileReader { case 3 -> readLootable(din); default -> throw new IOException("Unknown tile type: " + id); } - return new FabricTileData(replay.consumed(), new KMap<>()); + return new ModdedTileData(replay.consumed(), new KMap<>()); } private static void readSign(DataInputStream din) throws IOException { diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricWorldCheck.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedWorldCheck.java similarity index 93% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricWorldCheck.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedWorldCheck.java index b5529a190..70a9b2d2b 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricWorldCheck.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedWorldCheck.java @@ -16,9 +16,8 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; -import net.fabricmc.loader.api.FabricLoader; import net.minecraft.core.BlockPos; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.server.MinecraftServer; @@ -40,14 +39,14 @@ import java.util.List; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; -public final class FabricWorldCheck { +public final class ModdedWorldCheck { private static final Logger LOGGER = LoggerFactory.getLogger("Iris"); - private FabricWorldCheck() { + private ModdedWorldCheck() { } public static void schedule() { - Thread thread = new Thread(FabricWorldCheck::waitAndRun, "Iris World Check"); + Thread thread = new Thread(ModdedWorldCheck::waitAndRun, "Iris World Check"); thread.setDaemon(true); thread.start(); } @@ -56,8 +55,8 @@ public final class FabricWorldCheck { long start = System.currentTimeMillis(); MinecraftServer server = null; while (System.currentTimeMillis() - start < 600000L) { - Object instance = FabricLoader.getInstance().getGameInstance(); - if (instance instanceof MinecraftServer candidate && candidate.isReady()) { + MinecraftServer candidate = ModdedEngineBootstrap.currentServer(); + if (candidate != null && candidate.isReady()) { server = candidate; break; } @@ -90,9 +89,9 @@ public final class FabricWorldCheck { ServerLevel overworld = server.overworld(); String generatorClass = overworld.getChunkSource().getGenerator().getClass().getName(); LOGGER.info("[worldcheck] overworld generator: {}", generatorClass); - boolean irisGenerator = overworld.getChunkSource().getGenerator() instanceof IrisFabricChunkGenerator; + boolean irisGenerator = overworld.getChunkSource().getGenerator() instanceof IrisModdedChunkGenerator; if (!irisGenerator) { - LOGGER.error("[worldcheck] overworld is NOT using IrisFabricChunkGenerator"); + LOGGER.error("[worldcheck] overworld is NOT using IrisModdedChunkGenerator"); } BlockPos spawn = overworld.getRespawnData().pos(); diff --git a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricWorldEngines.java b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedWorldEngines.java similarity index 95% rename from adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricWorldEngines.java rename to adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedWorldEngines.java index 4888c3f34..991b115a1 100644 --- a/adapters/fabric/src/main/java/art/arcane/iris/fabric/FabricWorldEngines.java +++ b/adapters/modded-common/src/main/java/art/arcane/iris/modded/ModdedWorldEngines.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.fabric; +package art.arcane.iris.modded; import art.arcane.iris.core.loader.IrisData; import art.arcane.iris.engine.IrisEngine; @@ -24,7 +24,6 @@ import art.arcane.iris.engine.framework.Engine; import art.arcane.iris.engine.framework.EngineTarget; import art.arcane.iris.engine.object.IrisDimension; import art.arcane.iris.engine.object.IrisWorld; -import net.fabricmc.loader.api.FabricLoader; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.dimension.DimensionType; import net.minecraft.world.level.storage.LevelResource; @@ -35,11 +34,11 @@ import java.io.File; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -public final class FabricWorldEngines { +public final class ModdedWorldEngines { private static final Logger LOGGER = LoggerFactory.getLogger("Iris"); private static final ConcurrentHashMap ENGINES = new ConcurrentHashMap<>(); - private FabricWorldEngines() { + private ModdedWorldEngines() { } public static Engine get(ServerLevel level, String dimensionKey) { @@ -51,7 +50,7 @@ public final class FabricWorldEngines { } private static Engine create(ServerLevel level, String dimensionKey) { - FabricEngineBootstrap.bind(); + ModdedEngineBootstrap.bind(); File pack = resolvePack(dimensionKey); IrisData data = IrisData.get(pack); IrisDimension dimension = data.getDimensionLoader().load(dimensionKey); @@ -85,7 +84,7 @@ public final class FabricWorldEngines { } private static File resolvePack(String dimensionKey) { - File pack = FabricLoader.getInstance().getConfigDir() + File pack = ModdedEngineBootstrap.loader().configDir() .resolve("irisworldgen") .resolve("packs") .resolve(dimensionKey) diff --git a/adapters/fabric/src/main/resources/data/irisworldgen/dimension_type/overworld.json b/adapters/modded-common/src/main/resources/data/irisworldgen/dimension_type/overworld.json similarity index 100% rename from adapters/fabric/src/main/resources/data/irisworldgen/dimension_type/overworld.json rename to adapters/modded-common/src/main/resources/data/irisworldgen/dimension_type/overworld.json diff --git a/adapters/fabric/src/main/resources/data/minecraft/dimension/overworld.json b/adapters/modded-common/src/main/resources/data/minecraft/dimension/overworld.json similarity index 100% rename from adapters/fabric/src/main/resources/data/minecraft/dimension/overworld.json rename to adapters/modded-common/src/main/resources/data/minecraft/dimension/overworld.json diff --git a/adapters/neoforge/build.gradle b/adapters/neoforge/build.gradle index 02f44592b..20f0bdb49 100644 --- a/adapters/neoforge/build.gradle +++ b/adapters/neoforge/build.gradle @@ -1,9 +1,39 @@ +/* + * Iris is a World Generator for Minecraft Servers + * Copyright (c) 2026 Arcane Arts (Volmit Software) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import org.gradle.api.tasks.compile.JavaCompile +import org.gradle.jvm.toolchain.JavaLanguageVersion + plugins { id 'java' + id 'net.neoforged.moddev' version '2.0.141' + alias(libs.plugins.shadow) } +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('26.1.2.75') + group = 'art.arcane' -version = rootProject.version +version = irisVersion java { toolchain { @@ -11,17 +41,144 @@ java { } } +sourceSets { + main { + java { + srcDir '../modded-common/src/main/java' + } + resources { + srcDir '../modded-common/src/main/resources' + } + } +} + +repositories { + mavenCentral() + maven { + name = 'NeoForged' + url = uri('https://maven.neoforged.net/releases/') + } + maven { url = uri('https://repo.codemc.org/repository/maven-public/') } + maven { url = uri('https://jitpack.io') } + maven { url = uri('https://hub.spigotmc.org/nexus/content/repositories/snapshots/') } +} + +configurations { + bundle { + canBeConsumed = false + canBeResolved = true + } + devBundle { + canBeConsumed = false + canBeResolved = true + } +} + +configurations.named('bundle').configure { + exclude(group: 'com.google.code.gson') + exclude(group: 'com.google.guava') + exclude(group: 'commons-io') + exclude(group: 'org.apache.commons', module: 'commons-lang3') + exclude(group: 'it.unimi.dsi', module: 'fastutil') + exclude(group: 'org.slf4j') + exclude(group: 'org.apache.logging.log4j') + exclude(group: 'de.crazydev22.slimjar.helper') + exclude(group: 'de.crazydev22.slimjar') + exclude(group: 'io.github.slimjar') +} + +configurations.compileClasspath.extendsFrom(configurations.devBundle) +configurations.runtimeClasspath.extendsFrom(configurations.devBundle) + dependencies { - implementation(project(':spi')) + compileOnly('org.slf4j:slf4j-api:2.0.17') + compileOnly(libs.spigot) { + transitive = false + } + + List shared = [ + "art.arcane:core:${irisVersion}".toString(), + "art.arcane:spi:${irisVersion}".toString(), + 'com.github.VolmitSoftware:VolmLib:master-SNAPSHOT', + libs.paralithic, + libs.lru, + libs.kotlin.stdlib, + libs.kotlin.coroutines, + libs.commons.lang, + libs.commons.math3, + libs.caffeine, + libs.lz4, + libs.zip, + libs.sentry, + libs.oshi, + libs.byteBuddy.core, + libs.byteBuddy.agent + ] + shared.each { Object notation -> + add('bundle', notation) + add('devBundle', notation) + } +} + +neoForge { + version = neoForgeVersion + + runs { + server { + server() + String parity = providers.gradleProperty('irisParity').getOrNull() + if (parity != null) { + systemProperty('iris.parity', parity) + } + String parityGolden = providers.gradleProperty('irisParityGolden').getOrNull() + if (parityGolden != null) { + systemProperty('iris.parity.golden', parityGolden) + } + String parityDeep = providers.gradleProperty('irisParityDeep').getOrNull() + if (parityDeep != null) { + systemProperty('iris.parity.deep', parityDeep) + } + String worldCheck = providers.gradleProperty('irisWorldCheck').getOrNull() + if (worldCheck != null) { + systemProperty('iris.worldcheck', worldCheck) + } + jvmArgument('-Xmx8G') + programArgument('nogui') + } + } + + mods { + irisworldgen { + sourceSet(sourceSets.main) + } + } +} + +tasks.named('compileJava', JavaCompile).configure { + options.encoding = 'UTF-8' + options.release.set(25) } processResources { inputs.property('version', project.version) + inputs.property('minecraftVersion', minecraftVersion) filesMatching('META-INF/neoforge.mods.toml') { - expand('version': project.version) + expand('version': project.version, 'minecraftVersion': minecraftVersion) } } -tasks.named('jar', Jar).configure { - archiveFileName.set("Iris-${project.version}-neoforge-skeleton.jar") +tasks.named('shadowJar', ShadowJar).configure { + archiveFileName.set("Iris-${project.version}+mc${minecraftVersion}-neoforge.jar") + configurations = [project.configurations.named('bundle').get()] + mergeServiceFiles() + exclude('META-INF/maven/**') + exclude('META-INF/proguard/**') + exclude('META-INF/*.SF') + exclude('META-INF/*.DSA') + exclude('META-INF/*.RSA') + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} + +tasks.named('assemble').configure { + dependsOn(tasks.named('shadowJar')) } diff --git a/adapters/neoforge/run/.cache/jij/6a464b1c603b716033f3561a0632a7cc7be17c9d75af1cab7f1db5fe98c3888a/mixinextras-neoforge-0.5.4.jar b/adapters/neoforge/run/.cache/jij/6a464b1c603b716033f3561a0632a7cc7be17c9d75af1cab7f1db5fe98c3888a/mixinextras-neoforge-0.5.4.jar new file mode 100644 index 000000000..ee52a8753 Binary files /dev/null and b/adapters/neoforge/run/.cache/jij/6a464b1c603b716033f3561a0632a7cc7be17c9d75af1cab7f1db5fe98c3888a/mixinextras-neoforge-0.5.4.jar differ diff --git a/adapters/neoforge/run/.cache/jij/909b72f1d8225a13c4f00a23b3a5d04217543745de857d98694d4943708fc969/net.neoforged.neoforge-coremods-26.1.2.75.jar b/adapters/neoforge/run/.cache/jij/909b72f1d8225a13c4f00a23b3a5d04217543745de857d98694d4943708fc969/net.neoforged.neoforge-coremods-26.1.2.75.jar new file mode 100644 index 000000000..26f872e9f Binary files /dev/null and b/adapters/neoforge/run/.cache/jij/909b72f1d8225a13c4f00a23b3a5d04217543745de857d98694d4943708fc969/net.neoforged.neoforge-coremods-26.1.2.75.jar differ diff --git a/adapters/neoforge/run/banned-ips.json b/adapters/neoforge/run/banned-ips.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/adapters/neoforge/run/banned-ips.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/adapters/neoforge/run/banned-players.json b/adapters/neoforge/run/banned-players.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/adapters/neoforge/run/banned-players.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/adapters/neoforge/run/config/fml.toml b/adapters/neoforge/run/config/fml.toml new file mode 100644 index 000000000..4a3ff9e8c --- /dev/null +++ b/adapters/neoforge/run/config/fml.toml @@ -0,0 +1,30 @@ +#Disables File Watcher. Used to automatically update config if its file has been modified. +disableConfigWatcher = false +#Shows an early loading screen for mod loading which improves the user experience with early feedback about mod loading. +earlyWindowControl = true +#Max threads for early initialization parallelism, -1 is based on processor count +maxThreads = -1 +#Enable NeoForge global version checking +versionCheck = true +#Enable synchronous OpenGL debug output and object labeling +debugOpenGl = false +#Default config path for servers +defaultConfigPath = "defaultconfigs" +#Disables Optimized DFU client-side - already disabled on servers +disableOptimizedDFU = true +#Early window provider +earlyWindowProvider = "fmlearlywindow" +#Early window width +earlyWindowWidth = 854 +#Early window height +earlyWindowHeight = 480 +#Early window starts maximized +earlyWindowMaximized = false +#Force a given theme-id to be used for the early loading screen +earlyLoadingScreenTheme = "" +#Define dependency overrides below +#Dependency overrides can be used to forcibly remove a dependency constraint from a mod or to force a mod to load AFTER another mod +#Using dependency overrides can cause issues. Use at your own risk. +#Example dependency override for the mod with the id 'targetMod': dependency constraints (incompatibility clauses or restrictive version ranges) against mod 'dep1' are removed, and the mod will now load after the mod 'dep2' +#dependencyOverrides.targetMod = ["-dep1", "+dep2"] +dependencyOverrides = {} diff --git a/adapters/neoforge/run/config/iris/settings.json b/adapters/neoforge/run/config/iris/settings.json new file mode 100644 index 000000000..98258213d --- /dev/null +++ b/adapters/neoforge/run/config/iris/settings.json @@ -0,0 +1,84 @@ +{ + "general": { + "commandSounds": true, + "debug": false, + "dumpMantleOnError": false, + "disableNMS": false, + "pluginMetrics": true, + "splashLogoStartup": true, + "useConsoleCustomColors": true, + "useCustomColorsIngame": true, + "adjustVanillaHeight": false, + "autoIngestDatapacks": true, + "autoImportDatapackStructures": true, + "forceMainWorld": "", + "spinh": -20, + "spins": 7, + "spinb": 8 + }, + "world": { + "postLoadBlockUpdates": true, + "forcePersistEntities": true, + "anbientEntitySpawningSystem": true, + "asyncTickIntervalMS": 700, + "targetSpawnEntitiesPerChunk": 0.95, + "markerEntitySpawningSystem": true, + "effectSystem": true, + "worldEditWandCUI": true, + "globalPregenCache": false + }, + "gui": { + "useServerLaunchedGuis": true, + "maximumPregenGuiFPS": false, + "colorMode": true + }, + "autoConfiguration": { + "configureSpigotTimeoutTime": true, + "configurePaperWatchdogDelay": true, + "autoRestartOnCustomBiomeInstall": true + }, + "generator": { + "defaultWorldType": "overworld", + "maxBiomeChildDepth": 4, + "preventLeafDecay": true + }, + "concurrency": {}, + "studio": { + "studio": true, + "openVSCode": true, + "disableTimeAndWeather": true, + "enableEntitySpawning": false, + "autoStartDefaultStudio": false + }, + "performance": { + "engineSVC": { + "useVirtualThreads": true, + "forceMulticoreWrite": false, + "priority": 5 + }, + "trimMantleInStudio": false, + "mantleKeepAlive": 30, + "noiseCacheSize": 1024, + "resourceLoaderCacheSize": 1024, + "objectLoaderCacheSize": 4096, + "tectonicPlateSize": -1, + "mantleCleanupDelay": 200, + "simdKernels": true + }, + "pregen": { + "useTicketQueue": true, + "runtimeSchedulerMode": "AUTO", + "paperLikeBackendMode": "AUTO", + "chunkLoadTimeoutSeconds": 15, + "timeoutWarnIntervalMs": 500, + "saveIntervalMs": 30000, + "maxResidentTectonicPlates": 96, + "mantleBackpressureWaitMs": 25, + "mantleBackpressureTimeoutMs": 60000 + }, + "sentry": { + "includeServerId": true, + "disableAutoReporting": false, + "debug": false + } +} diff --git a/adapters/neoforge/run/config/irisworldgen/packs/overworld b/adapters/neoforge/run/config/irisworldgen/packs/overworld new file mode 160000 index 000000000..8e32852ee --- /dev/null +++ b/adapters/neoforge/run/config/irisworldgen/packs/overworld @@ -0,0 +1 @@ +Subproject commit 8e32852ee6ecd039fae27a36f701f57cdc02e83f diff --git a/adapters/neoforge/run/config/neoforge-common.toml b/adapters/neoforge/run/config/neoforge-common.toml new file mode 100644 index 000000000..f805c0016 --- /dev/null +++ b/adapters/neoforge/run/config/neoforge-common.toml @@ -0,0 +1,2 @@ +#Set this to true to enable showing debug information about attributes on an item when advanced tooltips is on. +attributeAdvancedTooltipDebugInfo = true diff --git a/adapters/neoforge/run/config/neoforge-server.toml b/adapters/neoforge/run/config/neoforge-server.toml new file mode 100644 index 000000000..99d6fcc1d --- /dev/null +++ b/adapters/neoforge/run/config/neoforge-server.toml @@ -0,0 +1,10 @@ +#Set this to true to remove any BlockEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES. +removeErroringBlockEntities = false +#Set this to true to remove any Entity (Note: Does not include BlockEntities) that throws an error in its tick method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES. +removeErroringEntities = false +#Set this to true to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticeable differences in mechanics so default is vanilla behavior. Default: false. +fullBoundingBoxLadders = false +#The permission handler used by the server. Defaults to neoforge:default_handler if no such handler with that name is registered. +permissionHandler = "neoforge:default_handler" +#Set this to true to enable advertising the dedicated server to local LAN clients so that it shows up in the Multiplayer screen automatically. +advertiseDedicatedServerToLan = true diff --git a/adapters/neoforge/run/crash-reports/crash-2026-06-12_01.57.48-server.txt b/adapters/neoforge/run/crash-reports/crash-2026-06-12_01.57.48-server.txt new file mode 100644 index 000000000..ecf5e519b --- /dev/null +++ b/adapters/neoforge/run/crash-reports/crash-2026-06-12_01.57.48-server.txt @@ -0,0 +1,80 @@ +---- Minecraft Crash Report ---- +// Oh - I know what I did wrong! + +Time: 2026-06-12 01:57:48 +Description: Exception in server tick loop + +java.lang.IllegalStateException: Failed to initialize server + at TRANSFORMER/minecraft@26.1.2/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:736) [minecraft-patched-26.1.2.75.jar:?] {neoforge:access_transformer} + at TRANSFORMER/minecraft@26.1.2/net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:300) [minecraft-patched-26.1.2.75.jar:?] {neoforge:access_transformer} + at java.base/java.lang.Thread.run(Thread.java:1474) [?:?] {} + + +A detailed walkthrough of the error, its code path and all known details is as follows: +--------------------------------------------------------------------------------------- + +-- System Details -- +Details: + Minecraft Version: 26.1.2 + Minecraft Version ID: 26.1.2 + Operating System: Mac OS X (aarch64) version 26.6 + Java Version: 25.0.2, Eclipse Adoptium + Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Eclipse Adoptium + Memory: 713231504 bytes (680 MiB) / 1262485504 bytes (1204 MiB) up to 8589934592 bytes (8192 MiB) + Memory (heap): init: 2048MiB, used: 520MiB, committed: 1204MiB, max: 8192MiB + Memory (non-head): init: 007MiB, used: 136MiB, committed: 138MiB, max: 000MiB + CPUs: 16 + Processor Vendor: Apple Inc. + Processor Name: Apple M3 Max + Identifier: Apple Inc. Family 0x8765edea Model 0 Stepping 0 + Microarchitecture: ARM64 SoC: Everest + Sawtooth + Frequency (GHz): 4.06 + Number of physical packages: 1 + Number of physical CPUs: 16 + Number of logical CPUs: 16 + Graphics card #0 name: Apple M3 Max + Graphics card #0 vendor: Apple (0x106b) + Graphics card #0 VRAM (MiB): 0.00 + Graphics card #0 deviceId: unknown + Graphics card #0 versionInfo: unknown + Memory slot #0 capacity (MiB): 0.00 + Memory slot #0 clockSpeed (GHz): 0.00 + Memory slot #0 type: unknown + Virtual memory max (MiB): 131072.00 + Virtual memory used (MiB): 50407.91 + Swap memory total (MiB): 0.00 + Swap memory used (MiB): 0.00 + Space in storage for jna.tmpdir (MiB): + Space in storage for org.lwjgl.system.SharedLibraryExtractPath (MiB): + Space in storage for io.netty.native.workdir (MiB): + Space in storage for java.io.tmpdir (MiB): available: 294249.78, total: 948554.19 + Space in storage for workdir (MiB): available: 294249.78, total: 948554.19 + JVM Flags: 1 total; -Xmx8G + Debug Flags: 0 total; + Server Running: true + Active Data Packs: vanilla, mod_data, mod/irisworldgen, mod/neoforge + Available Data Packs: minecart_improvements, redstone_experiments, trade_rebalance, vanilla, mod/irisworldgen, mod/neoforge, mod_data + Enabled Feature Flags: minecraft:vanilla + World Generation: Experimental + World Seed: -4481097493044353688 + Suppressed Exceptions: ~~NONE~~ + Is Modded: Definitely; Server brand changed to 'neoforge' + Type: Dedicated Server + Class Processors: + 00.00%: neoforge:neoforge_dev_dist_cleaner + 00.00%: neoforge:computing_frames (marker) + 00.00%: neoforge:runtime_enum_extender + 04.26%: neoforge:access_transformer + 00.08%: neoforge:mixin + 00.00%: neoforge:simple_processors_default (marker) + 00.02%: neoforge.coremods:field_to_getter.net.minecraft.world.level.biome.biome + 00.02%: neoforge.coremods:field_to_getter.net.minecraft.world.level.block.flowerpotblock + 00.02%: neoforge.coremods:field_to_getter.net.minecraft.world.level.levelgen.structure.structure + 00.38%: neoforge.coremods:method_redirector + Mod List: + main |Iris |irisworldgen |4.0.0-26.1 |Manifest: NOSIGNATURE + minecraft-patched-26.1.2.75.jar |Minecraft |minecraft |26.1.2 |Manifest: NOSIGNATURE + neoforge-26.1.2.75-universal.jar |NeoForge |neoforge |26.1.2.75 |Manifest: NOSIGNATURE + Crash Report UUID: 47d3804d-198f-40da-b8a3-34767d2b5cd9 + FML: 11.0.13 + NeoForge: 26.1.2.75 \ No newline at end of file diff --git a/adapters/neoforge/run/eula.txt b/adapters/neoforge/run/eula.txt new file mode 100644 index 000000000..02dccd973 --- /dev/null +++ b/adapters/neoforge/run/eula.txt @@ -0,0 +1 @@ +eula=true diff --git a/adapters/neoforge/run/logs/2026-06-12-1.log.gz b/adapters/neoforge/run/logs/2026-06-12-1.log.gz new file mode 100644 index 000000000..42ebd7ba4 Binary files /dev/null and b/adapters/neoforge/run/logs/2026-06-12-1.log.gz differ diff --git a/adapters/neoforge/run/logs/debug-1.log.gz b/adapters/neoforge/run/logs/debug-1.log.gz new file mode 100644 index 000000000..42ebd7ba4 Binary files /dev/null and b/adapters/neoforge/run/logs/debug-1.log.gz differ diff --git a/adapters/neoforge/run/logs/debug.log b/adapters/neoforge/run/logs/debug.log new file mode 100644 index 000000000..af1753a6b --- /dev/null +++ b/adapters/neoforge/run/logs/debug.log @@ -0,0 +1,102 @@ +[12Jun2026 01:58:46.567] [main/INFO] [net.neoforged.fml.startup.Entrypoint/]: JVM Uptime at startup: 85ms +[12Jun2026 01:58:46.578] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Starting FancyModLoader version 11.0.13 (DEDICATED_SERVER in DEV) +[12Jun2026 01:58:46.578] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Game directory: /Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/run +[12Jun2026 01:58:46.610] [main/INFO] [net.neoforged.fml.loading.EarlyServiceDiscovery/]: Found 2 early service jars (out of 121) in 11ms +[12Jun2026 01:58:46.610] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Loading FML Early Services: +[12Jun2026 01:58:46.611] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: - /Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.neoforged.fancymodloader/earlydisplay/11.0.13/491a1bedecb33802fa118cae384b60f91f6f0241/earlydisplay-11.0.13.jar +[12Jun2026 01:58:46.611] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: - /Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.neoforged.fancymodloader/loader/11.0.13/c9c89eaf35535990110088224d188748d81eaecf/loader-11.0.13.jar +[12Jun2026 01:58:46.615] [main/INFO] [net.neoforged.fml.loading.ImmediateWindowHandler/]: Not loading early display in headless mode. +[12Jun2026 01:58:46.645] [main/INFO] [net.neoforged.fml.loading.moddiscovery.locators.GameLocator/]: Detected a joined NeoForge and Minecraft configuration. Applying filtering... +[12Jun2026 01:58:46.712] [main/INFO] [net.neoforged.fml.loading.moddiscovery.locators.InDevFolderLocator/CORE]: Got mod coordinates irisworldgen%%/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/classes/java/main:irisworldgen%%/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/resources/main from env +[12Jun2026 01:58:46.789] [main/INFO] [net.neoforged.fml.loading.moddiscovery.locators.JarInJarDependencyLocator/]: Found 2 dependencies adding them to mods collection +[12Jun2026 01:58:46.791] [main/INFO] [net.neoforged.fml.loading.moddiscovery.ModDiscoverer/]: + Mod List: + Name Version (Mod Id) + + Iris 4.0.0-26.1 (irisworldgen) + Minecraft 26.1.2 (minecraft) + NeoForge 26.1.2.75 (neoforge) +[12Jun2026 01:58:46.895] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.7 Source=file:/Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.fabricmc/sponge-mixin/0.17.3+mixin.0.8.7/41c4a3984a80f4679e759fb9f495587acc5cdac7/sponge-mixin-0.17.3+mixin.0.8.7.jar Service=FML Env=SERVER +[12Jun2026 01:58:46.905] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Loading FML Plugins: +[12Jun2026 01:58:46.906] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: - /Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.neoforged/neoforge/26.1.2.75/5c8890989345caf63f92a4cb01adb857e3f47fa6/neoforge-26.1.2.75-universal.jar > net.neoforged.neoforge-coremods-26.1.2.75.jar +[12Jun2026 01:58:46.948] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Building game content classloader: + - irisworldgen (composite(folder(/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/classes/java/main), folder(/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/resources/main))) + - minecraft (composite(filtered(jar(/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/moddev/artifacts/minecraft-patched-26.1.2.75.jar)), filtered(jar(/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/moddev/artifacts/minecraft-patched-26.1.2.75.jar)))) + - mixinextras.neoforge (jar(/Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.neoforged/neoforge/26.1.2.75/5c8890989345caf63f92a4cb01adb857e3f47fa6/neoforge-26.1.2.75-universal.jar > mixinextras-neoforge-0.5.4.jar)) + - neoforge (composite(filtered(jar(/Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.neoforged/neoforge/26.1.2.75/5c8890989345caf63f92a4cb01adb857e3f47fa6/neoforge-26.1.2.75-universal.jar)))) + - net.neoforged.fml.generated (empty(VirtualJar/net.neoforged.fml.generated)) +[12Jun2026 01:58:46.956] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Built game content classloader in 13ms +[12Jun2026 01:58:48.683] [main/INFO] [MixinExtras|Service/]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.5.4). +[12Jun2026 01:58:51.553] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0] +[12Jun2026 01:58:51.554] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0] +[12Jun2026 01:58:51.555] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498] +[12Jun2026 01:58:51.556] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498] +[12Jun2026 01:58:51.557] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0] +[12Jun2026 01:58:51.558] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [time, set, time] and [time, set, timemarker] with inputs: [0, 0s, 0d, 0t] +[12Jun2026 01:58:51.559] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [time, set, timemarker] and [time, set, time] with inputs: [012] +[12Jun2026 01:58:51.560] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [time, of, clock, set, time] and [time, of, clock, set, timemarker] with inputs: [0, 0s, 0d, 0t] +[12Jun2026 01:58:51.561] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [time, of, clock, set, timemarker] and [time, of, clock, set, time] with inputs: [012] +[12Jun2026 01:58:51.561] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [waypoint, modify, waypoint, color, reset] and [waypoint, modify, waypoint, color, color] with inputs: [reset] +[12Jun2026 01:58:51.588] [modloading-worker-0/INFO] [Iris/]: Iris 4.0.0-26.1 bootstrapping on Minecraft 26.1.2 (NeoForge 26.1.2.75) +[12Jun2026 01:58:51.594] [modloading-worker-0/INFO] [net.neoforged.neoforge.common.NeoForgeMod/NEOFORGE-MOD]: NeoForge mod loading, version 26.1.2.75, for MC 26.1.2 +[12Jun2026 01:58:51.594] [modloading-worker-0/INFO] [Iris/]: Iris core loaded (3 classes ok) +[12Jun2026 01:58:51.607] [modloading-worker-0/INFO] [Iris/]: Iris chunk generator registered as irisworldgen:iris +[12Jun2026 01:58:51.608] [modloading-worker-0/INFO] [Iris/]: Iris world check armed +[12Jun2026 01:58:51.784] [main/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, profilesHost=https://api.mojang.com, name=PROD] +[12Jun2026 01:58:52.152] [Worker-Main-3/INFO] [net.minecraft.server.Main/]: No existing world data, creating new world +[12Jun2026 01:58:52.441] [main/INFO] [net.minecraft.world.item.crafting.RecipeManager/]: Loaded 1515 recipes +[12Jun2026 01:58:52.451] [main/INFO] [net.minecraft.advancements.AdvancementTree/]: Loaded 1617 advancements +[12Jun2026 01:58:52.453] [main/INFO] [net.neoforged.neoforge.common.crafting.RecipePriorityManager/]: Loaded 0 recipe priority overrides +[12Jun2026 01:58:52.538] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Starting minecraft server version 26.1.2 +[12Jun2026 01:58:52.538] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Loading properties +[12Jun2026 01:58:52.538] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Default game type: SURVIVAL +[12Jun2026 01:58:52.538] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Generating keypair +[12Jun2026 01:58:52.573] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Starting Minecraft server on *:25599 +[12Jun2026 01:58:52.861] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE! +[12Jun2026 01:58:52.861] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: The server will make no attempt to authenticate usernames. Beware. +[12Jun2026 01:58:52.861] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose. +[12Jun2026 01:58:52.861] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: To change this, set "online-mode" to "true" in the server.properties file. +[12Jun2026 01:58:52.894] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Preparing level "world" +[12Jun2026 01:58:52.987] [Server thread/INFO] [net.minecraft.server.level.progress.LoggingLevelLoadListener/]: Selecting global world spawn... +[12Jun2026 01:58:53.267] [worldgen/INFO] [Iris/]: Engine init: minecraft_overworld/overworld seed=-4236022621777363859 +[12Jun2026 01:58:54.580] [worldgen/INFO] [Iris/]: Iris engine up for minecraft:overworld: pack=/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/run/config/irisworldgen/packs/overworld dim=overworld seed=-4236022621777363859 height=-256..512 +[12Jun2026 01:58:54.580] [worldgen/INFO] [Iris/]: Iris generating overworld through IrisModdedChunkGenerator (dim=overworld first chunk -2,-2) +[12Jun2026 01:59:28.925] [Server thread/INFO] [net.minecraft.server.level.progress.LoggingLevelLoadListener/]: Loading 0 persistent chunks... +[12Jun2026 01:59:28.926] [Server thread/INFO] [net.minecraft.server.level.progress.LoggingLevelLoadListener/]: Preparing spawn area: 100% +[12Jun2026 01:59:28.927] [Server thread/INFO] [net.minecraft.server.level.progress.LoggingLevelLoadListener/]: Time elapsed: 35940 ms +[12Jun2026 01:59:28.927] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Done (36.057s)! For help, type "help" +[12Jun2026 01:59:28.929] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld +[12Jun2026 01:59:28.970] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end +[12Jun2026 01:59:28.981] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether +[12Jun2026 01:59:29.024] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (world): All chunks are saved +[12Jun2026 01:59:29.025] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved +[12Jun2026 01:59:29.025] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved +[12Jun2026 01:59:29.025] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage: All dimensions are saved +[12Jun2026 01:59:29.047] [Server thread/INFO] [net.neoforged.neoforge.server.permission.PermissionAPI/]: Successfully initialized permission handler neoforge:default_handler +[12Jun2026 01:59:29.266] [Server thread/INFO] [Iris/]: [worldcheck] overworld generator: art.arcane.iris.modded.IrisModdedChunkGenerator +[12Jun2026 01:59:29.266] [Server thread/INFO] [Iris/]: [worldcheck] spawn: 0 87 0 (minY=-256 height=768) +[12Jun2026 01:59:30.536] [DedicatedLanServerPinger #1/WARN] [net.neoforged.neoforge.server.dedicated.DedicatedLanServerPinger/]: DedicatedLanServerPinger: No route to host +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -24 81 -24 minecraft:azalea_leaves +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -24 72 -8 minecraft:grass_block +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -24 74 8 minecraft:grass_block +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -24 72 24 minecraft:short_grass +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -8 68 -24 minecraft:mangrove_wood +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -8 89 -8 minecraft:azalea_leaves +[12Jun2026 01:59:36.199] [Server thread/INFO] [Iris/]: [worldcheck] surface digest: a0068bb38f6b (16 columns, 6 distinct surface blocks: [minecraft:azalea_leaves, minecraft:grass_block, minecraft:short_grass, minecraft:mangrove_wood, minecraft:leaf_litter, minecraft:oak_leaves]) +[12Jun2026 01:59:36.199] [Server thread/INFO] [Iris/]: [worldcheck] chunk 0,0: 22 non-empty sections of 48; column blocks at (8,*,8): [minecraft:bedrock, minecraft:deepslate, minecraft:stone, minecraft:grass_block] +[12Jun2026 01:59:36.199] [Server thread/INFO] [Iris/]: [worldcheck] PASS +[12Jun2026 01:59:36.199] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 6891ms or 137 ticks behind +[12Jun2026 01:59:36.199] [Iris World Check/INFO] [Iris/]: [worldcheck] shutting down dev server (result=PASS) +[12Jun2026 01:59:37.068] [Server thread/INFO] [Iris/]: Iris engine closed for minecraft:overworld +[12Jun2026 01:59:37.069] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Stopping server +[12Jun2026 01:59:37.069] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving players +[12Jun2026 01:59:37.069] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving worlds +[12Jun2026 01:59:37.125] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld +[12Jun2026 01:59:37.335] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end +[12Jun2026 01:59:37.340] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether +[12Jun2026 01:59:37.358] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (world): All chunks are saved +[12Jun2026 01:59:37.359] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved +[12Jun2026 01:59:37.359] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved +[12Jun2026 01:59:37.359] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage: All dimensions are saved +[12Jun2026 01:59:37.415] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Closing FML Loader 6dc940fc +[12Jun2026 01:59:37.415] [main/INFO] [net.neoforged.fml.ModLoader/]: Clearing ModLoader diff --git a/adapters/neoforge/run/logs/latest.log b/adapters/neoforge/run/logs/latest.log new file mode 100644 index 000000000..af1753a6b --- /dev/null +++ b/adapters/neoforge/run/logs/latest.log @@ -0,0 +1,102 @@ +[12Jun2026 01:58:46.567] [main/INFO] [net.neoforged.fml.startup.Entrypoint/]: JVM Uptime at startup: 85ms +[12Jun2026 01:58:46.578] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Starting FancyModLoader version 11.0.13 (DEDICATED_SERVER in DEV) +[12Jun2026 01:58:46.578] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Game directory: /Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/run +[12Jun2026 01:58:46.610] [main/INFO] [net.neoforged.fml.loading.EarlyServiceDiscovery/]: Found 2 early service jars (out of 121) in 11ms +[12Jun2026 01:58:46.610] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Loading FML Early Services: +[12Jun2026 01:58:46.611] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: - /Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.neoforged.fancymodloader/earlydisplay/11.0.13/491a1bedecb33802fa118cae384b60f91f6f0241/earlydisplay-11.0.13.jar +[12Jun2026 01:58:46.611] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: - /Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.neoforged.fancymodloader/loader/11.0.13/c9c89eaf35535990110088224d188748d81eaecf/loader-11.0.13.jar +[12Jun2026 01:58:46.615] [main/INFO] [net.neoforged.fml.loading.ImmediateWindowHandler/]: Not loading early display in headless mode. +[12Jun2026 01:58:46.645] [main/INFO] [net.neoforged.fml.loading.moddiscovery.locators.GameLocator/]: Detected a joined NeoForge and Minecraft configuration. Applying filtering... +[12Jun2026 01:58:46.712] [main/INFO] [net.neoforged.fml.loading.moddiscovery.locators.InDevFolderLocator/CORE]: Got mod coordinates irisworldgen%%/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/classes/java/main:irisworldgen%%/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/resources/main from env +[12Jun2026 01:58:46.789] [main/INFO] [net.neoforged.fml.loading.moddiscovery.locators.JarInJarDependencyLocator/]: Found 2 dependencies adding them to mods collection +[12Jun2026 01:58:46.791] [main/INFO] [net.neoforged.fml.loading.moddiscovery.ModDiscoverer/]: + Mod List: + Name Version (Mod Id) + + Iris 4.0.0-26.1 (irisworldgen) + Minecraft 26.1.2 (minecraft) + NeoForge 26.1.2.75 (neoforge) +[12Jun2026 01:58:46.895] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.7 Source=file:/Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.fabricmc/sponge-mixin/0.17.3+mixin.0.8.7/41c4a3984a80f4679e759fb9f495587acc5cdac7/sponge-mixin-0.17.3+mixin.0.8.7.jar Service=FML Env=SERVER +[12Jun2026 01:58:46.905] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Loading FML Plugins: +[12Jun2026 01:58:46.906] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: - /Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.neoforged/neoforge/26.1.2.75/5c8890989345caf63f92a4cb01adb857e3f47fa6/neoforge-26.1.2.75-universal.jar > net.neoforged.neoforge-coremods-26.1.2.75.jar +[12Jun2026 01:58:46.948] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Building game content classloader: + - irisworldgen (composite(folder(/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/classes/java/main), folder(/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/resources/main))) + - minecraft (composite(filtered(jar(/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/moddev/artifacts/minecraft-patched-26.1.2.75.jar)), filtered(jar(/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/build/moddev/artifacts/minecraft-patched-26.1.2.75.jar)))) + - mixinextras.neoforge (jar(/Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.neoforged/neoforge/26.1.2.75/5c8890989345caf63f92a4cb01adb857e3f47fa6/neoforge-26.1.2.75-universal.jar > mixinextras-neoforge-0.5.4.jar)) + - neoforge (composite(filtered(jar(/Users/brianfopiano/.gradle/caches/modules-2/files-2.1/net.neoforged/neoforge/26.1.2.75/5c8890989345caf63f92a4cb01adb857e3f47fa6/neoforge-26.1.2.75-universal.jar)))) + - net.neoforged.fml.generated (empty(VirtualJar/net.neoforged.fml.generated)) +[12Jun2026 01:58:46.956] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Built game content classloader in 13ms +[12Jun2026 01:58:48.683] [main/INFO] [MixinExtras|Service/]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.5.4). +[12Jun2026 01:58:51.553] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0] +[12Jun2026 01:58:51.554] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0] +[12Jun2026 01:58:51.555] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498] +[12Jun2026 01:58:51.556] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498] +[12Jun2026 01:58:51.557] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0] +[12Jun2026 01:58:51.558] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [time, set, time] and [time, set, timemarker] with inputs: [0, 0s, 0d, 0t] +[12Jun2026 01:58:51.559] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [time, set, timemarker] and [time, set, time] with inputs: [012] +[12Jun2026 01:58:51.560] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [time, of, clock, set, time] and [time, of, clock, set, timemarker] with inputs: [0, 0s, 0d, 0t] +[12Jun2026 01:58:51.561] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [time, of, clock, set, timemarker] and [time, of, clock, set, time] with inputs: [012] +[12Jun2026 01:58:51.561] [main/WARN] [net.minecraft.commands.Commands/]: Ambiguity between arguments [waypoint, modify, waypoint, color, reset] and [waypoint, modify, waypoint, color, color] with inputs: [reset] +[12Jun2026 01:58:51.588] [modloading-worker-0/INFO] [Iris/]: Iris 4.0.0-26.1 bootstrapping on Minecraft 26.1.2 (NeoForge 26.1.2.75) +[12Jun2026 01:58:51.594] [modloading-worker-0/INFO] [net.neoforged.neoforge.common.NeoForgeMod/NEOFORGE-MOD]: NeoForge mod loading, version 26.1.2.75, for MC 26.1.2 +[12Jun2026 01:58:51.594] [modloading-worker-0/INFO] [Iris/]: Iris core loaded (3 classes ok) +[12Jun2026 01:58:51.607] [modloading-worker-0/INFO] [Iris/]: Iris chunk generator registered as irisworldgen:iris +[12Jun2026 01:58:51.608] [modloading-worker-0/INFO] [Iris/]: Iris world check armed +[12Jun2026 01:58:51.784] [main/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, profilesHost=https://api.mojang.com, name=PROD] +[12Jun2026 01:58:52.152] [Worker-Main-3/INFO] [net.minecraft.server.Main/]: No existing world data, creating new world +[12Jun2026 01:58:52.441] [main/INFO] [net.minecraft.world.item.crafting.RecipeManager/]: Loaded 1515 recipes +[12Jun2026 01:58:52.451] [main/INFO] [net.minecraft.advancements.AdvancementTree/]: Loaded 1617 advancements +[12Jun2026 01:58:52.453] [main/INFO] [net.neoforged.neoforge.common.crafting.RecipePriorityManager/]: Loaded 0 recipe priority overrides +[12Jun2026 01:58:52.538] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Starting minecraft server version 26.1.2 +[12Jun2026 01:58:52.538] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Loading properties +[12Jun2026 01:58:52.538] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Default game type: SURVIVAL +[12Jun2026 01:58:52.538] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Generating keypair +[12Jun2026 01:58:52.573] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Starting Minecraft server on *:25599 +[12Jun2026 01:58:52.861] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE! +[12Jun2026 01:58:52.861] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: The server will make no attempt to authenticate usernames. Beware. +[12Jun2026 01:58:52.861] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose. +[12Jun2026 01:58:52.861] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: To change this, set "online-mode" to "true" in the server.properties file. +[12Jun2026 01:58:52.894] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Preparing level "world" +[12Jun2026 01:58:52.987] [Server thread/INFO] [net.minecraft.server.level.progress.LoggingLevelLoadListener/]: Selecting global world spawn... +[12Jun2026 01:58:53.267] [worldgen/INFO] [Iris/]: Engine init: minecraft_overworld/overworld seed=-4236022621777363859 +[12Jun2026 01:58:54.580] [worldgen/INFO] [Iris/]: Iris engine up for minecraft:overworld: pack=/Users/brianfopiano/Developer/RemoteGit/VolmitSoftware/Iris/adapters/neoforge/run/config/irisworldgen/packs/overworld dim=overworld seed=-4236022621777363859 height=-256..512 +[12Jun2026 01:58:54.580] [worldgen/INFO] [Iris/]: Iris generating overworld through IrisModdedChunkGenerator (dim=overworld first chunk -2,-2) +[12Jun2026 01:59:28.925] [Server thread/INFO] [net.minecraft.server.level.progress.LoggingLevelLoadListener/]: Loading 0 persistent chunks... +[12Jun2026 01:59:28.926] [Server thread/INFO] [net.minecraft.server.level.progress.LoggingLevelLoadListener/]: Preparing spawn area: 100% +[12Jun2026 01:59:28.927] [Server thread/INFO] [net.minecraft.server.level.progress.LoggingLevelLoadListener/]: Time elapsed: 35940 ms +[12Jun2026 01:59:28.927] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Done (36.057s)! For help, type "help" +[12Jun2026 01:59:28.929] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld +[12Jun2026 01:59:28.970] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end +[12Jun2026 01:59:28.981] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether +[12Jun2026 01:59:29.024] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (world): All chunks are saved +[12Jun2026 01:59:29.025] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved +[12Jun2026 01:59:29.025] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved +[12Jun2026 01:59:29.025] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage: All dimensions are saved +[12Jun2026 01:59:29.047] [Server thread/INFO] [net.neoforged.neoforge.server.permission.PermissionAPI/]: Successfully initialized permission handler neoforge:default_handler +[12Jun2026 01:59:29.266] [Server thread/INFO] [Iris/]: [worldcheck] overworld generator: art.arcane.iris.modded.IrisModdedChunkGenerator +[12Jun2026 01:59:29.266] [Server thread/INFO] [Iris/]: [worldcheck] spawn: 0 87 0 (minY=-256 height=768) +[12Jun2026 01:59:30.536] [DedicatedLanServerPinger #1/WARN] [net.neoforged.neoforge.server.dedicated.DedicatedLanServerPinger/]: DedicatedLanServerPinger: No route to host +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -24 81 -24 minecraft:azalea_leaves +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -24 72 -8 minecraft:grass_block +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -24 74 8 minecraft:grass_block +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -24 72 24 minecraft:short_grass +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -8 68 -24 minecraft:mangrove_wood +[12Jun2026 01:59:36.198] [Server thread/INFO] [Iris/]: [worldcheck] surface sample: -8 89 -8 minecraft:azalea_leaves +[12Jun2026 01:59:36.199] [Server thread/INFO] [Iris/]: [worldcheck] surface digest: a0068bb38f6b (16 columns, 6 distinct surface blocks: [minecraft:azalea_leaves, minecraft:grass_block, minecraft:short_grass, minecraft:mangrove_wood, minecraft:leaf_litter, minecraft:oak_leaves]) +[12Jun2026 01:59:36.199] [Server thread/INFO] [Iris/]: [worldcheck] chunk 0,0: 22 non-empty sections of 48; column blocks at (8,*,8): [minecraft:bedrock, minecraft:deepslate, minecraft:stone, minecraft:grass_block] +[12Jun2026 01:59:36.199] [Server thread/INFO] [Iris/]: [worldcheck] PASS +[12Jun2026 01:59:36.199] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 6891ms or 137 ticks behind +[12Jun2026 01:59:36.199] [Iris World Check/INFO] [Iris/]: [worldcheck] shutting down dev server (result=PASS) +[12Jun2026 01:59:37.068] [Server thread/INFO] [Iris/]: Iris engine closed for minecraft:overworld +[12Jun2026 01:59:37.069] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Stopping server +[12Jun2026 01:59:37.069] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving players +[12Jun2026 01:59:37.069] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving worlds +[12Jun2026 01:59:37.125] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld +[12Jun2026 01:59:37.335] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end +[12Jun2026 01:59:37.340] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether +[12Jun2026 01:59:37.358] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (world): All chunks are saved +[12Jun2026 01:59:37.359] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved +[12Jun2026 01:59:37.359] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved +[12Jun2026 01:59:37.359] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage: All dimensions are saved +[12Jun2026 01:59:37.415] [main/INFO] [net.neoforged.fml.loading.FMLLoader/]: Closing FML Loader 6dc940fc +[12Jun2026 01:59:37.415] [main/INFO] [net.neoforged.fml.ModLoader/]: Clearing ModLoader diff --git a/adapters/neoforge/run/ops.json b/adapters/neoforge/run/ops.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/adapters/neoforge/run/ops.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/adapters/neoforge/run/server.properties b/adapters/neoforge/run/server.properties new file mode 100644 index 000000000..b99e7d2cf --- /dev/null +++ b/adapters/neoforge/run/server.properties @@ -0,0 +1,69 @@ +#Minecraft server properties +#Fri Jun 12 01:58:51 EDT 2026 +accepts-transfers=false +allow-flight=false +broadcast-console-to-ops=true +broadcast-rcon-to-ops=true +bug-report-link= +difficulty=easy +enable-code-of-conduct=false +enable-jmx-monitoring=false +enable-query=false +enable-rcon=false +enable-status=true +enforce-secure-profile=true +enforce-whitelist=false +entity-broadcast-range-percentage=100 +force-gamemode=false +function-permission-level=2 +gamemode=survival +generate-structures=true +generator-settings={} +hardcore=false +hide-online-players=false +initial-disabled-packs= +initial-enabled-packs=vanilla +level-name=world +level-seed= +level-type=minecraft\:normal +log-ips=true +management-server-allowed-origins= +management-server-enabled=false +management-server-host=localhost +management-server-port=0 +management-server-secret=gw5pwUKFpNvEqtk8fveDSDQCSnmiB63EXSaiRp6h +management-server-tls-enabled=true +management-server-tls-keystore= +management-server-tls-keystore-password= +max-chained-neighbor-updates=1000000 +max-players=20 +max-tick-time=60000 +max-world-size=29999984 +motd=A Minecraft Server +network-compression-threshold=256 +online-mode=false +op-permission-level=4 +pause-when-empty-seconds=60 +player-idle-timeout=0 +prevent-proxy-connections=false +query.port=25565 +rate-limit=0 +rcon.password= +rcon.port=25575 +region-file-compression=deflate +require-resource-pack=false +resource-pack= +resource-pack-id= +resource-pack-prompt= +resource-pack-sha1= +server-ip= +server-port=25599 +simulation-distance=10 +spawn-protection=16 +status-heartbeat-interval=0 +sync-chunk-writes=false +text-filtering-config= +text-filtering-version=0 +use-native-transport=true +view-distance=10 +white-list=false diff --git a/adapters/neoforge/run/usercache.json b/adapters/neoforge/run/usercache.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/adapters/neoforge/run/usercache.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/adapters/neoforge/run/whitelist.json b/adapters/neoforge/run/whitelist.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/adapters/neoforge/run/whitelist.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/adapters/neoforge/run/world/data/minecraft/custom_boss_events.dat b/adapters/neoforge/run/world/data/minecraft/custom_boss_events.dat new file mode 100644 index 000000000..0191e2d8d Binary files /dev/null and b/adapters/neoforge/run/world/data/minecraft/custom_boss_events.dat differ diff --git a/adapters/neoforge/run/world/data/minecraft/game_rules.dat b/adapters/neoforge/run/world/data/minecraft/game_rules.dat new file mode 100644 index 000000000..d678a5ee8 Binary files /dev/null and b/adapters/neoforge/run/world/data/minecraft/game_rules.dat differ diff --git a/adapters/neoforge/run/world/data/minecraft/random_sequences.dat b/adapters/neoforge/run/world/data/minecraft/random_sequences.dat new file mode 100644 index 000000000..03e5519b3 Binary files /dev/null and b/adapters/neoforge/run/world/data/minecraft/random_sequences.dat differ diff --git a/adapters/neoforge/run/world/data/minecraft/scheduled_events.dat b/adapters/neoforge/run/world/data/minecraft/scheduled_events.dat new file mode 100644 index 000000000..453be1b24 Binary files /dev/null and b/adapters/neoforge/run/world/data/minecraft/scheduled_events.dat differ diff --git a/adapters/neoforge/run/world/data/minecraft/scoreboard.dat b/adapters/neoforge/run/world/data/minecraft/scoreboard.dat new file mode 100644 index 000000000..0191e2d8d Binary files /dev/null and b/adapters/neoforge/run/world/data/minecraft/scoreboard.dat differ diff --git a/adapters/neoforge/run/world/data/minecraft/stopwatches.dat b/adapters/neoforge/run/world/data/minecraft/stopwatches.dat new file mode 100644 index 000000000..9e3a07673 Binary files /dev/null and b/adapters/neoforge/run/world/data/minecraft/stopwatches.dat differ diff --git a/adapters/neoforge/run/world/data/minecraft/weather.dat b/adapters/neoforge/run/world/data/minecraft/weather.dat new file mode 100644 index 000000000..5df945153 Binary files /dev/null and b/adapters/neoforge/run/world/data/minecraft/weather.dat differ diff --git a/adapters/neoforge/run/world/data/minecraft/world_clocks.dat b/adapters/neoforge/run/world/data/minecraft/world_clocks.dat new file mode 100644 index 000000000..7ee5d8a10 Binary files /dev/null and b/adapters/neoforge/run/world/data/minecraft/world_clocks.dat differ diff --git a/adapters/neoforge/run/world/data/minecraft/world_gen_settings.dat b/adapters/neoforge/run/world/data/minecraft/world_gen_settings.dat new file mode 100644 index 000000000..52725d5e7 Binary files /dev/null and b/adapters/neoforge/run/world/data/minecraft/world_gen_settings.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/minecraft/chunk_tickets.dat b/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/minecraft/chunk_tickets.dat new file mode 100644 index 000000000..0191e2d8d Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/minecraft/chunk_tickets.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/minecraft/raids.dat b/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/minecraft/raids.dat new file mode 100644 index 000000000..119934f1e Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/minecraft/raids.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/minecraft/world_border.dat b/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/minecraft/world_border.dat new file mode 100644 index 000000000..00075e6f6 Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/minecraft/world_border.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/neoforge/data_attachments.dat b/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/neoforge/data_attachments.dat new file mode 100644 index 000000000..0191e2d8d Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/data/neoforge/data_attachments.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/entities/r.-1.-1.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/entities/r.-1.-1.mca new file mode 100644 index 000000000..e69de29bb diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/entities/r.-1.0.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/entities/r.-1.0.mca new file mode 100644 index 000000000..e69de29bb diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/entities/r.0.-1.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/entities/r.0.-1.mca new file mode 100644 index 000000000..e69de29bb diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/entities/r.0.0.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/entities/r.0.0.mca new file mode 100644 index 000000000..e69de29bb diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/iris/engine-data/overworld.json b/adapters/neoforge/run/world/dimensions/minecraft/overworld/iris/engine-data/overworld.json new file mode 100644 index 000000000..3a211aa2e --- /dev/null +++ b/adapters/neoforge/run/world/dimensions/minecraft/overworld/iris/engine-data/overworld.json @@ -0,0 +1 @@ +{"statistics":{"totalHotloads":0,"chunksGenerated":64,"IrisToUpgradedVersion":0,"IrisCreationVersion":0,"MinecraftVersion":0},"chunks":{},"cooldowns":{}} diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.-1.ttp.lz4b b/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.-1.ttp.lz4b new file mode 100644 index 000000000..09afb870b Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.-1.ttp.lz4b differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.-4294967296.ttp.lz4b b/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.-4294967296.ttp.lz4b new file mode 100644 index 000000000..78bf6abc2 Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.-4294967296.ttp.lz4b differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.0.ttp.lz4b b/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.0.ttp.lz4b new file mode 100644 index 000000000..ca42e312a Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.0.ttp.lz4b differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.4294967295.ttp.lz4b b/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.4294967295.ttp.lz4b new file mode 100644 index 000000000..92022f191 Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/mantle/pv.4294967295.ttp.lz4b differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/poi/r.-1.-1.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/poi/r.-1.-1.mca new file mode 100644 index 000000000..e69de29bb diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/poi/r.-1.0.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/poi/r.-1.0.mca new file mode 100644 index 000000000..e69de29bb diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/poi/r.0.-1.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/poi/r.0.-1.mca new file mode 100644 index 000000000..e69de29bb diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/poi/r.0.0.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/poi/r.0.0.mca new file mode 100644 index 000000000..e69de29bb diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.-1.-1.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.-1.-1.mca new file mode 100644 index 000000000..6e0d67a1d Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.-1.-1.mca differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.-1.0.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.-1.0.mca new file mode 100644 index 000000000..7c4d1d2a5 Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.-1.0.mca differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.0.-1.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.0.-1.mca new file mode 100644 index 000000000..c977f1655 Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.0.-1.mca differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.0.0.mca b/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.0.0.mca new file mode 100644 index 000000000..d77b43541 Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/overworld/region/r.0.0.mca differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/chunk_tickets.dat b/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/chunk_tickets.dat new file mode 100644 index 000000000..0191e2d8d Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/chunk_tickets.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/ender_dragon_fight.dat b/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/ender_dragon_fight.dat new file mode 100644 index 000000000..197639c17 Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/ender_dragon_fight.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/raids.dat b/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/raids.dat new file mode 100644 index 000000000..119934f1e Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/raids.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/world_border.dat b/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/world_border.dat new file mode 100644 index 000000000..00075e6f6 Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/minecraft/world_border.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/neoforge/data_attachments.dat b/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/neoforge/data_attachments.dat new file mode 100644 index 000000000..0191e2d8d Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/the_end/data/neoforge/data_attachments.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/minecraft/chunk_tickets.dat b/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/minecraft/chunk_tickets.dat new file mode 100644 index 000000000..0191e2d8d Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/minecraft/chunk_tickets.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/minecraft/raids.dat b/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/minecraft/raids.dat new file mode 100644 index 000000000..119934f1e Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/minecraft/raids.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/minecraft/world_border.dat b/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/minecraft/world_border.dat new file mode 100644 index 000000000..00075e6f6 Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/minecraft/world_border.dat differ diff --git a/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/neoforge/data_attachments.dat b/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/neoforge/data_attachments.dat new file mode 100644 index 000000000..0191e2d8d Binary files /dev/null and b/adapters/neoforge/run/world/dimensions/minecraft/the_nether/data/neoforge/data_attachments.dat differ diff --git a/adapters/neoforge/run/world/level.dat b/adapters/neoforge/run/world/level.dat new file mode 100644 index 000000000..ef4ea9b4b Binary files /dev/null and b/adapters/neoforge/run/world/level.dat differ diff --git a/adapters/neoforge/run/world/level.dat_old b/adapters/neoforge/run/world/level.dat_old new file mode 100644 index 000000000..9fbf52814 Binary files /dev/null and b/adapters/neoforge/run/world/level.dat_old differ diff --git a/adapters/neoforge/run/world/serverconfig/readme.txt b/adapters/neoforge/run/world/serverconfig/readme.txt new file mode 100644 index 000000000..c782a9fd6 --- /dev/null +++ b/adapters/neoforge/run/world/serverconfig/readme.txt @@ -0,0 +1,3 @@ +Any server configs put in this folder will override the corresponding server config from /config/. +If the config being transferred is in a subfolder of the base config folder make sure to include that folder here in the path to the file you are overwriting. +For example if you are overwriting a config with the path /config/ExampleMod/config-server.toml, you would need to put it in serverconfig/ExampleMod/config-server.toml diff --git a/adapters/neoforge/run/world/session.lock b/adapters/neoforge/run/world/session.lock new file mode 100644 index 000000000..0d7e5f854 --- /dev/null +++ b/adapters/neoforge/run/world/session.lock @@ -0,0 +1 @@ +☃ \ No newline at end of file diff --git a/adapters/neoforge/settings.gradle b/adapters/neoforge/settings.gradle new file mode 100644 index 000000000..df0960044 --- /dev/null +++ b/adapters/neoforge/settings.gradle @@ -0,0 +1,95 @@ +/* + * Iris is a World Generator for Minecraft Servers + * Copyright (c) 2026 Arcane Arts (Volmit Software) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import java.io.File + +pluginManagement { + repositories { + maven { + name = 'NeoForged' + url = uri('https://maven.neoforged.net/releases/') + } + gradlePluginPortal() + mavenCentral() + } +} + +plugins { + id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0' +} + +rootProject.name = 'iris-neoforge' + +dependencyResolutionManagement { + versionCatalogs { + libs { + from(files('../../gradle/libs.versions.toml')) + } + } +} + +boolean hasVolmLibSettings(File directory) { + new File(directory, 'settings.gradle.kts').exists() || new File(directory, 'settings.gradle').exists() +} + +File resolveLocalVolmLibDirectory() { + String configuredPath = providers.gradleProperty('localVolmLibDirectory') + .orElse(providers.environmentVariable('VOLMLIB_DIR')) + .orNull + if (configuredPath != null && !configuredPath.isBlank()) { + File configuredDirectory = file(configuredPath) + if (hasVolmLibSettings(configuredDirectory)) { + return configuredDirectory + } + } + + File currentDirectory = settingsDir + while (currentDirectory != null) { + File candidate = new File(currentDirectory, 'VolmLib') + if (hasVolmLibSettings(candidate)) { + return candidate + } + + currentDirectory = currentDirectory.parentFile + } + + null +} + +boolean useLocalVolmLib = providers.gradleProperty('useLocalVolmLib') + .orElse('true') + .map { String value -> value.equalsIgnoreCase('true') } + .get() +File localVolmLibDirectory = resolveLocalVolmLibDirectory() + +if (useLocalVolmLib && localVolmLibDirectory != null) { + includeBuild(localVolmLibDirectory) { + dependencySubstitution { + substitute(module('com.github.VolmitSoftware:VolmLib')).using(project(':shared')) + substitute(module('com.github.VolmitSoftware.VolmLib:shared')).using(project(':shared')) + substitute(module('com.github.VolmitSoftware.VolmLib:volmlib-shared')).using(project(':shared')) + } + } +} + +includeBuild('../..') { + dependencySubstitution { + substitute(module('art.arcane:core')).using(project(':core')) + substitute(module('art.arcane:spi')).using(project(':spi')) + } +} diff --git a/adapters/neoforge/src/main/java/art/arcane/iris/neoforge/IrisNeoForgeBootstrap.java b/adapters/neoforge/src/main/java/art/arcane/iris/neoforge/IrisNeoForgeBootstrap.java index 9f2f695ad..293fa6447 100644 --- a/adapters/neoforge/src/main/java/art/arcane/iris/neoforge/IrisNeoForgeBootstrap.java +++ b/adapters/neoforge/src/main/java/art/arcane/iris/neoforge/IrisNeoForgeBootstrap.java @@ -18,8 +18,58 @@ package art.arcane.iris.neoforge; +import art.arcane.iris.modded.IrisModdedChunkGenerator; +import art.arcane.iris.modded.ModdedEngineBootstrap; +import art.arcane.iris.modded.ModdedParityProbe; +import art.arcane.iris.modded.ModdedWorldCheck; +import art.arcane.iris.modded.ModdedWorldEngines; +import com.mojang.serialization.MapCodec; +import net.minecraft.core.registries.Registries; +import net.minecraft.world.level.chunk.ChunkGenerator; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.ModContainer; +import net.neoforged.fml.ModList; +import net.neoforged.fml.common.Mod; +import net.neoforged.fml.loading.FMLLoader; +import net.neoforged.fml.loading.VersionInfo; +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.neoforge.event.server.ServerStoppingEvent; +import net.neoforged.neoforge.registries.DeferredRegister; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Mod("irisworldgen") public final class IrisNeoForgeBootstrap { - public IrisNeoForgeBootstrap() { - throw new UnsupportedOperationException("The Iris NeoForge adapter is a build skeleton; worldgen is not wired yet (see CROSSPLATFORM_PLAN.md Phase 4)."); + private static final Logger LOGGER = LoggerFactory.getLogger("Iris"); + + public IrisNeoForgeBootstrap(IEventBus modBus) { + ModdedEngineBootstrap.initialize(new NeoForgeModdedLoader()); + String modVersion = ModList.get().getModContainerById("irisworldgen") + .map((ModContainer container) -> container.getModInfo().getVersion().toString()) + .orElse("unknown"); + VersionInfo versionInfo = FMLLoader.getCurrent().getVersionInfo(); + LOGGER.info("Iris {} bootstrapping on Minecraft {} (NeoForge {})", modVersion, versionInfo.mcVersion(), versionInfo.neoForgeVersion()); + + ModdedEngineBootstrap.selfTest(IrisNeoForgeBootstrap.class.getClassLoader()); + ModdedEngineBootstrap.bind(); + + DeferredRegister> chunkGenerators = DeferredRegister.create(Registries.CHUNK_GENERATOR, "irisworldgen"); + chunkGenerators.register("iris", () -> IrisModdedChunkGenerator.CODEC); + chunkGenerators.register(modBus); + LOGGER.info("Iris chunk generator registered as irisworldgen:iris"); + + NeoForge.EVENT_BUS.addListener((ServerStoppingEvent event) -> ModdedWorldEngines.shutdown()); + + String parity = System.getProperty("iris.parity"); + if (parity != null) { + LOGGER.info("Iris parity probe armed: {}", parity); + ModdedParityProbe.schedule(parity); + } + + String worldCheck = System.getProperty("iris.worldcheck"); + if (worldCheck != null) { + LOGGER.info("Iris world check armed"); + ModdedWorldCheck.schedule(); + } } } diff --git a/adapters/neoforge/src/main/java/art/arcane/iris/neoforge/NeoForgeModdedLoader.java b/adapters/neoforge/src/main/java/art/arcane/iris/neoforge/NeoForgeModdedLoader.java new file mode 100644 index 000000000..486ffcc3f --- /dev/null +++ b/adapters/neoforge/src/main/java/art/arcane/iris/neoforge/NeoForgeModdedLoader.java @@ -0,0 +1,58 @@ +/* + * Iris is a World Generator for Minecraft Servers + * Copyright (c) 2026 Arcane Arts (Volmit Software) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package art.arcane.iris.neoforge; + +import art.arcane.iris.modded.ModdedLoader; +import net.minecraft.server.MinecraftServer; +import net.neoforged.fml.ModList; +import net.neoforged.fml.loading.FMLLoader; +import net.neoforged.fml.loading.FMLPaths; +import net.neoforged.neoforge.server.ServerLifecycleHooks; +import net.neoforged.neoforgespi.language.IModFileInfo; + +import java.io.File; +import java.nio.file.Path; + +public final class NeoForgeModdedLoader implements ModdedLoader { + @Override + public String platformName() { + return "neoforge"; + } + + @Override + public String minecraftVersion() { + return FMLLoader.getCurrent().getVersionInfo().mcVersion(); + } + + @Override + public MinecraftServer currentServer() { + return ServerLifecycleHooks.getCurrentServer(); + } + + @Override + public Path configDir() { + return FMLPaths.CONFIGDIR.get(); + } + + @Override + public File modJar() { + IModFileInfo info = ModList.get().getModFileById("irisworldgen"); + return info == null ? null : info.getFile().getFilePath().toFile(); + } +} diff --git a/adapters/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/adapters/neoforge/src/main/resources/META-INF/neoforge.mods.toml index d25912b22..618c88169 100644 --- a/adapters/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/adapters/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -6,5 +6,19 @@ license = "GPL-3.0" modId = "irisworldgen" version = "${version}" displayName = "Iris" -description = "Iris World Generation Engine (NeoForge adapter - SKELETON, worldgen not yet wired)" +description = "Iris World Generation Engine (NeoForge adapter - native chunk generator, overworld override datapack, engine lifecycle)" authors = "Arcane Arts (Volmit Software)" + +[[dependencies.irisworldgen]] +modId = "neoforge" +type = "required" +versionRange = "[1,)" +ordering = "NONE" +side = "BOTH" + +[[dependencies.irisworldgen]] +modId = "minecraft" +type = "required" +versionRange = "[${minecraftVersion}]" +ordering = "NONE" +side = "BOTH" diff --git a/build.gradle b/build.gradle index a9d789497..78c485e0f 100644 --- a/build.gradle +++ b/build.gradle @@ -155,11 +155,17 @@ tasks.register('buildForge', Copy) { into(layout.projectDirectory.dir('dist')) } +tasks.register('neoforgeJar', Exec) { + group = 'iris' + workingDir = layout.projectDirectory.dir('adapters/neoforge').asFile + String wrapperScript = System.getProperty('os.name').toLowerCase().contains('windows') ? 'gradlew.bat' : 'gradlew' + commandLine(layout.projectDirectory.file(wrapperScript).asFile.absolutePath, 'shadowJar', '--console=plain') +} + tasks.register('buildNeoforge', Copy) { group = 'iris' - dependsOn(':adapters:neoforge:jar') - from(project(':adapters:neoforge').layout.buildDirectory.file("libs/Iris-${project.version}-neoforge-skeleton.jar")) - rename { "Iris-${project.version}+mc${minecraftVersion}-neoforge-skeleton.jar" } + dependsOn('neoforgeJar') + from(layout.projectDirectory.file("adapters/neoforge/build/libs/Iris-${project.version}+mc${minecraftVersion}-neoforge.jar")) into(layout.projectDirectory.dir('dist')) } diff --git a/settings.gradle b/settings.gradle index de2abc625..6500407b8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -75,4 +75,3 @@ include(':adapters:bukkit:plugin') include(':adapters:bukkit:nms:v1_21_R7') include(':adapters:bukkit:nms:v26_1_R1') include(':adapters:forge') -include(':adapters:neoforge')