Skip to content

Commit

Permalink
add modmenu compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Draylar committed Feb 5, 2021
1 parent 44f3ed9 commit 01e6d16
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 7 deletions.
14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,24 @@ group = project.maven_group
minecraft {
}

repositories {
maven { url "https://maven.terraformersmc.com/releases" }
jcenter()
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modImplementation "me.sargunvohra.mcmods:autoconfig1u:3.2.2"
include "me.sargunvohra.mcmods:autoconfig1u:3.2.2"
modImplementation "me.sargunvohra.mcmods:autoconfig1u:3.3.1"
include "me.sargunvohra.mcmods:autoconfig1u:3.3.1"
modApi("me.shedaniel.cloth:config-2:4.8.3") {
exclude(group: "net.fabricmc.fabric-api")
}

modImplementation "com.terraformersmc:modmenu:1.16.5"
}

processResources {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.16.4
yarn_mappings=1.16.4+build.9
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.4
loader_version=0.10.8

# Mod Properties
mod_version=1.1.0
mod_version=1.2.0
maven_group=draylar
archives_base_name=reroll

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.29.3+1.16
fabric_version=0.30.0+1.16
14 changes: 14 additions & 0 deletions src/main/java/draylar/reroll/compat/ModMenuEntrypoint.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package draylar.reroll.compat;

import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import draylar.reroll.config.RerollConfig;
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;

public class ModMenuEntrypoint implements ModMenuApi {

@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
return screen -> AutoConfig.getConfigScreen(RerollConfig.class, screen).get();
}
}
5 changes: 4 additions & 1 deletion src/main/resources/assets/reroll/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"reroll.exp_prompt": "Experience cost: ",
"reroll.exp_amount": "%f Levels",
"reroll.lapis_prompt": "Lapis cost: ",
"reroll.lapis_amount": "%f Lapis Lazuli"
"reroll.lapis_amount": "%f Lapis Lazuli",

"text.autoconfig.reroll.option.levelsPerReroll": "Level Cost per Reroll",
"text.autoconfig.reroll.option.lapisPerReroll": "Lapis Lazuli Cost per Reroll"
}
3 changes: 3 additions & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
],
"client": [
"draylar.reroll.RerollClient"
],
"modmenu": [
"draylar.reroll.compat.ModMenuEntrypoint"
]
},
"mixins": [
Expand Down

0 comments on commit 01e6d16

Please sign in to comment.