Skip to content

Commit 8d2f978

Browse files
authored
Merge pull request #763 from FTBTeam/1.19/dev
1.19/dev
2 parents bb9afba + e9adf26 commit 8d2f978

6 files changed

Lines changed: 17 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ 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.5.10]
8+
9+
### Fixed
10+
* Fixed dependencies of quests in always-hidden chapters also always being hidden (even if in a different chapter)
11+
712
## [1902.5.9]
813

914
### Fixed

common/src/main/java/dev/ftb/mods/ftbquests/gui/SelectQuestObjectScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void addButtons(Panel panel) {
6161

6262
ClientQuestFile file = ClientQuestFile.INSTANCE;
6363
for (QuestObjectBase objectBase : file.getAllObjects()) {
64-
if (config.predicate.test(objectBase) && (file.canEdit() || (!(objectBase instanceof QuestObject qo) || qo.isVisible(file.self)))) {
64+
if (config.predicate.test(objectBase) && (file.canEdit() || (!(objectBase instanceof QuestObject qo) || qo.isSearchable(file.self)))) {
6565
list.add((T) objectBase);
6666
}
6767
}

common/src/main/java/dev/ftb/mods/ftbquests/gui/quests/ViewQuestPanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ private void showList(Collection<QuestObject> c, boolean dependencies) {
543543
}
544544

545545
for (QuestObject object : c) {
546-
if (questScreen.file.canEdit() || object.isVisible(questScreen.file.self)) {
546+
if (questScreen.file.canEdit() || object.isSearchable(questScreen.file.self)) {
547547
MutableComponent title = object.getMutableTitle();
548548
if (object.getQuestChapter() != null && object.getQuestChapter() != quest.getQuestChapter()) {
549549
Component suffix = Component.literal(" [").append(object.getQuestChapter().getTitle()).append("]").withStyle(ChatFormatting.GRAY);

common/src/main/java/dev/ftb/mods/ftbquests/quest/Quest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,10 +632,6 @@ public void move(Chapter to, double x, double y) {
632632

633633
@Override
634634
public boolean isVisible(TeamData data) {
635-
if (chapter.alwaysInvisible) {
636-
return false;
637-
}
638-
639635
if (invisible && !data.isCompleted(this)) {
640636
if (invisibleUntilTasks == 0 || tasks.stream().filter(data::isCompleted).limit(invisibleUntilTasks).count() < invisibleUntilTasks) {
641637
return false;
@@ -653,6 +649,11 @@ public boolean isVisible(TeamData data) {
653649
return getDependencies().anyMatch(object -> object.isVisible(data));
654650
}
655651

652+
@Override
653+
public boolean isSearchable(TeamData data) {
654+
return !chapter.alwaysInvisible && super.isSearchable(data);
655+
}
656+
656657
@Override
657658
public void clearCachedData() {
658659
super.clearCachedData();

common/src/main/java/dev/ftb/mods/ftbquests/quest/QuestObject.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ public boolean isVisible(TeamData data) {
8686
return true;
8787
}
8888

89+
public boolean isSearchable(TeamData data) {
90+
return isVisible(data);
91+
}
92+
8993
public void onStarted(QuestProgressEventData<?> data) {
9094
}
9195

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mod_id=ftbquests
55
archives_base_name=ftb-quests
66
minecraft_version=1.19.2
77
# Build time
8-
mod_version=1902.5.9
8+
mod_version=1902.5.10
99
maven_group=dev.ftb.mods
1010
mod_author=FTB Team
1111
# Curse release

0 commit comments

Comments
 (0)