Skip to content

Commit e2a84a3

Browse files
committed
26.2 fabric port
1 parent fe88dba commit e2a84a3

14 files changed

Lines changed: 28 additions & 101 deletions

File tree

build.gradle.kts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ val shadeModImplementation: Configuration by configurations.creating {
7979

8080
// Version definitions
8181
val mcVersion = VersionDefinition( // Used for pre releases and release candidates
82-
"26.2" to "26.2-pre-4",
8382
default = mcPlatform.versionString
8483
)
8584
val compatibleMcVersion = VersionDefinition(
@@ -93,7 +92,7 @@ val compatibleMcVersion = VersionDefinition(
9392
"1.21.10" to VersionRange("1.21.9", "1.21.10", name = "1.21.10"),
9493
"1.21.11" to VersionRange("1.21.11", "1.21.11", name = "1.21.11"),
9594
"26.1.2" to VersionRange("26.1", "26.1.2", exclusiveUpperBound = "26.2", name = "26.1"),
96-
"26.2" to VersionRange("26.2", "26.2", exclusiveUpperBound = "26.3", name = "26.2", allowAll = true),
95+
"26.2" to VersionRange("26.2", "26.2", exclusiveUpperBound = "26.3", name = "26.2"),
9796
)
9897
val javaVersion = VersionDefinition(
9998
"1.20.1" to "17",
@@ -117,7 +116,7 @@ val fabricApiVersion = VersionDefinition(
117116
"1.21.10" to "0.136.0+1.21.10",
118117
"1.21.11" to "0.139.4+1.21.11",
119118
"26.1.2" to "0.150.0+26.1.2",
120-
"26.2" to "0.150.3+26.2",
119+
"26.2" to "0.152.1+26.2",
121120
)
122121
val modMenuVersion = VersionDefinition(
123122
"1.20.1" to "7.2.2",
@@ -166,10 +165,7 @@ val universalVersion = VersionDefinition(
166165
default = mcPlatform.versionString
167166
).let {
168167
VersionDefinition(
169-
"1.21.11-neoforge" to "1.21.11-neoforge:499+DIAMOND-NEO",
170-
"26.1.2-neoforge" to "26.1-fabric:499",
171-
"26.2" to "${it.get(mcPlatform)}-${mcPlatform.loaderString}:500+feature-mc-26.2-snapshot-7",
172-
default = "${it.get(mcPlatform)}-${mcPlatform.loaderString}:499"
168+
default = "${it.get(mcPlatform)}-${mcPlatform.loaderString}:505"
173169
)
174170
}
175171

changelog.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
## Resourcify 1.8.3
1+
## Resourcify 1.8.4
22

33
Please make sure to report any bugs and/or visual anomalies
44
on [Resourcify's GitHub](https://github.com/DeDiamondPro/Resourcify/issues) or in
55
the [Discord](https://dediamondpro.dev/discord).
66

7-
- Resourcify now contributes to Modrinth's analytics,
8-
see [their article](https://modrinth.com/news/article/analytics-overhaul/) for more info.
9-
- Ported to 1.21.11 and 26.1.2 NeoForge
10-
- Fixed download progress being stuck at 0% sometimes.
11-
- Added a search debounce to prevent sending a lot of requests when typing fast
12-
- Fixed issues with trying to open links with special characters.
13-
- Updated a lot of dependencies
7+
- Ported Resourcify to 26.2 fabric!
148

159
----------------------------------------------------------------------------------------------------
1610

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod_name = Resourcify
22
mod_id = resourcify
3-
mod_version = 1.8.3
3+
mod_version = 1.8.4
44

55
org.gradle.jvmargs=-Xmx4G
66
org.gradle.parallel=true

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ stonecutter {
6161
for (version in platforms) {
6262
version(version, version.split('-')[0])
6363
}
64-
vcsVersion = "26.1.2-fabric"
64+
vcsVersion = "26.2-fabric"
6565
}
6666
}
6767

src/main/java/dev/dediamondpro/resourcify/mixins/CreateWorldScreenMixin.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@
1212
public class CreateWorldScreenMixin {
1313
@ModifyArg(
1414
method = "init",
15-
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/components/tabs/TabNavigationBar$Builder;addTabs([Lnet/minecraft/client/gui/components/tabs/Tab;)Lnet/minecraft/client/gui/components/tabs/TabNavigationBar$Builder;")
15+
at = @At(
16+
value = "INVOKE",
17+
//?if <26.2 {
18+
/*target = "Lnet/minecraft/client/gui/components/tabs/TabNavigationBar$Builder;addTabs([Lnet/minecraft/client/gui/components/tabs/Tab;)Lnet/minecraft/client/gui/components/tabs/TabNavigationBar$Builder;"
19+
*///?} else
20+
target = "Lnet/minecraft/client/gui/components/tabs/MenuTabBar$Builder;addTabs([Lnet/minecraft/client/gui/components/tabs/Tab;)Lnet/minecraft/client/gui/components/tabs/MenuTabBar$Builder;"
21+
)
1622
)
17-
public Tab[] addTab(Tab[] tabs) {
23+
public Tab[] /*? <26.2 { */ /*addTab *//*?} else {*/ addTabs /*?}*/ (Tab[] tabs) {
1824
if (!Config.Companion.getInstance().getWorldsEnabled()) {
1925
return tabs;
2026
}

src/main/java/dev/dediamondpro/resourcify/mixins/TabManagerMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
@Mixin(TabManager.class)
1212
public class TabManagerMixin {
1313

14-
@Inject(method = "setCurrentTab", at = @At("HEAD"), cancellable = true)
14+
@Inject(method = "setCurrentTab*", at = @At("HEAD"), cancellable = true)
1515
public void onResourcifyWorldTab(Tab tab, boolean playClickSound, CallbackInfo ci) {
1616
// The tab opens a GUI, so we don't want it to be selected because then the GUI would open again after its closed
1717
if (tab instanceof DownloadWorldTab) {

src/main/kotlin/dev/dediamondpro/resourcify/Constants.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ import org.slf4j.LoggerFactory
2323
object Constants {
2424
const val NAME = /*$ mod_name*/ "Resourcify"
2525
const val ID = /*$ mod_id*/ "resourcify"
26-
const val VERSION = /*$ mod_version*/ "1.8.3"
26+
const val VERSION = /*$ mod_version*/ "1.8.4"
2727
val LOGGER: Logger = LoggerFactory.getLogger(NAME)
2828
}

src/main/kotlin/dev/dediamondpro/resourcify/Resourcify.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package dev.dediamondpro.resourcify
1919

2020
import dev.dediamondpro.resourcify.platform.ThemeReloadListener
2121
import dev.dediamondpro.resourcify.config.SettingsPage
22-
import dev.dediamondpro.resourcify.handlers.VulkanHandler
2322

2423
//? if fabric {
2524
import net.fabricmc.api.ClientModInitializer
@@ -48,11 +47,11 @@ object Resourcify /*? if fabric {*/ : ClientModInitializer /*?}*/ {
4847
init {
4948
//? if neoforge {
5049
/*LOADING_CONTEXT.registerExtensionPoint(IConfigScreenFactory::class.java) {
51-
IConfigScreenFactory { _, _ -> VulkanHandler.createOrBlock { SettingsPage() } }
50+
IConfigScreenFactory { _, _ -> SettingsPage() }
5251
}
5352
*///?} else if forge {
5453
/*LOADING_CONTEXT.registerExtensionPoint(ConfigScreenFactory::class.java) {
55-
ConfigScreenFactory { _, _ -> VulkanHandler.createOrBlock { SettingsPage() } }
54+
ConfigScreenFactory { _, _ -> SettingsPage() }
5655
}
5756
*///?}
5857

src/main/kotlin/dev/dediamondpro/resourcify/config/ModMenuIntegration.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ package dev.dediamondpro.resourcify.config
2121

2222
import com.terraformersmc.modmenu.api.ConfigScreenFactory
2323
import com.terraformersmc.modmenu.api.ModMenuApi
24-
import dev.dediamondpro.resourcify.handlers.VulkanHandler
2524
import net.minecraft.client.gui.screens.Screen
2625

2726
class ModMenuIntegration : ModMenuApi {
@@ -30,7 +29,7 @@ class ModMenuIntegration : ModMenuApi {
3029
}
3130

3231
object SettingsFactory : ConfigScreenFactory<Screen?> {
33-
override fun create(parent: Screen?): Screen? = VulkanHandler.createOrBlock { SettingsPage() }
32+
override fun create(parent: Screen?): Screen = SettingsPage()
3433
}
3534
}
3635

src/main/kotlin/dev/dediamondpro/resourcify/gui/injections/PackScreensAddition.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import dev.dediamondpro.resourcify.gui.browsepage.BrowseScreen
2222
import dev.dediamondpro.resourcify.gui.update.UpdateGui
2323
import dev.dediamondpro.resourcify.services.ProjectType
2424
import dev.dediamondpro.resourcify.gui.data.Icons
25-
import dev.dediamondpro.resourcify.handlers.VulkanHandler
2625
import gg.essential.universal.UScreen
2726
import net.minecraft.client.gui.screens.Screen
2827

@@ -34,10 +33,10 @@ object PackScreensAddition {
3433
val folder = type.getDirectory(screen)
3534
val buttons = mutableListOf<ImageButton>()
3635
buttons.add(ImageButton(screen, type.plusX, type.plusY, Icons.PLUS) {
37-
VulkanHandler.runOrBlock { UScreen.displayScreen(BrowseScreen(type, folder)) }
36+
UScreen.displayScreen(BrowseScreen(type, folder))
3837
})
3938
if (type.hasUpdateButton(folder)) buttons.add(ImageButton(screen, type.updateX, type.updateY, Icons.UPDATE) {
40-
VulkanHandler.runOrBlock { UScreen.displayScreen(UpdateGui(type, folder)) }
39+
UScreen.displayScreen(UpdateGui(type, folder))
4140
})
4241
return buttons
4342
}

0 commit comments

Comments
 (0)