Skip to content

Commit

Permalink
Added JARs created to workflow and fixed a couple of things
Browse files Browse the repository at this point in the history
Signed-off-by: TreyRuffy <[email protected]>
  • Loading branch information
TreyRuffy committed Sep 26, 2021
1 parent c40c145 commit df9550a
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ jobs:
name: "test-results"
path: |
build/reports/
**/build/reports/
**/build/reports/
build/libs
**/build/libs/
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT" // Uses Architectury plugin https://github.com/architectury/architectury-plugin
id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false // Uses Architectury Loom
id "dev.architectury.loom" version "0.10.0.176" apply false // Uses Architectury Loom
// (fork of Fabric Loom) https://github.com/architectury/architectury-loom - does not apply to root project
id "net.kyori.indra.git" version "2.0.6" // Uses Indra Git plugin
id "net.kyori.indra.checkstyle" version "2.0.6" // Uses Indra Checkstyle plugin
Expand Down
6 changes: 5 additions & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ loom {
}

architectury {
common()
if (rootProject.forge_enabled.toBoolean()) {
common()
} else {
common(false)
}
}

afterEvaluate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import me.shedaniel.clothconfig2.api.ConfigBuilder;
import me.shedaniel.clothconfig2.api.ConfigCategory;
import me.shedaniel.clothconfig2.api.ConfigEntryBuilder;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.text.TranslatableText;

/**
Expand All @@ -22,10 +22,10 @@ private GeneralOptionsScreen() {
*
* @return the config builder
*/
public static ConfigBuilder configBuilder() {
public static ConfigBuilder configBuilder(final Screen parent) {

final ConfigBuilder builder = ConfigBuilder.create()
.setParentScreen(MinecraftClient.getInstance().currentScreen)
.setParentScreen(parent)
.setTitle(new TranslatableText("config.betterf3.title"));

builder.setSavingRunnable(ModConfigFile.saveRunnable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void init() {
"config.betterf3.order_right_button"), buttonWidget -> client.setScreen(new ModulesScreen(client.currentScreen, PositionEnum.RIGHT))));
this.addDrawableChild(new ButtonWidget(this.width / 2 - 130, this.height / 4 - 24, 260, 20,
new TranslatableText("config.betterf3.general_settings"),
buttonWidget -> client.setScreen(GeneralOptionsScreen.configBuilder().build())));
buttonWidget -> client.setScreen(GeneralOptionsScreen.configBuilder(client.currentScreen).build())));
this.addDrawableChild(new ButtonWidget(this.width / 2 - 130, this.height - 50, 260, 20,
new TranslatableText("config.betterf3.modules.done_button"),
buttonWidget -> client.setScreen(this.parent)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public boolean mouseClicked(final double mouseX, final double mouseY, final int
}
}

this.parent.select(this);
ModuleListWidget.this.setSelected(this);
return false;
}

Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ yarn_version=1.17.1+build.61
cloth_version=5.0.38
modmenu_version=2.0.12

forge_enabled=true
# Confirm settings in settings.gradle
forge_version=37.0.59
6 changes: 5 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ pluginManagement {
}
}

boolean forge_enabled = true; // Confirm settings in gradle.properties

include("common") // Common directory
include("fabric") // Fabric directory
include("forge") // Forge directory
if (forge_enabled) {
include("forge") // Forge directory
}
rootProject.name = 'BetterF3' // Sets project name

0 comments on commit df9550a

Please sign in to comment.