Skip to content

Commit 2df2eca

Browse files
authored
add Betweelands compat (#285)
* add IOreDicts * IngredientHelper for cartesianProducts for Ores and ItemStacks * add betweelands mixins * add The Betweenlands compat * comment out item output functionality of Steeping Pot * apply IngredientHelper for cartesian products * enhance description and add todo for IOreDicts * move runtimeOnly deps to map * add some runtime mods for development * make betweenlands compat compile * fix wording of a comment * adjust the betweelands in lang file * move strip forge reqs to core buildscript * add toBoolean()
1 parent bf0b322 commit 2df2eca

34 files changed

+1469
-54
lines changed

dependencies.gradle

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,22 @@ final def mod_dependencies = [
120120
'woot-244049:2712670' : [project.debug_woot],
121121
]
122122

123+
// Maps mods from CurseMaven to the properties that enable the mod.
124+
// These mods will be enabled at runtime, but will not be compiled.
125+
// Sorted alphabetically.
126+
final Map<String, List<String>> runtime_dependencies = [
127+
'com.cleanroommc:configanytime:3.0' : [project.debug_universal_tweaks],
128+
'curse.maven:aainfo-573154:3627065' : [project.debug_actually_advanced_info],
129+
'curse.maven:dropt-284973:3758733' : [project.debug_pyrotech],
130+
'curse.maven:jei-bees-248370:2490058' : [project.debug_forestry],
131+
'curse.maven:just-enough-petroleum-291727:2549332' : [project.debug_immersive_petroleum],
132+
'curse.maven:mouse-tweaks-unofficial-461660:5876158': [project.debug_mouse_tweaks_unofficial],
133+
'curse.maven:reid-629017:5502915' : [project.debug_roughly_enough_ids],
134+
'curse.maven:thaumic_jei-285492:2705304' : [project.debug_thaum],
135+
'curse.maven:universal-tweaks-705000:5860191' : [project.debug_universal_tweaks],
136+
'curse.maven:vintagefix-871198:5536276' : [project.debug_vintagefix],
137+
]
138+
123139
dependencies {
124140
embed "org.apache.groovy:groovy:${project.groovy_version}"
125141

@@ -149,8 +165,19 @@ dependencies {
149165
}
150166
}
151167

152-
if (project.debug_thaum.toBoolean()) {
153-
runtimeOnly 'curse.maven:thaumic_jei-285492:2705304'
168+
// enables mods for runtime
169+
runtime_dependencies.each { k, v ->
170+
if (v.any { it.toBoolean() }) {
171+
runtimeOnly k
172+
}
173+
}
174+
175+
compileOnly rfg.deobf('curse.maven:angry-pixel-the-betweenlands-mod-243363:4479688')
176+
if (project.debug_betweenlands.toBoolean()) {
177+
// TODO: allow development toggling of the coremod
178+
// until this is resolved, download and install the jar from
179+
// https://www.curseforge.com/minecraft/mc-mods/angry-pixel-the-betweenlands-mod/files/4479688
180+
// runtimeOnly rfg.deobf('curse.maven:angry-pixel-the-betweenlands-mod-243363:4479688')
154181
}
155182

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

181-
182-
if (project.debug_forestry.toBoolean()) {
183-
runtimeOnly rfg.deobf('curse.maven:jei-bees-248370:2490058')
184-
}
185-
186-
if (project.debug_immersive_petroleum.toBoolean()) {
187-
runtimeOnly rfg.deobf('curse.maven:just-enough-petroleum-291727:2549332')
188-
}
189-
190-
if (project.debug_pyrotech.toBoolean()) {
191-
runtimeOnly rfg.deobf("curse.maven:dropt-284973:3758733")
192-
}
193-
194208
compileOnly rfg.deobf('TechReborn:TechReborn-ModCompatibility-1.12.2:1.4.0.76:universal')
195209
if (project.debug_tech_reborn.toBoolean()) {
196210
runtimeOnly rfg.deobf('TechReborn:TechReborn-ModCompatibility-1.12.2:1.4.0.76:universal')
197211
}
198212

199-
runtimeOnly 'com.cleanroommc:strip-latest-forge-requirements:1.0'
200-
201213
}
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
2+
// Auto generated groovyscript example file
3+
// MODS_LOADED: thebetweenlands
4+
5+
log.info 'mod \'thebetweenlands\' detected, running script'
6+
7+
// Animator:
8+
// Converts an input item, Life amount from Life Crystals, and Fuel from Sulfur into an output itemstack, summoning an
9+
// entity, a random item from a loottable, or summoning an entity and outputting an itemstack.
10+
11+
mods.thebetweenlands.animator.removeByEntity(entity('thebetweenlands:sporeling'))
12+
mods.thebetweenlands.animator.removeByInput(item('thebetweenlands:bone_leggings'))
13+
mods.thebetweenlands.animator.removeByLootTable(resource('thebetweenlands:animator/scroll'))
14+
mods.thebetweenlands.animator.removeByOutput(item('thebetweenlands:items_misc:46'))
15+
// mods.thebetweenlands.animator.removeAll()
16+
17+
mods.thebetweenlands.animator.recipeBuilder()
18+
.input(item('minecraft:clay'))
19+
.output(item('minecraft:diamond'))
20+
.life(1)
21+
.fuel(1)
22+
.register()
23+
24+
mods.thebetweenlands.animator.recipeBuilder()
25+
.input(item('minecraft:gold_ingot'))
26+
.lootTable(resource('minecraft:entities/zombie'))
27+
.life(5)
28+
.fuel(1)
29+
.register()
30+
31+
mods.thebetweenlands.animator.recipeBuilder()
32+
.input(item('minecraft:gold_block'))
33+
.entity(entity('minecraft:zombie').getEntityClass())
34+
.life(1)
35+
.fuel(5)
36+
.register()
37+
38+
mods.thebetweenlands.animator.recipeBuilder()
39+
.input(item('minecraft:diamond'))
40+
.entity(entity('minecraft:enderman'))
41+
.output(item('minecraft:clay'))
42+
.life(3)
43+
.fuel(10)
44+
.register()
45+
46+
47+
// Compost:
48+
// Converts an input itemstack into an amount of compost.
49+
50+
mods.thebetweenlands.compost.removeByInput(item('thebetweenlands:items_misc:13'))
51+
// mods.thebetweenlands.compost.removeAll()
52+
53+
mods.thebetweenlands.compost.recipeBuilder()
54+
.input(item('minecraft:clay'))
55+
.amount(20)
56+
.time(30)
57+
.register()
58+
59+
mods.thebetweenlands.compost.recipeBuilder()
60+
.input(item('minecraft:gold_ingot'))
61+
.amount(1)
62+
.time(5)
63+
.register()
64+
65+
66+
// Crab Pot Filter Bubbler:
67+
// Converts an input item into an output itemstack when a Bubbler Crab is placed inside a Crab Pot Filter.
68+
69+
mods.thebetweenlands.crab_pot_filter_bubbler.removeByInput(item('thebetweenlands:silt'))
70+
mods.thebetweenlands.crab_pot_filter_bubbler.removeByOutput(item('thebetweenlands:swamp_dirt'))
71+
// mods.thebetweenlands.crab_pot_filter_bubbler.removeAll()
72+
73+
mods.thebetweenlands.crab_pot_filter_bubbler.recipeBuilder()
74+
.input(item('minecraft:clay'))
75+
.output(item('minecraft:diamond'))
76+
.register()
77+
78+
mods.thebetweenlands.crab_pot_filter_bubbler.recipeBuilder()
79+
.input(item('minecraft:gold_ingot'))
80+
.output(item('minecraft:clay'))
81+
.register()
82+
83+
84+
// Crab Pot Filter Silt:
85+
// Converts an input item into an output itemstack when a Silt Crab is placed inside a Crab Pot Filter.
86+
87+
mods.thebetweenlands.crab_pot_filter_silt.removeByInput(item('thebetweenlands:mud'))
88+
mods.thebetweenlands.crab_pot_filter_silt.removeByOutput(item('thebetweenlands:mud'))
89+
// mods.thebetweenlands.crab_pot_filter_silt.removeAll()
90+
91+
mods.thebetweenlands.crab_pot_filter_silt.recipeBuilder()
92+
.input(item('minecraft:clay'))
93+
.output(item('minecraft:diamond'))
94+
.register()
95+
96+
mods.thebetweenlands.crab_pot_filter_silt.recipeBuilder()
97+
.input(item('minecraft:gold_ingot'))
98+
.output(item('minecraft:clay'))
99+
.register()
100+
101+
102+
// Druid Altar:
103+
// Converts 4 input items into an output itemstack.
104+
105+
// mods.thebetweenlands.druid_altar.removeByInput(item('thebetweenlands:swamp_talisman:1'))
106+
mods.thebetweenlands.druid_altar.removeByOutput(item('thebetweenlands:swamp_talisman'))
107+
// mods.thebetweenlands.druid_altar.removeAll()
108+
109+
mods.thebetweenlands.druid_altar.recipeBuilder()
110+
.input(item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'))
111+
.output(item('minecraft:diamond'))
112+
.register()
113+
114+
mods.thebetweenlands.druid_altar.recipeBuilder()
115+
.input(item('minecraft:diamond'), item('minecraft:gold_block'), item('minecraft:gold_ingot'), item('minecraft:clay'))
116+
.output(item('minecraft:clay'))
117+
.register()
118+
119+
120+
// Pestle And Mortar:
121+
// Converts an input item into an output itemstack in a Pestle and Mortar by using a Pestle tool in the Mortar.
122+
123+
mods.thebetweenlands.pestle_and_mortar.removeByInput(item('thebetweenlands:limestone'))
124+
mods.thebetweenlands.pestle_and_mortar.removeByOutput(item('thebetweenlands:fish_bait'))
125+
// mods.thebetweenlands.pestle_and_mortar.removeAll()
126+
127+
mods.thebetweenlands.pestle_and_mortar.recipeBuilder()
128+
.input(item('minecraft:clay'))
129+
.output(item('minecraft:diamond'))
130+
.register()
131+
132+
mods.thebetweenlands.pestle_and_mortar.recipeBuilder()
133+
.input(item('minecraft:gold_ingot'))
134+
.output(item('minecraft:clay'))
135+
.register()
136+
137+
138+
// Purifier:
139+
// Converts an input item into an output itemstack, consuming Sulfur and Swamp Water as fuel.
140+
141+
mods.thebetweenlands.purifier.removeByInput(item('thebetweenlands:items_misc:64'))
142+
mods.thebetweenlands.purifier.removeByOutput(item('thebetweenlands:cragrock'))
143+
// mods.thebetweenlands.purifier.removeAll()
144+
145+
mods.thebetweenlands.purifier.recipeBuilder()
146+
.input(item('minecraft:clay'))
147+
.output(item('minecraft:diamond'))
148+
.register()
149+
150+
mods.thebetweenlands.purifier.recipeBuilder()
151+
.input(item('minecraft:gold_ingot'))
152+
.output(item('minecraft:clay'))
153+
.register()
154+
155+
156+
// Smoking Rack:
157+
// Converts an input item into an output itemstack over a configurable period of time, consuming Fallen Leaves to do so.
158+
159+
mods.thebetweenlands.smoking_rack.removeByInput(item('thebetweenlands:anadia'))
160+
mods.thebetweenlands.smoking_rack.removeByOutput(item('thebetweenlands:barnacle_smoked'))
161+
// mods.thebetweenlands.smoking_rack.removeAll()
162+
163+
mods.thebetweenlands.smoking_rack.recipeBuilder()
164+
.input(item('minecraft:clay'))
165+
.output(item('minecraft:diamond'))
166+
.register()
167+
168+
mods.thebetweenlands.smoking_rack.recipeBuilder()
169+
.input(item('minecraft:gold_ingot'))
170+
.output(item('minecraft:clay'))
171+
.time(50)
172+
.register()
173+
174+
175+
// Steeping Pot:
176+
// 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
177+
// Silk Bundle placed inside the Steeping Pot to do so. The Silk Bundle is converted into a Dirty Silk Bundle in the
178+
// process. The Silk Bundle can only hold specific items, which are also configurable.
179+
180+
mods.thebetweenlands.steeping_pot.removeAcceptedItem(item('thebetweenlands:items_crushed:5'))
181+
mods.thebetweenlands.steeping_pot.removeByInput(fluid('clean_water'))
182+
mods.thebetweenlands.steeping_pot.removeByInput(item('thebetweenlands:items_crushed:13'))
183+
mods.thebetweenlands.steeping_pot.removeByOutput(fluid('dye_fluid').withNbt(['type': 14]))
184+
// mods.thebetweenlands.steeping_pot.removeByOutput(item('thebetweenlands:limestone'))
185+
// mods.thebetweenlands.steeping_pot.removeAll()
186+
// mods.thebetweenlands.steeping_pot.removeAllAcceptedItem()
187+
188+
mods.thebetweenlands.steeping_pot.recipeBuilder()
189+
.input(item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'))
190+
.fluidInput(fluid('lava'))
191+
.fluidOutput(fluid('water'))
192+
.register()
193+
194+
mods.thebetweenlands.steeping_pot.recipeBuilder()
195+
.input(item('minecraft:diamond'))
196+
.fluidInput(fluid('lava'))
197+
.fluidOutput(fluid('dye_fluid'))
198+
.meta(5)
199+
.register()
200+
201+
mods.thebetweenlands.steeping_pot.recipeBuilder()
202+
.input(item('minecraft:emerald'))
203+
.fluidInput(fluid('lava'))
204+
.fluidOutput(fluid('water'))
205+
.register()
206+
207+
208+
mods.thebetweenlands.steeping_pot.addAcceptedItem(item('minecraft:gold_block'))
209+

gradle.properties

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ debug_generate_wiki = false
99
debug_generate_and_crash = false
1010
debug_disable_cache = false
1111

12+
debug_actually_advanced_info = false
13+
debug_mouse_tweaks_unofficial = false
14+
debug_roughly_enough_ids = false
15+
debug_universal_tweaks = false
16+
debug_vintagefix = false
17+
1218
# END SECTION: development environment settings
1319

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

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

206213

207214
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.cleanroommc.groovyscript.api;
2+
3+
import java.util.List;
4+
5+
/**
6+
* Indicates that the IIngredient represents one or more oredicts.
7+
*/
8+
public interface IOreDicts extends IIngredient {
9+
// TODO
10+
// There are a large number of places currently in the GroovyScript codebase
11+
// that check if something is "instanceof OreDictIngredient".
12+
// these should be replaced by checks against IOreDicts,
13+
// and surrounding code changed appropriately.
14+
15+
/**
16+
* @return a list of oredict strings
17+
*/
18+
List<String> getOreDicts();
19+
}

src/main/java/com/cleanroommc/groovyscript/compat/mods/ModSupport.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import com.cleanroommc.groovyscript.compat.mods.atum.Atum;
1717
import com.cleanroommc.groovyscript.compat.mods.avaritia.Avaritia;
1818
import com.cleanroommc.groovyscript.compat.mods.betterwithmods.BetterWithMods;
19+
import com.cleanroommc.groovyscript.compat.mods.betweenlands.Betweenlands;
1920
import com.cleanroommc.groovyscript.compat.mods.bloodarsenal.BloodArsenal;
2021
import com.cleanroommc.groovyscript.compat.mods.bloodmagic.BloodMagic;
2122
import com.cleanroommc.groovyscript.compat.mods.botania.Botania;
@@ -98,6 +99,7 @@ public class ModSupport {
9899
public static final GroovyContainer<Atum> ATUM = new InternalModContainer<>("atum", "Atum 2", Atum::new);
99100
public static final GroovyContainer<Avaritia> AVARITIA = new InternalModContainer<>("avaritia", "Avaritia", Avaritia::new);
100101
public static final GroovyContainer<BetterWithMods> BETTER_WITH_MODS = new InternalModContainer<>("betterwithmods", "Better With Mods", BetterWithMods::new);
102+
public static final GroovyContainer<Betweenlands> BETWEENLANDS = new InternalModContainer<>("thebetweenlands", "The Betweenlands", Betweenlands::new, "betweenlands");
101103
public static final GroovyContainer<BloodArsenal> BLOOD_ARSENAL = new InternalModContainer<>("bloodarsenal", "Blood Arsenal", BloodArsenal::new);
102104
public static final GroovyContainer<BloodMagic> BLOOD_MAGIC = new InternalModContainer<>("bloodmagic", "Blood Magic: Alchemical Wizardry", BloodMagic::new, "bm");
103105
public static final GroovyContainer<Botania> BOTANIA = new InternalModContainer<>("botania", "Botania", Botania::new);

0 commit comments

Comments
 (0)