Skip to content

Commit

Permalink
clean, add auto upload
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Sep 17, 2023
1 parent b665dec commit 7d0e5c4
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Changelog
- port to forge
39 changes: 37 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
14 changes: 14 additions & 0 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 7d0e5c4

Please sign in to comment.