Update to 1.20.4, and just generally fixing up code. This version actually runs!
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
/.gradle/
|
/.gradle/
|
||||||
/build/
|
/build/
|
||||||
/.idea/
|
/.idea/
|
||||||
|
/run/
|
||||||
24
build.gradle
24
build.gradle
@@ -1,7 +1,9 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '1.5-SNAPSHOT'
|
id 'fabric-loom' version '1.6-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id "org.jetbrains.kotlin.jvm" version "1.9.22"
|
id "org.jetbrains.kotlin.jvm" version "2.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
version = project.mod_version
|
version = project.mod_version
|
||||||
@@ -17,12 +19,6 @@ repositories {
|
|||||||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
||||||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
||||||
// for more information about repositories.
|
// for more information about repositories.
|
||||||
|
|
||||||
maven {
|
|
||||||
name = "CottonMC"
|
|
||||||
url = "https://server.bbkr.space/artifactory/libs-release"
|
|
||||||
}
|
|
||||||
maven { url "https://maven.terraformersmc.com/" }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loom {
|
loom {
|
||||||
@@ -46,13 +42,6 @@ dependencies {
|
|||||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"
|
modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"
|
||||||
|
|
||||||
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
|
|
||||||
// Uncomment the following line to enable the deprecated Fabric API modules.
|
|
||||||
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.
|
|
||||||
|
|
||||||
// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
|
|
||||||
// implementation group: 'org.kohsuke', name: 'github-api', version: '1.318'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
@@ -67,7 +56,7 @@ tasks.withType(JavaCompile).configureEach {
|
|||||||
it.options.release = 17
|
it.options.release = 17
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
tasks.withType(KotlinCompile).configureEach {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = 17
|
jvmTarget = 17
|
||||||
}
|
}
|
||||||
@@ -92,7 +81,8 @@ jar {
|
|||||||
// configure the maven publication
|
// configure the maven publication
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
mavenJava(MavenPublication) {
|
create("mavenJava", MavenPublication) {
|
||||||
|
artifactId = project.archives_base_name
|
||||||
from components.java
|
from components.java
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
# gradle.properties
|
# gradle.properties
|
||||||
|
|
||||||
|
kotlin.code.style=official
|
||||||
|
|
||||||
# Done to increase the memory available to gradle.
|
# Done to increase the memory available to gradle.
|
||||||
org.gradle.jvmargs=-Xmx1G
|
org.gradle.jvmargs=-Xmx1G
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.19.4
|
minecraft_version=1.20.4
|
||||||
yarn_mappings=1.19.4+build.2
|
yarn_mappings=1.20.4+build.3
|
||||||
loader_version=0.15.6
|
loader_version=0.15.11
|
||||||
fabric_kotlin_version=1.10.17+kotlin.1.9.22
|
fabric_kotlin_version=1.11.0+kotlin.2.0.0
|
||||||
|
|
||||||
# yeah
|
# yeah
|
||||||
modmenu_version=9.0.0
|
modmenu_version=9.0.0
|
||||||
@@ -20,4 +22,4 @@ maven_group=chickenmanfy.scify
|
|||||||
archives_base_name=scify
|
archives_base_name=scify
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.87.2+1.19.4
|
fabric_version=0.97.1+1.20.4
|
||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
20
gradlew.bat
vendored
20
gradlew.bat
vendored
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
|
|||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package chickenmanfy.scify
|
package chickenmanfy.scify
|
||||||
|
|
||||||
import io.github.prospector.modmenu.api.ConfigScreenFactory
|
|
||||||
import io.github.prospector.modmenu.api.ModMenuApi
|
|
||||||
import net.fabricmc.api.ClientModInitializer
|
import net.fabricmc.api.ClientModInitializer
|
||||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents
|
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents
|
||||||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper
|
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper
|
||||||
@@ -10,11 +8,6 @@ import net.minecraft.client.option.KeyBinding
|
|||||||
import net.minecraft.client.util.InputUtil
|
import net.minecraft.client.util.InputUtil
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import org.lwjgl.glfw.GLFW
|
import org.lwjgl.glfw.GLFW
|
||||||
import net.fabricmc.api.EnvType
|
|
||||||
import net.fabricmc.api.Environment
|
|
||||||
import net.minecraft.client.gui.screen.Screen
|
|
||||||
import net.minecraft.client.gui.widget.ButtonWidget
|
|
||||||
import net.minecraft.client.util.math.MatrixStack
|
|
||||||
|
|
||||||
|
|
||||||
object SciFyClient : ClientModInitializer {
|
object SciFyClient : ClientModInitializer {
|
||||||
@@ -37,37 +30,3 @@ object SciFyClient : ClientModInitializer {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Environment(EnvType.CLIENT)
|
|
||||||
class ScifyModMenu : ModMenuApi {
|
|
||||||
override fun getModConfigScreenFactory(): ConfigScreenFactory<*> {
|
|
||||||
return ConfigScreenFactory<*> { parent -> menu(parent) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Environment(EnvType.CLIENT)
|
|
||||||
class menu(private val parent: Screen) : Screen(Text.literal("Your Mod Config")) {
|
|
||||||
override fun init() {
|
|
||||||
// Add a button to open Mod Menu
|
|
||||||
val modMenuButton = ButtonWidget.builder(
|
|
||||||
Text.literal("Mod Menu")
|
|
||||||
) { button: ButtonWidget? ->
|
|
||||||
// Open Mod Menu
|
|
||||||
ModMenu.getInstance().openConfigScreen()
|
|
||||||
}
|
|
||||||
.dimensions(width / 2 - 100, height / 2, 200, 20)
|
|
||||||
.build()
|
|
||||||
|
|
||||||
addDrawableChild(modMenuButton)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun render(matrices: MatrixStack, mouseX: Int, mouseY: Int, delta: Float) {
|
|
||||||
renderBackground(matrices)
|
|
||||||
super.render(matrices, mouseX, mouseY, delta)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun onClose() {
|
|
||||||
client!!.setScreen(parent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,15 +3,22 @@
|
|||||||
"id": "scify",
|
"id": "scify",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"name": "SciFy",
|
"name": "SciFy",
|
||||||
"description": "A Dungeonfy mod so good you'll think it's science fiction",
|
"description": "A Dungeonfy mod so good you'll think it's science fiction\n\n\nThanks to the Dungeonfy community for giving me something to do during summer -Chickenmanfy",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Main Developer: Chickenmanfy",
|
{
|
||||||
"Server Owner: Enook",
|
"name": "Chickenmanfy",
|
||||||
"Thanks to Endr. for help with some bugs!"
|
"role": "Main Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "Endr.",
|
||||||
|
"role": "Help with bugs"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://modrinth.com",
|
"homepage": "https://modrinth.com/project/scify",
|
||||||
"sources": "https://github.com/chickenmanfy/scify/",
|
"sources": "https://github.com/chickenmanfy/scify",
|
||||||
"issues": "https://github.com/chickenmanfy/scify/issues"
|
"issues": "https://github.com/chickenmanfy/scify/issues"
|
||||||
},
|
},
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
@@ -40,7 +47,7 @@
|
|||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.15.6",
|
"fabricloader": ">=0.15.6",
|
||||||
"minecraft": "~1.19.4",
|
"minecraft": "~1.20.4",
|
||||||
"java": ">=17",
|
"java": ">=17",
|
||||||
"fabric-api": "*",
|
"fabric-api": "*",
|
||||||
"fabric-language-kotlin": ">=1.9.22"
|
"fabric-language-kotlin": ">=1.9.22"
|
||||||
|
|||||||
Reference in New Issue
Block a user