Skip to content

Commit

Permalink
Merge pull request #16 from UnknownCrafts/1.17.1-backport
Browse files Browse the repository at this point in the history
port to 1.17.1 from the 1.18 version
  • Loading branch information
PinkGoosik authored Apr 12, 2022
2 parents ff63bb7 + 55089dd commit 0b36c58
Show file tree
Hide file tree
Showing 59 changed files with 908 additions and 772 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
matrix:
# Use these Java versions
java: [
16 # Minimum supported by Minecraft
16, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-20.04, windows-latest]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/publish-curseforge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: publish-curseforge

on:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v1
with:
java-version: 16
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Build artifacts
run: ./gradlew build
- name: publish artifacts
uses: Kir-Antipov/[email protected]
with:
curseforge-id: 521126
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

files-primary: build/libs/!(*-@(dev|sources)).jar

version-type: beta
loaders: |
fabric
game-versions: |
1.17.1
dependencies: |
fabric-api | depends | *
java: |
16
retry-attempts: 2
retry-delay: 10000
26 changes: 26 additions & 0 deletions .github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: publish-github

on:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v1
with:
java-version: 16
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Build artifacts
run: ./gradlew build
- name: Upload assets to GitHub
uses: AButler/[email protected]
with:
files: 'build/libs/*'
repo-token: ${{ secrets.GH_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/publish-maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: publish-maven

on:
release:
types:
- published

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-20.04
container:
image: eclipse-temurin:16-jdk
options: --user root
steps:
- run: apt update && apt install git -y && git --version
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Change wrapper permissions
run: chmod +x ./gradlew
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew build publish --stacktrace
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
42 changes: 42 additions & 0 deletions .github/workflows/publish-modrinth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: publish-modrinth

on:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v1
with:
java-version: 16
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Build artifacts
run: ./gradlew build
- name: publish artifacts
uses: Kir-Antipov/[email protected]
with:
modrinth-id: rI0hvYcd
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

files-primary: build/libs/!(*-@(dev|sources)).jar

version-type: beta
loaders: |
fabric
game-versions: |
1.17.1
dependencies: |
fabric-api | depends | *
java: |
16
retry-attempts: 2
retry-delay: 10000
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@
[![img](http://cf.way2muchnoise.eu/full_visuality_downloads.svg)](https://curseforge.com/minecraft/mc-mods/visuality)
[![img](http://cf.way2muchnoise.eu/versions/visuality_latest.svg)](https://curseforge.com/minecraft/mc-mods/visuality)

[Discord](https://discord.gg/DcemWeskeZ), [Modrinth](https://modrinth.com/mod/visuality), [CurseForge](https://curseforge.com/minecraft/mc-mods/visuality)
[Discord](https://discord.gg/DcemWeskeZ) | [Modrinth](https://modrinth.com/mod/visuality) | [CurseForge](https://curseforge.com/minecraft/mc-mods/visuality)
# Visuality
</div>

## About
Visuality is a simple cosmetic mod that adds a bunch of new particles such as crystal sparkles, particles on mob hitting, environmental particles, custom particles for slimes, expect list expanding with mod updates.
Visuality is a simple client-sided Cosmetic Mod that will add a bunch of new particles such as crystal sparkles, particles on mob hitting, custom particles for slimes, environmental particles to your Minecraft world, expect particles collection expanding with the Mod updates!

## Configuration
You can configure the Mod by editing visuality.json in the config folder of your Minecraft directory.

## Community
Let any Issues or Suggestions be known on the Visuality [GitHub Repo](https://github.com/PinkGoosik/visuality), or on our [Discord Server](https://discord.gg/DcemWeskeZ)!
84 changes: 15 additions & 69 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,64 +1,49 @@
plugins {
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'maven-publish'
id "com.modrinth.minotaur" version "1.2.1"
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'io.github.juuxel.loom-quiltflower-mini' version '1.3.0'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_16

archivesBaseName = project.archives_base_name
version = project.mod_version + "-fabric"
version = project.mod_version
group = project.maven_group

repositories {
maven { url "https://maven.gegy.dev" } //databreaker
maven { url "https://api.modrinth.com/maven" }
maven { url "https://maven.pinkgoosik.ru" } //cosmetica, goosik-config
maven { url "https://maven.terraformersmc.com" } //modmenu
maven { url "https://jitpack.io" } //goosik-config
maven { url "https://maven.pinkgoosik.ru" } //cosmetica
maven { url "https://maven.parchmentmc.org" } //parchment
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-1.17.1:2021.12.12@zip")
}
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modImplementation "ru.pinkgoosik:cosmetica:0.3.1-fabric"
include "ru.pinkgoosik:cosmetica:0.3.1-fabric"

modImplementation "com.github.PinkGoosik:goosik-config:0.1.1"
include "com.github.PinkGoosik:goosik-config:0.1.1"
include modImplementation("ru.pinkgoosik:goosik-config:0.2.0-1.17.1-fabric")

modRuntime "com.terraformersmc:modmenu:2.0.3"
modRuntime "supercoder79:databreaker:0.2.7"
modRuntime "com.ptsmods:devlogin:1.2"
modLocalRuntime "com.terraformersmc:modmenu:2.0.14"
modLocalRuntime "maven.modrinth:lazydfu:0.1.2"
}

processResources {
inputs.property "version", project.mod_version

filesMatching("fabric.mod.json") {
expand "version": project.mod_version
}
}

tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"

// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}

Expand All @@ -68,7 +53,6 @@ jar {
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
Expand All @@ -79,47 +63,9 @@ publishing {
maven {
url "https://maven.pinkgoosik.ru/"
credentials {
username System.getenv("MAVEN_REPO_USER")
password System.getenv("MAVEN_REPO_PASS")
username System.getenv("MAVEN_USER")
password System.getenv("MAVEN_PASS")
}
}
}
}

//import com.modrinth.minotaur.TaskModrinthUpload
//
//task publishModrinth (type: TaskModrinthUpload){
// onlyIf {
// System.getenv("MODRINTH")
// }
// failSilently = true
// token = System.getenv("MODRINTH")
// projectId = 'rI0hvYcd'
// versionName = "[" + project.minecraft_version + "] " + "Visuality" + " " + project.mod_version
// versionNumber = project.minecraft_version + "-" + project.mod_version + "-fabric"
// versionType = "BETA"
// changelog = project.mod_changelog
// uploadFile = remapJar
// addGameVersion(project.minecraft_version)
// addLoader("fabric")
//}

//curseforge {
// apiKey = System.getenv("CURSEFORGE")
// project {
// id = "521126"
// changelog = project.mod_changelog
// releaseType = "beta"
// addGameVersion project.minecraft_version
// mainArtifact(remapJar) {
// displayName = "[" + project.minecraft_version + "] " + "Visuality" + " " + project.mod_version
// }
// }
// options {
// forgeGradleIntegration = false
// }
//}
//
//afterEvaluate {
// tasks.curseforge521126.dependsOn remapJar
//}
8 changes: 3 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.40
loader_version=0.11.6
loader_version=0.13.3

# Mod Properties
mod_version = 0.3.2
mod_version = 0.3.4
maven_group = ru.pinkgoosik
archives_base_name = visuality

# Dependencies
fabric_version=0.38.2+1.17
fabric_version=0.46.1+1.17
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 0b36c58

Please sign in to comment.