Skip to content

Commit

Permalink
Merge pull request #690 from FTBTeam/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
desht authored Sep 1, 2023
2 parents 3b69279 + 568742e commit 19783a4
Show file tree
Hide file tree
Showing 290 changed files with 6,157 additions and 7,263 deletions.
49 changes: 12 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,23 @@
name: Java CI
name: Java CI - Build on Push

on:
push:
branches:
# main and dev versions for each mc ver here
- "1.19/main"
- "1.19/dev"
branches: [ main, dev, "1.*" ]
workflow_dispatch:
inputs:
norelease:
description: 'Do not publish'
skip_maven_publish:
description: 'Skip Maven publishing'
required: true
default: 'false'

jobs:
build:
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, '[ci skip]')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 30 # Gets the last 30 commits so the changelog might work
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build and Publish with Gradle
uses: gradle/gradle-build-action@v2
env:
FTB_MAVEN_TOKEN: ${{ secrets.FTB_MAVEN_TOKEN }}
SAPS_TOKEN: ${{ secrets.SAPS_TOKEN }}
with:
arguments: build publish --stacktrace --no-daemon
- name: Release to CurseForge
uses: gradle/gradle-build-action@v2
if: |
contains(github.ref, 'main') && !contains(github.event.head_commit.message, '[norelease]') && github.event.inputs.norelease != 'true'
env:
GIT_COMMIT: ${{ github.event.after }}
GIT_PREVIOUS_COMMIT: ${{ github.event.before }}
CURSEFORGE_KEY: ${{ secrets.CURSEFORGE_KEY }}
with:
arguments: build curseforge --stacktrace --no-daemon
!contains(github.event.head_commit.message, '[ciskip]')
uses: FTBTeam/mods-meta/.github/workflows/standard-release.yml@main
with:
curse-publish-task: ""
maven-snapshots: true
secrets:
ftb-maven-token: ${{ secrets.FTB_MAVEN_TOKEN }}
saps-token: ${{ secrets.SAPS_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Java CI - Build Release

on:
release:
types: [ published ]

jobs:
build:
if: |
!contains(github.event.head_commit.message, '[ciskip]')
uses: FTBTeam/mods-meta/.github/workflows/standard-release.yml@main
with:
curse-publish-task: curseforge
secrets:
ftb-maven-token: ${{ secrets.FTB_MAVEN_TOKEN }}
saps-token: ${{ secrets.SAPS_TOKEN }}
curse-token: ${{ secrets.CURSEFORGE_KEY }}
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2001.1.1]

### Changed
* Ported to Minecraft 1.20.1
* Note that **FTB XMod Compat** is recommended for cross-mod integration (FTB Ranks / Luckperms, JEI / REI, Game Stages)
* No KubeJS support in this release (KubeJS is not available on 1.20.1)
* Scroll wheel behaviour changed; scrolling now scrolls up and down; hold Shift to pan left and right; hold Ctrl to zoom in and out
* Old behaviour can be restored via local preferences (see below)
* Quest and Chapter edit screens have been reorganised into subsections to reduce the "wall of text" effect
* Editing mode status information has been cleaned up into a status bar at the bottom of the screen

### Added
* New clientside local preferences are stored; can be accessed via the player head icon in bottom right of the GUI
* Currently only stores scroll-wheel behaviour, but likely to expanded in the future
* Now supports a `ftbquests.editor` permission node (via FTB Ranks or Luckperms; FTB XMod Compat also required)
* Allows players to be quest book editors without requiring full admin permissions
* Several quest settings now have chapter defaults
* Quest Size (note that the quest size is now 0 by default in quests instead of 1; 0 means "use chapter default")
* Repeatable flag
* Consume Items flag for Item Tasks (in addition to the existing global "Consume Items" flag settable via "Edit File")
* There is a new in-game "Key Reference" screen, available via the grey "Info" icon on the right-hand toolbar

## [1902.4.18]

### Changed
* Removed the feature whereby double-tapping Shift opens the quest search GUI
* This caused problems for player whose keyboards send multiple keyup/keydown events for modifier keys like Shift
* Use Ctrl+F to open the search GUI instead

### Fixed
* Fixed issue with quest dependency validation (after adding a dependency via the quest edit screen) sometimes taking far, far too long
* Likely to be an issue with large complex quest trees with many interleaving dependencies
* Fixed the mouse pointer warping to the screen center when opening FTB Quests from the sidebar button
* Fixed a client crash when opening a quest via JEI integration

## [1902.4.17]

### Fixed
Expand Down
18 changes: 9 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.2-SNAPSHOT" apply false
id "com.matthewprenger.cursegradle" version "1.4.0" apply false
}

Expand Down Expand Up @@ -28,10 +28,13 @@ allprojects {
apply from: "https://raw.githubusercontent.com/FTBTeam/mods-meta/main/gradle/git-md-changelog.gradle"

def ENV = System.getenv()
version = "${mod_version}-build.${ENV.GITHUB_RUN_NUMBER ?: 9999}"
version = mod_version
group = project.maven_group
archivesBaseName = project.archives_base_name

// needs to be done AFTER version is set
apply from: "https://raw.githubusercontent.com/FTBTeam/mods-meta/main/gradle/publishing.gradle"

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = 17

compileJava {
Expand All @@ -45,21 +48,18 @@ allprojects {
}

maven {
url "https://maven.blamejared.com/"
}

maven {
url "https://maven.saps.dev/minecraft"
url "https://maven.saps.dev/releases"
content {
includeGroup "dev.latvian.mods"
includeGroup "dev.ftb.mods"
}
}

maven {
url "https://maven.blamejared.com"
url "https://maven.saps.dev/snapshots"
content {
includeGroup "net.darkhax.gamestages"
includeGroup "dev.latvian.mods"
includeGroup "dev.ftb.mods"
}
}
}
Expand Down
27 changes: 11 additions & 16 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,38 @@ dependencies {
modApi("dev.ftb.mods:ftb-library:${rootProject.ftb_library_version}") { transitive false }
modApi "dev.ftb.mods:ftb-teams:${rootProject.ftb_teams_version}"
modApi "dev.latvian.mods:item-filters:${rootProject.itemfilters_version}"

modCompileOnly "me.shedaniel:RoughlyEnoughItems-api:${rootProject.rei_version}"

modImplementation "dev.latvian.mods:kubejs:${rootProject.kubejs_version}"
}

def ENV = System.getenv()

architectury {
common()
}

publishing {
publications {
mavenCommon(MavenPublication) {
artifactId = rootProject.archivesBaseName
mavenForge(MavenPublication) {
artifactId = "${rootProject.archives_base_name}"
version ftbPublishing.mavenVersion
from components.java
}
}

repositories {
if (ENV.FTB_MAVEN_TOKEN) {
if (ftbPublishing.ftbToken) {
maven {
url "https://maven.ftb.dev/release"
url ftbPublishing.ftbURL
credentials {
username = "ftb"
password = "${ENV.FTB_MAVEN_TOKEN}"
username = ftbPublishing.ftbUser
password = ftbPublishing.ftbToken
}
}
}

if (ENV.SAPS_TOKEN) {
if (ftbPublishing.sapsToken) {
maven {
url "https://maven.saps.dev/minecraft"
url ftbPublishing.sapsURL
credentials {
username = "ftb"
password = "${ENV.SAPS_TOKEN}"
username = ftbPublishing.sapsUser
password = ftbPublishing.sapsToken
}
}
}
Expand Down
39 changes: 23 additions & 16 deletions common/src/main/java/dev/ftb/mods/ftbquests/FTBQuests.java
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@
package dev.ftb.mods.ftbquests;

import dev.architectury.registry.CreativeTabRegistry;
import dev.architectury.utils.Env;
import dev.architectury.utils.EnvExecutor;
import dev.ftb.mods.ftbquests.api.FTBQuestsAPI;
import dev.ftb.mods.ftbquests.client.FTBQuestsClient;
import dev.ftb.mods.ftbquests.client.FTBQuestsNetClient;
import dev.ftb.mods.ftbquests.item.FTBQuestsItems;
import dev.ftb.mods.ftbquests.integration.RecipeModHelper;
import dev.ftb.mods.ftbquests.net.FTBQuestsNetHandler;
import dev.ftb.mods.ftbquests.quest.reward.RewardTypes;
import dev.ftb.mods.ftbquests.quest.task.TaskTypes;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Objects;

public class FTBQuests {
public static final String MOD_ID = "ftbquests";
public static final Logger LOGGER = LogManager.getLogger("FTB Quests");
public static final Logger LOGGER = LogManager.getLogger(FTBQuestsAPI.MOD_NAME);

public static FTBQuests instance;

public static FTBQuestsCommon PROXY;
public static FTBQuestsNetCommon NET_PROXY;

public static final CreativeModeTab ITEM_GROUP = CreativeTabRegistry.create(new ResourceLocation(FTBQuests.MOD_ID, FTBQuests.MOD_ID), () -> new ItemStack(FTBQuestsItems.BOOK.get()));
private static RecipeModHelper recipeModHelper;
private static final RecipeModHelper NO_OP_HELPER = new RecipeModHelper.NoOp();

public FTBQuests() {
FTBQuestsAPI._init(FTBQuestsAPIImpl.INSTANCE);

TaskTypes.init();
RewardTypes.init();
FTBQuestsNetHandler.init();
PROXY = EnvExecutor.getEnvSpecific(() -> FTBQuestsClient::new, () -> FTBQuestsCommon::new);
NET_PROXY = EnvExecutor.getEnvSpecific(() -> FTBQuestsNetClient::new, () -> FTBQuestsNetCommon::new);
new FTBQuestsEventHandler().init();
FTBQuestsEventHandler.INSTANCE.init();

EnvExecutor.runInEnv(Env.CLIENT, () -> FTBQuestsClient::init);
}

public static RecipeModHelper getRecipeModHelper() {
return Objects.requireNonNullElse(recipeModHelper, NO_OP_HELPER);
}

PROXY.init();
public static void setRecipeModHelper(RecipeModHelper recipeModHelper) {
if (FTBQuests.recipeModHelper != null) {
throw new IllegalStateException("recipe mod helper has already been initialised!");
}
FTBQuests.recipeModHelper = recipeModHelper;
}

public void setup() {
Expand Down
19 changes: 19 additions & 0 deletions common/src/main/java/dev/ftb/mods/ftbquests/FTBQuestsAPIImpl.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package dev.ftb.mods.ftbquests;

import dev.ftb.mods.ftbquests.api.FTBQuestsAPI;
import dev.ftb.mods.ftbquests.client.FTBQuestsClient;
import dev.ftb.mods.ftbquests.quest.BaseQuestFile;
import dev.ftb.mods.ftbquests.quest.ServerQuestFile;

import java.util.Objects;

public enum FTBQuestsAPIImpl implements FTBQuestsAPI.API {
INSTANCE;

@Override
public BaseQuestFile getQuestFile(boolean isClient) {
return isClient ?
Objects.requireNonNull(FTBQuestsClient.getClientQuestFile()) :
ServerQuestFile.INSTANCE;
}
}
60 changes: 0 additions & 60 deletions common/src/main/java/dev/ftb/mods/ftbquests/FTBQuestsCommon.java

This file was deleted.

Loading

0 comments on commit 19783a4

Please sign in to comment.