diff --git a/1.18.1.properties b/1.18.1.properties new file mode 100644 index 000000000..3fae30657 --- /dev/null +++ b/1.18.1.properties @@ -0,0 +1,37 @@ +# 1.18.1 version based stuff + +minecraft_version=1.18.1 +java_version = 17 + +# Fabric loader +fabric_loader_version=0.13.2 +fabric_api_version=0.46.4+1.18 + # Fabric mod versions + modmenu_version=3.0.1 + starlight_version_fabric=3554912 + lithium_version=mc1.18.1-0.7.7 + sodium_version=3605309 + iris_version=1.18.x-v1.1.4 + bclib_version=1.2.5 + immersive_portals_version = v1.0.4-1.18 + + # Fabric mod run + # 0 = Don't enable and don't run + # 1 = Can be referenced in code but doesn't run + # 2 = Can be referenced in code and runs in client + enable_starlight=0 + enable_sodium=1 + enable_lithium=0 + enable_iris=0 + enable_bclib=0 + +# Forge loader +forge_version=39.0.76 + # Forge mod versions + starlight_version_forge=3559934 + + # Forge mod run + # 0 = Dont enable and don't run + # 1 = Can be referenced in code but doesn't run + # 2 = Can be referenced in code and runs in client + enable_starlight_forge=0 diff --git a/1.18.2.properties b/1.18.2.properties new file mode 100644 index 000000000..646007ceb --- /dev/null +++ b/1.18.2.properties @@ -0,0 +1,38 @@ +# 1.18.2 version based stuff +# architectury_plugin_version = 3.4-SNAPSHOT +# dev_architectury_loom_version = 0.10.0-SNAPSHOT +minecraft_version=1.18.2 +java_version = 17 + +# Fabric loader +fabric_loader_version=0.13.3 +fabric_api_version=0.47.8+1.18.2 + # Fabric mod versions + modmenu_version=3.1.0 + starlight_version_fabric=3554912 + lithium_version=mc1.18.1-0.7.7 + sodium_version=3669187 + iris_version=1.18.x-v1.1.4 + bclib_version=1.2.5 + immersive_portals_version = v1.0.4-1.18 + + # Fabric mod run + # 0 = Don't enable and don't run + # 1 = Can be referenced in code but doesn't run + # 2 = Can be referenced in code and runs in client + enable_starlight=0 + enable_sodium=1 + enable_lithium=0 + enable_iris=0 + enable_bclib=0 + +# Forge loader +forge_version=40.0.1 + # Forge mod versions + starlight_version_forge=3559934 + + # Forge mod run + # 0 = Dont enable and don't run + # 1 = Can be referenced in code but doesn't run + # 2 = Can be referenced in code and runs in client + enable_starlight_forge=0 diff --git a/build.gradle b/build.gradle index 94df09540..68d6ef3bc 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ import io.github.ran.jarmerger.JarMergerPlugin + buildscript { dependencies{ classpath files('plugins/DHJarMerger-1.0.jar') @@ -11,6 +12,25 @@ plugins { id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false } +def loadProperties() { + def defaultMcVersion = '1.18.2' + if (!project.hasProperty("mcVer")) { + println "No mcVer set! Defaulting to ${defaultMcVersion}." + println "Tip: Use -PmcVer='${defaultMcVersion}' in cmd arg to set mcVer." + } + def mcVersion = project.hasProperty("mcVer") ? mcVer : defaultMcVersion + + println "Loading properties file at " + mcVersion + ".properties" + def props = new Properties() + props.load(new FileInputStream("$rootProject.rootDir/"+"$mcVersion"+".properties")) + + props.each { prop -> + rootProject.ext.set(prop.key, prop.value) + // println "Added prop [key:" + prop.key + ", value:" + prop.value + "]" + } +} +loadProperties() + apply plugin: JarMergerPlugin architectury { @@ -36,7 +56,7 @@ subprojects { p -> mappings loom.officialMojangMappings() //Manifold - annotationProcessor 'systems.manifold:manifold-preprocessor:2022.1.5' + annotationProcessor "systems.manifold:manifold-preprocessor:${rootProject.manifold_version}" // Toml implementation("com.electronwill.night-config:toml:${rootProject.toml_version}") @@ -47,7 +67,6 @@ subprojects { p -> modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" } - if (p != project(":core")) { common(project(":core")) { transitive false } shadowMe(project(":core")) { transitive false } @@ -124,8 +143,11 @@ allprojects { p -> description: mod_description, homepage: mod_homepage, source: mod_source, - issues: mod_issues + issues: mod_issues, + minecraft_version: minecraft_version, + java_version: java_version ] // The left side is what gets replaced in the mod info and the right side is where to get it from in the gradle.properties + //TODO: Make Forge loader version also be relaced with non hardcoded value instead of "[36,41)" inputs.properties replaceProperties replaceProperties.put 'project', project @@ -150,11 +172,12 @@ allprojects { p -> tasks.withType(JavaCompile) { // Add Manifold Preprocessor - options.compilerArgs += ['-Xplugin:Manifold'] + def excapedMCVersion = rootProject.minecraft_version.replace(".", "_") + options.compilerArgs += ['-Xplugin:Manifold', "-AMC_VERSION_${excapedMCVersion}"] + // println options.compilerArgs if (p != project(":core")) { - // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. - options.release = 17 + options.release = rootProject.java_version as Integer } } diff --git a/common/src/main/java/com/seibel/lod/common/Config.java b/common/src/main/java/com/seibel/lod/common/Config.java index 2260b6898..87ceec063 100644 --- a/common/src/main/java/com/seibel/lod/common/Config.java +++ b/common/src/main/java/com/seibel/lod/common/Config.java @@ -32,6 +32,11 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.I #define CONFIG +#if MC_VERSION_1.18.2 + +stafdqvsrevasbhyuicwegyhio + +#endif /** * This handles any configuration the user has access to. * @author coolGi2007 diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/chunk/ChunkWrapper.java b/common/src/main/java/com/seibel/lod/common/wrappers/chunk/ChunkWrapper.java index 2cd61bd18..a7359bc08 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/chunk/ChunkWrapper.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/chunk/ChunkWrapper.java @@ -66,8 +66,13 @@ public class ChunkWrapper implements IChunkWrapper @Override public IBiomeWrapper getBiome(int x, int y, int z) { + #if MC_VERSION_1_18_2 return BiomeWrapper.getBiomeWrapper(chunk.getNoiseBiome( QuartPos.fromBlock(x), QuartPos.fromBlock(y), QuartPos.fromBlock(z)).value()); + #elif MC_VERSION_1_18_1 + return BiomeWrapper.getBiomeWrapper(chunk.getNoiseBiome( + QuartPos.fromBlock(x), QuartPos.fromBlock(y), QuartPos.fromBlock(z))); + #endif } @Override diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java b/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java index e54ad7d93..e7d8597ab 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java @@ -167,12 +167,17 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper pos = getMaximumRenderedChunks(); return pos; } + #define MC_VERSION_1_18_1 if (!usingBackupGetVanillaRenderedChunks) { try { LevelRenderer levelRenderer = MC.levelRenderer; LinkedHashSet chunks = levelRenderer.renderChunkStorage.get().renderChunks; return (chunks.stream().map((chunk) -> { + #if MC_VERSION_1_18_2 AABB chunkBoundingBox = chunk.chunk.getBoundingBox(); + #elif MC_VERSION_1_18_1 + AABB chunkBoundingBox = chunk.chunk.bb; + #endif return FACTORY.createChunkPos(Math.floorDiv((int) chunkBoundingBox.minX, 16), Math.floorDiv((int) chunkBoundingBox.minZ, 16)); }).collect(Collectors.toCollection(HashSet::new))); diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java index 8e6894e7d..b482312d7 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java @@ -5,16 +5,23 @@ import com.google.common.collect.Maps; import com.mojang.serialization.Codec; import com.mojang.serialization.Dynamic; import com.seibel.lod.core.api.ApiShared; +import com.seibel.lod.core.api.ClientApi; import it.unimi.dsi.fastutil.longs.LongOpenHashSet; import it.unimi.dsi.fastutil.longs.LongSet; import java.util.Arrays; +import java.util.HashMap; +import java.util.Locale; import java.util.Map; import java.util.Objects; +#if MC_VERSION_1_18_2 import net.minecraft.core.Holder; -import net.minecraft.core.Registry; import net.minecraft.core.RegistryAccess; +import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature; +#endif + +import net.minecraft.core.Registry; import net.minecraft.core.SectionPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; @@ -38,7 +45,6 @@ import net.minecraft.world.level.chunk.PalettedContainer; import net.minecraft.world.level.chunk.UpgradeData; import net.minecraft.world.level.levelgen.Heightmap; import net.minecraft.world.level.levelgen.blending.BlendingData; -import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature; import net.minecraft.world.level.levelgen.feature.StructureFeature; import net.minecraft.world.level.levelgen.structure.StructureStart; import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext; @@ -70,11 +76,14 @@ public class ChunkLoader private static LevelChunkSection[] readSections(LevelAccessor level, LevelLightEngine lightEngine, ChunkPos chunkPos, CompoundTag chunkData) { Registry biomes = level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); -// Codec> biomeCodec = PalettedContainer.codec( -// biomes, biomes.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getOrThrow(Biomes.PLAINS)); + #if MC_VERSION_1_18_1 + Codec> biomeCodec = PalettedContainer.codec( + biomes, biomes.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getOrThrow(Biomes.PLAINS)); + #elif MC_VERSION_1_18_2 Codec>> biomeCodec = PalettedContainer.codec( biomes.asHolderIdMap(), biomes.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getHolderOrThrow(Biomes.PLAINS)); - + #endif + int i = level.getSectionsCount(); LevelChunkSection[] chunkSections = new LevelChunkSection[i]; @@ -90,18 +99,26 @@ public class ChunkLoader if (sectionId >= 0 && sectionId < chunkSections.length) { PalettedContainer blockStateContainer; + #if MC_VERSION_1_18_1 + PalettedContainer biomeContainer; + #elif MC_VERSION_1_18_2 PalettedContainer> biomeContainer; + #endif blockStateContainer = tagSection.contains("block_states", 10) ? BLOCK_STATE_CODEC.parse(NbtOps.INSTANCE, tagSection.getCompound("block_states")).promotePartial(string -> logErrors(chunkPos, sectionYPos, string)).getOrThrow(false, LOGGER::error) : new PalettedContainer(Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), PalettedContainer.Strategy.SECTION_STATES); + #if MC_VERSION_1_18_1 biomeContainer = tagSection.contains("biomes", 10) - ? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, i, (String) string)).getOrThrow(false, LOGGER::error) - : new PalettedContainer>(biomes.asHolderIdMap(), biomes.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); -// biomeContainer = tagSection.contains("biomes", 10) -// ? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, sectionYPos, string)).getOrThrow(false, LOGGER::error) -// : new PalettedContainer>(biomes, biomes.getOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); + ? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, sectionYPos, string)).getOrThrow(false, LOGGER::error) + : new PalettedContainer(biomes, biomes.getOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); + #elif MC_VERSION_1_18_2 + biomeContainer = tagSection.contains("biomes", 10) + ? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, i, (String) string)).getOrThrow(false, LOGGER::error) + : new PalettedContainer>(biomes.asHolderIdMap(), biomes.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); + #endif + chunkSections[sectionId] = new LevelChunkSection(sectionYPos, blockStateContainer, biomeContainer); } @@ -128,20 +145,66 @@ public class ChunkLoader } Heightmap.primeHeightmaps(chunk, ChunkStatus.FULL.heightmapsAfter()); } - - private static Map, StructureStart> unpackStructureStart(StructurePieceSerializationContext structurePieceSerializationContext, CompoundTag compoundTag, long l) + + #if MC_VERSION_1_18_1 + private static Map, StructureStart> unpackStructureStart(StructurePieceSerializationContext structurePieceSerializationContext, CompoundTag compoundTag, long l) { - Map, StructureStart> map = Maps.newHashMap(); - Registry> structStartRegistry = structurePieceSerializationContext.registryAccess().registryOrThrow(Registry.CONFIGURED_STRUCTURE_FEATURE_REGISTRY); - CompoundTag compoundTag2 = compoundTag.getCompound("starts"); + HashMap, StructureStart> map = Maps.newHashMap(); + CompoundTag compoundTag2 = compoundTag.getCompound("starts"); for (String string : compoundTag2.getAllKeys()) { - ResourceLocation resourceLocation = ResourceLocation.tryParse(string); + String string2 = string.toLowerCase(Locale.ROOT); + StructureFeature structureFeature = StructureFeature.STRUCTURES_REGISTRY.get(string2); + if (structureFeature == null) + { + LOGGER.error("Unknown structure start: {}", (Object) string2); + continue; + } + StructureStart structureStart = StructureFeature.loadStaticStart(structurePieceSerializationContext, compoundTag2.getCompound(string), l); + if (structureStart == null) + continue; + map.put(structureFeature, structureStart); + } + return map; + } + + private static Map, LongSet> unpackStructureReferences(ChunkPos chunkPos, CompoundTag compoundTag) + { + HashMap, LongSet> map = Maps.newHashMap(); + CompoundTag compoundTag2 = compoundTag.getCompound("References"); + for (String string : compoundTag2.getAllKeys()) + { + String string2 = string.toLowerCase(Locale.ROOT); + StructureFeature structureFeature = StructureFeature.STRUCTURES_REGISTRY.get(string2); + if (structureFeature == null) + { + LOGGER.warn("Found reference to unknown structure '{}' in chunk {}, discarding", (Object) string2, (Object) chunkPos); + continue; + } + map.put(structureFeature, new LongOpenHashSet(Arrays.stream(compoundTag2.getLongArray(string)).filter(l -> + { + ChunkPos chunkPos2 = new ChunkPos(l); + if (chunkPos2.getChessboardDistance(chunkPos) > 8) + { + LOGGER.warn("Found invalid structure reference [ {} @ {} ] for chunk {}.", (Object) string2, (Object) chunkPos2, (Object) chunkPos); + return false; + } + return true; + }).toArray())); + } + return map; + } + #elif MC_VERSION_1_18_2 + private static Map, StructureStart> unpackStructureStart(StructurePieceSerializationContext structurePieceSerializationContext, CompoundTag compoundTag, long l) { + Map, StructureStart> map = Maps.newHashMap(); + Registry> structStartRegistry = structurePieceSerializationContext.registryAccess().registryOrThrow(Registry.CONFIGURED_STRUCTURE_FEATURE_REGISTRY); + CompoundTag compoundTag2 = compoundTag.getCompound("starts"); + for (String string : compoundTag2.getAllKeys()) { + ResourceLocation resourceLocation = ResourceLocation.tryParse(string); ConfiguredStructureFeature structureFeature = structStartRegistry.get(resourceLocation); // String string2 = string.toLowerCase(Locale.ROOT); // ConfiguredStructureFeature structureFeature = StructureFeature.STRUCTURES_REGISTRY.get(string2); - if (structureFeature == null) - { + if (structureFeature == null) { LOGGER.error("Unknown structure start: {}", resourceLocation); continue; } @@ -152,7 +215,7 @@ public class ChunkLoader } return map; } - + private static Map, LongSet> unpackStructureReferences(RegistryAccess registryAccess, ChunkPos chunkPos, CompoundTag compoundTag) { Map, LongSet> map = Maps.newHashMap(); @@ -182,13 +245,14 @@ public class ChunkLoader } return map; } - + #endif + private static void readStructures(WorldGenLevel level, LevelChunk chunk, CompoundTag chunkData) { CompoundTag tagStructures = chunkData.getCompound("structures"); chunk.setAllStarts( unpackStructureStart(StructurePieceSerializationContext.fromLevel(level.getLevel()), tagStructures, level.getSeed())); - chunk.setAllReferences(unpackStructureReferences(level.registryAccess() ,chunk.getPos(), tagStructures)); + chunk.setAllReferences(unpackStructureReferences(#if MC_VERSION_1_18_2 level.registryAccess() ,#endif chunk.getPos(), tagStructures)); } private static void readPostPocessings(LevelChunk chunk, CompoundTag chunkData) diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java index ea87fecfb..d754a6d0f 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java @@ -247,12 +247,20 @@ public class LightedWorldGenRegion extends WorldGenRegion { BlockTintCache blockTintCache = (BlockTintCache) this.tintCaches.get(colorResolver); return blockTintCache.getColor(blockPos); } + + private Biome _getBiome(BlockPos pos) { + #if MC_VERSION_1_18_2 + return getBiome(pos).value(); + #elif MC_VERSION_1_18_1 + return getBiome(pos); + #endif + } public int calculateBlockTint(BlockPos blockPos, ColorResolver colorResolver) { int i = (Minecraft.getInstance()).options.biomeBlendRadius; if (i == 0) - return colorResolver.getColor((Biome) getBiome(blockPos).value(), blockPos.getX(), blockPos.getZ()); + return colorResolver.getColor((Biome) _getBiome(blockPos), blockPos.getX(), blockPos.getZ()); int j = (i * 2 + 1) * (i * 2 + 1); int k = 0; int l = 0; @@ -262,7 +270,7 @@ public class LightedWorldGenRegion extends WorldGenRegion { while (cursor3D.advance()) { mutableBlockPos.set(cursor3D.nextX(), cursor3D.nextY(), cursor3D.nextZ()); - int n = colorResolver.getColor((Biome) getBiome((BlockPos) mutableBlockPos).value(), mutableBlockPos.getX(), mutableBlockPos.getZ()); + int n = colorResolver.getColor((Biome) _getBiome((BlockPos) mutableBlockPos), mutableBlockPos.getX(), mutableBlockPos.getZ()); k += (n & 0xFF0000) >> 16; l += (n & 0xFF00) >> 8; m += n & 0xFF; diff --git a/common/src/main/resources/lod.accesswidener b/common/src/main/resources/lod.accesswidener index f568e46fe..564f2d77b 100644 --- a/common/src/main/resources/lod.accesswidener +++ b/common/src/main/resources/lod.accesswidener @@ -23,7 +23,7 @@ accessible field net/minecraft/world/level/lighting/LevelLightEngine skyEngine L accessible method net/minecraft/world/level/levelgen/Heightmap setHeight (III)V accessible field net/minecraft/world/level/biome/Biome generationSettings Lnet/minecraft/world/level/biome/BiomeGenerationSettings; accessible field net/minecraft/world/level/biome/Biome biomeCategory Lnet/minecraft/world/level/biome/Biome$BiomeCategory; -accessible field net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator settings Lnet/minecraft/core/Holder; +# accessible field net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator settings Lnet/minecraft/core/Holder; accessible method net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator doFill (Lnet/minecraft/world/level/levelgen/blending/Blender;Lnet/minecraft/world/level/StructureFeatureManager;Lnet/minecraft/world/level/chunk/ChunkAccess;II)Lnet/minecraft/world/level/chunk/ChunkAccess; #accessible method net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator doCreateBiomes (Lnet/minecraft/core/Registry;Lnet/minecraft/world/level/levelgen/blending/Blender;Lnet/minecraft/world/level/StructureFeatureManager;Lnet/minecraft/world/level/chunk/ChunkAccess;)V accessible method net/minecraft/world/level/lighting/LayerLightEngine queueSectionData (JLnet/minecraft/world/level/chunk/DataLayer;Z)V diff --git a/fabric/src/main/java/com/seibel/lod/fabric/mixins/events/MixinClientLevel.java b/fabric/src/main/java/com/seibel/lod/fabric/mixins/events/MixinClientLevel.java index 7d6312a74..df7e92345 100644 --- a/fabric/src/main/java/com/seibel/lod/fabric/mixins/events/MixinClientLevel.java +++ b/fabric/src/main/java/com/seibel/lod/fabric/mixins/events/MixinClientLevel.java @@ -4,7 +4,9 @@ import com.seibel.lod.fabric.Main; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.multiplayer.ClientPacketListener; import net.minecraft.client.renderer.LevelRenderer; +#if MC_VERSION_1_18_2 import net.minecraft.core.Holder; +#endif import net.minecraft.resources.ResourceKey; import net.minecraft.world.level.chunk.LevelChunk; import net.minecraft.world.level.dimension.DimensionType; @@ -19,12 +21,21 @@ import java.util.function.Supplier; * This class is used for world loading events * @author Ran */ + @Mixin(ClientLevel.class) public class MixinClientLevel { + #if MC_VERSION_1_18_2 @Inject(method = "", at = @At("TAIL")) private void loadWorldEvent(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey resourceKey, Holder holder, int i, int j, Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) { Main.client_proxy.worldLoadEvent((ClientLevel) (Object) this); } + #elif MC_VERSION_1_18_1 + @Inject(method = "", at = @At("TAIL")) + private void loadWorldEvent(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey resourceKey, DimensionType dimensionType, int i, int j, Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) { + Main.client_proxy.worldLoadEvent((ClientLevel) (Object) this); + } + #endif + @Inject(method = "setLightReady", at = @At("HEAD")) private void onChunkLightReady(int x, int z, CallbackInfo ci) { ClientLevel l = (ClientLevel) (Object) this; diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index dc95685e1..7f5921c3d 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -34,8 +34,8 @@ "depends": { "fabricloader": "*", "fabric": "*", - "minecraft": "1.18.2", - "java": ">=17" + "minecraft": "${minecraft_version}", + "java": ">=${java_version}" }, "suggests": { "another-mod": "*" diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index f51449c65..e3764750e 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -1,6 +1,6 @@ modLoader="javafml" #//mandatory -loaderVersion="[37,41)" # // mandatory. This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +loaderVersion="[36,41)" # // mandatory. This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. license="GNU GPLv3" issueTrackerURL="${issues}" diff --git a/gradle.properties b/gradle.properties index 61585837e..3498d0558 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,13 +1,10 @@ org.gradle.jvmargs=-Xmx2048M -minecraft_version=1.18.2 - -archives_base_name=DistantHorizons -mod_version=1.6.2a maven_group=com.seibel.lod -toml_version=3.6.4 +archives_base_name=DistantHorizons # Mod info +mod_version=1.6.2a mod_name=Distant Horizons mod_description=This mod generates and renders simplified terrain beyond the normal view distance at a low performance cost. Allowing you to see much farther without turning your game into a slideshow. mod_authors=James Seibel, Leonardo Amato, Cola, coolGi2007, Ran, Leetom @@ -15,35 +12,9 @@ mod_homepage=https://www.curseforge.com/minecraft/mc-mods/distant-horizons mod_source=https://gitlab.com/jeseibel/minecraft-lod-mod/ mod_issues=https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues -# Fabric loader -fabric_loader_version=0.13.3 -fabric_api_version=0.47.8+1.18.2 - # Fabric mod versions - modmenu_version=3.1.0 - starlight_version_fabric=3554912 - lithium_version=mc1.18.1-0.7.7 - sodium_version=3669187 - iris_version=1.18.x-v1.1.4 - bclib_version=1.2.5 - immersive_portals_version = v1.0.4-1.18 +# Global Plugin versions +toml_version=3.6.4 +manifold_version=2022.1.5 - # Fabric mod run - # 0 = Don't enable and don't run - # 1 = Can be referenced in code but doesn't run - # 2 = Can be referenced in code and runs in client - enable_starlight=0 - enable_sodium=1 - enable_lithium=0 - enable_iris=0 - enable_bclib=0 - -# Forge loader -forge_version=40.0.1 - # Forge mod versions - starlight_version_forge=3559934 - - # Forge mod run - # 0 = Dont enable and don't run - # 1 = Can be referenced in code but doesn't run - # 2 = Can be referenced in code and runs in client - enable_starlight_forge=0 +##### FOR IDE SUPPORT AND TELL IDE TO USE CERTIAN MC VERSION: SWITCH THIS: +mcVer=1.18.1 \ No newline at end of file