From 40e9f05ec35ccd66fc737d2c9a77b4191627ce30 Mon Sep 17 00:00:00 2001 From: IThundxr Date: Sat, 10 Aug 2024 14:43:46 -0400 Subject: [PATCH] I have defeated the elephant :crown: --- common/build.gradle.kts | 2 +- .../createnumismatics/config/NumismaticsConfig.java | 10 +++++----- fabric/build.gradle.kts | 7 ++----- .../fabric/mixin/ItemHandlerWrapperAccessor.java | 4 ++-- .../mixin/PortableFluidInterfaceBlockEntityMixin.java | 2 +- .../fabric/mixin/WrappedStorageAccessor.java | 4 ++-- .../PortableEnergyInterfaceBlockEntityMixin.java | 6 +++--- forge/build.gradle.kts | 4 ++-- gradle.properties | 2 +- 9 files changed, 19 insertions(+), 22 deletions(-) diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 286e74f..8dcbc85 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -65,7 +65,7 @@ dependencies { modCompileOnly("net.fabricmc.fabric-api:fabric-api:${"fabric_api_version"()}") // Steam 'n' Rails - modCompileOnly("com.railwayteam.railways:Steam_Rails-common-${"minecraft_version"()}:${"snr_version"()}+common-mc${"minecraft_version"()}") + modCompileOnly("com.railwayteam.railways:Steam_Rails-common-${"minecraft_version"()}:${"snr_version"()}+common-mc${"minecraft_version"()}") { isTransitive = false } // Carry On modCompileOnly("tschipp.carryon:carryon-fabric-${"minecraft_version"()}:${"carryon_fabric_version"()}") diff --git a/common/src/main/java/dev/ithundxr/createnumismatics/config/NumismaticsConfig.java b/common/src/main/java/dev/ithundxr/createnumismatics/config/NumismaticsConfig.java index 480b3bb..715ab72 100644 --- a/common/src/main/java/dev/ithundxr/createnumismatics/config/NumismaticsConfig.java +++ b/common/src/main/java/dev/ithundxr/createnumismatics/config/NumismaticsConfig.java @@ -33,13 +33,13 @@ public class NumismaticsConfig { @ApiStatus.Internal public static final Map CONFIGS = new EnumMap<>(ModConfig.Type.class); - //private static CClient client; + private static CClient client; private static CCommon common; private static CServer server; -// public static CClient client() { -// return client; -// } + public static CClient client() { + return client; + } public static CCommon common() { return common; @@ -68,7 +68,7 @@ private static T register(Supplier factory, ModConfig. @ApiStatus.Internal public static void registerCommon() { - //client = register(CClient::new, ModConfig.Type.CLIENT); + client = register(CClient::new, ModConfig.Type.CLIENT); common = register(CCommon::new, ModConfig.Type.COMMON); server = register(CServer::new, ModConfig.Type.SERVER); } diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index dd68f40..cf2c4bd 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -75,9 +75,6 @@ dependencies { // deprecated modules @ runtime only modLocalRuntime("net.fabricmc.fabric-api:fabric-api-deprecated:${"fabric_api_version"()}") - // because create fabric is a bit broken I think - modImplementation("net.minecraftforge:forgeconfigapiport-fabric:4.2.11") - // Development QOL modLocalRuntime("maven.modrinth:lazydfu:${"lazydfu_version"()}") modLocalRuntime("com.terraformersmc:modmenu:${"modmenu_version"()}") @@ -87,9 +84,9 @@ dependencies { modLocalRuntime("dev.emi:emi-fabric:${"emi_version"()}") // Steam 'n' Rails - modCompileOnly("com.railwayteam.railways:Steam_Rails-fabric-${"minecraft_version"()}:${"snr_version"()}+fabric-mc${"minecraft_version"()}") + modCompileOnly("com.railwayteam.railways:Steam_Rails-fabric-${"minecraft_version"()}:${"snr_version"()}+fabric-mc${"minecraft_version"()}") { isTransitive = false } if ("enable_snr"().toBoolean()) { - modLocalRuntime("com.railwayteam.railways:Steam_Rails-fabric-${"minecraft_version"()}:${"snr_version"()}+fabric-mc${"minecraft_version"()}") + modLocalRuntime("com.railwayteam.railways:Steam_Rails-fabric-${"minecraft_version"()}:${"snr_version"()}+fabric-mc${"minecraft_version"()}") { isTransitive = false } } // Carry On diff --git a/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/ItemHandlerWrapperAccessor.java b/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/ItemHandlerWrapperAccessor.java index a2177ef..53a548d 100644 --- a/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/ItemHandlerWrapperAccessor.java +++ b/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/ItemHandlerWrapperAccessor.java @@ -27,9 +27,9 @@ @Mixin(ItemHandlerWrapper.class) @SuppressWarnings("UnstableApiUsage") public interface ItemHandlerWrapperAccessor { - @Accessor("wrapped") + @Accessor(value = "wrapped", remap = false) void setWrapped(Storage wrapped); - @Accessor("wrapped") + @Accessor(value = "wrapped", remap = false) Storage getWrapped(); } diff --git a/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/PortableFluidInterfaceBlockEntityMixin.java b/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/PortableFluidInterfaceBlockEntityMixin.java index a5ea051..a8f6b18 100644 --- a/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/PortableFluidInterfaceBlockEntityMixin.java +++ b/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/PortableFluidInterfaceBlockEntityMixin.java @@ -51,7 +51,7 @@ @SuppressWarnings("UnstableApiUsage") public abstract class PortableFluidInterfaceBlockEntityMixin extends PortableStorageInterfaceBlockEntity { - @Shadow protected InterfaceFluidHandler capability; + @Shadow(remap = false) protected InterfaceFluidHandler capability; @Unique private FluidSalepointTargetBehaviour railway$salepointBehaviour; diff --git a/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/WrappedStorageAccessor.java b/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/WrappedStorageAccessor.java index e0f524a..03f3242 100644 --- a/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/WrappedStorageAccessor.java +++ b/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/WrappedStorageAccessor.java @@ -26,9 +26,9 @@ @Mixin(WrappedStorage.class) @SuppressWarnings("UnstableApiUsage") public interface WrappedStorageAccessor extends Storage { - @Accessor("wrapped") + @Accessor(value = "wrapped", remap = false) Storage getWrapped(); - @Accessor("wrapped") + @Accessor(value = "wrapped", remap = false) void setWrapped(Storage wrapped); } diff --git a/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/compat/PortableEnergyInterfaceBlockEntityMixin.java b/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/compat/PortableEnergyInterfaceBlockEntityMixin.java index c098035..ac12f54 100644 --- a/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/compat/PortableEnergyInterfaceBlockEntityMixin.java +++ b/fabric/src/main/java/dev/ithundxr/createnumismatics/fabric/mixin/compat/PortableEnergyInterfaceBlockEntityMixin.java @@ -53,7 +53,7 @@ @Mixin(PortableEnergyInterfaceBlockEntity.class) @SuppressWarnings("UnstableApiUsage") public abstract class PortableEnergyInterfaceBlockEntityMixin extends PortableStorageInterfaceBlockEntity { - @Shadow + @Shadow(remap = false) protected InterfaceEnergyHandler capability; @Unique @@ -225,10 +225,10 @@ public void write(@NotNull CompoundTag nbt, boolean clientPacket) { @ConditionalMixin(mods = Mods.CREATEADDITION) @Mixin(InterfaceEnergyHandler.class) private interface InterfaceEnergyHandlerAccessor { - @Accessor("wrapped") + @Accessor(value = "wrapped", remap = false) EnergyStorage getWrapped(); - @Accessor("wrapped") + @Accessor(value = "wrapped", remap = false) void setWrapped(EnergyStorage wrapped); } } diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index db3757c..f49845e 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -84,9 +84,9 @@ dependencies { modLocalRuntime("mezz.jei:jei-${"minecraft_version"()}-forge:${"jei_version"()}") // Steam 'n' Rails - modCompileOnly("com.railwayteam.railways:Steam_Rails-forge-${"minecraft_version"()}:${"snr_version"()}+forge-mc${"minecraft_version"()}") + modCompileOnly("com.railwayteam.railways:Steam_Rails-forge-${"minecraft_version"()}:${"snr_version"()}+forge-mc${"minecraft_version"()}") { isTransitive = false } if ("enable_snr"().toBoolean()) { - modLocalRuntime("com.railwayteam.railways:Steam_Rails-forge-${"minecraft_version"()}:${"snr_version"()}+forge-mc${"minecraft_version"()}") + modLocalRuntime("com.railwayteam.railways:Steam_Rails-forge-${"minecraft_version"()}:${"snr_version"()}+forge-mc${"minecraft_version"()}") { isTransitive = false } } // Carry On diff --git a/gradle.properties b/gradle.properties index e2f54ef..ce9348b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -71,7 +71,7 @@ jade_version = 11.10.0+fabric # Steam 'n' Rails snr_version = 1.6.4 -enable_snr = true +enable_snr = false # Carry On - https://github.com/Tschipp/CarryOn carryon_forge_version = 2.1.2.7