Skip to content

Commit 096fc59

Browse files
committed
Begin creating recipes: Blasting Recipe
1 parent 3e07426 commit 096fc59

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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

Comments
 (0)