Skip to content

Commit

Permalink
Fix NeoForge run
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jan 21, 2024
1 parent 3638259 commit 65ad537
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/main/java/io/github/gaming32/worldhost/WorldHost.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
//#endif
//#else
//$$ import io.github.gaming32.worldhost.gui.screen.WorldHostConfigScreen;
//$$ import net.minecraft.client.gui.screens.Screen;
//$$ import net.minecraft.server.packs.PackType;
//$$ import net.minecraft.server.packs.PackResources;
//#if FORGE
Expand Down Expand Up @@ -240,6 +239,9 @@ private static void init() {
//#else
//$$ .getResourcePackFor(MOD_ID)
//#endif
//#if MC >= 1.20.4
//$$ .map(c -> c.openPrimary("worldhost"))
//#endif
//$$ .map(c -> {
//#if MC <= 1.19.2
//$$ try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
//#endif

//#if MC >= 1.20.4 && FABRIC
import de.florianmichael.viafabricplus.screen.base.ProtocolSelectionScreen;
import de.florianmichael.viafabricplus.settings.impl.GeneralSettings;
import net.fabricmc.loader.api.FabricLoader;
//#if MC >= 1.20.1
Expand Down
12 changes: 10 additions & 2 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,27 @@ description = "Host your singleplayer worlds without having to run a server or s
modId = "neoforge"
versionRange = "[20,)"
##endif
mandatory = true
##if MC < 1.20.4
#?? mandatory = true
##else
type = "required"
##endif
ordering = "NONE"
side = "BOTH"

[[dependencies.world_host]]
modId = "minecraft"
mandatory = true
##if MC == 1.20.1
#?? versionRange = "[1.20,1.20.2)"
##elseif MC == 1.20.4
versionRange = "[1.20.3,1.20.5)"
##else
#?? versionRange = "$mc_version"
##endif
##if MC < 1.20.4
#?? mandatory = true
##else
type = "required"
##endif
ordering = "NONE"
side = "BOTH"
2 changes: 1 addition & 1 deletion version.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ unimined.minecraft {
isNeoForge -> neoForged {
loader(when (mcVersion) {
1_20_02 -> "86"
1_20_04 -> "2-beta"
1_20_04 -> "69-beta"
else -> throw IllegalStateException("Unknown NeoForge version for $mcVersionString")
})
minecraftRemapper.config {
Expand Down

0 comments on commit 65ad537

Please sign in to comment.