Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into 174
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/net/prominic/groovyls/compiler/util/GroovyASTUtils.java
  • Loading branch information
brachy84 committed Jun 16, 2024
2 parents 7dc7602 + c4b572f commit a5d8304
Show file tree
Hide file tree
Showing 316 changed files with 5,103 additions and 2,530 deletions.
20 changes: 18 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ final def mod_dependencies = [
'aether-255308:3280119' : [project.debug_aether],
'alchemistry-293425:3186612' : [project.debug_alchemistry],
'alchemylib-293426:2761706' : [project.debug_alchemistry],
'shadowfacts-forgelin-248453:2785465' : [project.debug_alchemistry],
'ae2-extended-life-570458:4553942' : [project.debug_applied_energistics_2],
'shadowfacts-forgelin-248453:2785465' : [project.debug_alchemistry, project.debug_industrial_foregoing],
'ae2-extended-life-570458:4553942' : [project.debug_applied_energistics_2, project.debug_lazy_ae2],
'arcane-archives-311357:3057332' : [project.debug_arcane_archives],
'guidebook-253874:2989594' : [project.debug_arcane_archives],
'mystical_lib-277064:3483816' : [project.debug_arcane_archives, project.debug_roots],
Expand Down Expand Up @@ -63,10 +63,14 @@ final def mod_dependencies = [
// WARNING: experimental must be placed before classic, otherwise you will crash when debugging either. Check FluidGenerator compat to confirm
'industrialcraft_experimental-242638:3838713' : [project.debug_industrial_craft_2_experimental],
'industrialcraft_classic-242942:3093607' : [project.debug_industrial_craft_2_classic],
'tesla-core-lib-254602:3438487' : [project.debug_industrial_foregoing],
'industrialforegoing-266515:2745321' : [project.debug_industrial_foregoing],
'inspirations-284007:2843007' : [project.debug_inspirations],
'mantle-74924:2713386' : [project.debug_inspirations, project.debug_tinkers],
'common-capabilities-247007:3053017' : [project.debug_integrated_dynamics],
'integrated-dynamics-236307:3159505' : [project.debug_integrated_dynamics],
'lazy-ae2-322347:3254160' : [project.debug_lazy_ae2],
'libnine-322344:3509087' : [project.debug_lazy_ae2],
'mekanism-268560:2835175' : [project.debug_mekanism],
'natures-aura-306626:2882138' : [project.debug_natures_aura],
'packmode-278398:2567799' : [project.debug_packmode],
Expand Down Expand Up @@ -143,4 +147,16 @@ minecraft {
if (project.debug_run_ls.toBoolean()) {
extraRunJvmArguments.add('-Dgroovyscript.run_ls=true')
}
if (project.debug_generate_examples.toBoolean()) {
extraRunJvmArguments.add('-Dgroovyscript.generate_examples=true')
}
if (project.debug_generate_wiki.toBoolean()) {
extraRunJvmArguments.add('-Dgroovyscript.generate_wiki=true')
}
if (project.debug_generate_and_crash.toBoolean()) {
extraRunJvmArguments.add('-Dgroovyscript.generate_and_crash=true')
}
if (project.debug_log_missing_lang_keys.toBoolean()) {
extraRunJvmArguments.add('-Dgroovyscript.log_missing_lang_keys=true')
}
}
10 changes: 9 additions & 1 deletion examples/postInit/immersiveengineering.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ mods.immersiveengineering.coke_oven.recipeBuilder()


// Crusher:
// Converts an input itemstack into an output itemstack, consuming energy.
// Converts an input itemstack into an output itemstack with optional additional chanced item outputs, consuming energy.

mods.immersiveengineering.crusher.removeByInput(item('immersiveengineering:material:7'))
mods.immersiveengineering.crusher.removeByOutput(item('minecraft:sand'))
Expand All @@ -128,6 +128,14 @@ mods.immersiveengineering.crusher.recipeBuilder()
.energy(100)
.register()

mods.immersiveengineering.crusher.recipeBuilder()
.input(item('minecraft:diamond_block'))
.output(item('minecraft:diamond'))
.secondaryOutput(item('minecraft:gold_ingot'))
.secondaryOutput(item('minecraft:gold_ingot'), 0.3)
.energy(100)
.register()



// Excavator:
Expand Down
118 changes: 118 additions & 0 deletions examples/postInit/industrialforegoing.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@

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

import net.minecraft.potion.PotionEffect

println 'mod \'industrialforegoing\' detected, running script'

// Bioreactor:
// Converts an input item into Biofuel, with the amount of Biofuel generated being based on the number of concurrent
// conversion processes inside the Bioreactor.

mods.industrialforegoing.bio_reactor.removeByInput(item('minecraft:wheat_seeds'))
// mods.industrialforegoing.bio_reactor.removeAll()

mods.industrialforegoing.bio_reactor.add(item('minecraft:clay'))

// Latex Extractor:
// Converts an input block in-world into a fluidstack over time, eventually breaking the block.

mods.industrialforegoing.extractor.removeByInput(item('minecraft:log2:1'))
// mods.industrialforegoing.extractor.removeByOutput(fluid('latex'))
// mods.industrialforegoing.extractor.removeAll()

mods.industrialforegoing.extractor.add(item('minecraft:clay'), fluid('lava') * 50)
mods.industrialforegoing.extractor.add(item('minecraft:stone'), fluid('water') * 100, 1)

// Fluid Dictionary Converter:
// Converts one fluid into another fluid at a given ratio.

// mods.industrialforegoing.fluid_dictionary.removeByInput(fluid('essence'))
// mods.industrialforegoing.fluid_dictionary.removeByOutput(fluid(essence'))
// mods.industrialforegoing.fluid_dictionary.removeAll()

mods.industrialforegoing.fluid_dictionary.add(fluid('biofuel'), fluid('latex'),)
mods.industrialforegoing.fluid_dictionary.add(fluid('latex'), fluid('biofuel'),)
mods.industrialforegoing.fluid_dictionary.add(fluid('essence'), fluid('latex'), 2)
mods.industrialforegoing.fluid_dictionary.add(fluid('latex'), fluid('essence'), 0.5)

// Laser Drill:
// Converts power into ores, with a given weight, between a minimum and maximum Y value, in any whitelisted biome or not in
// any blacklisted biome, and with a specific color of laser lens impacting the probability.

mods.industrialforegoing.laser_drill.removeByBlacklist(biome('minecraft:sky'))
mods.industrialforegoing.laser_drill.removeByLens(5)
// mods.industrialforegoing.laser_drill.removeByLens(item('industrialforegoing:laser_lens:5'))
mods.industrialforegoing.laser_drill.removeByOutput(item('minecraft:coal_ore'))
mods.industrialforegoing.laser_drill.removeByWhitelist(biome('minecraft:hell'))
// mods.industrialforegoing.laser_drill.removeAll()

mods.industrialforegoing.laser_drill.recipeBuilder()
.output(item('minecraft:clay'))
.lensMeta(5)
.weight(100)
.register()


// Fermentation Station:
// Converts an input fluidstack into an output fluidstack.

mods.industrialforegoing.ore_fermenter.removeByInput(fluid('if.ore_fluid_raw').withNbt([Ore: 'oreRedstone']))
// mods.industrialforegoing.ore_fermenter.removeByOutput(fluid('if.ore_fluid_fermented').withNbt([Ore: 'oreRedstone']))
// mods.industrialforegoing.ore_fermenter.removeAll()

mods.industrialforegoing.ore_fermenter.add(fluid('if.ore_fluid_raw').withNbt(['Ore': 'oreGold']), fluid('if.ore_fluid_fermented').withNbt(['Ore': 'oreGold']) * 2)

// Washing Factory:
// Converts an input itemstack and input fluidstack into an output fluidstack.

// mods.industrialforegoing.ore_raw.removeByInput(fluid('meat'))
mods.industrialforegoing.ore_raw.removeByOre(ore('oreRedstone'))
// mods.industrialforegoing.ore_raw.removeByOre('oreRedstone')
// mods.industrialforegoing.ore_raw.removeByOutput(fluid('if.ore_fluid_raw').withNbt(['Ore': 'oreRedstone']),)
// mods.industrialforegoing.ore_raw.removeAll()

mods.industrialforegoing.ore_raw.add(ore('stone'), fluid('water') * 1000, fluid('lava') * 50)
mods.industrialforegoing.ore_raw.add(ore('oreGold'), fluid('meat') * 200, fluid('if.ore_fluid_raw').withNbt(['Ore': 'oreGold']) * 300)

// Fluid Sieving Machine:
// Converts an input itemstack and input fluidstack into an output itemstack.

mods.industrialforegoing.ore_sieve.removeByInput(fluid('if.pink_slime'))
mods.industrialforegoing.ore_sieve.removeByInput(item('minecraft:sand'))
// mods.industrialforegoing.ore_sieve.removeByOutput(item('industrialforegoing:pink_slime_ingot)
// mods.industrialforegoing.ore_sieve.removeAll()

mods.industrialforegoing.ore_sieve.add(fluid('lava') * 5, item('minecraft:gold_ingot'), item('minecraft:clay'))
mods.industrialforegoing.ore_sieve.add(fluid('if.ore_fluid_fermented').withNbt(['Ore': 'oreGold']) * 100, item('minecraft:nether_star') * 2, item('minecraft:clay'))

// Protein Reactor:
// Converts an input item into Protein, with the amount of Protein generated being based on the number of concurrent
// conversion processes inside the Protein Reactor.

mods.industrialforegoing.protein_reactor.removeByInput(item('minecraft:porkchop'))
// mods.industrialforegoing.protein_reactor.removeAll()

mods.industrialforegoing.protein_reactor.add(item('minecraft:clay'))

// Sludge Refiner:
// Converts 1000mb of Sludge into a random itemstack based on the weight of the given itemstack.

mods.industrialforegoing.sludge_refiner.removeByOutput(item('minecraft:clay_ball'))
// mods.industrialforegoing.sludge_refiner.removeAll()

mods.industrialforegoing.sludge_refiner.add(item('minecraft:gold_ingot'), 5)

// Straw:
// Converts an fluid block in-world into various effects for the player when consumed via a straw.

// mods.industrialforegoing.straw.removeAll()

mods.industrialforegoing.straw.recipeBuilder()
.fluidInput(fluid('if.pink_slime'))
.effect(new PotionEffect(potion('minecraft:strength'), 1800, 3))
.register()



12 changes: 6 additions & 6 deletions examples/postInit/mekanism.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ println 'mod \'mekanism\' detected, running script'
// Add new infusion types and itemstacks to those types.

mods.mekanism.infusion.remove(ore('dustDiamond'))
mods.mekanism.infusion.removeByType(infusion('carbon'))
// mods.mekanism.infusion.removeByType(infusion('diamond'))
mods.mekanism.infusion.removeByType(infusionType('carbon'))
// mods.mekanism.infusion.removeByType(infusionType('diamond'))
// mods.mekanism.infusion.removeAll()

mods.mekanism.infusion.addType('groovy_example', resource('placeholdername:blocks/mekanism_infusion_texture'))
mods.mekanism.infusion.add(infusion('diamond'), 100, item('minecraft:clay'))
mods.mekanism.infusion.add(infusion('carbon'), 100, item('minecraft:gold_ingot'))
mods.mekanism.infusion.add(infusionType('diamond'), 100, item('minecraft:clay'))
mods.mekanism.infusion.add(infusionType('carbon'), 100, item('minecraft:gold_ingot'))
mods.mekanism.infusion.add('groovy_example', 10, item('minecraft:ice'))
mods.mekanism.infusion.add('groovy_example', 20, item('minecraft:packed_ice'))

Expand Down Expand Up @@ -155,13 +155,13 @@ mods.mekanism.metallurgic_infuser.removeByInput(ore('dustObsidian'), 'DIAMOND')

mods.mekanism.metallurgic_infuser.recipeBuilder()
.input(item('minecraft:nether_star'))
.infuse(infusion('groovy_example'))
.infuse(infusionType('groovy_example'))
.amount(50)
.output(item('minecraft:clay'))
.register()


// mods.mekanism.metallurgic_infuser.add(item('minecraft:nether_star'), infusion('groovy_example'), 50, item('minecraft:clay'))
// mods.mekanism.metallurgic_infuser.add(item('minecraft:nether_star'), infusionType('groovy_example'), 50, item('minecraft:clay'))

// Osmium Compressor:
// Converts an input itemstack and 200 of a gasstack into an output itemstack. By default, will use Liquid Osmium as the
Expand Down
1 change: 1 addition & 0 deletions examples/postInit/pyrotech.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ mods.pyrotech.soaking_pot.recipeBuilder()
.time(400)
.campfireRequired(true)
.name('diamond_to_emerald_with_amongium_soaking_pot')
.register()


mods.pyrotech.soaking_pot.add('dirt_to_apple', item('minecraft:dirt'), fluid('water'), item('minecraft:apple'), 1200)
Expand Down
14 changes: 7 additions & 7 deletions examples/postInit/thermalexpansion.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -108,35 +108,35 @@ mods.thermalexpansion.charger.recipeBuilder()
// Converts an input itemstack into an output itemstack, with different modes each requiring a different augment to be
// installed, costing power and taking time based on the power cost.

mods.thermalexpansion.compactor.removeByInput(mode('coin'), item('thermalfoundation:material:130'))
mods.thermalexpansion.compactor.removeByInput(compactorMode('coin'), item('thermalfoundation:material:130'))
mods.thermalexpansion.compactor.removeByInput(item('minecraft:iron_ingot'))
// mods.thermalexpansion.compactor.removeByMode(mode('plate'))
mods.thermalexpansion.compactor.removeByOutput(mode('coin'), item('thermalfoundation:coin:102'))
// mods.thermalexpansion.compactor.removeByMode(compactorMode('plate'))
mods.thermalexpansion.compactor.removeByOutput(compactorMode('coin'), item('thermalfoundation:coin:102'))
mods.thermalexpansion.compactor.removeByOutput(item('minecraft:blaze_rod'))
mods.thermalexpansion.compactor.removeByOutput(item('thermalfoundation:material:24'))
// mods.thermalexpansion.compactor.removeAll()

mods.thermalexpansion.compactor.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond') * 2)
.mode(mode('coin'))
.mode(compactorMode('coin'))
.register()

mods.thermalexpansion.compactor.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.mode(mode('all'))
.mode(compactorMode('all'))
.register()

mods.thermalexpansion.compactor.recipeBuilder()
.input(item('minecraft:diamond') * 2)
.output(item('minecraft:gold_ingot'))
.mode(mode('plate'))
.mode(compactorMode('plate'))
.energy(1000)
.register()


// mods.thermalexpansion.compactor.add(1000, mode('plate'), item('minecraft:obsidian') * 2, item('minecraft:gold_ingot'))
// mods.thermalexpansion.compactor.add(1000, compactorMode('plate'), item('minecraft:obsidian') * 2, item('minecraft:gold_ingot'))

// Compression Dynamo:
// Converts an input fluidstack into power, taking time based on the power.
Expand Down
82 changes: 82 additions & 0 deletions examples/postInit/threng.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

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

println 'mod \'threng\' detected, running script'

// Fluix Aggregation:
// Converts up to 3 input itemstacks into an output itemstack.

mods.threng.aggregator.removeByInput(item('appliedenergistics2:material:45'))
mods.threng.aggregator.removeByOutput(item('appliedenergistics2:material:7'))
// mods.threng.aggregator.removeAll()

mods.threng.aggregator.recipeBuilder()
.input(ore('blockGlass'), item('minecraft:diamond'))
.output(item('minecraft:diamond') * 4)
.register()

mods.threng.aggregator.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:diamond'))
.register()


// Pulse Centrifuge:
// Converts 1 input itemstack into an output itemstack.

mods.threng.centrifuge.removeByInput(item('appliedenergistics2:material'))
mods.threng.centrifuge.removeByOutput(item('appliedenergistics2:material:4'))
// mods.threng.centrifuge.removeAll()

mods.threng.centrifuge.recipeBuilder()
.input(ore('blockGlass'))
.output(item('minecraft:diamond'))
.register()

mods.threng.centrifuge.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:diamond'))
.register()


// Crystal Energization:
// Converts 1 input itemstack into an output itemstack, consuming a set amount of energy.

// mods.threng.energizer.removeByInput(item('appliedenergistics2:material'))
mods.threng.energizer.removeByOutput(item('appliedenergistics2:material:1'))
// mods.threng.energizer.removeAll()

mods.threng.energizer.recipeBuilder()
.input(ore('blockGlass'))
.energy(50)
.output(item('minecraft:diamond'))
.register()

mods.threng.energizer.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.energy(10000)
.output(item('minecraft:diamond'))
.register()


// ME Circuit Etching:
// Converts up to 3 input itemstacks from specific slots into an output itemstack.

mods.threng.etcher.removeByInput(item('minecraft:diamond'))
mods.threng.etcher.removeByOutput(item('appliedenergistics2:material:22'))
// mods.threng.etcher.removeAll()

mods.threng.etcher.recipeBuilder()
.input(ore('blockGlass'))
.top(item('minecraft:diamond'))
.bottom(item('minecraft:clay'))
.output(item('minecraft:diamond') * 5)
.register()

mods.threng.etcher.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:diamond'))
.register()


Loading

0 comments on commit a5d8304

Please sign in to comment.