Skip to content

Commit

Permalink
Add (partial?) Advanced Rocketry compatibility (#189)
Browse files Browse the repository at this point in the history
* advanced rocketry: machines compat v1

still a lot to be desired.

* advanced rocketry: polishing, documentation, etc

* advanced rocketry: all PR fixes except for piston

* advanced rocketry: added small plate presser

* Docs: recursively select annotations from subclasses

* Advanced Rocketry: PR adjustments

* Docs: update @Property javadoc/comments

* Rocketry: PR fixes

* Rocketry: remove BaseMultiblockRegistry

* replaced Collectors.toList() with Arrays.asList() where applicable
  • Loading branch information
Wizzerinus committed Aug 31, 2024
1 parent 8f1bfba commit 9705f37
Show file tree
Hide file tree
Showing 25 changed files with 1,110 additions and 10 deletions.
5 changes: 5 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
final def mod_dependencies = [
'actually-additions-228404:3117927' : [project.debug_actually_additions],
'advancedmortars-283777:2780626' : [project.debug_adv_mortars],
'advanced-rocketry-236542:4671856' : [project.debug_advanced_rocketry],
'advanced-rocketry-2-1024225:5486514' : [project.debug_advanced_rocketry_2],
// libAR is equivalent to libvulpes
'libvulpes-236541:3801015' : [project.debug_advanced_rocketry],
'library-for-ar-reworked-1038780:5446535' : [project.debug_advanced_rocketry_2],
'aether-255308:3280119' : [project.debug_aether],
'alchemistry-293425:3186612' : [project.debug_alchemistry],
'alchemylib-293426:2761706' : [project.debug_alchemistry],
Expand Down
173 changes: 173 additions & 0 deletions examples/postInit/advancedrocketry.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@

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

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

// Centrifuge:
// Converts an input fluid into up to 12 output items and up to 4 output fluids, consuming RF

// mods.advancedrocketry.centrifuge.removeAll()
mods.advancedrocketry.centrifuge.removeByInput(fluid('enrichedlava'))

mods.advancedrocketry.centrifuge.recipeBuilder()
.fluidInput(fluid('lava') * 500)
.output(item('minecraft:slime_ball'), 0.1f)
.output(item('minecraft:stone'), 0.9f)
.fluidOutput(fluid('enrichedlava') * 500)
.power(50)
.time(100)
.outputSize(1)
.register()


// Chemical Reactor:
// Converts up to 2 fluids and 8 input items into up to 1 fluid and up to 4 output items, consuming RF

// mods.advancedrocketry.chemical_reactor.removeAll()
mods.advancedrocketry.chemical_reactor.removeByInput(item('minecraft:bone'))
mods.advancedrocketry.chemical_reactor.removeByOutput(item('minecraft:leather_helmet'))

mods.advancedrocketry.chemical_reactor.recipeBuilder()
.input(item('minecraft:chorus_fruit_popped'))
.fluidInput(fluid('lava') * 500)
.output(item('minecraft:end_rod') * 4)
.fluidOutput(fluid('water') * 500)
.power(50)
.time(100)
.register()


// Crystallizer:
// Converts up to 4 input items into up to 4 output items, consuming RF

// mods.advancedrocketry.crystallizer.removeAll()
mods.advancedrocketry.crystallizer.removeByInput(item('libvulpes:productingot', 3))
mods.advancedrocketry.crystallizer.removeByOutput(item('libvulpes:productgem'))

mods.advancedrocketry.crystallizer.recipeBuilder()
.input(item('minecraft:blaze_powder') * 4)
.output(item('minecraft:blaze_rod'))
.power(50)
.time(100)
.register()


// Cutting Machine:
// Converts up to 4 input items into up to 4 output items, consuming RF

// mods.advancedrocketry.cutting_machine.removeAll()
mods.advancedrocketry.cutting_machine.removeByInput(item('advancedrocketry:alienwood'))
mods.advancedrocketry.cutting_machine.removeByOutput(item('minecraft:planks', 1))

mods.advancedrocketry.cutting_machine.recipeBuilder()
.input(item('minecraft:blaze_rod'))
.output(item('minecraft:blaze_powder') * 4)
.power(50)
.time(100)
.register()


// Electric Arc Furnace:
// Converts input items and fluids into output items and fluids, consuming RF

// mods.advancedrocketry.electric_arc_furnace.removeAll()
mods.advancedrocketry.electric_arc_furnace.removeByInput(item('minecraft:iron_ingot'))
mods.advancedrocketry.electric_arc_furnace.removeByOutput(item('libvulpes:productingot', 3))

mods.advancedrocketry.electric_arc_furnace.recipeBuilder()
.input(item('minecraft:blaze_powder') * 4)
.output(item('minecraft:blaze_rod'))
.power(50)
.time(100)
.register()


// Electrolyser:
// Converts an input fluid into up to 2 output fluids, consuming RF

// mods.advancedrocketry.electrolyser.removeAll()
mods.advancedrocketry.electrolyser.removeByInput(fluid('water'))
// mods.advancedrocketry.electrolyser.removeByOutput(fluid('oxygen'))

mods.advancedrocketry.electrolyser.recipeBuilder()
.fluidInput(fluid('lava') * 10)
.fluidOutput(fluid('nitrogen') * 50)
.power(50)
.time(100)
.register()


// Lathe:
// Converts up to 4 input items into up to 4 output items, consuming RF

// mods.advancedrocketry.lathe.removeAll()
mods.advancedrocketry.lathe.removeByInput(item('libvulpes:productingot', 6))
mods.advancedrocketry.lathe.removeByOutput(item('libvulpes:productrod', 4))

mods.advancedrocketry.lathe.recipeBuilder()
.input(ore('plankWood'))
.output(item('minecraft:stick') * 2)
.power(50)
.time(100)
.register()


// Precision Assembler:
// Converts input items and fluids into output items and fluids, consuming RF

// mods.advancedrocketry.precision_assembler.removeAll()
mods.advancedrocketry.precision_assembler.removeByInput(item('minecraft:redstone_block'))
mods.advancedrocketry.precision_assembler.removeByOutput(item('advancedrocketry:atmanalyser'))

mods.advancedrocketry.precision_assembler.recipeBuilder()
.input(item('minecraft:fishing_rod'), item('minecraft:carrot'))
.output(item('minecraft:carrot_on_a_stick'))
.power(50)
.time(100)
.register()


// Precision Laser Etcher:
// Converts up to 4 input items into up to 4 output items, consuming RF

// mods.advancedrocketry.precision_laser_etcher.removeAll()
mods.advancedrocketry.precision_laser_etcher.removeByInput(item('minecraft:redstone_block'))
mods.advancedrocketry.precision_laser_etcher.removeByOutput(item('advancedrocketry:itemcircuitplate'))

mods.advancedrocketry.precision_laser_etcher.recipeBuilder()
.input(item('minecraft:blaze_powder') * 4, item('advancedrocketry:wafer'))
.output(item('advancedrocketry:itemcircuitplate'))
.power(50)
.time(100)
.register()


// Rolling Machine:
// Consumes up to 1 input fluid and up to 4 input items into up to 4 output items, consuming RF

// mods.advancedrocketry.rolling_machine.removeAll()
mods.advancedrocketry.rolling_machine.removeByInput(item('libvulpes:productplate'))
mods.advancedrocketry.rolling_machine.removeByOutput(item('libvulpes:productsheet', 1))

mods.advancedrocketry.rolling_machine.recipeBuilder()
.input(item('minecraft:snow'), fluid('water') * 300)
.output(item('minecraft:snow_layer') * 2)
.power(50)
.time(100)
.register()


// Small Plate Presser:
// Converts a block right below it into output items when powered by redstone

// mods.advancedrocketry.small_plate_presser.removeAll()
mods.advancedrocketry.small_plate_presser.removeByInput(item('minecraft:iron_block'))
mods.advancedrocketry.small_plate_presser.removeByOutput(item('libvulpes:productplate', 2))

mods.advancedrocketry.small_plate_presser.recipeBuilder()
.input(item('minecraft:cobblestone'))
.output(item('minecraft:diamond'))
.register()


3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ debug_generate_and_crash = false

debug_actually_additions = false
debug_adv_mortars = false
# both versions of advanced rocketry claim to be API compatible, this is included to make testing easier
debug_advanced_rocketry = false
debug_advanced_rocketry_2 = false
debug_aether = false
debug_alchemistry = false
debug_applied_energistics_2 = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Can only allow one annotation per field.
* </li>
* <li>
* {@link ElementType#TYPE}: Marks the field targeted by {@link #property()} within the attached class with this {@link Property}.
* {@link ElementType#TYPE}: Marks the field targeted by {@link #property()} within the attached class and any subclasses with this {@link Property}.
* Multiple will be wrapped in {@link Properties}.
* </li>
* <li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.cleanroommc.groovyscript.api.GroovyPlugin;
import com.cleanroommc.groovyscript.compat.mods.actuallyadditions.ActuallyAdditions;
import com.cleanroommc.groovyscript.compat.mods.advancedmortars.AdvancedMortars;
import com.cleanroommc.groovyscript.compat.mods.advancedrocketry.AdvancedRocketry;
import com.cleanroommc.groovyscript.compat.mods.aetherlegacy.Aether;
import com.cleanroommc.groovyscript.compat.mods.alchemistry.Alchemistry;
import com.cleanroommc.groovyscript.compat.mods.appliedenergistics2.AppliedEnergistics2;
Expand Down Expand Up @@ -77,6 +78,7 @@ public class ModSupport {

public static final GroovyContainer<ActuallyAdditions> ACTUALLY_ADDITIONS = new InternalModContainer<>("actuallyadditions", "Actually Additions", ActuallyAdditions::new, "aa");
public static final GroovyContainer<AdvancedMortars> ADVANCED_MORTARS = new InternalModContainer<>("advancedmortars", "Advanced Mortars", AdvancedMortars::new);
public static final GroovyContainer<AdvancedRocketry> ADVANCED_ROCKETRY = new InternalModContainer<>("advancedrocketry", "Advanced Rocketry", AdvancedRocketry::new);
public static final GroovyContainer<Aether> AETHER = new InternalModContainer<>("aether_legacy", "Aether Legacy", Aether::new, "aether");
public static final GroovyContainer<Alchemistry> ALCHEMISTRY = new InternalModContainer<>("alchemistry", "Alchemistry", Alchemistry::new);
public static final GroovyContainer<AppliedEnergistics2> APPLIED_ENERGISTICS_2 = new InternalModContainer<>("appliedenergistics2", "Applied Energistics 2", AppliedEnergistics2::new, "ae2");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.cleanroommc.groovyscript.compat.mods.advancedrocketry;

import com.cleanroommc.groovyscript.compat.mods.GroovyPropertyContainer;

public class AdvancedRocketry extends GroovyPropertyContainer {

public final Centrifuge centrifuge = new Centrifuge();
public final ChemicalReactor reactor = new ChemicalReactor();
public final Crystallizer crystallizer = new Crystallizer();
public final CuttingMachine cutting = new CuttingMachine();
public final ElectricArcFurnace arcFurnace = new ElectricArcFurnace();
public final Electrolyser electrolyser = new Electrolyser();
public final Lathe lathe = new Lathe();
public final PrecisionAssembler assembler = new PrecisionAssembler();
public final PrecisionLaserEtcher laserEtcher = new PrecisionLaserEtcher();
public final RollingMachine rolling = new RollingMachine();
public final SmallPlatePresser platePress = new SmallPlatePresser();

}
Loading

0 comments on commit 9705f37

Please sign in to comment.