Skip to content

Commit

Permalink
Update to 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiahwinsley committed Jun 9, 2023
1 parent 5a9e757 commit 66eb6d0
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 35 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ on:
jobs:
build:

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Cache Gradle packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish to Curseforge

on:
workflow_dispatch:
inputs:
tag:
description: 'Release Tag'
required: true
type: string

jobs:
build:
runs-on: ubuntu-22.04
steps:
# Get the specified release by tag
- uses: octokit/[email protected]
id: get_release_by_tag
with:
route: GET /repos/{repository}/releases/tags/{tag}
repository: ${GITHUB_REPOSITORY}
tag: ${inputs.tag}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: robinraju/[email protected]
id: get_release_assets
with:
tag: ${inputs.tag}
fileName: "*.jar"
out-file-path: "assets"
token: ${{ secrets.GITHUB_TOKEN }}
- uses: itsmeow/curseforge-upload@v3
with:
file_path: "${{ fromJson(steps.get_release_assets.outputs.downloaded_files)[0] }}"
game_endpoint: "minecraft"
game_versions: "Minecraft 1.20:1.20,Java 17,Forge"
project_id: "431430"
token: ${{ secrets.CF_API_TOKEN }}
changelog: "${{ fromJson(steps.get_release_by_tag.outputs.data).body }}"

8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
jobs:
build:

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
Expand All @@ -23,7 +23,7 @@ jobs:
run: ./gradlew build
- name: Upload Release Asset
id: upload-release-assets
uses: alexellis/upload-assets@0.2.3
uses: alexellis/upload-assets@0.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
22 changes: 11 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT'
}

Expand All @@ -26,7 +26,7 @@ minecraft {
//
// Use non-default mappings at your own risk. They may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: 'official', version: '1.19.1'
mappings channel: 'official', version: '1.20'

// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.

Expand All @@ -49,10 +49,10 @@ minecraft {
property 'forge.logging.console.level', 'debug'

// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', 'flickerfix'
property 'forge.enabledGameTestNamespaces', mod_id

mods {
flickerfix {
"${mod_id}" {
source sourceSets.main
}
}
Expand All @@ -65,10 +65,10 @@ minecraft {

property 'forge.logging.console.level', 'debug'

property 'forge.enabledGameTestNamespaces', 'flickerfix'
property 'forge.enabledGameTestNamespaces', mod_id

mods {
flickerfix {
"${mod_id}" {
source sourceSets.main
}
}
Expand All @@ -84,10 +84,10 @@ minecraft {

property 'forge.logging.console.level', 'debug'

property 'forge.enabledGameTestNamespaces', 'flickerfix'
property 'forge.enabledGameTestNamespaces', mod_id

mods {
flickerfix {
"${mod_id}" {
source sourceSets.main
}
}
Expand All @@ -104,7 +104,7 @@ minecraft {
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

mods {
flickerfix {
"${mod_id}" {
source sourceSets.main
}
}
Expand All @@ -129,7 +129,7 @@ dependencies {
// Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
// that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.19.1-42.0.1'
minecraft 'net.minecraftforge:forge:1.20-46.0.2'

annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mc_version=1.19.1
mc_version=1.20
group=net.permutated
mod_id=flickerfix
version=3.1.0
version=4.0.0



Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
4 changes: 4 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ pluginManagement {
}
}

plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0'
}

rootProject.name = mod_id
6 changes: 3 additions & 3 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
loaderVersion="[41,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
loaderVersion="[46,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
license="All rights reserved"
Expand All @@ -33,7 +33,7 @@ Disables nightvision flickering when duration goes below 10 seconds.
# Does this dependency have to exist - if not, ordering below must be specified
mandatory=true #mandatory
# The version range of the dependency
versionRange="[41,)" #mandatory
versionRange="[46,)" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT or SERVER
Expand All @@ -43,6 +43,6 @@ Disables nightvision flickering when duration goes below 10 seconds.
modId="minecraft"
mandatory=true
# This version range declares a minimum of the current minecraft version up to but not including the next major version
versionRange="[1.19,1.20)"
versionRange="[1.20,1.21)"
ordering="NONE"
side="BOTH"
12 changes: 6 additions & 6 deletions src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"pack": {
"description": "FlickerFix resources",
"pack_format": 9,
"forge:resource_pack_format": 9,
"forge:data_pack_format": 10
}
"pack": {
"description": {
"text": "FlickerFix resources"
},
"pack_format": 15
}
}

0 comments on commit 66eb6d0

Please sign in to comment.