Merged jar, now for fabric (works on quilt as well), forge and neoforged
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ loom {
|
||||
extraAccessWideners.add loom.accessWidenerPath.get().asFile.name
|
||||
|
||||
mixinConfigs = [
|
||||
"DistantHorizons.mixins.json"
|
||||
"DistantHorizons.forge.mixins.json"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.seibel.distanthorizons.forge.mixins;
|
||||
|
||||
import net.minecraft.client.ClientBrandRetriever;
|
||||
import net.minecraftforge.fml.ModList;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
|
||||
@@ -18,6 +19,9 @@ public class ForgeMixinPlugin implements IMixinConfigPlugin
|
||||
@Override
|
||||
public boolean shouldApplyMixin(String targetClassName, String mixinClassName)
|
||||
{
|
||||
if (!ClientBrandRetriever.getClientModName().equals("forge"))
|
||||
return false;
|
||||
|
||||
if (mixinClassName.contains(".mods."))
|
||||
{ // If the mixin wants to go into a mod then we check if that mod is loaded or not
|
||||
return ModList.get().isLoaded(
|
||||
|
||||
@@ -26,7 +26,8 @@ issueTrackerURL = "${issues}"
|
||||
|
||||
[[dependencies.distanthorizons]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
mandatory = true # Forge syntax
|
||||
type = "required" # Neoforged syntax
|
||||
versionRange = "${compatible_forgemc_versions}" # Where we set what version of mc it is avalible for
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
+5
-1
@@ -1,5 +1,6 @@
|
||||
package com.seibel.distanthorizons.neoforged.mixins;
|
||||
|
||||
import net.minecraft.client.ClientBrandRetriever;
|
||||
import net.neoforged.fml.ModList;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
|
||||
@@ -12,12 +13,15 @@ import java.util.Set;
|
||||
* @author coolGi
|
||||
* @author cortex
|
||||
*/
|
||||
public class ForgeMixinPlugin implements IMixinConfigPlugin
|
||||
public class NeoforgedMixinPlugin implements IMixinConfigPlugin
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean shouldApplyMixin(String targetClassName, String mixinClassName)
|
||||
{
|
||||
if (!ClientBrandRetriever.getClientModName().equals("neoforge"))
|
||||
return false;
|
||||
|
||||
if (mixinClassName.contains(".mods."))
|
||||
{ // If the mixin wants to go into a mod then we check if that mod is loaded or not
|
||||
return ModList.get().isLoaded(
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "com.seibel.distanthorizons.forge.mixins",
|
||||
"package": "com.seibel.distanthorizons.neoforged.mixins",
|
||||
"mixins": [
|
||||
"server.unsafe.MixinThreadingDetector",
|
||||
"server.MixinUtilBackgroundThread",
|
||||
@@ -20,5 +20,5 @@
|
||||
"client.MixinTextureUtil"
|
||||
],
|
||||
"server": [],
|
||||
"plugin": "com.seibel.distanthorizons.forge.mixins.ForgeMixinPlugin"
|
||||
"plugin": "com.seibel.distanthorizons.neoforged.mixins.NeoforgedMixinPlugin"
|
||||
}
|
||||
@@ -23,12 +23,15 @@ issueTrackerURL = "${issues}"
|
||||
#// Allow any version to be present (or not) on the server
|
||||
acceptableRemoteVersions = "*"
|
||||
|
||||
# TODO: Once there is a way to move this to the `META-INF/MANIFEST.MF` with architectury, DO SO!
|
||||
# (currently, this only works cus neoforge's mods.toml is added to the jar after forge's mods.toml, so this can work
|
||||
[[mixins]]
|
||||
config = "DistantHorizons.mixins.json"
|
||||
config = "DistantHorizons.neoforged.mixins.json"
|
||||
|
||||
[[dependencies.distanthorizons]]
|
||||
modId = "minecraft"
|
||||
type = "required"
|
||||
mandatory = true # Forge syntax
|
||||
type = "required" # Neoforged syntax
|
||||
versionRange = "${compatible_forgemc_versions}" # Where we set what version of mc it is avalible for
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
Reference in New Issue
Block a user