diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..a2ff73b0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,2 @@ +## Changelog +- port to forge \ No newline at end of file diff --git a/build.gradle b/build.gradle index a827dd94..1969a8d5 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,8 @@ plugins { id 'io.github.juuxel.loom-vineflower' version '1.+' id 'java-library' id 'maven-publish' - id 'com.github.johnrengelman.shadow' version '7.0.0' - id 'com.modrinth.minotaur' version '1.2.+' + id 'com.modrinth.minotaur' version '2.+' + id 'net.darkhax.curseforgegradle' version '1.+' } group = project.maven_group @@ -72,6 +72,41 @@ jar { } } +modrinth { + token = System.getenv("MODRINTH_TOKEN") + + projectId = "${project.modrinth_id}" + versionNumber = "${project.version}" + versionType = "beta" + changelog = file("CHANGELOG.md").getText('UTF-8') + uploadFile = remapJar + additionalFiles = [sourcesJar] + gameVersions = ["1.18", "1.18.2"] + loaders = ["forge"] + dependencies { + required.project "obsidianui" + } +} + +task publishCurseForge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { + apiToken = System.getenv("CURSEFORGE_TOKEN") + disableVersionDetection() + + def mainFile = upload(project.curseforge_id, remapJar) + mainFile.displayName = "${project.version}" + mainFile.releaseType = "beta" + mainFile.changelog = file("CHANGELOG.md") + mainFile.changelogType = "markdown" + mainFile.addModLoader("Forge") + mainFile.addJavaVersion("Java 17", "Java 18") + mainFile.addGameVersion("1.18", "1.18.2") + mainFile.addRequirement("obsidianui") + + def sourcesFile = mainFile.withAdditionalFile(sourcesJar) + sourcesFile.changelog = file("CHANGELOG.md") + sourcesFile.changelogType = "markdown" +} + // configure the maven publication publishing { publications { diff --git a/gradle.properties b/gradle.properties index 56412634..4a968d3b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,10 +8,11 @@ yarn_mappings=1.18.2+build.4 forge_version=1.18.2-40.2.10 # Mod Properties -mod_version = 0.1.0 +mod_version = 0.1.1 maven_group = dev.lambdaurora archives_base_name = Ryoamiclights -modrinth_id=yBW8D80W +modrinth_id=reCfnRvJ +curseforge_id=913587 # Dependencies architectury_version=4.11.93 diff --git a/src/main/java/dev/lambdaurora/lambdynlights/mixin/forge/WorldRendererMixin.java b/src/main/java/dev/lambdaurora/lambdynlights/mixin/forge/WorldRendererMixin.java index b49f4f16..f1878d57 100644 --- a/src/main/java/dev/lambdaurora/lambdynlights/mixin/forge/WorldRendererMixin.java +++ b/src/main/java/dev/lambdaurora/lambdynlights/mixin/forge/WorldRendererMixin.java @@ -15,6 +15,11 @@ @Mixin(WorldRenderer.class) public class WorldRendererMixin { + /** + * Architectury API/Forge NOT HAVE {@code WorldRenderEvents} + * + * @author TexTrue + */ @Inject(at = @At("HEAD"), method = "render") public void render(MatrixStack outlinebuffersource, float i, long j, boolean k, Camera l, GameRenderer i1, LightmapTextureManager lightTexture, Matrix4f multibuffersource, CallbackInfo ci) { MinecraftClient.getInstance().getProfiler().push("dynamic_lighting"); diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index c70aa2de..025ddf7e 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -28,4 +28,18 @@ modId = "minecraft" mandatory = true versionRange = "[1.18,1.18.2]" ordering = "NONE" +side = "BOTH" + +[[dependencies.lambdynlights]] +modId = "architectury" +mandatory = true +versionRange = "*" +ordering = "NONE" +side = "BOTH" + +[[dependencies.lambdynlights]] +modId = "spruceui" +mandatory = true +versionRange = "*" +ordering = "NONE" side = "BOTH" \ No newline at end of file