Skip to content

Commit c88cd9b

Browse files
committed
First Version Menu
still missing a display on the ListButtons for the itemStacks; and a player model in the ToolTransformation screen
1 parent 8a8b0eb commit c88cd9b

6 files changed

Lines changed: 996 additions & 52 deletions

File tree

build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ dependencies {
3434
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
3535
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
3636

37-
// Fabric API. This is technically optional, but you probably want it anyway.
3837
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
3938
modImplementation "dev.isxander:yet-another-config-lib:${project.yacl_version}"
4039
modImplementation ("com.terraformersmc:modmenu:${project.mod_menu_version}")
@@ -46,8 +45,8 @@ processResources {
4645

4746
filesMatching("fabric.mod.json") {
4847
expand "modVersion": project.version,
49-
"mcVersion": minecraftVersion,
50-
"yaclVersion" : yaclVersion
48+
"mcVersion": minecraftVersion,
49+
"yaclVersion": yaclVersion
5150
}
5251
}
5352

src/main/java/com/daniking/backtools/config/BackToolsConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,6 @@ public class BackToolsConfig {
9898
public boolean helicopterMode = false;
9999
@SerialEntry(comment = "If true, tools render with capes")
100100
public boolean renderWithCapes = false;
101+
@SerialEntry(comment = "If false, a simplified menu will be shown, if true everything is configurable from the ingame menu")
102+
public boolean advancedMenuEntries = false;
101103
}

src/main/java/com/daniking/backtools/config/ConfigHandler.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,43 @@ public boolean shouldRenderWithCapes() {
144144
return yaclHandler.instance().renderWithCapes;
145145
}
146146

147+
public boolean isAdvancedMenu() {
148+
return yaclHandler.instance().advancedMenuEntries;
149+
}
150+
151+
public void shouldRenderWithCapes(final boolean shouldRenderWithCapes) {
152+
yaclHandler.instance().renderWithCapes = shouldRenderWithCapes;
153+
saveConfig();
154+
}
155+
156+
public void helicopterMode(final boolean helicopterMode) {
157+
yaclHandler.instance().helicopterMode = helicopterMode;
158+
saveConfig();
159+
}
160+
161+
public void advancedMenuEntries(final boolean advancedMenuEntries) {
162+
yaclHandler.instance().advancedMenuEntries = advancedMenuEntries;
163+
saveConfig();
164+
}
165+
166+
public @NotNull LinkedHashMap<@NotNull AItemLike, @NotNull ToolTransformation> rawBackTools() {
167+
return yaclHandler.instance().backTools;
168+
}
169+
170+
public void rawBackTools(@NotNull LinkedHashMap<@NotNull AItemLike, @NotNull ToolTransformation> rawBackTools) {
171+
yaclHandler.instance().backTools = rawBackTools;
172+
saveConfig();
173+
}
174+
175+
public @NotNull LinkedHashMap<@NotNull AItemLike, @NotNull ToolTransformation> rawBeltTools() {
176+
return yaclHandler.instance().beltTools;
177+
}
178+
179+
public void rawBeltTools(@NotNull LinkedHashMap<@NotNull AItemLike, @NotNull ToolTransformation> rawBeltTools) {
180+
yaclHandler.instance().beltTools = rawBeltTools;
181+
saveConfig();
182+
}
183+
147184
public void checkWrapperLookUp(final @NotNull RegistryWrapper.WrapperLookup wrapperLookup) {
148185
if (this.wrapperLookup != wrapperLookup) {
149186
this.dynamicJSONOps = RegistryOps.of(JsonOps.INSTANCE, wrapperLookup);

0 commit comments

Comments
 (0)