Skip to content

Commit d132464

Browse files
authored
Merge pull request #38 from FTBTeam/dev
Dev
2 parents 844f323 + 7b3340b commit d132464

File tree

63 files changed

+1135
-930
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1135
-930
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,23 @@
1-
name: Java CI
1+
name: Java CI - Build on Push
22

33
on:
44
push:
5-
branches:
6-
# main and dev versions for each mc ver here
7-
- "1.19/main"
8-
- "1.19/dev"
5+
branches: [ main, dev, "1.*" ]
96
workflow_dispatch:
107
inputs:
11-
norelease:
12-
description: 'Do not publish'
8+
skip_maven_publish:
9+
description: 'Skip Maven publishing'
1310
required: true
1411
default: 'false'
1512

1613
jobs:
1714
build:
18-
runs-on: ubuntu-latest
1915
if: |
20-
!contains(github.event.head_commit.message, '[ci skip]')
21-
steps:
22-
- uses: actions/checkout@v3
23-
with:
24-
fetch-depth: 30 # Gets the last 30 commits so the changelog might work
25-
- name: Set up JDK 17
26-
uses: actions/setup-java@v3
27-
with:
28-
distribution: 'temurin'
29-
java-version: '17'
30-
- name: Validate Gradle Wrapper
31-
uses: gradle/wrapper-validation-action@v1
32-
- name: Build and Publish with Gradle
33-
uses: gradle/gradle-build-action@v2
34-
env:
35-
FTB_MAVEN_TOKEN: ${{ secrets.FTB_MAVEN_TOKEN }}
36-
SAPS_TOKEN: ${{ secrets.SAPS_TOKEN }}
37-
with:
38-
arguments: build publish --stacktrace --no-daemon
39-
- name: Release to CurseForge
40-
uses: gradle/gradle-build-action@v2
41-
if: |
42-
contains(github.ref, 'main') && !contains(github.event.head_commit.message, '[norelease]') && github.event.inputs.norelease != 'true'
43-
env:
44-
GIT_COMMIT: ${{ github.event.after }}
45-
GIT_PREVIOUS_COMMIT: ${{ github.event.before }}
46-
CURSEFORGE_KEY: ${{ secrets.CURSEFORGE_KEY }}
47-
with:
48-
arguments: build curseforge --stacktrace --no-daemon
16+
!contains(github.event.head_commit.message, '[ciskip]')
17+
uses: FTBTeam/mods-meta/.github/workflows/standard-release.yml@main
18+
with:
19+
curse-publish-task: ""
20+
maven-snapshots: true
21+
secrets:
22+
ftb-maven-token: ${{ secrets.FTB_MAVEN_TOKEN }}
23+
saps-token: ${{ secrets.SAPS_TOKEN }}

.github/workflows/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Java CI - Build Release
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
build:
9+
if: |
10+
!contains(github.event.head_commit.message, '[ciskip]')
11+
uses: FTBTeam/mods-meta/.github/workflows/standard-release.yml@main
12+
with:
13+
curse-publish-task: curseforge
14+
secrets:
15+
ftb-maven-token: ${{ secrets.FTB_MAVEN_TOKEN }}
16+
saps-token: ${{ secrets.SAPS_TOKEN }}
17+
curse-token: ${{ secrets.CURSEFORGE_KEY }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ logs
2121
# other
2222
eclipse
2323
run
24-
.vscode
24+
.vscode
25+
**/extra-mods-*/

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
[1902.1.16]
8+
9+
### Fixed
10+
* Correctly report errors and stop when a syntax error in ranks.snbt or players.snbt prevents the file from loading
11+
* Don't tell the player it loaded OK then wipe the current runtime config...
12+
713
[1902.1.15]
814

915
### Added

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id "architectury-plugin" version "3.4-SNAPSHOT"
3-
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
3+
id "dev.architectury.loom" version "1.2-SNAPSHOT" apply false
44
}
55

66
architectury {
@@ -31,6 +31,9 @@ allprojects {
3131
group = project.maven_group
3232
archivesBaseName = project.archives_base_name
3333

34+
// needs to be done AFTER version is set
35+
apply from: "https://raw.githubusercontent.com/FTBTeam/mods-meta/main/gradle/publishing.gradle"
36+
3437
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = 17
3538

3639
compileJava {
@@ -58,6 +61,13 @@ allprojects {
5861
includeGroup "dev.ftb.mods"
5962
}
6063
}
64+
maven {
65+
url "https://maven.saps.dev/snapshots"
66+
content {
67+
includeGroup "dev.latvian.mods"
68+
includeGroup "dev.ftb.mods"
69+
}
70+
}
6171
}
6272

6373
java {

common/build.gradle

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,28 @@ publishing {
1616
publications {
1717
mavenCommon(MavenPublication) {
1818
artifactId = rootProject.archivesBaseName
19+
version ftbPublishing.mavenVersion
1920
from components.java
2021
}
2122
}
2223

2324
repositories {
24-
if (ENV.FTB_MAVEN_TOKEN) {
25+
if (ftbPublishing.ftbToken) {
2526
maven {
26-
url "https://maven.ftb.dev/release"
27+
url ftbPublishing.ftbURL
2728
credentials {
28-
username = "ftb"
29-
password = "${ENV.FTB_MAVEN_TOKEN}"
29+
username = ftbPublishing.ftbUser
30+
password = ftbPublishing.ftbToken
3031
}
3132
}
3233
}
3334

34-
if (ENV.SAPS_TOKEN) {
35+
if (ftbPublishing.sapsToken) {
3536
maven {
36-
url "https://maven.saps.dev/minecraft"
37+
url ftbPublishing.sapsURL
3738
credentials {
38-
username = "ftb"
39-
password = "${ENV.SAPS_TOKEN}"
39+
username = ftbPublishing.sapsUser
40+
password = ftbPublishing.sapsToken
4041
}
4142
}
4243
}

common/src/main/java/dev/ftb/mods/ftbranks/FTBRanks.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import dev.architectury.event.events.common.CommandRegistrationEvent;
44
import dev.architectury.event.events.common.LifecycleEvent;
55
import dev.ftb.mods.ftbranks.api.FTBRanksAPI;
6+
import dev.ftb.mods.ftbranks.api.event.RankEvent;
67
import dev.ftb.mods.ftbranks.impl.FTBRanksAPIImpl;
78
import org.apache.logging.log4j.LogManager;
89
import org.apache.logging.log4j.Logger;
@@ -14,13 +15,16 @@ public class FTBRanks {
1415
public static final String MOD_ID = "ftbranks";
1516
public static final Logger LOGGER = LogManager.getLogger("FTB Ranks");
1617

17-
public FTBRanks() {
18-
FTBRanksAPI.INSTANCE = new FTBRanksAPIImpl();
19-
LifecycleEvent.SERVER_BEFORE_START.register(FTBRanksAPIImpl::serverAboutToStart);
18+
public static void init() {
19+
FTBRanksAPI.setup(new FTBRanksAPIImpl());
20+
21+
LifecycleEvent.SERVER_STARTING.register(FTBRanksAPIImpl::serverStarting);
2022
LifecycleEvent.SERVER_STARTED.register(FTBRanksAPIImpl::serverStarted);
2123
LifecycleEvent.SERVER_STOPPED.register(FTBRanksAPIImpl::serverStopped);
2224
LifecycleEvent.SERVER_LEVEL_SAVE.register(FTBRanksAPIImpl::worldSaved);
23-
LifecycleEvent.SERVER_STARTING.register(FTBRanksAPIImpl::serverStarting);
25+
26+
RankEvent.REGISTER_CONDITIONS.register(FTBRanksAPIImpl::registerConditions);
27+
2428
CommandRegistrationEvent.EVENT.register(FTBRanksCommands::register);
2529
}
2630
}

0 commit comments

Comments
 (0)