diff --git a/build.gradle b/build.gradle index 7ff2767d..fdf03e73 100644 --- a/build.gradle +++ b/build.gradle @@ -171,6 +171,7 @@ dependencies { compileOnly rfg.deobf('curse.maven:rftools-dimensions-240950:2707390') compileOnly rfg.deobf('curse.maven:actuallyaditions-228404:2844115') compileOnly rfg.deobf('curse.maven:extrautilities-225561:2678374') + compileOnly rfg.deobf('curse.maven:steamworld-282607:2641200') compileOnly 'curse.maven:applecore-224472:2969118' compileOnly 'curse.maven:arcanearchives-311357:3057332' compileOnly 'curse.maven:bewitchment-285439:3044569' diff --git a/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java b/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java index 39f7663b..5f2131dd 100644 --- a/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java +++ b/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java @@ -179,6 +179,10 @@ public class UTConfigMods @Config.Name("Spice Of Life") public static final SpiceOfLifeCategory SPICE_OF_LIFE = new SpiceOfLifeCategory(); + @Config.LangKey("cfg.universaltweaks.modintegration.steamworld") + @Config.Name("SteamWorld") + public static final SteamWorldCategory STEAMWORLD = new SteamWorldCategory(); + @Config.LangKey("cfg.universaltweaks.modintegration.sd") @Config.Name("Storage Drawers") public static final StorageDrawersCategory STORAGE_DRAWERS = new StorageDrawersCategory(); @@ -700,6 +704,14 @@ public static class SpiceOfLifeCategory public boolean utDuplicationFixesToggle = true; } + public static class SteamWorldCategory + { + @Config.RequiresMcRestart + @Config.Name("Sky of Old Dimension Fix") + @Config.Comment("Fixes a Stack Overflow crash when entering the Sky of Old Dimension") + public boolean utSkyOfOldFixToggle = true; + } + public static class StorageDrawersCategory { @Config.RequiresMcRestart diff --git a/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java b/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java index e226a606..8b70d398 100644 --- a/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java +++ b/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java @@ -81,6 +81,7 @@ public class UTMixinLoader implements ILateMixinLoader put("mixins.mods.rftoolsdimensions.json", () -> loaded("rftoolsdim")); put("mixins.mods.roost.contenttweaker.json", () -> loaded("contenttweaker")); put("mixins.mods.simpledifficulty.json", () -> loaded("simpledifficulty")); + put("mixins.mods.steamworld.json", () -> loaded("steamworld") && UTConfigMods.STEAMWORLD.utSkyOfOldFixToggle); put("mixins.mods.spiceoflife.dupes.json", () -> loaded("spiceoflife") && UTConfigMods.SPICE_OF_LIFE.utDuplicationFixesToggle); put("mixins.mods.tconstruct.json", () -> loaded("tconstruct")); put("mixins.mods.tconstruct.oredictcache.json", () -> loaded("tconstruct") && UTConfigMods.TINKERS_CONSTRUCT.utTConOreDictCacheToggle); diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/steamworld/mixin/UTOldSkyMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/steamworld/mixin/UTOldSkyMixin.java new file mode 100644 index 00000000..bbb49e0e --- /dev/null +++ b/src/main/java/mod/acgaming/universaltweaks/mods/steamworld/mixin/UTOldSkyMixin.java @@ -0,0 +1,20 @@ +package mod.acgaming.universaltweaks.mods.steamworld.mixin; + +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.BiomeProvider; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; +import zaexides.steamworld.world.dimension.BiomeProviderSkyOfOld; + +@Mixin(value = BiomeProviderSkyOfOld.class) +public class UTOldSkyMixin extends BiomeProvider +{ + /** + * @author MCAdventureCity + * @reason Fix StackOverflowError when entering the Sky of Old Dimension. + */ + @Overwrite + public Biome[] getBiomes(Biome[] oldBiomeList, int x, int z, int width, int depth) { + return super.getBiomes(oldBiomeList, x, z, width, depth); + } +} diff --git a/src/main/java/mod/acgaming/universaltweaks/util/compat/UTObsoleteModsHandler.java b/src/main/java/mod/acgaming/universaltweaks/util/compat/UTObsoleteModsHandler.java index 11061b50..e186b874 100644 --- a/src/main/java/mod/acgaming/universaltweaks/util/compat/UTObsoleteModsHandler.java +++ b/src/main/java/mod/acgaming/universaltweaks/util/compat/UTObsoleteModsHandler.java @@ -117,6 +117,7 @@ public class UTObsoleteModsHandler put("savemystronghold", () -> UTConfigTweaks.WORLD.utStrongholdToggle); put("sleepsooner", () -> UTConfigTweaks.ENTITIES.SLEEPING.utSleepingTime != -1); put("smooth-scrolling-everywhere", () -> UTConfigTweaks.MISC.SMOOTH_SCROLLING.utSmoothScrollingToggle); + put("steamworldpatcher", () -> UTConfigMods.STEAMWORLD.utSkyOfOldFixToggle); put("stepupfix", () -> UTConfigTweaks.ENTITIES.utAutoJumpToggle); put("stg", () -> UTConfigTweaks.MISC.SWING_THROUGH_GRASS.utSwingThroughGrassToggle); put("superhot", () -> UTConfigTweaks.ITEMS.utSuperHotTorchToggle); diff --git a/src/main/resources/assets/universaltweaks/lang/en_us.lang b/src/main/resources/assets/universaltweaks/lang/en_us.lang index c0401c83..63fa116b 100644 --- a/src/main/resources/assets/universaltweaks/lang/en_us.lang +++ b/src/main/resources/assets/universaltweaks/lang/en_us.lang @@ -86,6 +86,7 @@ cfg.universaltweaks.modintegration.quark=Quark cfg.universaltweaks.modintegration.rftoolsdimensions=RFTools Dimensions cfg.universaltweaks.modintegration.railcraft=Railcraft cfg.universaltweaks.modintegration.roost=Roost +cfg.universaltweaks.modintegration.steamworld=SteamWorld cfg.universaltweaks.modintegration.sd=Storage Drawers cfg.universaltweaks.modintegration.simpledifficulty=Simple Difficulty cfg.universaltweaks.modintegration.simplyjetpacks=Simply Jetpacks diff --git a/src/main/resources/mixins.mods.steamworld.json b/src/main/resources/mixins.mods.steamworld.json new file mode 100644 index 00000000..7fbdb9f2 --- /dev/null +++ b/src/main/resources/mixins.mods.steamworld.json @@ -0,0 +1,7 @@ +{ + "package": "mod.acgaming.universaltweaks.mods.steamworld.mixin", + "refmap": "universaltweaks.refmap.json", + "minVersion": "0.8", + "compatibilityLevel": "JAVA_8", + "mixins": ["UTOldSkyMixin"] +} \ No newline at end of file