AtomicStryker's Ruins mod compat

#186 #93
This commit is contained in:
FalsePattern committed 2025-06-09 17:26:08 +02:00
1 parent f4623ebf2e
commit 76fdd16906
7 files changed
+136

No files matched your search

+1
View File
@@ -96,6 +96,7 @@ This mod also contains patches for the following mods:
- Restructured
- Realistic Terrain Generation
- Realistic World Generation
- Ruins
- Thaumcraft
- The Lord of the Rings Mod: Legacy
- The Mists of RioV
+3
View File
@@ -211,6 +211,9 @@ dependencies {
//Restructured 1.0.4.2
compileOnly(deobfCurse("restructured-230570:2276784"))
//Ruins (AtomicStryker) 15.4 nbtfix
compileOnly(deobf("mirror:Ruins:1.7.10"))
//TARDIS Mod 0.995
compileOnly(deobfCurse("tardismod-230170:2305503"))
@@ -0,0 +1,40 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2025 FalsePattern, The MEGA Team
* All Rights Reserved
*
* The above copyright notice, this permission notice and the word "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, only version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.ruins;
import atomicstryker.ruins.common.FileHandler;
import atomicstryker.ruins.common.RuinsMod;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(FileHandler.class)
public class FileHandlerMixin {
@ModifyConstant(method = "useGeneric",
constant = {@Constant(intValue = RuinsMod.BIOME_NONE)},
remap = false)
private int extendBiomeNone(int constant) {
return constant - RuinsMod.BIOME_NONE + ExtendedConstants.biomeIDCount;
}
}
@@ -0,0 +1,40 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2025 FalsePattern, The MEGA Team
* All Rights Reserved
*
* The above copyright notice, this permission notice and the word "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, only version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.ruins;
import atomicstryker.ruins.common.RuinsMod;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(targets = "atomicstryker.ruins.common.FileHandler$LoaderThread")
public abstract class LoaderThreadMixin extends Thread {
@ModifyConstant(method = "run",
constant = {@Constant(intValue = RuinsMod.BIOME_NONE),
@Constant(intValue = RuinsMod.BIOME_NONE + 1)},
remap = false)
private int extendBiomeNone(int constant) {
return constant - RuinsMod.BIOME_NONE + ExtendedConstants.biomeIDCount;
}
}
@@ -0,0 +1,46 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2025 FalsePattern, The MEGA Team
* All Rights Reserved
*
* The above copyright notice, this permission notice and the word "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, only version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.ruins;
import atomicstryker.ruins.common.RuinGenerator;
import atomicstryker.ruins.common.RuinsMod;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(RuinGenerator.class)
public abstract class RuinGeneratorMixin {
@ModifyConstant(method = "createBuilding",
constant = {@Constant(intValue = RuinsMod.BIOME_NONE)},
remap = false)
private int extendBiomeNone(int constant) {
return constant - RuinsMod.BIOME_NONE + ExtendedConstants.biomeIDCount;
}
@ModifyConstant(method = "printStats",
constant = {@Constant(intValue = RuinsMod.BIOME_NONE)},
remap = false)
private int extendBiomeNone2(int constant) {
return constant - RuinsMod.BIOME_NONE + ExtendedConstants.biomeIDCount;
}
}
@@ -75,6 +75,7 @@ import static com.falsepattern.endlessids.mixin.plugin.TargetedMod.OWG;
import static com.falsepattern.endlessids.mixin.plugin.TargetedMod.RANDOMTHINGS;
import static com.falsepattern.endlessids.mixin.plugin.TargetedMod.RESTRUCTURED;
import static com.falsepattern.endlessids.mixin.plugin.TargetedMod.RTG;
import static com.falsepattern.endlessids.mixin.plugin.TargetedMod.RUINS;
import static com.falsepattern.endlessids.mixin.plugin.TargetedMod.RWG;
import static com.falsepattern.endlessids.mixin.plugin.TargetedMod.TARDIS;
import static com.falsepattern.endlessids.mixin.plugin.TargetedMod.THAUMCRAFT;
@@ -226,6 +227,10 @@ public class Mixin {
biome_rtg_LandscapeGeneratorMixin(EXT_BIOME, require(RTG)),
biome_rtg_WorldChunkManagerRTGMixin(EXT_BIOME, require(RTG)),
biome_ruins_FileHandlerMixin(EXT_BIOME, require(RUINS)),
biome_ruins_LoaderThreadMixin(EXT_BIOME, require(RUINS)),
biome_ruins_RuinGeneratorMixin(EXT_BIOME, require(RUINS)),
biome_rwg_ChunkGeneratorRealisticMixin(EXT_BIOME, require(RWG)),
biome_rwg_RealisticBiomeBaseMixin(EXT_BIOME, require(RWG)),
biome_rwg_VillageMaterialsMixin(EXT_BIOME, require(RWG)),
@@ -74,6 +74,7 @@ public enum TargetedMod implements ITargetedMod {
NOMADICTENTS("Nomadic Tents", false, contains("nomadictents")),
OWG("Nostalgic world generation", false, contains("owg-").or(contains("nostalgiagenerator-"))),
RANDOMTHINGS("Random Things", false, contains("randomthings-")),
RUINS("Ruins", false, contains("ruins-")),
RESTRUCTURED("Restructured", false, contains("restructured-")),
RTG("Realistic Terrain Generation", false, contains("rtg-")),
RWG("Realistic World Gen", false, contains("rwg-")),