Skip to content

Commit

Permalink
Merge pull request #43 from jchung01/genlayer-modsupport
Browse files Browse the repository at this point in the history
More mod support for river gen (MorePlanets/Atum)
  • Loading branch information
ACGaming committed Mar 30, 2024
2 parents faf5619 + a22306d commit 6887eca
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ dependencies {
compileOnly rfg.deobf( "curse.maven:Patchouli-306770:3162874" )
compileOnly rfg.deobf( "curse.maven:bewitchment-285439:3256343" )
compileOnly rfg.deobf( "curse.maven:compact-machines-224218:2707509")
compileOnly rfg.deobf( "curse.maven:moreplanets-261990:5063201" )
compileOnly rfg.deobf( "curse.maven:atum2-59621:3116599" )

compileOnly rfg.deobf( "curse.maven:CubicChunks-292243:5135427" )
compileOnly rfg.deobf( "curse.maven:RTGU-648514:4396319" )
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/dimdev/jeid/JEID.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class JEID {
public static final String DEPENDENCIES = "required:mixinbooter@[8.0,);"
+ "after:abyssalcraft;"
+ "after:advancedrocketry;"
+ "after:atum;"
+ "after:biomesoplenty;"
+ "after:biometweaker;"
+ "after:bookshelf;"
Expand All @@ -34,6 +35,7 @@ public class JEID {
+ "after:geographicraft;"
+ "after:hammercore;"
+ "after:journeymap;"
+ "after:moreplanets;"
+ "after:mystcraft;"
+ "after:thaumcraft;"
+ "after:thebetweenlands;"
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/dimdev/jeid/core/JEIDMixinLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public List<String> getMixinConfigs() {
configs.add("mixins.jeid.advancedrocketry.v1_7_0.json");
}
}
if (Loader.isModLoaded("atum")) {
configs.add("mixins.jeid.atum.json");
}
if (Loader.isModLoaded("biomesoplenty")) {
configs.add("mixins.jeid.biomesoplenty.json");
}
Expand Down Expand Up @@ -64,6 +67,9 @@ public List<String> getMixinConfigs() {
if (Loader.isModLoaded("journeymap")) {
configs.add("mixins.jeid.journeymap.json");
}
if (Loader.isModLoaded("moreplanets")) {
configs.add("mixins.jeid.moreplanets.json");
}
if (Loader.isModLoaded("mystcraft")) {
configs.add("mixins.jeid.mystcraft.json");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.dimdev.jeid.mixin.modsupport.atum;

import com.teammetallurgy.atum.world.gen.layer.GenLayerAtumRiverMix;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(value = GenLayerAtumRiverMix.class)
public class MixinGenLayerAtumRiverMix
{
@ModifyConstant(method = "getInts", constant = @Constant(intValue = 255))
private int getBitMask(int oldValue) {
return 0xFFFFFFFF;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.dimdev.jeid.mixin.modsupport.moreplanets;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
import stevekung.mods.moreplanets.planets.chalos.world.gen.biome.layer.GenLayerSlimelyStreamMix;
import stevekung.mods.moreplanets.planets.fronos.world.gen.biome.layer.GenLayerFronosRiverMix;
import stevekung.mods.moreplanets.planets.nibiru.world.gen.biome.layer.GenLayerNibiruRiverMix;

@Mixin(value = {GenLayerFronosRiverMix.class, GenLayerNibiruRiverMix.class, GenLayerSlimelyStreamMix.class})
public class MixinGenLayerRiversMix {
@ModifyConstant(method = "getInts", constant = @Constant(intValue = 255))
private int getBitMask(int oldValue) {
return 0xFFFFFFFF;
}
}
14 changes: 14 additions & 0 deletions src/main/resources/mixins.jeid.atum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"package": "org.dimdev.jeid.mixin.modsupport.atum",
"required": true,
"refmap": "mixins.jeid.refmap.json",
"target": "@env(DEFAULT)",
"minVersion": "0.6",
"compatibilityLevel": "JAVA_8",
"mixins": [
"MixinGenLayerAtumRiverMix"
],
"injectors": {
"maxShiftBy": 10
}
}
14 changes: 14 additions & 0 deletions src/main/resources/mixins.jeid.moreplanets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"package": "org.dimdev.jeid.mixin.modsupport.moreplanets",
"required": true,
"refmap": "mixins.jeid.refmap.json",
"target": "@env(DEFAULT)",
"minVersion": "0.6",
"compatibilityLevel": "JAVA_8",
"mixins": [
"MixinGenLayerRiversMix"
],
"injectors": {
"maxShiftBy": 10
}
}

0 comments on commit 6887eca

Please sign in to comment.