diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b625e3a..fb61c501 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). +## [2001.4.5] + +### Fixed +* _Actually_ fixed the issue that should have been fixed in 2001.4.4 + * The previous fix worked for 50% of possible stack sizes, and the wrong 50% was used in testing... + ## [2001.4.4] ### Fixed diff --git a/common/src/main/java/dev/ftb/mods/ftbquests/client/gui/quests/QuestPanel.java b/common/src/main/java/dev/ftb/mods/ftbquests/client/gui/quests/QuestPanel.java index ee32d2f3..66093ab1 100644 --- a/common/src/main/java/dev/ftb/mods/ftbquests/client/gui/quests/QuestPanel.java +++ b/common/src/main/java/dev/ftb/mods/ftbquests/client/gui/quests/QuestPanel.java @@ -195,6 +195,10 @@ public void drawOffsetBackground(GuiGraphics graphics, Theme theme, int x, int y Color4I c = complete ? ThemeProperties.DEPENDENCY_LINE_COMPLETED_COLOR.get(questScreen.selectedChapter) : ThemeProperties.DEPENDENCY_LINE_UNCOMPLETED_COLOR.get(questScreen.selectedChapter); + if (unavailable || qb.quest.getProgressionMode() == ProgressionMode.FLEXIBLE && !questScreen.file.selfTeamData.areDependenciesComplete(qb.quest)) { + // dim connection lines for unavailable quests + c = c.withAlpha(Math.max(30, c.alphai() / 2)); + } for (QuestButton button : qb.getDependencies()) { if (button.shouldDraw() && button.quest != selectedQuest && qb.quest != selectedQuest && !button.quest.shouldHideDependentLines()) { diff --git a/common/src/main/java/dev/ftb/mods/ftbquests/item/MissingItem.java b/common/src/main/java/dev/ftb/mods/ftbquests/item/MissingItem.java index 67bac175..73c23a7e 100644 --- a/common/src/main/java/dev/ftb/mods/ftbquests/item/MissingItem.java +++ b/common/src/main/java/dev/ftb/mods/ftbquests/item/MissingItem.java @@ -42,7 +42,12 @@ public static ItemStack readItem(CompoundTag tag) { return stack; } - return ItemStack.of(tag); + // Kludge: vanilla serializes the stack size as a byte, which breaks for a stack >127 items, + // leading to the stack turning into an empty (air) stack + // (note: using ItemStack#copyWithCount will *not* work here) + ItemStack stack = ItemStack.of(tag); + stack.setCount(tag.getInt("Count")); + return stack; } public static CompoundTag writeItem(ItemStack stack) { @@ -53,9 +58,7 @@ public static CompoundTag writeItem(ItemStack stack) { SNBTCompoundTag tag = new SNBTCompoundTag(); stack.save(tag); - // kludge: vanilla saves the stack size as a byte, which means negative sizes for big stacks, - // leading to the stack turning into an empty (air) stack - // https://github.com/FTBTeam/FTB-Mods-Issues/issues/1182 + // kludge: see above! tag.putInt("Count", stack.getCount()); if (tag.size() == 2) { diff --git a/gradle.properties b/gradle.properties index 94fae70c..ab0605d0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ mod_id=ftbquests archives_base_name=ftb-quests minecraft_version=1.20.1 # Build time -mod_version=2001.4.4 +mod_version=2001.4.5 maven_group=dev.ftb.mods mod_author=FTB Team # Curse release