Skip to content
This repository was archived by the owner on Jun 7, 2026. It is now read-only.

Commit 7d00e8e

Browse files
committed
Misc bugfixes
1 parent 987d09e commit 7d00e8e

3 files changed

Lines changed: 17 additions & 12 deletions

File tree

sql/provided/20250625211200_game_builtins.sql

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
-- Vanilla recipe types
2-
INSERT INTO recipe_type (loc)
3-
VALUES ('minecraft:crafting_shaped'),
4-
('minecraft:crafting_shapeless'),
5-
('minecraft:smelting'),
6-
('minecraft:blasting'),
7-
('minecraft:campfire_cooking'),
8-
('minecraft:smoking'),
9-
('minecraft:stonecutting'),
10-
('minecraft:smithing_transform');
2+
INSERT INTO recipe_type (loc, version_id)
3+
SELECT v.loc, ver.id
4+
FROM (VALUES ('minecraft:crafting_shaped'),
5+
('minecraft:crafting_shapeless'),
6+
('minecraft:smelting'),
7+
('minecraft:blasting'),
8+
('minecraft:campfire_cooking'),
9+
('minecraft:smoking'),
10+
('minecraft:stonecutting'),
11+
('minecraft:smithing_transform')) AS v(loc)
12+
CROSS JOIN
13+
(SELECT id FROM project_version WHERE project_id = 'minecraft' AND name IS NULL) AS ver;
1114

1215
-- Vanilla recipe workbenches
1316
INSERT INTO recipe_workbench (type_id, item_id)

src/service/database/project_database.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ namespace service {
306306
EXISTS ( \
307307
SELECT 1 FROM recipe_ingredient_item ri_sub \
308308
JOIN item i ON ri_sub.item_id = i.id \
309-
WHERE ri_sub.recipe_id = r.id AND i.loc = $1 AND ri_sub.input \
309+
WHERE ri_sub.recipe_id = r.id AND i.loc = $3 AND ri_sub.input \
310310
) \
311311
OR EXISTS( \
312312
SELECT 1 FROM recipe_ingredient_tag rt_sub \

src/service/project/content.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ namespace service {
8383
const auto path = co_await projectDb_->getProjectContentPath(loc);
8484
if (!localized) {
8585
// Use page title instead
86-
if (const auto title = getPageTitle(*path)) {
87-
co_return ItemData{.name = *title, .path = *path};
86+
if (path) {
87+
if (const auto title = getPageTitle(*path)) {
88+
co_return ItemData{.name = *title, .path = *path};
89+
}
8890
}
8991
co_return Error::ErrNotFound;
9092
}

0 commit comments

Comments
 (0)