1+ using System . Text . Json . Serialization ;
2+
3+ namespace SteveSharp . JsonShapes . Recipes ;
4+
5+ public class BlastingRecipe {
6+ public class RecipeIngredient {
7+ [ JsonPropertyName ( "item" ) ]
8+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
9+ public string ? Item { get ; set ; }
10+
11+ [ JsonPropertyName ( "tag" ) ]
12+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
13+ public string ? ItemTag { get ; set ; }
14+ }
15+ public class Result {
16+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
17+ [ JsonPropertyName ( "id" ) ]
18+ public string ? Id { get ; set ; }
19+
20+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
21+ [ JsonPropertyName ( "components" ) ]
22+ public Dictionary < string , dynamic > ? Components { get ; set ; }
23+ }
24+
25+ [ JsonPropertyName ( "type" ) ]
26+ public string Type { get ; set ; } = "minecraft:blasting" ;
27+
28+ [ JsonPropertyName ( "ingredient" ) ]
29+ public dynamic ? Ingredient { get ; set ; }
30+
31+ [ JsonPropertyName ( "result" ) ]
32+ public Result ? RecipeResult { get ; set ; }
33+
34+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
35+ [ JsonPropertyName ( "experience" ) ]
36+ public int Experience { get ; set ; }
37+
38+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
39+ [ JsonPropertyName ( "cookingtime" ) ]
40+ public int CookingTIme { get ; set ; }
41+ }
0 commit comments