Skip to content

Commit

Permalink
Merge pull request #721 from FTBTeam/1.20.1/dev
Browse files Browse the repository at this point in the history
1.20.1/dev
  • Loading branch information
desht authored Apr 22, 2024
2 parents 1a889e1 + f17e1a9 commit 81614b2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 17 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ 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.1]

### Fixed
* Fixed popup textfield for Checkbox task creation not rendering (more precisely, rendering off-screen...)
* Requires FTB Library 2001.2.1, which also contains several GUI-related fixes
* Fixed client crash when double-clicking some long text lines for editing in the view quest panel
* Fixed keypresses getting ignored after popup textfields (e.g. creating Checkbox tasks) are dismissed
* Fixed popup textfields rendering partially offscreen under some circumstances

## [2001.4.0]

### Changed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package dev.ftb.mods.ftbquests.client;

import dev.ftb.mods.ftblibrary.config.*;
import dev.ftb.mods.ftblibrary.config.ui.*;
import dev.ftb.mods.ftblibrary.config.ui.EditConfigScreen;
import dev.ftb.mods.ftblibrary.config.ui.EditStringConfigOverlay;
import dev.ftb.mods.ftblibrary.config.ui.SelectFluidScreen;
import dev.ftb.mods.ftblibrary.config.ui.SelectItemStackScreen;
import dev.ftb.mods.ftbquests.api.FTBQuestsAPI;
import dev.ftb.mods.ftbquests.client.gui.SelectQuestObjectScreen;
import dev.ftb.mods.ftbquests.quest.QuestObjectType;
Expand Down Expand Up @@ -37,6 +40,7 @@ public static RewardType.GuiProvider defaultRewardGuiProvider(RewardType.Provide
s.setHasSearchBox(true);
s.openGui();
} else {

ConfigGroup group = new ConfigGroup(FTBQuestsAPI.MOD_ID, accepted -> {
if (accepted) {
callback.accept(reward);
Expand Down Expand Up @@ -67,14 +71,7 @@ public static TaskType.GuiProvider defaultTaskGuiProvider(TaskType.Provider prov
overlay.setExtraZlevel(300);
panel.getGui().pushModalPanel(overlay);
} else {
ConfigGroup group = new ConfigGroup(FTBQuestsAPI.MOD_ID, accepted -> {
if (accepted) {
callback.accept(task);
}
panel.run();
});
task.fillConfigGroup(task.createSubGroup(group));
new EditConfigScreen(group).openGui();
openSetupGui(panel.getGui(), callback, task);
}
};
}
Expand All @@ -96,15 +93,16 @@ public static void setTaskGuiProviders() {
StringConfig c = new StringConfig(null);
c.setValue("");

EditStringConfigOverlay<String> overlay = new EditStringConfigOverlay<>(panel, c, accepted -> {
EditStringConfigOverlay<String> overlay = new EditStringConfigOverlay<>(panel.getGui(), c, accepted -> {
if (accepted) {
CheckmarkTask checkmarkTask = new CheckmarkTask(0L, quest);
checkmarkTask.setRawTitle(c.getValue());
callback.accept(checkmarkTask);
}
panel.run();
}, TaskTypes.CHECKMARK.getDisplayName())
.atPosition(panel.width / 3, panel.height + 5);
}, TaskTypes.CHECKMARK.getDisplayName()).atMousePosition();
overlay.setWidth(150);
overlay.setExtraZlevel(300);
panel.getGui().pushModalPanel(overlay);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ private void drawStatusBar(GuiGraphics graphics, Theme theme, PoseStack poseStac
Color4I.DARK_GRAY.draw(graphics, statusX, height - 9, statusWidth, 1);
statPanelBg.draw(graphics, statusX, height - 9, statusWidth, 10);

poseStack.translate(statusX, height - 6, 600);
poseStack.translate(statusX, height - 6, 250);
poseStack.scale(0.5f, 0.5f, 0.5f);

String curStr = String.format("Cursor: [%+.2f, %+.2f]", questX, questY);
Expand Down
2 changes: 1 addition & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"fabric": "*",
"minecraft": "~1.20.1",
"architectury": ">=9.0.8",
"ftblibrary": ">=2001.2.0",
"ftblibrary": ">=2001.2.1",
"ftbteams": ">=2001.1.4-build.1"
},
"breaks": {
Expand Down
2 changes: 1 addition & 1 deletion forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ side = "BOTH"
[[dependencies.ftbquests]]
modId = "ftblibrary"
mandatory = true
versionRange = "[2001.2.0,)"
versionRange = "[2001.2.1,)"
ordering = "AFTER"
side = "BOTH"

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod_id=ftbquests
archives_base_name=ftb-quests
minecraft_version=1.20.1
# Build time
mod_version=2001.4.0
mod_version=2001.4.1
maven_group=dev.ftb.mods
mod_author=FTB Team
# Curse release
Expand All @@ -18,7 +18,7 @@ fabric_loader_version=0.14.21
fabric_api_version=0.83.1+1.20.1
forge_version=47.2.19
# Deps
ftb_library_version=2001.2.0
ftb_library_version=2001.2.1
ftb_teams_version=2001.3.0
# Optional deps
teamreborn_energy_version=3.0.0

0 comments on commit 81614b2

Please sign in to comment.