Skip to content

Commit 9705f37

Browse files
authored
Add (partial?) Advanced Rocketry compatibility (#189)
* 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
1 parent 8f1bfba commit 9705f37

25 files changed

+1110
-10
lines changed

dependencies.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
final def mod_dependencies = [
3030
'actually-additions-228404:3117927' : [project.debug_actually_additions],
3131
'advancedmortars-283777:2780626' : [project.debug_adv_mortars],
32+
'advanced-rocketry-236542:4671856' : [project.debug_advanced_rocketry],
33+
'advanced-rocketry-2-1024225:5486514' : [project.debug_advanced_rocketry_2],
34+
// libAR is equivalent to libvulpes
35+
'libvulpes-236541:3801015' : [project.debug_advanced_rocketry],
36+
'library-for-ar-reworked-1038780:5446535' : [project.debug_advanced_rocketry_2],
3237
'aether-255308:3280119' : [project.debug_aether],
3338
'alchemistry-293425:3186612' : [project.debug_alchemistry],
3439
'alchemylib-293426:2761706' : [project.debug_alchemistry],
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
2+
// Auto generated groovyscript example file
3+
// MODS_LOADED: advancedrocketry
4+
5+
println 'mod \'advancedrocketry\' detected, running script'
6+
7+
// Centrifuge:
8+
// Converts an input fluid into up to 12 output items and up to 4 output fluids, consuming RF
9+
10+
// mods.advancedrocketry.centrifuge.removeAll()
11+
mods.advancedrocketry.centrifuge.removeByInput(fluid('enrichedlava'))
12+
13+
mods.advancedrocketry.centrifuge.recipeBuilder()
14+
.fluidInput(fluid('lava') * 500)
15+
.output(item('minecraft:slime_ball'), 0.1f)
16+
.output(item('minecraft:stone'), 0.9f)
17+
.fluidOutput(fluid('enrichedlava') * 500)
18+
.power(50)
19+
.time(100)
20+
.outputSize(1)
21+
.register()
22+
23+
24+
// Chemical Reactor:
25+
// Converts up to 2 fluids and 8 input items into up to 1 fluid and up to 4 output items, consuming RF
26+
27+
// mods.advancedrocketry.chemical_reactor.removeAll()
28+
mods.advancedrocketry.chemical_reactor.removeByInput(item('minecraft:bone'))
29+
mods.advancedrocketry.chemical_reactor.removeByOutput(item('minecraft:leather_helmet'))
30+
31+
mods.advancedrocketry.chemical_reactor.recipeBuilder()
32+
.input(item('minecraft:chorus_fruit_popped'))
33+
.fluidInput(fluid('lava') * 500)
34+
.output(item('minecraft:end_rod') * 4)
35+
.fluidOutput(fluid('water') * 500)
36+
.power(50)
37+
.time(100)
38+
.register()
39+
40+
41+
// Crystallizer:
42+
// Converts up to 4 input items into up to 4 output items, consuming RF
43+
44+
// mods.advancedrocketry.crystallizer.removeAll()
45+
mods.advancedrocketry.crystallizer.removeByInput(item('libvulpes:productingot', 3))
46+
mods.advancedrocketry.crystallizer.removeByOutput(item('libvulpes:productgem'))
47+
48+
mods.advancedrocketry.crystallizer.recipeBuilder()
49+
.input(item('minecraft:blaze_powder') * 4)
50+
.output(item('minecraft:blaze_rod'))
51+
.power(50)
52+
.time(100)
53+
.register()
54+
55+
56+
// Cutting Machine:
57+
// Converts up to 4 input items into up to 4 output items, consuming RF
58+
59+
// mods.advancedrocketry.cutting_machine.removeAll()
60+
mods.advancedrocketry.cutting_machine.removeByInput(item('advancedrocketry:alienwood'))
61+
mods.advancedrocketry.cutting_machine.removeByOutput(item('minecraft:planks', 1))
62+
63+
mods.advancedrocketry.cutting_machine.recipeBuilder()
64+
.input(item('minecraft:blaze_rod'))
65+
.output(item('minecraft:blaze_powder') * 4)
66+
.power(50)
67+
.time(100)
68+
.register()
69+
70+
71+
// Electric Arc Furnace:
72+
// Converts input items and fluids into output items and fluids, consuming RF
73+
74+
// mods.advancedrocketry.electric_arc_furnace.removeAll()
75+
mods.advancedrocketry.electric_arc_furnace.removeByInput(item('minecraft:iron_ingot'))
76+
mods.advancedrocketry.electric_arc_furnace.removeByOutput(item('libvulpes:productingot', 3))
77+
78+
mods.advancedrocketry.electric_arc_furnace.recipeBuilder()
79+
.input(item('minecraft:blaze_powder') * 4)
80+
.output(item('minecraft:blaze_rod'))
81+
.power(50)
82+
.time(100)
83+
.register()
84+
85+
86+
// Electrolyser:
87+
// Converts an input fluid into up to 2 output fluids, consuming RF
88+
89+
// mods.advancedrocketry.electrolyser.removeAll()
90+
mods.advancedrocketry.electrolyser.removeByInput(fluid('water'))
91+
// mods.advancedrocketry.electrolyser.removeByOutput(fluid('oxygen'))
92+
93+
mods.advancedrocketry.electrolyser.recipeBuilder()
94+
.fluidInput(fluid('lava') * 10)
95+
.fluidOutput(fluid('nitrogen') * 50)
96+
.power(50)
97+
.time(100)
98+
.register()
99+
100+
101+
// Lathe:
102+
// Converts up to 4 input items into up to 4 output items, consuming RF
103+
104+
// mods.advancedrocketry.lathe.removeAll()
105+
mods.advancedrocketry.lathe.removeByInput(item('libvulpes:productingot', 6))
106+
mods.advancedrocketry.lathe.removeByOutput(item('libvulpes:productrod', 4))
107+
108+
mods.advancedrocketry.lathe.recipeBuilder()
109+
.input(ore('plankWood'))
110+
.output(item('minecraft:stick') * 2)
111+
.power(50)
112+
.time(100)
113+
.register()
114+
115+
116+
// Precision Assembler:
117+
// Converts input items and fluids into output items and fluids, consuming RF
118+
119+
// mods.advancedrocketry.precision_assembler.removeAll()
120+
mods.advancedrocketry.precision_assembler.removeByInput(item('minecraft:redstone_block'))
121+
mods.advancedrocketry.precision_assembler.removeByOutput(item('advancedrocketry:atmanalyser'))
122+
123+
mods.advancedrocketry.precision_assembler.recipeBuilder()
124+
.input(item('minecraft:fishing_rod'), item('minecraft:carrot'))
125+
.output(item('minecraft:carrot_on_a_stick'))
126+
.power(50)
127+
.time(100)
128+
.register()
129+
130+
131+
// Precision Laser Etcher:
132+
// Converts up to 4 input items into up to 4 output items, consuming RF
133+
134+
// mods.advancedrocketry.precision_laser_etcher.removeAll()
135+
mods.advancedrocketry.precision_laser_etcher.removeByInput(item('minecraft:redstone_block'))
136+
mods.advancedrocketry.precision_laser_etcher.removeByOutput(item('advancedrocketry:itemcircuitplate'))
137+
138+
mods.advancedrocketry.precision_laser_etcher.recipeBuilder()
139+
.input(item('minecraft:blaze_powder') * 4, item('advancedrocketry:wafer'))
140+
.output(item('advancedrocketry:itemcircuitplate'))
141+
.power(50)
142+
.time(100)
143+
.register()
144+
145+
146+
// Rolling Machine:
147+
// Consumes up to 1 input fluid and up to 4 input items into up to 4 output items, consuming RF
148+
149+
// mods.advancedrocketry.rolling_machine.removeAll()
150+
mods.advancedrocketry.rolling_machine.removeByInput(item('libvulpes:productplate'))
151+
mods.advancedrocketry.rolling_machine.removeByOutput(item('libvulpes:productsheet', 1))
152+
153+
mods.advancedrocketry.rolling_machine.recipeBuilder()
154+
.input(item('minecraft:snow'), fluid('water') * 300)
155+
.output(item('minecraft:snow_layer') * 2)
156+
.power(50)
157+
.time(100)
158+
.register()
159+
160+
161+
// Small Plate Presser:
162+
// Converts a block right below it into output items when powered by redstone
163+
164+
// mods.advancedrocketry.small_plate_presser.removeAll()
165+
mods.advancedrocketry.small_plate_presser.removeByInput(item('minecraft:iron_block'))
166+
mods.advancedrocketry.small_plate_presser.removeByOutput(item('libvulpes:productplate', 2))
167+
168+
mods.advancedrocketry.small_plate_presser.recipeBuilder()
169+
.input(item('minecraft:cobblestone'))
170+
.output(item('minecraft:diamond'))
171+
.register()
172+
173+

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ debug_generate_and_crash = false
1414

1515
debug_actually_additions = false
1616
debug_adv_mortars = false
17+
# both versions of advanced rocketry claim to be API compatible, this is included to make testing easier
18+
debug_advanced_rocketry = false
19+
debug_advanced_rocketry_2 = false
1720
debug_aether = false
1821
debug_alchemistry = false
1922
debug_applied_energistics_2 = false

src/main/java/com/cleanroommc/groovyscript/api/documentation/annotations/Property.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Can only allow one annotation per field.
1212
* </li>
1313
* <li>
14-
* {@link ElementType#TYPE}: Marks the field targeted by {@link #property()} within the attached class with this {@link Property}.
14+
* {@link ElementType#TYPE}: Marks the field targeted by {@link #property()} within the attached class and any subclasses with this {@link Property}.
1515
* Multiple will be wrapped in {@link Properties}.
1616
* </li>
1717
* <li>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.cleanroommc.groovyscript.api.GroovyPlugin;
66
import com.cleanroommc.groovyscript.compat.mods.actuallyadditions.ActuallyAdditions;
77
import com.cleanroommc.groovyscript.compat.mods.advancedmortars.AdvancedMortars;
8+
import com.cleanroommc.groovyscript.compat.mods.advancedrocketry.AdvancedRocketry;
89
import com.cleanroommc.groovyscript.compat.mods.aetherlegacy.Aether;
910
import com.cleanroommc.groovyscript.compat.mods.alchemistry.Alchemistry;
1011
import com.cleanroommc.groovyscript.compat.mods.appliedenergistics2.AppliedEnergistics2;
@@ -77,6 +78,7 @@ public class ModSupport {
7778

7879
public static final GroovyContainer<ActuallyAdditions> ACTUALLY_ADDITIONS = new InternalModContainer<>("actuallyadditions", "Actually Additions", ActuallyAdditions::new, "aa");
7980
public static final GroovyContainer<AdvancedMortars> ADVANCED_MORTARS = new InternalModContainer<>("advancedmortars", "Advanced Mortars", AdvancedMortars::new);
81+
public static final GroovyContainer<AdvancedRocketry> ADVANCED_ROCKETRY = new InternalModContainer<>("advancedrocketry", "Advanced Rocketry", AdvancedRocketry::new);
8082
public static final GroovyContainer<Aether> AETHER = new InternalModContainer<>("aether_legacy", "Aether Legacy", Aether::new, "aether");
8183
public static final GroovyContainer<Alchemistry> ALCHEMISTRY = new InternalModContainer<>("alchemistry", "Alchemistry", Alchemistry::new);
8284
public static final GroovyContainer<AppliedEnergistics2> APPLIED_ENERGISTICS_2 = new InternalModContainer<>("appliedenergistics2", "Applied Energistics 2", AppliedEnergistics2::new, "ae2");
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.cleanroommc.groovyscript.compat.mods.advancedrocketry;
2+
3+
import com.cleanroommc.groovyscript.compat.mods.GroovyPropertyContainer;
4+
5+
public class AdvancedRocketry extends GroovyPropertyContainer {
6+
7+
public final Centrifuge centrifuge = new Centrifuge();
8+
public final ChemicalReactor reactor = new ChemicalReactor();
9+
public final Crystallizer crystallizer = new Crystallizer();
10+
public final CuttingMachine cutting = new CuttingMachine();
11+
public final ElectricArcFurnace arcFurnace = new ElectricArcFurnace();
12+
public final Electrolyser electrolyser = new Electrolyser();
13+
public final Lathe lathe = new Lathe();
14+
public final PrecisionAssembler assembler = new PrecisionAssembler();
15+
public final PrecisionLaserEtcher laserEtcher = new PrecisionLaserEtcher();
16+
public final RollingMachine rolling = new RollingMachine();
17+
public final SmallPlatePresser platePress = new SmallPlatePresser();
18+
19+
}

0 commit comments

Comments
 (0)