Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
- name: download fallback repo
run: ./gradlew updateFallbackRepo
- name: build
run: ./gradlew chiseledBuild
run: ./gradlew build
- name: capture build artifacts
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: versions/**/build/libs/*.jar
path: build/libs/*.jar
42 changes: 33 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import java.nio.channels.Channels
import java.nio.channels.ReadableByteChannel

plugins {
id("fabric-loom") version "1.10-SNAPSHOT"
id("fabric-loom") version "1.14-SNAPSHOT"
}

version = property("mod_version")!! as String + "+mc" + property("minecraft_version")!!
Expand All @@ -17,9 +17,14 @@ base {
}

loom {
accessWidenerPath = project.file("src/main/resources/skyblocktweaks.accesswidener")
}
accessWidenerPath = project.file("src/main/resources/skyblocktweaks.accesswidener")

// runConfigs.all {
// ideConfigGenerated(stonecutter.current.isActive)
// }

runConfigs.remove(runConfigs["server"])
}

repositories {
maven("https://maven.isxander.dev/releases")
Expand All @@ -40,24 +45,39 @@ repositories {
}
maven("https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1")
maven("https://repo.hypixel.net/repository/Hypixel/")
maven("https://maven.parchmentmc.org")
maven("https://maven.gegy.dev/releases")
}

dependencies {
minecraft("com.mojang:minecraft:${property("minecraft_version")}")
mappings("net.fabricmc:yarn:${property("yarn_mappings")}:v2")
// mappings(loom.layered {
// officialMojangMappings()
// optionalProp("parchment_version") {
// parchment("org.parchmentmc.data:parchment-${property("minecraft_version")}:$it@zip")
// }
// optionalProp("yalmm_version") {
// mappings("dev.lambdaurora:yalmm-mojbackward:${property("minecraft_version")}+build.$it}")
// }
// })
mappings(loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${property("minecraft_version")}:${property("parchment_version")}@zip")
//mappings("dev.lambdaurora:yalmm-mojbackward:1.21.8+build.${property("yalmm_version")}")
// ^ Disabled as of 1/11 due to causing issues with decomp
})
modImplementation ("net.fabricmc:fabric-loader:${property("loader_version")}")
modImplementation ("net.fabricmc.fabric-api:fabric-api:${property("fabric_version")}")
modImplementation ("dev.isxander:yet-another-config-lib:${property("yacl_version")}")
//modImplementation ("com.terraformersmc:modmenu:${property("modmenu_version")}")
modCompileOnly("com.terraformersmc:modmenu:${property("modmenu_version")}")
modImplementation ("com.terraformersmc:modmenu:${property("modmenu_version")}")
//modCompileOnly("com.terraformersmc:modmenu:${property("modmenu_version")}")
modCompileOnly("me.shedaniel:RoughlyEnoughItems-api-fabric:${property("rei_version")}")
//modRuntimeOnly("me.shedaniel:RoughlyEnoughItems-fabric:${property("rei_version")}")
implementation("net.hypixel:mod-api:${property("modapi_version")}")
include(modImplementation("maven.modrinth:hypixel-mod-api:${property("modapi_fabric_version")}") as Any)
modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:1.2.1")


modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:1.2.1")
}

tasks.processResources {
inputs.property("version", project.version)

Expand Down Expand Up @@ -86,6 +106,10 @@ tasks.named<Jar>("jar") {
}
}

fun <T> optionalProp(property: String, block: (String) -> T?): T? =
findProperty(property)?.toString()?.takeUnless { it.isBlank() }?.let(block)





Expand Down
15 changes: 13 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,23 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.parallel=true
maven_group=wtf.cheeze.sbt
archives_base_name=SkyblockTweaks
loader_version=0.16.14
loader_version=0.18.4

modapi_version=1.0.1


mod_version=0.1.0-Alpha.17
#mod_version=Unstable

# Fix YALMM
fabric.loom.dropNonIntermediateRootMethods=true

minecraft_version=1.21.10
parchment_version=2025.10.12
yalmm_version=3
fabric_version=0.138.4+1.21.10

modapi_fabric_version=1.0.1+build.1+mc1.21
modmenu_version=16.0.0
yacl_version=3.8.2+1.21.10-fabric
rei_version=21.9.812
support_range=1.21.10
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
27 changes: 14 additions & 13 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@ pluginManagement {
}
mavenCentral()
gradlePluginPortal()
maven("https://maven.kikugie.dev/snapshots")
// maven("https://maven.kikugie.dev/releases")
// maven("https://maven.kikugie.dev/snapshots")
}
}

plugins {
id("dev.kikugie.stonecutter") version "0.6-alpha.13"
}

stonecutter {
kotlinController = true
centralScript = "build.gradle.kts"
//plugins {
// id("dev.kikugie.stonecutter") version "0.7.10"
//}

create(rootProject) {
versions( "1.21.5", "1.21.6")
vcsVersion = "1.21.5"
}
}
//stonecutter {
// kotlinController = true
// centralScript = "build.gradle.kts"
//
// create(rootProject) {
// versions("1.21.8")
// vcsVersion = "1.21.8"
// }
//}
8 changes: 1 addition & 7 deletions src/main/java/wtf/cheeze/sbt/SkyblockTweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public class SkyblockTweaks implements ModInitializer {

@Override
public void onInitialize() {

SBTConfig.load();
PersistentData.registerEvents();

Expand All @@ -79,12 +78,7 @@ public void onInitialize() {
MiningTitles.registerEvents();
FetchurFeatures.registerEvents();
ReforgeOverlay.registerEvents();

//? if >1.21.5
/*HudRenderEvents.registerEvents();*/



HudRenderEvents.registerEvents();
UpdateChecker.checkForUpdates();
}
}
37 changes: 20 additions & 17 deletions src/main/java/wtf/cheeze/sbt/command/CommandUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import com.mojang.brigadier.suggestion.SuggestionProvider;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.text.Text;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
import wtf.cheeze.sbt.utils.text.MessageManager;
import wtf.cheeze.sbt.utils.NumberUtils;
import wtf.cheeze.sbt.utils.text.TextUtils;
Expand All @@ -36,11 +36,10 @@
import java.util.function.Supplier;

public class CommandUtils {

public static LiteralArgumentBuilder<FabricClientCommandSource> getScreenOpeningCommand(String name, Supplier<Screen> screenFactory) {
return ClientCommandManager.literal(name).executes(context -> {
MinecraftClient mc = context.getSource().getClient();
mc.send(() -> mc.setScreen(screenFactory.get()));
Minecraft mc = context.getSource().getClient();
mc.schedule(() -> mc.setScreen(screenFactory.get()));
return 1;
});
}
Expand All @@ -54,7 +53,6 @@ public static SuggestionProvider<FabricClientCommandSource> getArrayAsSuggestion
};
}


static int[] getCalcPetTable(Rarity rarity) {
return switch (rarity) {
case COMMON -> Constants.pets().levelsCommon();
Expand All @@ -66,41 +64,46 @@ static int[] getCalcPetTable(Rarity rarity) {
};
}


static Text getDebugText(String name, boolean value) {
static Component getDebugText(String name, boolean value) {
return getDebugText(name, String.valueOf(value), value ? Colors.LIME : Colors.RED);
}
static Text getDebugText(String name, int value) {

static Component getDebugText(String name, int value) {
return getDebugText(name, String.valueOf(value), Colors.YELLOW);
}
static Text getDebugText(String name, float value) {

static Component getDebugText(String name, float value) {
return getDebugText(name, String.valueOf(value), Colors.YELLOW);
}

static Text getDebugText(String name, String value, int color) {
static Component getDebugText(String name, String value, int color) {
return TextUtils.join(
TextUtils.withColor(name + ": ", Colors.CYAN),
TextUtils.withColor(value, color)
);
}
static Text getDebugText(String name, String value) {

static Component getDebugText(String name, String value) {
return TextUtils.join(
TextUtils.withColor(name + ": ", Colors.CYAN),
TextUtils.withColor(value, Colors.YELLOW)
);
}

public static void send(CommandContext<FabricClientCommandSource> context, Text text) {
public static void send(CommandContext<FabricClientCommandSource> context, Component text) {
context.getSource().sendFeedback(TextUtils.join(MessageManager.PREFIX, TextUtils.SPACE, text));
}

public static void send(CommandContext<FabricClientCommandSource> context, String text) {
context.getSource().sendFeedback(TextUtils.join(MessageManager.PREFIX, TextUtils.SPACE, Text.of(text)));
context.getSource().sendFeedback(TextUtils.join(MessageManager.PREFIX, TextUtils.SPACE, Component.nullToEmpty(text)));
}
public static void sendRaw(CommandContext<FabricClientCommandSource> context, Text text) {

public static void sendRaw(CommandContext<FabricClientCommandSource> context, Component text) {
context.getSource().sendFeedback(text);
}

public static void sendRaw(CommandContext<FabricClientCommandSource> context, String text) {
context.getSource().sendFeedback(Text.of(text));
context.getSource().sendFeedback(Component.nullToEmpty(text));
}

public static void calcSend(CommandContext<FabricClientCommandSource> context, String type, int number) {
Expand Down
Loading