Skip to content

Commit

Permalink
fixed curios not being optional, and made patchouli a mods.toml dep
Browse files Browse the repository at this point in the history
closes #354
  • Loading branch information
Ellpeck committed May 16, 2024
1 parent b72b1c1 commit a11c21d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ tasks.withType(ProcessResources).configureEach {
loader_version_range: loader_version_range,
mod_id : mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors : mod_authors, mod_description: mod_description,
patchouli_version : patchouli_version
]
inputs.properties replaceProperties

Expand Down Expand Up @@ -145,4 +146,4 @@ publishing {

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ loader_version_range=[2,)

jei_version=17.3.0.48
curios_version=7.2.0+1.20.4
patchouli_version=1.20.4-85-NEOFORGE-SNAPSHOT
patchouli_version=1.20.4-85-NEOFORGE

## Mod Properties
# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/de/ellpeck/naturesaura/compat/Compat.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

public final class Compat {

@SuppressWarnings("Convert2MethodRef") // bleh classloading compat issues
private static final Map<String, Supplier<ICompat>> MODULE_TYPES = ImmutableMap.<String, Supplier<ICompat>>builder()
.put("patchouli", PatchouliCompat::new)
.put("curios", CuriosCompat::new)
.put("patchouli", () -> new PatchouliCompat())
.put("curios", () -> new CuriosCompat())
//.put("enchantability", EnchantibilityCompat::new)
.build();
private static final Map<String, ICompat> MODULES = new HashMap<>();
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@ side = "BOTH"
# stop your mod loading on the server for example.
#[features.${mod_id}]
#openGLVersion="[3.2,)"

[[dependencies.${mod_id}]]
modId="patchouli"
type = "required"
versionRange="[${patchouli_version},)"
ordering="NONE"
side="BOTH"

0 comments on commit a11c21d

Please sign in to comment.