-
Notifications
You must be signed in to change notification settings - Fork 30
Fallback property container for all installed mods #289
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
Conversation
WaitingIdly
left a comment
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.
a likely unexpected side effect of this is mods.minecraft now exists. i think this is the correct behavior, it just becomes a bit weird to speak of.
due to this, though, it makes sense to bind the currently existing vanilla compat to mods.minecraft - and bind the custom original groovyscript to mods.groovyscript.
additionally, it seems like it would make sense to add compat as an alias to mods (ie compat.minecraft).
src/main/java/com/cleanroommc/groovyscript/compat/mods/ModSupport.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/helper/GroovyHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/BasicGroovyPropertyContainer.java
Outdated
Show resolved
Hide resolved
…edient, improvements
# Conflicts: # src/main/java/com/cleanroommc/groovyscript/helper/ingredient/OreDictIngredient.java
WaitingIdly
left a comment
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.
looks good!
| return t; | ||
| }); | ||
| Set<String> aliasSet = new ObjectOpenHashSet<>(); | ||
| aliasSet.add("mc"); |
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.
would vanilla be a good alias? would allow mods.vanilla, which i find rather amusing.
i believe using aliasSet.addAll(Alias.generateOf("Vanilla", containerName).and("MC", "mc")); should work.
| private final String modId = "minecraft"; | ||
| private final String containerName = "Minecraft"; |
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.
is there a reason not to have these be static?
You now access all installed mods with
mods.[modid]. There are basic getters for id, name, version and forge mod container.mods.[modid].allItemsreturns aIIngredientwith all items from that mod (which are exposed to the creative inventory).Supersedes #275