File tree Expand file tree Collapse file tree 4 files changed +7
-13
lines changed
main/java/dev/compactmods/crafting
test/java/dev/compactmods/crafting/tests/recipes/setup Expand file tree Collapse file tree 4 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public static void init(IEventBus bus) {
4343 public static void newRegistries (final NewRegistryEvent evt ) {
4444 final var b = new RegistryBuilder <RecipeComponentType <?>>()
4545 .setName (CATALYSTS_RL )
46- .setType (c (RecipeComponentType .class ));
46+ .setType (c (CatalystType .class ));
4747
4848 evt .create (b );
4949 }
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public static void init(IEventBus eventBus) {
4949 public static void newRegistries (final NewRegistryEvent evt ) {
5050 final var b = new RegistryBuilder <RecipeComponentType <?>>()
5151 .setName (REC_LAYERS )
52- .setType (c (RecipeComponentType .class ));
52+ .setType (c (RecipeLayerType .class ));
5353
5454 evt .create (b );
5555 }
Original file line number Diff line number Diff line change 66import dev .compactmods .crafting .api .catalyst .ICatalystMatcher ;
77import dev .compactmods .crafting .core .CCCatalystTypes ;
88import net .minecraft .core .Registry ;
9+ import net .minecraft .resources .ResourceKey ;
910import net .minecraft .tags .Tag ;
1011import net .minecraft .tags .TagKey ;
1112import net .minecraft .world .item .Item ;
@@ -26,23 +27,19 @@ public class ItemTagCatalystMatcher extends ForgeRegistryEntry<CatalystType<?>>
2627 ).apply (i , ItemTagCatalystMatcher ::new ));
2728
2829 private final TagKey <Item > tag ;
29- private final ITag <Item > tag2 ;
3030
3131 public ItemTagCatalystMatcher () {
3232 this .tag = null ;
33- this .tag2 = null ;
3433 }
3534
3635 public ItemTagCatalystMatcher (TagKey <Item > tag ) {
3736 this .tag = tag ;
38- final var it = ForgeRegistries .ITEMS .tags ();
39- this .tag2 = it .getTag (tag );
4037 }
4138
4239 @ Override
4340 public boolean matches (ItemStack stack ) {
4441 if (tag == null ) return true ;
45- return tag2 . contains ( stack .getItem () );
42+ return stack .is ( tag );
4643 }
4744
4845 @ Override
@@ -55,6 +52,8 @@ public Set<ItemStack> getPossible() {
5552 if (tag == null )
5653 return Collections .emptySet ();
5754
55+ final var it = ForgeRegistries .ITEMS .tags ();
56+ final var tag2 = it .getTag (tag );
5857 return tag2 .stream ()
5958 .map (ItemStack ::new )
6059 .collect (Collectors .toSet ());
Original file line number Diff line number Diff line change @@ -26,12 +26,7 @@ public static void BaseRecipeType(final GameTestHelper test) {
2626 if (typeString == null )
2727 test .fail ("BaseRecipeType#toString returned null value" );
2828
29- try {
30- type .register ();
31- test .succeed ();
32- } catch (Exception ex ) {
33- test .fail ("Failed to complete registration call." );
34- }
29+ test .succeed ();
3530 }
3631
3732 @ GameTest (template = GameTestTemplates .EMPTY )
You can’t perform that action at this time.
0 commit comments