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 ProdigyTech compatibility #173

Merged
merged 21 commits into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9bcfb77
Made Prodigy Tech compilable, added Solderer
Wizzerinus Jun 6, 2024
06dc275
solderer: separated Pattern from Input
Wizzerinus Jun 6, 2024
e57f99d
prodigytech: added Zorra Altar integration
Wizzerinus Jun 6, 2024
108b062
prodigytech: added the simple machines
Wizzerinus Jun 6, 2024
59ae567
prodigytech: added primordialis reactor
Wizzerinus Jun 6, 2024
8943018
prodigytech: added atomic reshaper
Wizzerinus Jun 6, 2024
316a31c
zorra altar: better way to create custom items
Wizzerinus Jun 6, 2024
31b58a4
prodigytech: added explosion furnace
Wizzerinus Jun 6, 2024
4212f96
prodigytech: add example localization
Wizzerinus Jun 6, 2024
07373e0
prodigytech: pull request fixes
Wizzerinus Jun 7, 2024
30f4d37
prodigytech: set proper @Property annotations
Wizzerinus Jun 7, 2024
b5b2d4c
prodigytech: pr fixes (2)
Wizzerinus Jun 7, 2024
a7b4a92
prodigytech: restore debug variables to false
Wizzerinus Jun 7, 2024
6b5929d
prodigytech: code cleanup
Wizzerinus Jun 7, 2024
0ee4d0e
prodigytech: pr fixes (3)
Wizzerinus Jun 8, 2024
ec93b1b
prodigytech: made adjustments that made sense
Wizzerinus Jul 3, 2024
38c65f2
prodigytech: change to 'greater than 0' wording
Wizzerinus Jul 4, 2024
ae5bd5e
prodigytech: somewhat improved EFAdditives code
Wizzerinus Jul 4, 2024
5958438
prodigytech: made SimpleRecipeHandlers public
Wizzerinus Jul 4, 2024
a2bd649
prodigytech: convert Explosive/Dampener into records
Wizzerinus Jul 4, 2024
c1e6f73
Merge branch 'master' into compat/prodigytech
Wizzerinus Jul 5, 2024
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
3 changes: 2 additions & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ final def mod_dependencies = [
'athenaeum-284350:4633750' : [project.debug_pyrotech],
'pyrotech-306676:4956838' : [project.debug_pyrotech],
'mystical_world-282940:3460961' : [project.debug_roots],
'patchouli-306770:3162874' : [project.debug_roots, project.debug_natures_aura],
'patchouli-306770:3162874' : [project.debug_roots, project.debug_natures_aura, project.debug_prodigytech],
'prodigytech-297414:2769520' : [project.debug_prodigytech],
'roots-246183:3905074' : [project.debug_roots],
'rustic-256141:3107974' : [project.debug_rustic],
'thaumcraft-223628:2629023' : [project.debug_thaum],
Expand Down
13 changes: 13 additions & 0 deletions examples/assets/placeholdername/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@ itemGroup.groovyscript.example_creative_tab=GroovyScript Creative Tab
item.placeholdername.heartofauniverse.name=Heart of the Universe
item.placeholdername.clay_2.name=If clay is so good...
item.placeholdername.clay_3.name=Enchanted Clay
item.placeholdername.prodigy_stick.name=Prodigy Stick
item.placeholdername.snack.name=Snack
tile.placeholdername.generic_block.name=Generic Block
tile.placeholdername.dragon_egg_lamp.name=Dragon Egg Lamp

fluid.placeholdername.amongium=Amongium

# For the prodigy tech example
enchantment.level.11=XI
enchantment.level.12=XII
enchantment.level.13=XIII
enchantment.level.14=XIV
enchantment.level.15=XV
enchantment.level.16=XVI
enchantment.level.17=XVII
enchantment.level.18=XVIII
enchantment.level.19=XIX
enchantment.level.20=XX
brachy84 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "placeholdername:items/prodigy_stick"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
195 changes: 195 additions & 0 deletions examples/postInit/prodigytech.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@

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

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

// Atomic Reshaper:
// Uses Hot Air and Primordium to convert items. Can have a weighted random based output.

mods.prodigytech.atomic_reshaper.removeByInput(ore('paper'))
// mods.prodigytech.atomic_reshaper.removeAll()

mods.prodigytech.atomic_reshaper.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:emerald_block'))
.primordium(10)
.time(50)
.register()

mods.prodigytech.atomic_reshaper.recipeBuilder()
.input(item('minecraft:gold_block'))
.output(item('minecraft:diamond_block'), 10)
.output(item('minecraft:carrot'), 3)
.primordium(7)
.register()


// Explosion Furnace:
// Uses an explosive, a dampener, and an optional reagent to convert items. The power value of all recipes, all explosives,
// and all dampeners should be close to avoid an efficiency loss.

// mods.prodigytech.explosion_furnace.removeAll()
mods.prodigytech.explosion_furnace.removeByOutput(item('prodigytech:ferramic_ingot'))

mods.prodigytech.explosion_furnace.recipeBuilder()
.input(ore('ingotGold'), item('minecraft:diamond'))
.craftPerReagent(8)
.power(160)
.output(item('minecraft:emerald_block'))
.register()

mods.prodigytech.explosion_furnace.recipeBuilder()
.input(item('minecraft:stone'))
.power(160)
.output(item('minecraft:glowstone'))
.register()


// Explosion Furnace Additives:
// Turn an item into an explosive or into a dampener when inserted into the Explosion Furnace.

// mods.prodigytech.explosion_furnace_additives.removeAllDampeners()
// mods.prodigytech.explosion_furnace_additives.removeAllExplosives()
mods.prodigytech.explosion_furnace_additives.removeDampener(ore('dustAsh'))
mods.prodigytech.explosion_furnace_additives.removeExplosive(ore('gunpowder'))

mods.prodigytech.explosion_furnace_additives.addDampener(item('minecraft:stone'), 50)
mods.prodigytech.explosion_furnace_additives.addExplosive(item('minecraft:cobblestone'), 50)

// Heat Sawmill:
// Wood processing machine with 1 input, 2 outputs and an optional chance for the 2nd output.

mods.prodigytech.heat_sawmill.removeByInput(ore('plankWood'))
// mods.prodigytech.heat_sawmill.removeAll()

mods.prodigytech.heat_sawmill.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:diamond'))
.time(50)
.register()

mods.prodigytech.heat_sawmill.recipeBuilder()
.input(item('minecraft:iron_ingot'))
.output(item('minecraft:coal'))
.register()

mods.prodigytech.heat_sawmill.recipeBuilder()
.input(item('minecraft:iron_block'))
.output(item('minecraft:emerald'), item('minecraft:clay'))
.register()

mods.prodigytech.heat_sawmill.recipeBuilder()
.input(item('minecraft:gold_block'))
.output(item('minecraft:emerald'), item('minecraft:nether_star'))
.secondaryChance(0.25)
.time(50)
.register()


// Magnetic Reassembler:
// A simple 1 to 1 processing machine for dusts.

mods.prodigytech.magnetic_reassembler.removeByInput(item('minecraft:gravel'))
// mods.prodigytech.magnetic_reassembler.removeAll()

mods.prodigytech.magnetic_reassembler.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:diamond'))
.time(50)
.register()

mods.prodigytech.magnetic_reassembler.recipeBuilder()
.input(item('minecraft:iron_ingot'))
.output(item('minecraft:coal'))
.register()


// Ore Refinery:
// Ore processing machine with 1 input, 2 outputs and an optional chance for the 2nd output.

mods.prodigytech.ore_refinery.removeByInput(ore('oreLapis'))
// mods.prodigytech.ore_refinery.removeAll()

mods.prodigytech.ore_refinery.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:diamond'))
.time(50)
.register()

mods.prodigytech.ore_refinery.recipeBuilder()
.input(item('minecraft:iron_ingot'))
.output(item('minecraft:coal'))
.register()

mods.prodigytech.ore_refinery.recipeBuilder()
.input(item('minecraft:iron_block'))
.output(item('minecraft:emerald'), item('minecraft:clay'))
.register()

mods.prodigytech.ore_refinery.recipeBuilder()
.input(item('minecraft:gold_block'))
.output(item('minecraft:emerald'), item('minecraft:nether_star'))
.secondaryChance(0.25)
.time(50)
.register()


// Primordialis Reactor:
// Turns organic matter into Primordium.

mods.prodigytech.primordialis_reactor.remove(ore('sugarcane'))
// mods.prodigytech.primordialis_reactor.removeAll()

mods.prodigytech.primordialis_reactor.add(item('minecraft:diamond'))

// Rotary Grinder:
// A simple 1 to 1 processing machine making dusts.

mods.prodigytech.rotary_grinder.removeByInput(item('minecraft:gravel'))
// mods.prodigytech.rotary_grinder.removeAll()

mods.prodigytech.rotary_grinder.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:diamond'))
.time(50)
.register()

mods.prodigytech.rotary_grinder.recipeBuilder()
.input(item('minecraft:iron_ingot'))
.output(item('minecraft:coal'))
.register()


// Solderer:
// Performs recipes using Gold Dust, has a recipe catalyst, and uses up Circuit Boards and an optional extra input for each
// recipe.

mods.prodigytech.solderer.removeByAdditive(item('minecraft:iron_ingot'))
mods.prodigytech.solderer.removeByOutput(item('prodigytech:circuit_refined'))
mods.prodigytech.solderer.removeByPattern(item('prodigytech:pattern_circuit_refined'))
// mods.prodigytech.solderer.removeAll()
// mods.prodigytech.solderer.removeWithoutAdditive()

mods.prodigytech.solderer.recipeBuilder()
.pattern(item('minecraft:clay'))
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:diamond'))
.gold(5)
.time(100)
.register()

mods.prodigytech.solderer.recipeBuilder()
.pattern(item('minecraft:coal_block'))
.output(item('minecraft:nether_star'))
.gold(75)
.register()


// Zorra Altar:
// Allows over-enchanting Zorrasteel equipment.

mods.prodigytech.zorra_altar.addEnchantment('sword', enchantment('minecraft:power'), 10)
mods.prodigytech.zorra_altar.addEnchantment('stick', enchantment('minecraft:knockback'), 20)
mods.prodigytech.zorra_altar.removeEnchantment('sword', enchantment('minecraft:sharpness'))

21 changes: 21 additions & 0 deletions examples/preInit/prodigytech.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// MODS_LOADED: prodigytech

import lykrast.prodigytech.common.item.IZorrasteelEquipment
import lykrast.prodigytech.common.recipe.ZorraAltarManager

if (!isLoaded('prodigytech')) return
println 'mod \'prodigytech\' detected, running script'

// Create an item at the location 'placeholdername:prodigy_stick' enchantable in the Zorra Altar
// Note: due to the PT's implementation it is difficult to make other mod's items enchantable
// This merely registers the item, the post-init script adds the specific enchantments
class ProdigyStick extends Item implements IZorrasteelEquipment {
static registry = mods.prodigytech.zorra_altar.createRegistry('stick')

ZorraAltarManager getManager() {
return registry
}
}

content.registerItem('prodigy_stick', new ProdigyStick())

1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ debug_integrated_dynamics = false
debug_mekanism = false
debug_natures_aura = false
debug_packmode = false
debug_prodigytech = false
debug_pyrotech = false
debug_roots = false
debug_rustic = false
Expand Down
Empty file modified gradlew
100644 → 100755
Wizzerinus marked this conversation as resolved.
Show resolved Hide resolved
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.cleanroommc.groovyscript.compat.mods.jei.JustEnoughItems;
import com.cleanroommc.groovyscript.compat.mods.mekanism.Mekanism;
import com.cleanroommc.groovyscript.compat.mods.naturesaura.NaturesAura;
import com.cleanroommc.groovyscript.compat.mods.prodigytech.ProdigyTech;
import com.cleanroommc.groovyscript.compat.mods.pyrotech.PyroTech;
import com.cleanroommc.groovyscript.compat.mods.roots.Roots;
import com.cleanroommc.groovyscript.compat.mods.rustic.Rustic;
Expand Down Expand Up @@ -86,6 +87,7 @@ public class ModSupport implements IDynamicGroovyProperty {
public static final GroovyContainer<JustEnoughItems> JEI = new InternalModContainer<>("jei", "Just Enough Items", JustEnoughItems::new, "hei");
public static final GroovyContainer<Mekanism> MEKANISM = new InternalModContainer<>("mekanism", "Mekanism", Mekanism::new);
public static final GroovyContainer<NaturesAura> NATURES_AURA = new InternalModContainer<>("naturesaura", "Nature's Aura", NaturesAura::new);
public static final GroovyContainer<ProdigyTech> PRODIGY_TECH = new InternalModContainer<>("prodigytech", "Prodigy Tech", ProdigyTech::new);
public static final GroovyContainer<PyroTech> PYROTECH = new InternalModContainer<>("pyrotech", "Pyrotech", PyroTech::new);
public static final GroovyContainer<Roots> ROOTS = new InternalModContainer<>("roots", "Roots 3", Roots::new);
public static final GroovyContainer<Rustic> RUSTIC = new InternalModContainer<>("rustic", "Rustic", Rustic::new);
Expand Down
Loading