Skip to content

Conversation

@brachy84
Copy link
Member

You now access all installed mods with mods.[modid]. There are basic getters for id, name, version and forge mod container.
mods.[modid].allItems returns a IIngredient with all items from that mod (which are exposed to the creative inventory).
Supersedes #275

Copy link
Collaborator

@WaitingIdly WaitingIdly left a 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).

# Conflicts:
#	src/main/java/com/cleanroommc/groovyscript/helper/ingredient/OreDictIngredient.java
Copy link
Collaborator

@WaitingIdly WaitingIdly left a 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");
Copy link
Collaborator

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.

Comment on lines 15 to 16
private final String modId = "minecraft";
private final String containerName = "Minecraft";
Copy link
Collaborator

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?

@brachy84 brachy84 merged commit d23ac46 into master Mar 17, 2025
@brachy84 brachy84 deleted the modmapper branch March 17, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants