5
5
import dev .latvian .mods .kubejs .recipe .schema .RecipeSchema ;
6
6
import net .minecraft .core .registries .BuiltInRegistries ;
7
7
import net .minecraft .resources .ResourceLocation ;
8
+ import net .minecraft .tags .TagKey ;
9
+ import net .minecraft .world .entity .EntityType ;
8
10
import net .minecraft .world .item .ItemStack ;
9
11
import net .minecraft .world .item .crafting .Ingredient ;
10
12
@@ -15,6 +17,7 @@ public interface RitualRecipeSchema {
15
17
RecipeKey <List <Ingredient >> INGREDIENTS = IngredientComponent .INGREDIENT .asList ().inputKey ("ingredients" );
16
18
RecipeKey <String > RITUAL_TYPE = StringComponent .ID .inputKey ("ritual_type" ).alt ("ritualType" ).optional ("occultism:craft" ).alwaysWrite ();
17
19
RecipeKey <String > ENTITY_TO_SUMMON = StringComponent .ID .inputKey ("entity_to_summon" ).alt ("entityToSummon" ).alt ("summon" ).defaultOptional ();
20
+ RecipeKey <TagKey <EntityType <?>>> ENTITY_TAG_TO_SUMMON = TagKeyComponent .ENTITY_TYPE .inputKey ("entity_tag_to_summon" ).alt ("entityTagToSummon" ).alt ("summonTag" ).defaultOptional ();
18
21
RecipeKey <String > ENTITY_NBT = StringComponent .ANY .inputKey ("entity_nbt" ).alt ("entityNbt" ).defaultOptional ();
19
22
RecipeKey <Ingredient > ACTIVATION_ITEM = IngredientComponent .INGREDIENT .inputKey ("activation_item" ).alt ("activationItem" );
20
23
RecipeKey <String > PENTACLE_ID = StringComponent .ID .inputKey ("pentacle_id" ).alt ("pentacleId" ).alt ("pentacle" );
@@ -28,7 +31,7 @@ public interface RitualRecipeSchema {
28
31
29
32
RecipeKey <?> ENTITY_TO_SACRIFICE =
30
33
RecipeComponent .builder (
31
- new RecipeComponentBuilder .Key ("tag" , StringComponent . ID ),
34
+ new RecipeComponentBuilder .Key ("tag" , TagKeyComponent . ENTITY_TYPE ),
32
35
new RecipeComponentBuilder .Key ("display_name" , StringComponent .ANY )
33
36
)
34
37
.inputKey ("entity_to_sacrifice" ).alt ("entityToSacrifice" ).alt ("sacrifice" )
@@ -43,7 +46,7 @@ public interface RitualRecipeSchema {
43
46
// and now all the optionals...
44
47
DURATION , SPIRIT_MAX_AGE , SPIRIT_JOB_TYPE , RITUAL_DUMMY , RITUAL_TYPE ,
45
48
// excluded keys last
46
- ENTITY_TO_SUMMON , ENTITY_NBT , ENTITY_TO_SACRIFICE , ITEM_TO_USE , COMMAND
49
+ ENTITY_TO_SUMMON , ENTITY_TAG_TO_SUMMON , ENTITY_NBT , ENTITY_TO_SACRIFICE , ITEM_TO_USE , COMMAND
47
50
);
48
51
49
52
}
0 commit comments