Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Java CI - Build on Push

on:
push:
branches: [ main, dev, "1.*" ]
branches: [ main, dev, "1.**" ]
workflow_dispatch:
inputs:
skip_maven_publish:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ 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).

## [2101.1.4]

### Fixed
* Updated FTB Ranks wiki URL in generated README file
* Reworked `RankCommandPredicate` to avoid stack overflow errors with certain modded command trees

## [2101.1.3]

### Added
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "0.5.1"
id "me.modmuss50.mod-publish-plugin" version "2.1.1"
}

apply from: 'https://raw.githubusercontent.com/FTBTeam/mods-meta/main/gradle/changelog.gradle'
Expand Down Expand Up @@ -120,6 +120,8 @@ publishMods {
accessToken = providers.environmentVariable("CURSEFORGE_KEY")
minecraftVersions.add("${minecraft_version}")
javaVersions.add(JavaVersion.VERSION_21)
server = true
client = true
}

curseforge("curseforgeFabric") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.server.level.ServerPlayer;

import java.util.HashSet;
import java.util.Set;
import java.util.function.Predicate;
import java.util.function.Supplier;

Expand All @@ -21,7 +23,19 @@ public RankCommandPredicate(CommandNode<CommandSourceStack> commandNode, String
}

public String getNodeName() {
return redirect == null || redirect.get() == null ? nodeName : redirect.get().getNodeName();
Set<RankCommandPredicate> visited = new HashSet<>();
RankCommandPredicate currentNode = this;
while (visited.add(currentNode)) {
if (currentNode.redirect == null) {
return currentNode.nodeName;
}
RankCommandPredicate nextNode = currentNode.redirect.get();
if (nextNode == null) {
return currentNode.nodeName;
}
currentNode = nextNode;
}
return currentNode.nodeName;
}

public void setRedirect(Supplier<RankCommandPredicate> redirect) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public void refreshReadme() throws IOException {
lines.add("=== FTB Ranks ===");
lines.add("");
lines.add("Last README file update: " + new Date());
lines.add("Wiki: https://www.notion.so/feedthebeast/FTB-Mod-Documentation-da2e359bad2449459d58d787edda3168");
lines.add("Wiki: https://docs.feed-the-beast.com/mod-docs/mods/suite/Ranks/");
lines.add("To refresh this file, run /ftbranks refresh_readme");
lines.add("");
lines.add("= All available command nodes =");
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod_id=ftbranks
readable_name=FTB Ranks
archives_base_name=ftb-ranks
maven_group=dev.ftb.mods
mod_version=2101.1.3
mod_version=2101.1.4
mod_author=FTB Team

minecraft_version=1.21.1
Expand Down
Loading