Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Betweelands compat #285

Merged
merged 16 commits into from
Mar 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 29 additions & 17 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -120,6 +120,22 @@ final def mod_dependencies = [
'woot-244049:2712670' : [project.debug_woot],
]

// Maps mods from CurseMaven to the properties that enable the mod.
// These mods will be enabled at runtime, but will not be compiled.
// Sorted alphabetically.
final Map<String, List<String>> runtime_dependencies = [
'com.cleanroommc:configanytime:3.0' : [project.debug_universal_tweaks],
'curse.maven:aainfo-573154:3627065' : [project.debug_actually_advanced_info],
'curse.maven:dropt-284973:3758733' : [project.debug_pyrotech],
'curse.maven:jei-bees-248370:2490058' : [project.debug_forestry],
'curse.maven:just-enough-petroleum-291727:2549332' : [project.debug_immersive_petroleum],
'curse.maven:mouse-tweaks-unofficial-461660:5876158': [project.debug_mouse_tweaks_unofficial],
'curse.maven:reid-629017:5502915' : [project.debug_roughly_enough_ids],
'curse.maven:thaumic_jei-285492:2705304' : [project.debug_thaum],
'curse.maven:universal-tweaks-705000:5860191' : [project.debug_universal_tweaks],
'curse.maven:vintagefix-871198:5536276' : [project.debug_vintagefix],
]

dependencies {
embed "org.apache.groovy:groovy:${project.groovy_version}"

@@ -149,8 +165,19 @@ dependencies {
}
}

if (project.debug_thaum.toBoolean()) {
runtimeOnly 'curse.maven:thaumic_jei-285492:2705304'
// enables mods for runtime
runtime_dependencies.each { k, v ->
if (v.any { it.toBoolean() }) {
runtimeOnly k
}
}

compileOnly rfg.deobf('curse.maven:angry-pixel-the-betweenlands-mod-243363:4479688')
if (project.debug_betweenlands.toBoolean()) {
// TODO: allow development toggling of the coremod
// until this is resolved, download and install the jar from
// https://www.curseforge.com/minecraft/mc-mods/angry-pixel-the-betweenlands-mod/files/4479688
// runtimeOnly rfg.deobf('curse.maven:angry-pixel-the-betweenlands-mod-243363:4479688')
}

compileOnly 'com.enderio:endercore:0.5.78'
@@ -178,24 +205,9 @@ dependencies {
runtimeOnly rfg.deobf('curse.maven:industrialcraft_classic-242942:3093607')
}


if (project.debug_forestry.toBoolean()) {
runtimeOnly rfg.deobf('curse.maven:jei-bees-248370:2490058')
}

if (project.debug_immersive_petroleum.toBoolean()) {
runtimeOnly rfg.deobf('curse.maven:just-enough-petroleum-291727:2549332')
}

if (project.debug_pyrotech.toBoolean()) {
runtimeOnly rfg.deobf("curse.maven:dropt-284973:3758733")
}

compileOnly rfg.deobf('TechReborn:TechReborn-ModCompatibility-1.12.2:1.4.0.76:universal')
if (project.debug_tech_reborn.toBoolean()) {
runtimeOnly rfg.deobf('TechReborn:TechReborn-ModCompatibility-1.12.2:1.4.0.76:universal')
}

runtimeOnly 'com.cleanroommc:strip-latest-forge-requirements:1.0'

}
209 changes: 209 additions & 0 deletions examples/postInit/thebetweenlands.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@

// Auto generated groovyscript example file
// MODS_LOADED: thebetweenlands

log.info 'mod \'thebetweenlands\' detected, running script'

// Animator:
// Converts an input item, Life amount from Life Crystals, and Fuel from Sulfur into an output itemstack, summoning an
// entity, a random item from a loottable, or summoning an entity and outputting an itemstack.

mods.thebetweenlands.animator.removeByEntity(entity('thebetweenlands:sporeling'))
mods.thebetweenlands.animator.removeByInput(item('thebetweenlands:bone_leggings'))
mods.thebetweenlands.animator.removeByLootTable(resource('thebetweenlands:animator/scroll'))
mods.thebetweenlands.animator.removeByOutput(item('thebetweenlands:items_misc:46'))
// mods.thebetweenlands.animator.removeAll()

mods.thebetweenlands.animator.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.life(1)
.fuel(1)
.register()

mods.thebetweenlands.animator.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.lootTable(resource('minecraft:entities/zombie'))
.life(5)
.fuel(1)
.register()

mods.thebetweenlands.animator.recipeBuilder()
.input(item('minecraft:gold_block'))
.entity(entity('minecraft:zombie').getEntityClass())
.life(1)
.fuel(5)
.register()

mods.thebetweenlands.animator.recipeBuilder()
.input(item('minecraft:diamond'))
.entity(entity('minecraft:enderman'))
.output(item('minecraft:clay'))
.life(3)
.fuel(10)
.register()


// Compost:
// Converts an input itemstack into an amount of compost.

mods.thebetweenlands.compost.removeByInput(item('thebetweenlands:items_misc:13'))
// mods.thebetweenlands.compost.removeAll()

mods.thebetweenlands.compost.recipeBuilder()
.input(item('minecraft:clay'))
.amount(20)
.time(30)
.register()

mods.thebetweenlands.compost.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.amount(1)
.time(5)
.register()


// Crab Pot Filter Bubbler:
// Converts an input item into an output itemstack when a Bubbler Crab is placed inside a Crab Pot Filter.

mods.thebetweenlands.crab_pot_filter_bubbler.removeByInput(item('thebetweenlands:silt'))
mods.thebetweenlands.crab_pot_filter_bubbler.removeByOutput(item('thebetweenlands:swamp_dirt'))
// mods.thebetweenlands.crab_pot_filter_bubbler.removeAll()

mods.thebetweenlands.crab_pot_filter_bubbler.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.register()

mods.thebetweenlands.crab_pot_filter_bubbler.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay'))
.register()


// Crab Pot Filter Silt:
// Converts an input item into an output itemstack when a Silt Crab is placed inside a Crab Pot Filter.

mods.thebetweenlands.crab_pot_filter_silt.removeByInput(item('thebetweenlands:mud'))
mods.thebetweenlands.crab_pot_filter_silt.removeByOutput(item('thebetweenlands:mud'))
// mods.thebetweenlands.crab_pot_filter_silt.removeAll()

mods.thebetweenlands.crab_pot_filter_silt.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.register()

mods.thebetweenlands.crab_pot_filter_silt.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay'))
.register()


// Druid Altar:
// Converts 4 input items into an output itemstack.

// mods.thebetweenlands.druid_altar.removeByInput(item('thebetweenlands:swamp_talisman:1'))
mods.thebetweenlands.druid_altar.removeByOutput(item('thebetweenlands:swamp_talisman'))
// mods.thebetweenlands.druid_altar.removeAll()

mods.thebetweenlands.druid_altar.recipeBuilder()
.input(item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'))
.output(item('minecraft:diamond'))
.register()

mods.thebetweenlands.druid_altar.recipeBuilder()
.input(item('minecraft:diamond'), item('minecraft:gold_block'), item('minecraft:gold_ingot'), item('minecraft:clay'))
.output(item('minecraft:clay'))
.register()


// Pestle And Mortar:
// Converts an input item into an output itemstack in a Pestle and Mortar by using a Pestle tool in the Mortar.

mods.thebetweenlands.pestle_and_mortar.removeByInput(item('thebetweenlands:limestone'))
mods.thebetweenlands.pestle_and_mortar.removeByOutput(item('thebetweenlands:fish_bait'))
// mods.thebetweenlands.pestle_and_mortar.removeAll()

mods.thebetweenlands.pestle_and_mortar.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.register()

mods.thebetweenlands.pestle_and_mortar.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay'))
.register()


// Purifier:
// Converts an input item into an output itemstack, consuming Sulfur and Swamp Water as fuel.

mods.thebetweenlands.purifier.removeByInput(item('thebetweenlands:items_misc:64'))
mods.thebetweenlands.purifier.removeByOutput(item('thebetweenlands:cragrock'))
// mods.thebetweenlands.purifier.removeAll()

mods.thebetweenlands.purifier.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.register()

mods.thebetweenlands.purifier.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay'))
.register()


// Smoking Rack:
// Converts an input item into an output itemstack over a configurable period of time, consuming Fallen Leaves to do so.

mods.thebetweenlands.smoking_rack.removeByInput(item('thebetweenlands:anadia'))
mods.thebetweenlands.smoking_rack.removeByOutput(item('thebetweenlands:barnacle_smoked'))
// mods.thebetweenlands.smoking_rack.removeAll()

mods.thebetweenlands.smoking_rack.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.register()

mods.thebetweenlands.smoking_rack.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay'))
.time(50)
.register()


// Steeping Pot:
// Converts a 1,000mb of fluid into either 1,000mb of a fluid, an output itemstack, or both, consuming up to 4 items from a
// Silk Bundle placed inside the Steeping Pot to do so. The Silk Bundle is converted into a Dirty Silk Bundle in the
// process. The Silk Bundle can only hold specific items, which are also configurable.

mods.thebetweenlands.steeping_pot.removeAcceptedItem(item('thebetweenlands:items_crushed:5'))
mods.thebetweenlands.steeping_pot.removeByInput(fluid('clean_water'))
mods.thebetweenlands.steeping_pot.removeByInput(item('thebetweenlands:items_crushed:13'))
mods.thebetweenlands.steeping_pot.removeByOutput(fluid('dye_fluid').withNbt(['type': 14]))
// mods.thebetweenlands.steeping_pot.removeByOutput(item('thebetweenlands:limestone'))
// mods.thebetweenlands.steeping_pot.removeAll()
// mods.thebetweenlands.steeping_pot.removeAllAcceptedItem()

mods.thebetweenlands.steeping_pot.recipeBuilder()
.input(item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'))
.fluidInput(fluid('lava'))
.fluidOutput(fluid('water'))
.register()

mods.thebetweenlands.steeping_pot.recipeBuilder()
.input(item('minecraft:diamond'))
.fluidInput(fluid('lava'))
.fluidOutput(fluid('dye_fluid'))
.meta(5)
.register()

mods.thebetweenlands.steeping_pot.recipeBuilder()
.input(item('minecraft:emerald'))
.fluidInput(fluid('lava'))
.fluidOutput(fluid('water'))
.register()


mods.thebetweenlands.steeping_pot.addAcceptedItem(item('minecraft:gold_block'))

9 changes: 8 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -9,6 +9,12 @@ debug_generate_wiki = false
debug_generate_and_crash = false
debug_disable_cache = false

debug_actually_advanced_info = false
debug_mouse_tweaks_unofficial = false
debug_roughly_enough_ids = false
debug_universal_tweaks = false
debug_vintagefix = false

# END SECTION: development environment settings

# SECTION: debug mod compat
@@ -28,6 +34,7 @@ debug_aurorian = false
debug_avaritia = false

debug_better_with_mods = false
debug_betweenlands = false
debug_blood_arsenal = false
debug_blood_magic = false
debug_botania = false
@@ -201,7 +208,7 @@ includeCommonDevEnvMods = true
# and cannot launch with the forge version required, enable this to strip the forge version requirements from that mod.
# This will add 'strip-latest-forge-requirements' as 'runtimeOnlyNonPublishable'.
# Requires useMixins or forceEnableMixins to be true, as the mod uses mixins to function.
stripForgeRequirements = false
stripForgeRequirements = true


# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
19 changes: 19 additions & 0 deletions src/main/java/com/cleanroommc/groovyscript/api/IOreDicts.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.cleanroommc.groovyscript.api;

import java.util.List;

/**
* Indicates that the IIngredient represents one or more oredicts.
*/
public interface IOreDicts extends IIngredient {
// TODO
// There are a large number of places currently in the GroovyScript codebase
// that check if something is "instanceof OreDictIngredient".
// these should be replaced by checks against IOreDicts,
// and surrounding code changed appropriately.

/**
* @return a list of oredict strings
*/
List<String> getOreDicts();
}
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
import com.cleanroommc.groovyscript.compat.mods.atum.Atum;
import com.cleanroommc.groovyscript.compat.mods.avaritia.Avaritia;
import com.cleanroommc.groovyscript.compat.mods.betterwithmods.BetterWithMods;
import com.cleanroommc.groovyscript.compat.mods.betweenlands.Betweenlands;
import com.cleanroommc.groovyscript.compat.mods.bloodarsenal.BloodArsenal;
import com.cleanroommc.groovyscript.compat.mods.bloodmagic.BloodMagic;
import com.cleanroommc.groovyscript.compat.mods.botania.Botania;
@@ -98,6 +99,7 @@ public class ModSupport {
public static final GroovyContainer<Atum> ATUM = new InternalModContainer<>("atum", "Atum 2", Atum::new);
public static final GroovyContainer<Avaritia> AVARITIA = new InternalModContainer<>("avaritia", "Avaritia", Avaritia::new);
public static final GroovyContainer<BetterWithMods> BETTER_WITH_MODS = new InternalModContainer<>("betterwithmods", "Better With Mods", BetterWithMods::new);
public static final GroovyContainer<Betweenlands> BETWEENLANDS = new InternalModContainer<>("thebetweenlands", "The Betweenlands", Betweenlands::new, "betweenlands");
public static final GroovyContainer<BloodArsenal> BLOOD_ARSENAL = new InternalModContainer<>("bloodarsenal", "Blood Arsenal", BloodArsenal::new);
public static final GroovyContainer<BloodMagic> BLOOD_MAGIC = new InternalModContainer<>("bloodmagic", "Blood Magic: Alchemical Wizardry", BloodMagic::new, "bm");
public static final GroovyContainer<Botania> BOTANIA = new InternalModContainer<>("botania", "Botania", Botania::new);
Loading