Skip to content

Commit 046d931

Browse files
Merge pull request #26 from MisterCheezeCake/mc2
2 parents 31a803d + 6d40c4c commit 046d931

File tree

135 files changed

+1620
-2092
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+1620
-2092
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
- name: download fallback repo
3131
run: ./gradlew updateFallbackRepo
3232
- name: build
33-
run: ./gradlew chiseledBuild
33+
run: ./gradlew build
3434
- name: capture build artifacts
3535
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
3636
uses: actions/upload-artifact@v4
3737
with:
3838
name: Artifacts
39-
path: versions/**/build/libs/*.jar
39+
path: build/libs/*.jar

build.gradle.kts

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import java.nio.channels.Channels
66
import java.nio.channels.ReadableByteChannel
77

88
plugins {
9-
id("fabric-loom") version "1.10-SNAPSHOT"
9+
id("fabric-loom") version "1.14-SNAPSHOT"
1010
}
1111

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

1919
loom {
20-
accessWidenerPath = project.file("src/main/resources/skyblocktweaks.accesswidener")
21-
}
20+
accessWidenerPath = project.file("src/main/resources/skyblocktweaks.accesswidener")
21+
22+
// runConfigs.all {
23+
// ideConfigGenerated(stonecutter.current.isActive)
24+
// }
2225

26+
runConfigs.remove(runConfigs["server"])
27+
}
2328

2429
repositories {
2530
maven("https://maven.isxander.dev/releases")
@@ -40,24 +45,39 @@ repositories {
4045
}
4146
maven("https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1")
4247
maven("https://repo.hypixel.net/repository/Hypixel/")
48+
maven("https://maven.parchmentmc.org")
49+
maven("https://maven.gegy.dev/releases")
4350
}
4451

4552
dependencies {
4653
minecraft("com.mojang:minecraft:${property("minecraft_version")}")
47-
mappings("net.fabricmc:yarn:${property("yarn_mappings")}:v2")
54+
// mappings(loom.layered {
55+
// officialMojangMappings()
56+
// optionalProp("parchment_version") {
57+
// parchment("org.parchmentmc.data:parchment-${property("minecraft_version")}:$it@zip")
58+
// }
59+
// optionalProp("yalmm_version") {
60+
// mappings("dev.lambdaurora:yalmm-mojbackward:${property("minecraft_version")}+build.$it}")
61+
// }
62+
// })
63+
mappings(loom.layered {
64+
officialMojangMappings()
65+
parchment("org.parchmentmc.data:parchment-${property("minecraft_version")}:${property("parchment_version")}@zip")
66+
//mappings("dev.lambdaurora:yalmm-mojbackward:1.21.8+build.${property("yalmm_version")}")
67+
// ^ Disabled as of 1/11 due to causing issues with decomp
68+
})
4869
modImplementation ("net.fabricmc:fabric-loader:${property("loader_version")}")
4970
modImplementation ("net.fabricmc.fabric-api:fabric-api:${property("fabric_version")}")
5071
modImplementation ("dev.isxander:yet-another-config-lib:${property("yacl_version")}")
51-
//modImplementation ("com.terraformersmc:modmenu:${property("modmenu_version")}")
52-
modCompileOnly("com.terraformersmc:modmenu:${property("modmenu_version")}")
72+
modImplementation ("com.terraformersmc:modmenu:${property("modmenu_version")}")
73+
//modCompileOnly("com.terraformersmc:modmenu:${property("modmenu_version")}")
5374
modCompileOnly("me.shedaniel:RoughlyEnoughItems-api-fabric:${property("rei_version")}")
5475
//modRuntimeOnly("me.shedaniel:RoughlyEnoughItems-fabric:${property("rei_version")}")
5576
implementation("net.hypixel:mod-api:${property("modapi_version")}")
5677
include(modImplementation("maven.modrinth:hypixel-mod-api:${property("modapi_fabric_version")}") as Any)
57-
modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:1.2.1")
58-
59-
78+
modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:1.2.1")
6079
}
80+
6181
tasks.processResources {
6282
inputs.property("version", project.version)
6383

@@ -86,6 +106,10 @@ tasks.named<Jar>("jar") {
86106
}
87107
}
88108

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

90114

91115

gradle.properties

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,23 @@ org.gradle.jvmargs=-Xmx3G
33
org.gradle.parallel=true
44
maven_group=wtf.cheeze.sbt
55
archives_base_name=SkyblockTweaks
6-
loader_version=0.16.14
6+
loader_version=0.18.4
77

88
modapi_version=1.0.1
99

10-
1110
mod_version=0.1.0-Alpha.17
1211
#mod_version=Unstable
1312

13+
# Fix YALMM
14+
fabric.loom.dropNonIntermediateRootMethods=true
15+
16+
minecraft_version=1.21.10
17+
parchment_version=2025.10.12
18+
yalmm_version=3
19+
fabric_version=0.138.4+1.21.10
1420

21+
modapi_fabric_version=1.0.1+build.1+mc1.21
22+
modmenu_version=16.0.0
23+
yacl_version=3.8.2+1.21.10-fabric
24+
rei_version=21.9.812
25+
support_range=1.21.10

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

settings.gradle.kts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@ pluginManagement {
66
}
77
mavenCentral()
88
gradlePluginPortal()
9-
maven("https://maven.kikugie.dev/snapshots")
9+
// maven("https://maven.kikugie.dev/releases")
10+
// maven("https://maven.kikugie.dev/snapshots")
1011
}
1112
}
1213

13-
plugins {
14-
id("dev.kikugie.stonecutter") version "0.6-alpha.13"
15-
}
16-
17-
stonecutter {
18-
kotlinController = true
19-
centralScript = "build.gradle.kts"
14+
//plugins {
15+
// id("dev.kikugie.stonecutter") version "0.7.10"
16+
//}
2017

21-
create(rootProject) {
22-
versions( "1.21.5", "1.21.6")
23-
vcsVersion = "1.21.5"
24-
}
25-
}
18+
//stonecutter {
19+
// kotlinController = true
20+
// centralScript = "build.gradle.kts"
21+
//
22+
// create(rootProject) {
23+
// versions("1.21.8")
24+
// vcsVersion = "1.21.8"
25+
// }
26+
//}

src/main/java/wtf/cheeze/sbt/SkyblockTweaks.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public class SkyblockTweaks implements ModInitializer {
5757

5858
@Override
5959
public void onInitialize() {
60-
6160
SBTConfig.load();
6261
PersistentData.registerEvents();
6362

@@ -79,12 +78,7 @@ public void onInitialize() {
7978
MiningTitles.registerEvents();
8079
FetchurFeatures.registerEvents();
8180
ReforgeOverlay.registerEvents();
82-
83-
//? if >1.21.5
84-
/*HudRenderEvents.registerEvents();*/
85-
86-
87-
81+
HudRenderEvents.registerEvents();
8882
UpdateChecker.checkForUpdates();
8983
}
9084
}

src/main/java/wtf/cheeze/sbt/command/CommandUtils.java

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import com.mojang.brigadier.suggestion.SuggestionProvider;
2424
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
2525
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
26-
import net.minecraft.client.MinecraftClient;
27-
import net.minecraft.client.gui.screen.Screen;
28-
import net.minecraft.text.Text;
26+
import net.minecraft.client.Minecraft;
27+
import net.minecraft.client.gui.screens.Screen;
28+
import net.minecraft.network.chat.Component;
2929
import wtf.cheeze.sbt.utils.text.MessageManager;
3030
import wtf.cheeze.sbt.utils.NumberUtils;
3131
import wtf.cheeze.sbt.utils.text.TextUtils;
@@ -36,11 +36,10 @@
3636
import java.util.function.Supplier;
3737

3838
public class CommandUtils {
39-
4039
public static LiteralArgumentBuilder<FabricClientCommandSource> getScreenOpeningCommand(String name, Supplier<Screen> screenFactory) {
4140
return ClientCommandManager.literal(name).executes(context -> {
42-
MinecraftClient mc = context.getSource().getClient();
43-
mc.send(() -> mc.setScreen(screenFactory.get()));
41+
Minecraft mc = context.getSource().getClient();
42+
mc.schedule(() -> mc.setScreen(screenFactory.get()));
4443
return 1;
4544
});
4645
}
@@ -54,7 +53,6 @@ public static SuggestionProvider<FabricClientCommandSource> getArrayAsSuggestion
5453
};
5554
}
5655

57-
5856
static int[] getCalcPetTable(Rarity rarity) {
5957
return switch (rarity) {
6058
case COMMON -> Constants.pets().levelsCommon();
@@ -66,41 +64,46 @@ static int[] getCalcPetTable(Rarity rarity) {
6664
};
6765
}
6866

69-
70-
static Text getDebugText(String name, boolean value) {
67+
static Component getDebugText(String name, boolean value) {
7168
return getDebugText(name, String.valueOf(value), value ? Colors.LIME : Colors.RED);
7269
}
73-
static Text getDebugText(String name, int value) {
70+
71+
static Component getDebugText(String name, int value) {
7472
return getDebugText(name, String.valueOf(value), Colors.YELLOW);
7573
}
76-
static Text getDebugText(String name, float value) {
74+
75+
static Component getDebugText(String name, float value) {
7776
return getDebugText(name, String.valueOf(value), Colors.YELLOW);
7877
}
7978

80-
static Text getDebugText(String name, String value, int color) {
79+
static Component getDebugText(String name, String value, int color) {
8180
return TextUtils.join(
8281
TextUtils.withColor(name + ": ", Colors.CYAN),
8382
TextUtils.withColor(value, color)
8483
);
8584
}
86-
static Text getDebugText(String name, String value) {
85+
86+
static Component getDebugText(String name, String value) {
8787
return TextUtils.join(
8888
TextUtils.withColor(name + ": ", Colors.CYAN),
8989
TextUtils.withColor(value, Colors.YELLOW)
9090
);
9191
}
9292

93-
public static void send(CommandContext<FabricClientCommandSource> context, Text text) {
93+
public static void send(CommandContext<FabricClientCommandSource> context, Component text) {
9494
context.getSource().sendFeedback(TextUtils.join(MessageManager.PREFIX, TextUtils.SPACE, text));
9595
}
96+
9697
public static void send(CommandContext<FabricClientCommandSource> context, String text) {
97-
context.getSource().sendFeedback(TextUtils.join(MessageManager.PREFIX, TextUtils.SPACE, Text.of(text)));
98+
context.getSource().sendFeedback(TextUtils.join(MessageManager.PREFIX, TextUtils.SPACE, Component.nullToEmpty(text)));
9899
}
99-
public static void sendRaw(CommandContext<FabricClientCommandSource> context, Text text) {
100+
101+
public static void sendRaw(CommandContext<FabricClientCommandSource> context, Component text) {
100102
context.getSource().sendFeedback(text);
101103
}
104+
102105
public static void sendRaw(CommandContext<FabricClientCommandSource> context, String text) {
103-
context.getSource().sendFeedback(Text.of(text));
106+
context.getSource().sendFeedback(Component.nullToEmpty(text));
104107
}
105108

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

0 commit comments

Comments
 (0)