From 4ee19498736cbf6527fcc492f4d33d72138d0144 Mon Sep 17 00:00:00 2001 From: coolGi Date: Wed, 8 Jun 2022 18:00:30 +0930 Subject: [PATCH] Save commit for 1.19 --- .gitlab-ci.yml | 23 ++++++++ 1.16.5.properties | 2 +- 1.17.1.properties | 2 +- 1.18.1.properties | 2 +- 1.18.2.properties | 2 +- 1.19.properties | 43 ++++++++++++++ Readme.md | 4 ++ build.gradle | 38 ++++++------ common/build.gradle | 10 +--- .../lod/common/wrappers/config/ConfigGui.java | 58 ++++++++++++++++++- .../minecraft/MinecraftClientWrapper.java | 7 +++ .../worldGeneration/GlobalParameters.java | 8 +++ .../src/main/resources/1_19.lod.accesswidener | 50 ++++++++++++++++ fabric/build.gradle | 4 +- fabric/src/main/resources/fabric.mod.json | 4 +- forge/build.gradle | 2 +- forge/src/main/resources/META-INF/mods.toml | 2 +- gradle.properties | 5 +- 18 files changed, 224 insertions(+), 42 deletions(-) create mode 100644 1.19.properties create mode 100644 common/src/main/resources/1_19.lod.accesswidener diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 335097d45..518d956cb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ image: gradle:eclipse-temurin # all stages need to be defined here stages: + - build_19 - build_18_2 - build_18_1 - build_17_1 @@ -111,6 +112,28 @@ build_18_2: - cache/ allow_failure: true +# 1.19 build +build_19: + stage: build_19 + script: + - ./gradlew deleteMerged --gradle-user-home cache/; + - ./gradlew build -PmcVer=1.19 --gradle-user-home cache/; + - ./gradlew merge --gradle-user-home cache/; + image: eclipse-temurin:17 + artifacts: + name: "Merged_NightlyBuild_1_19-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" + paths: + - Merged + expire_in: 1 day + when: always + cache: + key: "gradleCache" + policy: pull-push + paths: + - .gradle + - cache/ + allow_failure: true + # unused deployment stage #deploy: diff --git a/1.16.5.properties b/1.16.5.properties index bc4c10e68..7088d9248 100644 --- a/1.16.5.properties +++ b/1.16.5.properties @@ -2,7 +2,7 @@ java_version=8 minecraft_version=1.16.5 -parchment_version=2022.03.06 +#parchment_version=2022.03.06 compatible_minecraft_versions=["1.16.4", "1.16.5"] # Fabric loader diff --git a/1.17.1.properties b/1.17.1.properties index 175e060e1..6e70a3d0c 100644 --- a/1.17.1.properties +++ b/1.17.1.properties @@ -2,7 +2,7 @@ java_version=16 minecraft_version=1.17.1 -parchment_version=2021.12.12 +#parchment_version=2021.12.12 compatible_minecraft_versions=["1.17", "1.17.1"] # Fabric loader diff --git a/1.18.1.properties b/1.18.1.properties index 62c2fcedb..3e94919bf 100644 --- a/1.18.1.properties +++ b/1.18.1.properties @@ -2,7 +2,7 @@ java_version = 17 minecraft_version=1.18.1 -parchment_version=2022.03.06 +#parchment_version=2022.03.06 compatible_minecraft_versions=["1.18", "1.18.1"] # Fabric loader diff --git a/1.18.2.properties b/1.18.2.properties index 606c4dc57..d9f336b8f 100644 --- a/1.18.2.properties +++ b/1.18.2.properties @@ -2,7 +2,7 @@ java_version = 17 minecraft_version=1.18.2 -parchment_version=2022.03.13 +#parchment_version=2022.03.13 compatible_minecraft_versions=["1.18.2"] # Fabric loader diff --git a/1.19.properties b/1.19.properties new file mode 100644 index 000000000..c8c8694b2 --- /dev/null +++ b/1.19.properties @@ -0,0 +1,43 @@ +# 1.18.2 version based stuff + +java_version = 17 +minecraft_version=1.19 +#parchment_version=2022.03.13 +compatible_minecraft_versions=["1.19"] + +# Fabric loader +fabric_loader_version=0.14.6 +fabric_api_version=0.55.1+1.19 + # Fabric mod versions + modmenu_version=4.0.0 + starlight_version_fabric=0 + phosphor_version_fabric=0 + lithium_version=0 + sodium_version=3820973 + iris_version=1.19.x-v1.2.5 + immersive_portals_version = 0 + bclib_version=0 + + # 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_phosphor=0 + enable_sodium=1 + enable_lithium=0 + enable_iris=0 + enable_bclib=0 + +# Forge loader +forge_version=41.0.1 + # Forge mod versions + starlight_version_forge=0 + terraforged_version= + + # Forge 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_forge=0 + enable_terraforged=0 diff --git a/Readme.md b/Readme.md index 831004056..27b14048b 100644 --- a/Readme.md +++ b/Readme.md @@ -2,6 +2,7 @@ > A mod that adds a Level of Detail System to Minecraft +# This branch is a temporary 1.19 branch and will be deleted soon # What is Distant Horizons? @@ -17,6 +18,7 @@ If you want to see a quick demo, check out a video covering the mod here: ### Versions This branch is for these versions of Minecraft +- 1.19 - 1.18.2 - 1.18.1 & 1.18 - 1.17.1 & 1.17 @@ -59,6 +61,7 @@ This version has been confirmed to work in IDE and Retail Minecraft with ether t #### Nightlly builds This mod has an autobuild system to automatically build the mod on each commit +- 1.19: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/main/download?job=build_19 - 1.18.2: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/main/download?job=build_18_2 - 1.18.1: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/main/download?job=build_18_1 - 1.17.1: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/main/download?job=build_17_1 @@ -86,6 +89,7 @@ https://fabricmc.net/wiki/tutorial:setup ## Switching Versions This branch support 4 built versions: + - 1.19 - 1.18.2 - 1.18.1 (which also runs on 1.18) - 1.17.1 (which also runs on 1.17) diff --git a/build.gradle b/build.gradle index fa67fb0ed..70f716b4c 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false + id "dev.architectury.loom" version "0.11.0-SNAPSHOT" apply false } def writeBuildGradlePredefine(List mcVers, int mcIndex) { @@ -69,6 +69,7 @@ def loadProperties() { "1.17.1": "1_17", "1.18.1": "1_18", "1.18.2": "1_18", + "1.19" : "1_19" ] // Use this as sometimes multiple versions use the same access wideners rootProject.ext.set("acsessWidenerVersion", mcVersionToAcsessWidenerVersion.get(mcVersion)) @@ -88,9 +89,9 @@ subprojects { p -> loom { silentMojangMappingsLicense() - if (p != project(":core")) { - accessWidenerPath.set(project(":common").file("src/main/resources/${acsessWidenerVersion}.lod.accesswidener")) - } +// if (p != project(":core")) { +// accessWidenerPath.set(project(":common").file("src/main/resources/${acsessWidenerVersion}.lod.accesswidener")) +// } } configurations { @@ -106,7 +107,7 @@ subprojects { p -> // Mojmap mappings officialMojangMappings() // Parchment mappings (it adds parameter mappings & javadoc) - parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip") +// parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip") } //Manifold @@ -121,10 +122,10 @@ 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 } - } +// if (p != project(":core")) { +// common(project(":core")) { transitive false } +// shadowMe(project(":core")) { transitive false } +// } } // Allows the jar to run standalone @@ -238,10 +239,10 @@ allprojects { p -> rename "${rootProject.acsessWidenerVersion}.lod.accesswidener", "lod.accesswidener" } - task copyCoreResources(type: Copy) { - from fileTree(project(":core").file("src/main/resources")) - into p.file("build/resources/main") - } +// task copyCoreResources(type: Copy) { +// from fileTree(project(":core").file("src/main/resources")) +// into p.file("build/resources/main") +// } task copyCommonResources(type: Copy) { from fileTree(project(":common").file("src/main/resources")) @@ -276,12 +277,12 @@ allprojects { p -> // println options.compilerArgs // Set the java version - if (p != project(":core")) { +// if (p != project(":core")) { options.compilerArgs += ['-Xplugin:Manifold'] options.release = rootProject.java_version as Integer - } else if (p == project(":core")) { - options.release = 8; // Core should use Java 8 no matter what - } +// } else if (p == project(":core")) { +// options.release = 8; // Core should use Java 8 no matter what +// } // TODO: make everything use java 8 // options.release = 8 // Use Java 8 for everything so back porting is easier } @@ -291,7 +292,8 @@ allprojects { p -> } // Disable running the core and common - if (p == project(":core") || p == project(":common")) { +// if (p == project(":core") || p == project(":common")) { + if (p == project(":common")) { runClient.enabled = false runServer.enabled = false } diff --git a/common/build.gradle b/common/build.gradle index e4aa8c237..c84866111 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,13 +1,5 @@ architectury { - common() -} - -afterEvaluate { - tasks { - remapJar { - remapAccessWidener.set(false) - } - } + common(rootProject.enabled_platforms.split(",")) } publishing { diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java b/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java index 1e75a1219..830f1ea2f 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java @@ -47,8 +47,10 @@ import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; +#if PRE_MC_1_19 import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; +#endif import net.minecraft.client.resources.language.I18n; // translation #if POST_MC_1_17_1 import net.minecraft.client.gui.narration.NarratableEntry; @@ -123,7 +125,11 @@ public abstract class ConfigGui Object value; String tempValue; boolean inLimits = true; + #if PRE_MC_1_19 TranslatableComponent name; + #else + Component name; + #endif int index; /** Hides the button */ boolean hideOption = false; @@ -220,8 +226,11 @@ public abstract class ConfigGui if (entry != null) { if (!entry.name().equals("")) + #if PRE_MC_1_19 info.name = new TranslatableComponent(entry.name()); - + #else + info.name = Component.literal(entry.name()); + #endif if (fieldClass == int.class) { @@ -242,7 +251,11 @@ public abstract class ConfigGui else if (fieldClass == boolean.class) { // For boolean + #if PRE_MC_1_19 Function func = value -> new TextComponent((Boolean) value ? "True" : "False").withStyle((Boolean) value ? ChatFormatting.GREEN : ChatFormatting.RED); + #else + Function func = value -> Component.literal((Boolean) value ? "True" : "False").withStyle((Boolean) value ? ChatFormatting.GREEN : ChatFormatting.RED); + #endif info.widget = new AbstractMap.SimpleEntry>(button -> { info.value = !(Boolean) info.value; button.setMessage(func.apply(info.value)); @@ -252,7 +265,11 @@ public abstract class ConfigGui { // For enum List values = Arrays.asList(field.getType().getEnumConstants()); + #if PRE_MC_1_19 Function func = value -> new TranslatableComponent(MOD_NAME + ".config." + "enum." + fieldClass.getSimpleName() + "." + info.value.toString()); + #else + Function func = value -> Component.literal(MOD_NAME + ".config." + "enum." + fieldClass.getSimpleName() + "." + info.value.toString()); + #endif info.widget = new AbstractMap.SimpleEntry>(button -> { int index = values.indexOf(info.value) + 1; info.value = values.get(index >= values.size() ? 0 : index); @@ -263,7 +280,12 @@ public abstract class ConfigGui else if (screenEntry != null) { if (!screenEntry.name().equals("")) + #if PRE_MC_1_19 info.name = new TranslatableComponent(screenEntry.name()); + #else + info.name = Component.literal(screenEntry.name()); + #endif + info.screenButton = true; info.gotoScreen = (!info.category.isEmpty() ? info.category + "." : "") + field.getName(); @@ -291,7 +313,11 @@ public abstract class ConfigGui { value = func.apply(stringValue); inLimits = value.doubleValue() >= minValue && value.doubleValue() <= maxValue; + #if PRE_MC_1_19 info.error = inLimits ? null : new AbstractMap.SimpleEntry<>(editBox, new TextComponent(value.doubleValue() < minValue ? + #else + info.error = inLimits ? null : new AbstractMap.SimpleEntry<>(editBox, Component.literal(value.doubleValue() < minValue ? + #endif "§cMinimum " + "length" + (cast ? " is " + (int) minValue : " is " + minValue) : "§cMaximum " + "length" + (cast ? " is " + (int) maxValue : " is " + maxValue))); } @@ -498,7 +524,11 @@ public abstract class ConfigGui { protected ConfigScreen(Screen parent, String category) { + #if PRE_MC_1_19 super(new TranslatableComponent( + #else + super(Component.literal( + #endif I18n.exists(MOD_NAME + ".config" + (category.isEmpty()? "." + category : "") + ".title") ? MOD_NAME + ".config.title" : MOD_NAME + ".config" + (category.isEmpty() ? "" : "." + category) + ".title") @@ -565,8 +595,13 @@ public abstract class ConfigGui { if (info.category.matches(category) && !info.hideOption) { + #if PRE_MC_1_19 TranslatableComponent name = (info.name == null ? new TranslatableComponent(translationPrefix + (!info.category.isEmpty() ? info.category + "." : "") + info.field.getName()) : info.name); Button resetButton = new Button(this.width - ConfigScreenConfigs.SpaceFromRightScreen - info.width - ConfigScreenConfigs.ButtonWidthSpacing - ConfigScreenConfigs.ResetButtonWidth, 0, ConfigScreenConfigs.ResetButtonWidth, 20, new TextComponent("Reset").withStyle(ChatFormatting.RED), (button -> { + #else + Component name = (info.name == null ? Component.literal(translationPrefix + (!info.category.isEmpty() ? info.category + "." : "") + info.field.getName()) : info.name); + Button resetButton = new Button(this.width - ConfigScreenConfigs.SpaceFromRightScreen - info.width - ConfigScreenConfigs.ButtonWidthSpacing - ConfigScreenConfigs.ResetButtonWidth, 0, ConfigScreenConfigs.ResetButtonWidth, 20, Component.literal("Reset").withStyle(ChatFormatting.RED), (button -> { + #endif info.value = info.defaultValue; info.tempValue = info.defaultValue.toString(); info.index = 0; @@ -578,7 +613,11 @@ public abstract class ConfigGui { Map.Entry> widget = (Map.Entry>) info.widget; if (info.field.getType().isEnum()) + #if PRE_MC_1_19 widget.setValue(value -> new TranslatableComponent(translationPrefix + "enum." + info.field.getType().getSimpleName() + "." + info.value.toString())); + #else + widget.setValue(value -> Component.literal(translationPrefix + "enum." + info.field.getType().getSimpleName() + "." + info.value.toString())); + #endif this.list.addButton(new Button(this.width - info.width - ConfigScreenConfigs.SpaceFromRightScreen, 0, info.width, 20, widget.getValue().apply(info.value), widget.getKey()), resetButton, null, name); } else if (info.field.getType() == List.class) @@ -594,8 +633,13 @@ public abstract class ConfigGui Predicate processor = ((BiFunction>) info.widget).apply(widget, done); widget.setFilter(processor); resetButton.setWidth(20); - resetButton.setMessage(new TextComponent("R").withStyle(ChatFormatting.RED)); - Button cycleButton = new Button(this.width - 185, 0, 20, 20, new TextComponent(String.valueOf(info.index)).withStyle(ChatFormatting.GOLD), (button -> { + #if PRE_MC_1_19 + resetButton.setMessage(new TextComponent("R").withStyle(ChatFormatting.RED)); + Button cycleButton = new Button(this.width - 185, 0, 20, 20, new TextComponent(String.valueOf(info.index)).withStyle(ChatFormatting.GOLD), (button -> { + #else + resetButton.setMessage(Component.literal("R").withStyle(ChatFormatting.RED)); + Button cycleButton = new Button(this.width - 185, 0, 20, 20, Component.literal(String.valueOf(info.index)).withStyle(ChatFormatting.GOLD), (button -> { + #endif ((List) info.value).remove(""); this.reload = true; info.index = info.index + 1; @@ -644,14 +688,22 @@ public abstract class ConfigGui if (list.getHoveredButton(mouseX,mouseY).isPresent()) { AbstractWidget buttonWidget = list.getHoveredButton(mouseX,mouseY).get(); Component text = ButtonEntry.buttonsWithText.get(buttonWidget); + #if PRE_MC_1_19 TranslatableComponent name = new TranslatableComponent(this.translationPrefix + (info.category.isEmpty() ? "" : info.category + ".") + info.field.getName()); + #else + Component name = Component.literal(this.translationPrefix + (info.category.isEmpty() ? "" : info.category + ".") + info.field.getName()); + #endif String key = translationPrefix + (info.category.isEmpty() ? "" : info.category + ".") + info.field.getName() + ".@tooltip"; if (info.error != null && text.equals(name)) renderTooltip(matrices, (Component) info.error.getValue(), mouseX, mouseY); else if (I18n.exists(key) && (text != null && text.equals(name))) { List list = new ArrayList<>(); for (String str : I18n.get(key).split("\n")) + #if PRE_MC_1_19 list.add(new TextComponent(str)); + #else + list.add(Component.literal(str)); + #endif renderComponentTooltip(matrices, list, mouseX, mouseY); } } diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftClientWrapper.java b/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftClientWrapper.java index 883263d9b..0e88c98d5 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftClientWrapper.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftClientWrapper.java @@ -55,7 +55,10 @@ import net.minecraft.client.resources.model.ModelManager; import net.minecraft.client.server.IntegratedServer; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +#if PRE_MC_1_19 import net.minecraft.network.chat.TextComponent; +#endif +import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.ChunkPos; @@ -365,7 +368,11 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper @Override public void sendChatMessage(String string) { + #if PRE_MC_1_19 getPlayer().sendMessage(new TextComponent(string), getPlayer().getUUID()); + #else + getPlayer().sendSystemMessage(Component.literal(string)); + #endif } /** diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/GlobalParameters.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/GlobalParameters.java index 72e11f8b5..35dbfb8f1 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/GlobalParameters.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/GlobalParameters.java @@ -35,13 +35,21 @@ import net.minecraft.world.level.chunk.ChunkGenerator; import net.minecraft.world.level.chunk.storage.ChunkScanAccess; #endif import net.minecraft.world.level.levelgen.WorldGenSettings; +#if PRE_MC_1_19 import net.minecraft.world.level.levelgen.structure.templatesystem.StructureManager; +#else +import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager; +#endif import net.minecraft.world.level.storage.WorldData; public final class GlobalParameters { public final ChunkGenerator generator; + #if PRE_MC_1_19 public final StructureManager structures; + #else + public final StructureTemplateManager structures; + #endif public final WorldGenSettings worldGenSettings; public final ThreadedLevelLightEngine lightEngine; public final LodBuilder lodBuilder; diff --git a/common/src/main/resources/1_19.lod.accesswidener b/common/src/main/resources/1_19.lod.accesswidener new file mode 100644 index 000000000..f5fbb63b0 --- /dev/null +++ b/common/src/main/resources/1_19.lod.accesswidener @@ -0,0 +1,50 @@ +accessWidener v1 named + + +# used when determining where to save files to +accessible field net/minecraft/world/level/storage/DimensionDataStorage dataFolder Ljava/io/File; + +# used when rendering +accessible field com/mojang/blaze3d/vertex/VertexBuffer indexCount I +accessible field com/mojang/blaze3d/vertex/VertexBuffer vertextBufferId I +accessible method net/minecraft/client/renderer/GameRenderer getFov (Lnet/minecraft/client/Camera;FZ)D + +# used for grabbing vanilla rendered chunks +accessible field net/minecraft/client/renderer/LevelRenderer renderChunkStorage Ljava/util/concurrent/atomic/AtomicReference; +accessible class net/minecraft/client/renderer/LevelRenderer$RenderChunkStorage +accessible class net/minecraft/client/renderer/LevelRenderer$RenderChunkInfo +accessible field net/minecraft/client/renderer/LevelRenderer$RenderChunkInfo chunk Lnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk; + +# lighting +accessible field net/minecraft/client/renderer/LightTexture lightPixels Lcom/mojang/blaze3d/platform/NativeImage; +accessible field net/minecraft/client/renderer/LightTexture lightTexture Lnet/minecraft/client/renderer/texture/DynamicTexture; +accessible field net/minecraft/world/level/lighting/LevelLightEngine blockEngine Lnet/minecraft/world/level/lighting/LayerLightEngine; +accessible field net/minecraft/world/level/lighting/LevelLightEngine skyEngine Lnet/minecraft/world/level/lighting/LayerLightEngine; + +# world generation +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 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 + +# lod generation from save file +accessible field net/minecraft/server/level/ChunkMap mainThreadExecutor Lnet/minecraft/util/thread/BlockableEventLoop; +accessible method net/minecraft/server/level/ChunkMap readChunk (Lnet/minecraft/world/level/ChunkPos;)Lnet/minecraft/nbt/CompoundTag; + + +# grabbing textures +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite animatedTexture Lnet/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture; +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite width I +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite height I +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite mainImage [Lcom/mojang/blaze3d/platform/NativeImage; +accessible class net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture +accessible method net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture getFrameX (I)I +accessible method net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture getFrameY (I)I +extendable class com/mojang/math/Matrix4f + +# hacky stuff +accessible field net/minecraft/util/ThreadingDetector lock Ljava/util/concurrent/Semaphore; +mutable field net/minecraft/util/ThreadingDetector lock Ljava/util/concurrent/Semaphore; diff --git a/fabric/build.gradle b/fabric/build.gradle index 7847249c1..ce0efe18b 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -100,13 +100,13 @@ task deleteResources(type: Delete) { } processResources { - dependsOn(copyCoreResources) +// dependsOn(copyCoreResources) dependsOn(copyCommonResources) dependsOn(copyAccessWidener) } runClient { - dependsOn(copyCoreResources) +// dependsOn(copyCoreResources) dependsOn(copyCommonResources) dependsOn(copyAccessWidener) jvmArgs "-XX:-OmitStackTraceInFastThrow" diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 6472ededc..eb4ae1df9 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -5,7 +5,7 @@ "name": "${mod_name}", "description": "${description}", - "authors": ${authors}, + "authors": $authors, "contact": { "homepage": "${homepage}", @@ -36,7 +36,7 @@ "fabric-lifecycle-events-v1": "*", "fabric-key-binding-api-v1": "*", "fabric-networking-api-v1": "*", - "minecraft": ${compatible_minecraft_versions}, + "minecraft": $compatible_minecraft_versions, "java": ">=${java_version}" }, diff --git a/forge/build.gradle b/forge/build.gradle index 8f023fda4..a297d842b 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -58,7 +58,7 @@ dependencies { processResources { dependsOn(copyAccessWidener) - dependsOn(copyCoreResources) +// dependsOn(copyCoreResources) dependsOn(copyCommonResources) } diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 430d3ffec..f25e8209b 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -9,7 +9,7 @@ issueTrackerURL="${issues}" modId="lod" #//mandatory version= "${version}" #//mandatory, gets the version number from jar populated by the build.gradle script displayName="${mod_name}" #//mandatory - authors=${authors} + authors=$authors #//updateJSONURL="https://change.me.example.invalid/updates.json" # A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ displayURL="${homepage}" description= "${description}" #//mandatory. The description text for the mod diff --git a/gradle.properties b/gradle.properties index 71f1abfc7..6cf3066f6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,8 @@ mod_issues=https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues # Global Plugin versions toml_version=3.6.4 manifold_version=2022.1.7 -mcVersions=1.16.5,1.17.1,1.18.1,1.18.2 +enabled_platforms=fabric,forge +mcVersions=1.16.5,1.17.1,1.18.1,1.18.2,1.19 ##### FOR IDE SUPPORT AND TELL IDE TO USE CERTIAN MC VERSION: SWITCH THIS: -mcVer=1.18.2 \ No newline at end of file +mcVer=1.19 \ No newline at end of file