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 8f12077 commit 369930b
Show file tree
Hide file tree
Showing 11 changed files with 119 additions and 108 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/gradle_build.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
name: Gradle Build

on: [push, pull_request]
on:
workflow_dispatch:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
build:
strategy:
matrix:
java: [ 20 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 20
uses: actions/setup-java@v2
- uses: actions/checkout@v3
with:
java-version: 20
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Grant execute permission for Gradlew
run: chmod +x gradlew
cache: 'gradle'

- name: Build with Gradle
run: ./gradlew build
uses: gradle/gradle-build-action@v2
with:
arguments: build --parallel --stacktrace
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') && !startsWith(github.ref, 'refs/heads/dev/') && !startsWith(github.ref, 'refs/tags/v') }}

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: Artifacts
path: ./build/libs/
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Release

on: [workflow_dispatch] # Manual trigger

permissions:
contents: write

jobs:
Build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 20
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 20
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle') }}
- uses: gradle/wrapper-validation-action@v1
- run: |
chmod +x gradlew
./gradlew build publishCurseForge publish modrinth --stacktrace -Porg.gradle.parallel.threads=4
env:
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
96 changes: 2 additions & 94 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,2 @@
# LambDynamicLights changelog

## 1.0.0

- Initial release.
- Added dynamic lighting to the game.

## 1.1.0

- Added item frame dynamic lighting.
- Added API.
- Added more options.
- Added entities dynamic lighting toggle.
- Added block entities dynamic lighting toggle.
- Added block entity dynamic lighting.
- Allow dynamic lighting for block entities without block states.
- Should not be used in cases where block states can be used.
- Added compatibility with [Lil Tater Reloaded](https://github.com/Yoghurt4C/LilTaterReloaded).
- Lil taters will light up the area if they hold an item emitting light.
- Fixed light not moving when light source was moving too slow.
- Fixed lighting errors with Sodium.

## 1.2.0

- Added water-sensitive check for items and light sources.
- Added data item tag `#lambdynlights:water_sensitive` which lists every item which can't light up in the water.
- Added an option to enable/disable the feature
- Updated [SpruceUI] to 1.5.6 to fix latest snapshots issues.
- Added "early/WIP" compatibility with [Canvas Renderer].
- Added a warning message about performance issues.
- Fixed a crash with [Sodium] rc7 with smooth lighting set to HIGH.

### 1.2.1

- Added TNT dynamic lighting.
- Added lighting options for TNT and Creepers.
- Added luminance value to Fire charge item.
- Updated [SpruceUI] to 1.5.8
- Fixed player dynamic lighting not getting tracked when changing dimensions.

### 1.2.2

- Changed video options dynamic lighting button to redirect to LambDynamicLights settings.
- Fixed random crash.

## 1.3.0

- Added Simplified Chinese translations.
- Added German translations.
- Added Mexican Spanish translations ([#13](https://github.com/LambdAurora/LambDynamicLights/pull/13)).
- Added Polish translations ([#15](https://github.com/LambdAurora/LambDynamicLights/pull/15)).
- Added Russian translations ([#9](https://github.com/LambdAurora/LambDynamicLights/pull/9)).
- Added spectral arrow as item emitting light ([#17](https://github.com/LambdAurora/LambDynamicLights/pull/17)).
- Added dynamic lighting on glowing entities ([#17](https://github.com/LambdAurora/LambDynamicLights/pull/17)).
- Updated to Minecraft 1.16.2
- Updated [SpruceUI] to 1.6.2.
- Fixed dynamic lighting update issues at chunk borders ([#12](https://github.com/LambdAurora/LambDynamicLights/issues/12)).
- Fixed water-sensitive items lighting up in water on dedicated servers. ([#3](https://github.com/LambdAurora/LambDynamicLights/issues/3))
- Added new JSON API to add item luminance and water-sensitivity through resource packs.
- Added `DynamicLightHandler#isWaterSensitive` to make some entities water-sensitive like the blaze.
- Fixed incompatibility with future [Sodium] versions. ([#6](https://github.com/LambdAurora/LambDynamicLights/issues/6))

### 1.3.1

- Fixed entity lighting issue with [Sodium] 0.1.0. ([#23](https://github.com/LambdAurora/LambDynamicLights/issues/23))

### 1.3.2

- Added entity lighting capabilities to minecarts.
- Added `DynamicLightsInitializer` and `dynamiclights` entrypoint.
- Added Brazilian Portuguese translations.
- Added Estonian translations.
- Added Hindi translations.
- Added Turkish translations.
- Updated French translations.
- Fixed memory leak in dynamic light source tracking. ([#30](https://github.com/LambdAurora/LambDynamicLights/issues/30))

### 1.3.3

- Added Italian translations ([#40](https://github.com/LambdAurora/LambDynamicLights/pull/40)).
- Optimized dynamic lighting update methods.
- Fixed crash when leaving world with some minimaps mods. ([#37](https://github.com/LambdAurora/LambDynamicLights/issues/37), [#41](https://github.com/LambdAurora/LambDynamicLights/issues/41))
- Fixed crash with Immersive Portals ([#39](https://github.com/LambdAurora/LambDynamicLights/issues/39)).
- Updated [SpruceUI], and Fabric API dependencies.

### 1.3.4

- Fix ghost dynamic light source ([#47](https://github.com/LambdAurora/LambDynamicLights/issues/47)).
- Fix missing background in settings screen.
- Updated [SpruceUI].

[SpruceUI]: https://github.com/LambdAurora/SpruceUI "SpruceUI page"
[Sodium]: https://modrinth.com/mod/sodium "Sodium Modrinth page"
[Canvas Renderer]: https://www.curseforge.com/minecraft/mc-mods/canvas-renderer "Canvas Renderer CurseForge page"
## Changelog
- port to forge
43 changes: 38 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id 'dev.architectury.loom' version '1.2-SNAPSHOT'
id 'maven-publish'
id 'com.modrinth.minotaur' version '2.+'
id 'net.darkhax.curseforgegradle' version '1.+'
}

group = project.maven_group
Expand Down Expand Up @@ -34,10 +36,6 @@ repositories {
}
}

configurations {
api.extendsFrom libApi
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
Expand All @@ -47,7 +45,7 @@ dependencies {

modImplementation("maven.modrinth:obsidianui:${project.spruceui_version}")

libApi("org.aperlambda:lambdajcommon:1.8.1") {
implementation("org.aperlambda:lambdajcommon:1.8.1") {
exclude group: 'com.google.code.gson'
exclude group: 'com.google.guava'
}
Expand Down Expand Up @@ -75,6 +73,41 @@ jar {
from "../LICENSE"
}

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.16.4", "1.16.5"]
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 8")
mainFile.addGameVersion("1.16.4", "1.16.5")
mainFile.addRequirement("obsidianui")

def sourcesFile = mainFile.withAdditionalFile(sourcesJar)
sourcesFile.changelog = file("CHANGELOG.md")
sourcesFile.changelogType = "markdown"
}

// configure the maven publication
publishing {
publications {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ forge_version=1.16.5-36.2.39
mod_version = 0.1.0
maven_group = me.lambdaurora
archives_base_name = Ryoamiclights
modrinth_id=reCfnRvJ
curseforge_id=913587

# Dependencies
architectury_version=1.32.68
Expand Down
Binary file added icon/400x400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/400x400.psd
Binary file not shown.
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.16.4,1.16.5)"
ordering = "NONE"
side = "BOTH"

[[dependencies.lambdynlights]]
modId = "architectury"
mandatory = true
versionRange = "[1,)"
ordering = "NONE"
side = "BOTH"

[[dependencies.lambdynlights]]
modId = "spruceui"
mandatory = true
versionRange = "[0.1,)"
ordering = "NONE"
side = "BOTH"
File renamed without changes.
Binary file modified src/main/resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 369930b

Please sign in to comment.