Skip to content

Commit 6a3ed1e

Browse files
committed
Bump version to 1.0.0-beta4, enhance Optifine detection, and update installation guide
1 parent af7e72d commit 6a3ed1e

File tree

6 files changed

+28
-14
lines changed

6 files changed

+28
-14
lines changed

build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ loom {
4141
log4jConfigs.from(file("log4j2.xml"))
4242
launchConfigs {
4343
"client" {
44-
property("mixin.debug", "true")
45-
arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker")
4644
arg("--tweakClass", "com.github.kdgaming0.packcore.tweaker.PackConfigTweaker")
4745
}
4846
}
@@ -135,9 +133,6 @@ tasks.withType<org.gradle.jvm.tasks.Jar> {
135133
this["FMLCorePluginContainsFMLMod"] = "true"
136134
this["ForceLoadAsMod"] = "true"
137135
this["TweakClass"] = "com.github.kdgaming0.packcore.tweaker.PackConfigTweaker"
138-
// If you don't want mixins, remove these lines:
139-
this["TweakClass"] = "org.spongepowered.asm.launch.MixinTweaker"
140-
this["MixinConfigs"] = "mixins.$modid.json"
141136
if (transformerFile.exists()) {
142137
this["FMLAT"] = "${modid}_at.cfg"
143138
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ org.gradle.jvmargs=-Xmx2g
33
baseGroup = com.github.kdgaming0.packcore
44
mcVersion = 1.8.9
55
modid = packcore
6-
version = 1.0.0-beta2
6+
version = 1.0.0-beta4

src/main/java/com/github/kdgaming0/packcore/copysystem/ZipSelectionDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private void initializeUI() {
7878
JLabel introLabel = new JLabel("<html><body style='width:450px;'>"
7979
+ "<h2>Welcome to Skyblock Enhanced!</h2>"
8080
+ "Before playing, please select the ready-to-use zip file that best matches your needs for the best experience:<br><br>"
81-
+ "<b><i>Normal (1080p / 1440p):</i></b> Recommended for most players. This option has more features enabled by default, offering a rich and complex experience. However, new players may find it overwhelming at first due to the amount of on-screen information when joining Skyblock for the first time with mods.<br>"
81+
+ "<b><i>Normal (1080p / 1440p):</i></b> Recommended for most players. This option has more features enabled by default, offering a rich and complex experience.<br>"
8282
+ "<b><i>Lite (3-5 Business Days) (1080p / 1440p):</i></b> Designed for complete beginners, with fewer features enabled to simplify the experience. This is a great starting point to get familiar with the mod features. As you gain experience, you can enable additional features to create your perfect setup.<br><br>"
8383
+ "Custom configurations you’ve added will also appear here. (You can create them in-game via <i>/packcore</i> or the <i>Config Management</i> button on the main menu.)<br><br>"
8484
+ "If you skip this step, mods will use their default settings, as if downloaded individually and clicked play. This will cause many features to be disabled and have overlapping GUI elements. (I can't promise there won't be any overlapping with the ready-to-use configs but there will be less.)<br><br>"

src/main/java/com/github/kdgaming0/packcore/screen/OptifineGuide.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,20 @@ class OptifineGuide : UIContainer() {
112112

113113
val guideInstructionsText = MarkdownComponent(
114114
"""
115-
## Optifine install guide
115+
### Optifine install guide
116+
PackCore have detected that you don't have Optifine installed. (If this is wrong please ignore this message)
117+
Optifine is a mod that can help you get better performance in Minecraft. It is recommended to install it. (Because of licensing issues can I not include it in the modpack)
118+
116119
1. Go to the Optfine website and download Optifine for 1.8.9. [Direct link to The download.](https://optifine.net/adloadx?f=preview_OptiFine_1.8.9_HD_U_M6_pre2.jar)
117120
2. When you have downloaded find it in the Download folder in the File Explorer.
118121
3. Open the Modrinth app and locate the SkyBlock Enhanced installation.
119-
- It should be 3 dots on the right side of the installation.
122+
4. Open the installation folder.
123+
- It should be 3 dots on the right side of the installation close to the play button.
120124
- Click on the 3 dots and then click on Open Folder.
121125
5. Then locate the mods folder and open it.
122126
6. When opened copy the Optifine file over from the Download folder and into the mods folder that you just opened.
123-
7. Click play and have fun.
127+
7. Close the game and reopen it.
128+
8. Have fun with better performance.
124129
""".trimIndent()
125130
).constrain {
126131
x = CenterConstraint()

src/main/java/com/github/kdgaming0/packcore/screen/SEMainMenu.kt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ class SEMainMenu : WindowScreen(ElementaVersion.V7) {
3434
private var optifineWindowOpen = false
3535
private var optifineGuide: OptifineGuide? = null
3636

37+
private fun isOptiFineInstalled(): Boolean {
38+
return try {
39+
Class.forName("optifine.OptiFineClassTransformer")
40+
true
41+
} catch (e: ClassNotFoundException) {
42+
false
43+
}
44+
}
45+
3746
init {
3847
// Set the background image
3948
val background = UIPanorama().constrain {
@@ -67,7 +76,7 @@ class SEMainMenu : WindowScreen(ElementaVersion.V7) {
6776

6877
val buttonContainer2 = UIContainer().constrain {
6978
x = CenterConstraint()
70-
y = 60.pixels()
79+
y = 65.pixels()
7180
width = ChildBasedMaxSizeConstraint()
7281
height = 100.percent()
7382
} childOf buttonBackgroundEffect
@@ -95,7 +104,7 @@ class SEMainMenu : WindowScreen(ElementaVersion.V7) {
95104
UMinecraft.getMinecraft().displayGuiScreen(GuiOptions(this, UMinecraft.getMinecraft().gameSettings))
96105
} childOf buttonContainer3
97106

98-
CreateMenuButton("Mod Options") {
107+
CreateMenuButton("PackCore Options") {
99108
UScreen.displayScreen(ConfigGui())
100109
} childOf buttonContainer3
101110

@@ -195,7 +204,7 @@ class SEMainMenu : WindowScreen(ElementaVersion.V7) {
195204
y = CenterConstraint()
196205
} childOf labeBox
197206

198-
if (!Loader.isModLoaded("optifine")) {
207+
if (!isOptiFineInstalled()) {
199208
CreateMenuButtonInfo("Optifine Guide") {
200209
if (!optifineWindowOpen) {
201210
optifineWindowOpen = true
@@ -361,7 +370,7 @@ class SEMainMenu : WindowScreen(ElementaVersion.V7) {
361370

362371
override fun afterInitialization() {
363372
// Only show if Optifine is not loaded AND the guide is enabled in config
364-
if (!Loader.isModLoaded("optifine") &&
373+
if (!isOptiFineInstalled() &&
365374
ModConfig.getShowOptifineGuide() &&
366375
!optifineWindowOpen &&
367376
optifineGuide == null) {

src/main/java/com/github/kdgaming0/packcore/tweaker/PackConfigTweaker.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.google.gson.GsonBuilder;
66
import com.google.gson.JsonObject;
77
import net.minecraft.launchwrapper.ITweaker;
8+
import net.minecraft.launchwrapper.Launch;
89
import net.minecraft.launchwrapper.LaunchClassLoader;
910
import org.apache.logging.log4j.LogManager;
1011
import org.apache.logging.log4j.Logger;
@@ -37,6 +38,10 @@ public void acceptOptions(List<String> args, File gameDir, File assetsDir, Strin
3738

3839
@Override
3940
public void injectIntoClassLoader(LaunchClassLoader classLoader) {
41+
@SuppressWarnings("unchecked")
42+
List<String> tweakClasses = (List<String>) Launch.blackboard.get("TweakClasses");
43+
tweakClasses.add("org.spongepowered.asm.launch.MixinTweaker");
44+
4045
loadConfig();
4146

4247
// Check if PromptSetDefaultConfig is true

0 commit comments

Comments
 (0)