Skip to content

Commit

Permalink
Merge pull request #487 from asylumdevgroup-modding/steamworldpatcher
Browse files Browse the repository at this point in the history
Merge SteamWorldPatcher
  • Loading branch information
ACGaming authored Jun 13, 2024
2 parents da5a016 + 894e41f commit 4fa089a
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/universaltweaks/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/mixins.mods.steamworld.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"package": "mod.acgaming.universaltweaks.mods.steamworld.mixin",
"refmap": "universaltweaks.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
"mixins": ["UTOldSkyMixin"]
}

0 comments on commit 4fa089a

Please sign in to comment.