-
Notifications
You must be signed in to change notification settings - Fork 28
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 (partial?) Advanced Rocketry compatibility #189
Add (partial?) Advanced Rocketry compatibility #189
Conversation
still a lot to be desired.
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/AdvancedRocketry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/ChemicalReactor.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Outdated
Show resolved
Hide resolved
This should be all of fixes, except Piston Push is not yet implemented. I'll do that later. |
Small Plate Presser implemented, also did some class restructure to make it easier |
anything else needed here? |
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/AdvancedRocketry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/Centrifuge.java
Outdated
Show resolved
Hide resolved
...n/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseMultiblockRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/SmallPlatePresser.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Outdated
Show resolved
Hide resolved
...n/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseMultiblockRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Show resolved
Hide resolved
...n/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseMultiblockRegistry.java
Outdated
Show resolved
Hide resolved
...n/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseMultiblockRegistry.java
Outdated
Show resolved
Hide resolved
...n/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseMultiblockRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/Centrifuge.java
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/Centrifuge.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseRegistry.java
Outdated
Show resolved
Hide resolved
ok these should be all PR adjustments |
...n/java/com/cleanroommc/groovyscript/compat/mods/advancedrocketry/BaseMultiblockRegistry.java
Outdated
Show resolved
Hide resolved
RecipesMachine registry = RecipesMachine.getInstance(); | ||
List<IRecipe> recipes = registry.getRecipes(clazz); | ||
if (recipes == null) { | ||
recipes = new LinkedList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be a linked list? Most of the time array list is bettere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the same code as Advanced Rocketry uses to init its recipe lists, so yeah im pretty sure it does.
List<IRecipe> recipes = this.getRecipes(clazz);
if (recipes == null) {
recipes = new LinkedList();
this.recipeList.put(clazz, recipes);
}
Map<Integer, String> oredicts = new HashMap<>(); | ||
for (int i = 0; i < input.size(); i++) { | ||
IIngredient in = input.get(i); | ||
inputs.add(Arrays.stream(in.getMatchingStacks()).collect(Collectors.toList())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arrays.asList()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gonna look at these collectors.toList()
uses and fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
So there are 2 main parts with Advanced Rocketry one might want to do through GrS: adding recipes to processing machines, and adding planets. I've checked the code for XML planet loading and it's so deranged I don't want to read through it (no joke the main method is like 400 lines - see here ) so I decided against it for the time being, so only machines are supported right now
AR has a fork, I've tested all my changes against the fork, they do work properly
Machines supported:
Centrifuge
,ChemicalReactor
,Crystallizer
,CuttingMachine
,ElectricArcFurnace
,Electrolyser
,Lathe
,PrecisionAssembler
,PrecisionLaserEtcher
,RollingMachine
Machines NOT supported: piston push (since GrS already includes builtin compat for In-World Crafting)