Skip to content

Commit 53ccbb7

Browse files
rainweaver76claude
andauthored
Fix Enchanter scroll quests for the 1.20.1 quest schema (#11727)
The 5 Enchanter scroll quests added in #11650 use the 1.21.1 quest JSON format (item as an ItemStack object {id,count}, potion data via item components). On 1.20.1 the delivery and item-reward parsers expect a string item id plus a separate "qty" int (and SNBT "nbt" for potions), so each quest failed to load with a NullPointerException on the missing "qty" field ("Skipping quest ... due to parsing error"). Convert the delivery objectives and item rewards to the 1.20.1 format: - "item": {"id":X,"count":N} -> "item": "X", "qty": N - luck potion components -> "nbt": "{Potion:\"minecraft:luck\"}" Dialogue, triggers, and happiness rewards are unchanged. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 69feca2 commit 53ccbb7

5 files changed

Lines changed: 57 additions & 122 deletions

File tree

src/main/resources/data/minecolonies/colony/quests/general/adayinthefield.json

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@
5353
"type": "minecolonies:delivery",
5454
"details": {
5555
"target": 0,
56-
"item": {
57-
"id": "minecolonies:scroll_tp",
58-
"count": 3
59-
},
56+
"item": "minecolonies:scroll_tp",
57+
"qty": 3,
6058
"next-objective": 2
6159
}
6260
},
@@ -110,28 +108,22 @@
110108
{
111109
"type": "minecolonies:item",
112110
"details": {
113-
"item": {
114-
"id": "minecolonies:scroll_area_tp",
115-
"count": 1
116-
}
111+
"item": "minecolonies:scroll_area_tp",
112+
"qty": 1
117113
}
118114
},
119115
{
120116
"type": "minecolonies:item",
121117
"details": {
122-
"item": {
123-
"id": "minecolonies:scroll_tp",
124-
"count": 3
125-
}
118+
"item": "minecolonies:scroll_tp",
119+
"qty": 3
126120
}
127121
},
128122
{
129123
"type": "minecolonies:item",
130124
"details": {
131-
"item": {
132-
"id": "minecraft:blue_orchid",
133-
"count": 3
134-
}
125+
"item": "minecraft:blue_orchid",
126+
"qty": 3
135127
}
136128
},
137129
{

src/main/resources/data/minecolonies/colony/quests/general/ancientmagic.json

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@
6969
"type": "minecolonies:delivery",
7070
"details": {
7171
"target": 1,
72-
"item": {
73-
"id": "minecolonies:scroll_buff"
74-
},
72+
"item": "minecolonies:scroll_buff",
73+
"qty": 1,
7574
"next-objective": 2
7675
}
7776
},
@@ -111,43 +110,25 @@
111110
{
112111
"type": "minecolonies:item",
113112
"details": {
114-
"item": {
115-
"id": "minecraft:potion",
116-
"count": 1,
117-
"components": {
118-
"minecraft:potion_contents": {
119-
"potion": "minecraft:luck"
120-
}
121-
}
122-
}
113+
"item": "minecraft:potion",
114+
"qty": 1,
115+
"nbt": "{Potion:\"minecraft:luck\"}"
123116
}
124117
},
125118
{
126119
"type": "minecolonies:item",
127120
"details": {
128-
"item": {
129-
"id": "minecraft:potion",
130-
"count": 1,
131-
"components": {
132-
"minecraft:potion_contents": {
133-
"potion": "minecraft:luck"
134-
}
135-
}
136-
}
121+
"item": "minecraft:potion",
122+
"qty": 1,
123+
"nbt": "{Potion:\"minecraft:luck\"}"
137124
}
138125
},
139126
{
140127
"type": "minecolonies:item",
141128
"details": {
142-
"item": {
143-
"id": "minecraft:potion",
144-
"count": 1,
145-
"components": {
146-
"minecraft:potion_contents": {
147-
"potion": "minecraft:luck"
148-
}
149-
}
150-
}
129+
"item": "minecraft:potion",
130+
"qty": 1,
131+
"nbt": "{Potion:\"minecraft:luck\"}"
151132
}
152133
},
153134
{

src/main/resources/data/minecolonies/colony/quests/general/apromisetokeep.json

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,17 @@
7272
"type": "minecolonies:delivery",
7373
"details": {
7474
"target": 0,
75-
"item": {
76-
"id": "minecraft:paper",
77-
"count": 3
78-
},
75+
"item": "minecraft:paper",
76+
"qty": 3,
7977
"next-objective": 2
8078
}
8179
},
8280
{
8381
"type": "minecolonies:delivery",
8482
"details": {
8583
"target": 0,
86-
"item": {
87-
"id": "minecraft:compass",
88-
"count": 1
89-
},
84+
"item": "minecraft:compass",
85+
"qty": 1,
9086
"next-objective": 3
9187
}
9288
},
@@ -140,19 +136,15 @@
140136
{
141137
"type": "minecolonies:item",
142138
"details": {
143-
"item": {
144-
"id": "minecolonies:scroll_tp",
145-
"count": 3
146-
}
139+
"item": "minecolonies:scroll_tp",
140+
"qty": 3
147141
}
148142
},
149143
{
150144
"type": "minecolonies:item",
151145
"details": {
152-
"item": {
153-
"id": "minecraft:pumpkin_pie",
154-
"count": 1
155-
}
146+
"item": "minecraft:pumpkin_pie",
147+
"qty": 1
156148
}
157149
},
158150
{

src/main/resources/data/minecolonies/colony/quests/general/bumpinthenight.json

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -62,43 +62,35 @@
6262
"type": "minecolonies:delivery",
6363
"details": {
6464
"target": 0,
65-
"item": {
66-
"id": "minecolonies:scroll_tp",
67-
"count": 1
68-
},
65+
"item": "minecolonies:scroll_tp",
66+
"qty": 1,
6967
"next-objective": 2
7068
}
7169
},
7270
{
7371
"type": "minecolonies:delivery",
7472
"details": {
7573
"target": 0,
76-
"item": {
77-
"id": "minecraft:lapis_lazuli",
78-
"count": 5
79-
},
74+
"item": "minecraft:lapis_lazuli",
75+
"qty": 5,
8076
"next-objective": 3
8177
}
8278
},
8379
{
8480
"type": "minecolonies:delivery",
8581
"details": {
8682
"target": 0,
87-
"item": {
88-
"id": "minecraft:ender_pearl",
89-
"count": 1
90-
},
83+
"item": "minecraft:ender_pearl",
84+
"qty": 1,
9185
"next-objective": 4
9286
}
9387
},
9488
{
9589
"type": "minecolonies:delivery",
9690
"details": {
9791
"target": 0,
98-
"item": {
99-
"id": "minecraft:paper",
100-
"count": 1
101-
},
92+
"item": "minecraft:paper",
93+
"qty": 1,
10294
"next-objective": 5
10395
}
10496
},
@@ -152,37 +144,29 @@
152144
{
153145
"type": "minecolonies:item",
154146
"details": {
155-
"item": {
156-
"id": "minecolonies:scroll_guard_help",
157-
"count": 3
158-
}
147+
"item": "minecolonies:scroll_guard_help",
148+
"qty": 3
159149
}
160150
},
161151
{
162152
"type": "minecolonies:item",
163153
"details": {
164-
"item": {
165-
"id": "minecraft:lapis_lazuli",
166-
"count": 5
167-
}
154+
"item": "minecraft:lapis_lazuli",
155+
"qty": 5
168156
}
169157
},
170158
{
171159
"type": "minecolonies:item",
172160
"details": {
173-
"item": {
174-
"id": "minecraft:ender_pearl",
175-
"count": 1
176-
}
161+
"item": "minecraft:ender_pearl",
162+
"qty": 1
177163
}
178164
},
179165
{
180166
"type": "minecolonies:item",
181167
"details": {
182-
"item": {
183-
"id": "minecraft:paper",
184-
"count": 1
185-
}
168+
"item": "minecraft:paper",
169+
"qty": 1
186170
}
187171
},
188172
{

src/main/resources/data/minecolonies/colony/quests/general/wheresthebuilder.json

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -72,32 +72,26 @@
7272
"type": "minecolonies:delivery",
7373
"details": {
7474
"target": 0,
75-
"item": {
76-
"id": "minecolonies:scroll_tp",
77-
"count": 3
78-
},
75+
"item": "minecolonies:scroll_tp",
76+
"qty": 3,
7977
"next-objective": 2
8078
}
8179
},
8280
{
8381
"type": "minecolonies:delivery",
8482
"details": {
8583
"target": 0,
86-
"item": {
87-
"id": "minecraft:glowstone_dust",
88-
"count": 6
89-
},
84+
"item": "minecraft:glowstone_dust",
85+
"qty": 6,
9086
"next-objective": 3
9187
}
9288
},
9389
{
9490
"type": "minecolonies:delivery",
9591
"details": {
9692
"target": 0,
97-
"item": {
98-
"id": "minecraft:paper",
99-
"count": 2
100-
},
93+
"item": "minecraft:paper",
94+
"qty": 2,
10195
"next-objective": 4
10296
}
10397
},
@@ -201,37 +195,29 @@
201195
{
202196
"type": "minecolonies:item",
203197
"details": {
204-
"item": {
205-
"id": "minecolonies:scroll_highlight",
206-
"count": 5
207-
}
198+
"item": "minecolonies:scroll_highlight",
199+
"qty": 5
208200
}
209201
},
210202
{
211203
"type": "minecolonies:item",
212204
"details": {
213-
"item": {
214-
"id": "minecolonies:scroll_tp",
215-
"count": 3
216-
}
205+
"item": "minecolonies:scroll_tp",
206+
"qty": 3
217207
}
218208
},
219209
{
220210
"type": "minecolonies:item",
221211
"details": {
222-
"item": {
223-
"id": "minecraft:glowstone_dust",
224-
"count": 6
225-
}
212+
"item": "minecraft:glowstone_dust",
213+
"qty": 6
226214
}
227215
},
228216
{
229217
"type": "minecolonies:item",
230218
"details": {
231-
"item": {
232-
"id": "minecraft:paper",
233-
"count": 2
234-
}
219+
"item": "minecraft:paper",
220+
"qty": 2
235221
}
236222
},
237223
{

0 commit comments

Comments
 (0)