File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ func MapItem(x map[string]any, k string) item.Stack {
152
152
readEnchantments (tag , & s )
153
153
readDisplay (tag , & s )
154
154
readDragonflyData (tag , & s )
155
+ readUnbreakable (tag , & s )
155
156
return s
156
157
}
157
158
return item.Stack {}
@@ -176,6 +177,7 @@ func Item(data map[string]any, s *item.Stack) item.Stack {
176
177
readDisplay (tag , s )
177
178
readDragonflyData (tag , s )
178
179
readEnchantments (tag , s )
180
+ readUnbreakable (tag , s )
179
181
return * s
180
182
}
181
183
@@ -281,3 +283,9 @@ func readDragonflyData(m map[string]any, s *item.Stack) {
281
283
}
282
284
}
283
285
}
286
+
287
+ // readDamage reads the unbreakable value stored in the NBT with the Unbreakable tag and saves it to the item.Stack
288
+ // passed.
289
+ func readUnbreakable (m map [string ]any , s * item.Stack ) {
290
+ * s = s .WithUnbreakable (Bool (m , "Unbreakable" ))
291
+ }
You can’t perform that action at this time.
0 commit comments