From 73f4bc3108fd1a7f915967dbdc67f0aae2325bbc Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 24 Aug 2023 20:28:25 +0930 Subject: [PATCH 1/7] Formatted some resource files --- .../DistantHorizons.fabric.mixins.json | 55 +++++----- fabric/src/main/resources/fabric.mod.json | 103 +++++++++--------- .../resources/DistantHorizons.mixins.json | 42 +++---- forge/src/main/resources/META-INF/mods.toml | 53 +++++---- 4 files changed, 125 insertions(+), 128 deletions(-) diff --git a/fabric/src/main/resources/DistantHorizons.fabric.mixins.json b/fabric/src/main/resources/DistantHorizons.fabric.mixins.json index 0c7244db8..d306798af 100644 --- a/fabric/src/main/resources/DistantHorizons.fabric.mixins.json +++ b/fabric/src/main/resources/DistantHorizons.fabric.mixins.json @@ -1,30 +1,29 @@ { - "required": true, - "minVersion": "0.8", - "package": "com.seibel.distanthorizons.fabric.mixins", - "mixins": [ - "server.unsafe.MixinThreadingDetector", - "server.MixinChunkGenerator", - "server.MixinChunkMap", - "server.MixinUtilBackgroundThread" - ], - "client": [ - "client.MixinClientLevel", - "client.MixinClientPacketListener", - "client.MixinDebugScreenOverlay", - "client.MixinFogRenderer", - "client.MixinGameRenderer", - "client.MixinLevelRenderer", - "client.MixinLightmap", - "client.MixinOptionsScreen", - "client.MixinMinecraft", - "client.MixinTextureUtil", - - "mods.sodium.MixinSodiumRenderer" - ], - "server": [], - "injectors": { - "defaultRequire": 1 - }, - "plugin": "com.seibel.distanthorizons.fabric.mixins.FabricMixinPlugin" + "required": true, + "minVersion": "0.8", + "package": "com.seibel.distanthorizons.fabric.mixins", + "mixins": [ + "server.unsafe.MixinThreadingDetector", + "server.MixinChunkGenerator", + "server.MixinChunkMap", + "server.MixinUtilBackgroundThread" + ], + "client": [ + "client.MixinClientLevel", + "client.MixinClientPacketListener", + "client.MixinDebugScreenOverlay", + "client.MixinFogRenderer", + "client.MixinGameRenderer", + "client.MixinLevelRenderer", + "client.MixinLightmap", + "client.MixinOptionsScreen", + "client.MixinMinecraft", + "client.MixinTextureUtil", + "mods.sodium.MixinSodiumRenderer" + ], + "server": [], + "injectors": { + "defaultRequire": 1 + }, + "plugin": "com.seibel.distanthorizons.fabric.mixins.FabricMixinPlugin" } diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 7e6907fd7..1b03cb8cc 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -1,56 +1,55 @@ { - "schemaVersion": 1, - "id": "distanthorizons", - "version": "${version}", - - "name": "${mod_name}", - "description": "${description}", - "authors": $authors, - - "contact": { - "homepage": "${homepage}", - "sources": "${source}", - "issues": "${issues}" - }, - - "license": "LGPL-3", - "icon": "icon.png", - - "accessWidener": "distanthorizons.accesswidener", - - "environment": "*", - "entrypoints": { - "client": [ - "com.seibel.distanthorizons.fabric.FabricClientMain" + "schemaVersion": 1, + "id": "distanthorizons", + "version": "${version}", + + "name": "${mod_name}", + "description": "${description}", + "authors": $authors, + + "contact": { + "homepage": "${homepage}", + "sources": "${source}", + "issues": "${issues}" + }, + + "license": "LGPL-3", + "icon": "icon.png", + + "accessWidener": "distanthorizons.accesswidener", + + "environment": "*", + "entrypoints": { + "client": [ + "com.seibel.distanthorizons.fabric.FabricClientMain" + ], + "server": [ + "com.seibel.distanthorizons.fabric.FabricDedicatedServerMain" + ], + "modmenu": [ + "com.seibel.distanthorizons.fabric.wrappers.config.ModMenuIntegration" + ] + }, + + "mixins": [ + "DistantHorizons.fabric.mixins.json" ], - "server": [ - "com.seibel.distanthorizons.fabric.FabricDedicatedServerMain" - ], - - "modmenu": [ - "com.seibel.distanthorizons.fabric.wrappers.config.ModMenuIntegration" - ] - }, - - "mixins": [ - "DistantHorizons.fabric.mixins.json" - ], - - "depends": { - "fabricloader": "*", - "fabric-api-base": "*", - "fabric-lifecycle-events-v1": "*", - "fabric-key-binding-api-v1": "*", - "fabric-resource-loader-v0": "*", - "minecraft": $compatible_minecraft_versions, - "java": ">=${java_version}" - }, - - "custom": { - "modmenu": { - "links": { - "modmenu.discord": "${discord}" - } + + "depends": { + "fabricloader": "*", + "fabric-api-base": "*", + "fabric-lifecycle-events-v1": "*", + "fabric-key-binding-api-v1": "*", + "fabric-resource-loader-v0": "*", + "minecraft": $compatible_minecraft_versions, + "java": ">=${java_version}" + }, + + "custom": { + "modmenu": { + "links": { + "modmenu.discord": "${discord}" + } + } } - } } diff --git a/forge/src/main/resources/DistantHorizons.mixins.json b/forge/src/main/resources/DistantHorizons.mixins.json index 83bfe64e2..4d03828c3 100644 --- a/forge/src/main/resources/DistantHorizons.mixins.json +++ b/forge/src/main/resources/DistantHorizons.mixins.json @@ -1,23 +1,23 @@ { - "required": true, - "minVersion": "0.8", - "package": "com.seibel.distanthorizons.forge.mixins", - "mixins": [ - "server.unsafe.MixinThreadingDetector", - "server.MixinUtilBackgroundThread", - "server.MixinChunkGenerator", - "server.MixinTFChunkGenerator" - ], - "client": [ - "client.MixinClientPacketListener", - "client.MixinDebugScreenOverlay", - "client.MixinFogRenderer", - "client.MixinGameRenderer", - "client.MixinLevelRenderer", - "client.MixinLightmap", - "client.MixinOptionsScreen", - "client.MixinTextureUtil" - ], - "server": [], - "plugin": "com.seibel.distanthorizons.forge.mixins.ForgeMixinPlugin" + "required": true, + "minVersion": "0.8", + "package": "com.seibel.distanthorizons.forge.mixins", + "mixins": [ + "server.unsafe.MixinThreadingDetector", + "server.MixinUtilBackgroundThread", + "server.MixinChunkGenerator", + "server.MixinTFChunkGenerator" + ], + "client": [ + "client.MixinClientPacketListener", + "client.MixinDebugScreenOverlay", + "client.MixinFogRenderer", + "client.MixinGameRenderer", + "client.MixinLevelRenderer", + "client.MixinLightmap", + "client.MixinOptionsScreen", + "client.MixinTextureUtil" + ], + "server": [], + "plugin": "com.seibel.distanthorizons.forge.mixins.ForgeMixinPlugin" } diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index a9dccfc67..30f586289 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -1,33 +1,32 @@ - -modLoader="javafml" #//mandatory -loaderVersion="*" # // mandatory. Allow all forge versions as we are definding what Minecraft versions we requre later on -license="LGPL" -issueTrackerURL="${issues}" +modLoader = "javafml" #//mandatory +loaderVersion = "*" # // mandatory. Allow all forge versions as we are definding what Minecraft versions we requre later on +license = "LGPL" +issueTrackerURL = "${issues}" [[mods]] #//mandatory - modId="distanthorizons" #//mandatory - version= "${version}" #//mandatory, gets the version number from jar populated by the build.gradle script - displayName="${mod_name}" #//mandatory - authors=["James Seibel", "Leonardo Amato", "Cola", "coolGi", "Ran", "Leetom"] - #//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 - logoFile="logo.png" - catalogueImageIcon="icon.png" - credits="Massive thanks to: Leonardo, Cola, Ran, CoolGi, and Leetom. For their hard work to bring Distant Horizons to where it is today. - James" - #// if not set defaults to "false" - clientSideOnly="true" - #// if not set side defaults to "BOTH" - #// TODO change to "BOTH" when we add server support - side="CLIENT" - #// Allow any version to be present (or not) on the server - acceptableRemoteVersions="*" + modId = "distanthorizons" #//mandatory + version = "${version}" #//mandatory, gets the version number from jar populated by the build.gradle script + displayName = "${mod_name}" #//mandatory + authors = ["James Seibel", "Leonardo Amato", "Cola", "coolGi", "Ran", "Leetom"] + #//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 + logoFile = "logo.png" + catalogueImageIcon = "icon.png" + credits = "Massive thanks to: Leonardo, Cola, Ran, CoolGi, and Leetom. For their hard work to bring Distant Horizons to where it is today. - James" + #// if not set defaults to "false" + clientSideOnly = "true" + #// if not set side defaults to "BOTH" + #// TODO change to "BOTH" when we add server support + side = "CLIENT" + #// Allow any version to be present (or not) on the server + acceptableRemoteVersions = "*" [[dependencies.distanthorizons]] - modId="minecraft" - mandatory=true - versionRange="${compatible_forgemc_versions}" # Where we set what version of mc it is avalible for - ordering="NONE" - side="BOTH" \ No newline at end of file + modId = "minecraft" + mandatory = true + versionRange = "${compatible_forgemc_versions}" # Where we set what version of mc it is avalible for + ordering = "NONE" + side = "BOTH" \ No newline at end of file From c78f6eb66d3c1c81f30fdbb47eebcfadfd572ed6 Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 24 Aug 2023 20:58:43 +0930 Subject: [PATCH 2/7] Added blendium to mod suggestion on fabric --- fabric/src/main/resources/fabric.mod.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 1b03cb8cc..01ab3fbf9 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -51,5 +51,9 @@ "modmenu.discord": "${discord}" } } + }, + + "suggests": { + "blendium": "*" } } From bf3428b53c1a2018fc5b4c20be7668f425f8d826 Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 24 Aug 2023 21:07:05 +0930 Subject: [PATCH 3/7] Added version number to bottom left of config (#558) --- .../common/wrappers/gui/ClassicConfigGUI.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java index cd0b35ab2..ca0f10490 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java @@ -385,9 +385,15 @@ public class ClassicConfigGUI DhDrawCenteredString(matrices, font, title, width / 2, 15, 0xFFFFFF); // Render title - // If the update is pending, display this message to inform the user that it will apply when the game restarts - if (SelfUpdater.deleteOldOnClose) - DhDrawString(matrices, font, Translatable(configBase.modID + ".updater.waitingForClose"), 4, height - 38, 0xFFFFFF); + if (this.configBase.modID == "distanthorizons") + { + // Display version + DhDrawString(matrices, font, TextOrLiteral(ModInfo.VERSION), 2, height - 10, 0xAAAAAA); + + // If the update is pending, display this message to inform the user that it will apply when the game restarts + if (SelfUpdater.deleteOldOnClose) + DhDrawString(matrices, font, Translatable(configBase.modID + ".updater.waitingForClose"), 4, height - 38, 0xFFFFFF); + } // Render the tooltip only if it can find a tooltip in the language file From 9ffc54f0b1198742af7bd515a441d116f7a4b254 Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 24 Aug 2023 21:12:56 +0930 Subject: [PATCH 4/7] Updated readme --- Readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Readme.md b/Readme.md index 2566023d5..6875690be 100644 --- a/Readme.md +++ b/Readme.md @@ -20,7 +20,7 @@ If you want to see a quick demo, check out a video covering the mod here: ### This branch supports the following versions of Minecraft: -#### 1.20.1, 1.20 +#### 1.20.1, 1.20 (Default) Fabric: 0.14.21\ Fabric API: 0.85.0+1.20.1\ Forge: 45.1.0\ @@ -41,21 +41,21 @@ Forge: 43.2.14\ Parchment: 1.19.2:2022.11.27\ Modmenu: 4.2.0-beta.2 -#### 1.18.2 (Default) +#### 1.18.2 Fabric: 0.14.21\ Fabric API: 0.76.0+1.18.2\ Forge: 40.2.10\ Parchment: 1.18.2:2022.11.06\ Modmenu: 3.2.5 -#### 1.17.1, 1.17 (BROKE) +#### 1.17.1, 1.17 Fabric: 0.14.21\ Fabric API: 0.46.1+1.17\ Forge: 37.1.1\ Parchment: 1.17.1:2021.12.12\ Modmenu: 2.0.14 -#### 1.16.5, 1.16.4 (BROKE) +#### 1.16.5, 1.16.4 Fabric: 0.14.21\ Fabric API: 0.42.0+1.16\ Forge: 36.2.39\ @@ -196,5 +196,5 @@ https://github.com/TheElectronWill/night-config SVG Salamander for SVG support\ https://github.com/blackears/svgSalamander -FlatLaf for theming (for development testing, may remove later)\ +FlatLaf for Java Swing theming (for development testing, may remove later, and not included in compiled jars)\ https://www.formdev.com/flatlaf/ From a96e345fbe804a6d2f8298cb879f91be8d7a8982 Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 24 Aug 2023 21:13:23 +0930 Subject: [PATCH 5/7] Updated core subproject --- coreSubProjects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreSubProjects b/coreSubProjects index 794e9afc1..81992f6a8 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 794e9afc10e33e4f72849ff7a560ff596622789e +Subproject commit 81992f6a87307d9869d8bef5f926b4c92e4b7295 From 60cbbb0393745de71a1432304bbcbefc93b7ae2f Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 24 Aug 2023 21:20:46 +0930 Subject: [PATCH 6/7] Updated core sub-project --- coreSubProjects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreSubProjects b/coreSubProjects index 81992f6a8..c8f9c8393 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 81992f6a87307d9869d8bef5f926b4c92e4b7295 +Subproject commit c8f9c839351ca6f42314f1263e8b5a5738c5e2d2 From 263574bf3844e5d38d283020fb5dec9196e87226 Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 24 Aug 2023 21:26:24 +0930 Subject: [PATCH 7/7] Added string (tripwire) to the ignored blocks --- .../common/wrappers/block/BlockStateWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java index b54fd8a1c..ffe66ea10 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java @@ -40,7 +40,7 @@ public class BlockStateWrapper implements IBlockStateWrapper public static final ConcurrentHashMap cache = new ConcurrentHashMap<>(); public static final BlockStateWrapper AIR = fromBlockState(BuiltInRegistries.BLOCK.get(ResourceLocation.tryParse("minecraft:air")).defaultBlockState(), false); - public static final String[] RENDERER_IGNORED_BLOCKS_RESOURCE_LOCATIONS = {"minecraft:air", "minecraft:barrier", "minecraft:structure_void"}; + public static final String[] RENDERER_IGNORED_BLOCKS_RESOURCE_LOCATIONS = {"minecraft:air", "minecraft:barrier", "minecraft:structure_void", "minecraft:tripwire"}; public static final HashMap RENDERER_IGNORED_BLOCKS_INTERNAL = getRendererIgnoredBlocksInternal(RENDERER_IGNORED_BLOCKS_RESOURCE_LOCATIONS); public static final HashMap RENDERER_IGNORED_BLOCKS = getRendererIgnoredBlocks(RENDERER_IGNORED_BLOCKS_INTERNAL);