File tree 2 files changed +5
-5
lines changed
paper-api/src/main/java/org/bukkit/inventory
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 10
10
record ItemTypeRecipeChoiceImpl (RegistryKeySet <ItemType > itemTypes ) implements RecipeChoice .ItemTypeChoice {
11
11
12
12
ItemTypeRecipeChoiceImpl {
13
- Preconditions .checkArgument (!itemTypes .isEmpty (), "RecipeChoice. ItemTypeChoice cannot be empty" );
14
- Preconditions .checkArgument (!(itemTypes .contains (ItemTypeKeys .AIR )), "RecipeChoice. ItemTypeChoice cannot contain minecraft:air" );
13
+ Preconditions .checkArgument (!itemTypes .isEmpty (), "ItemTypeChoice cannot be empty" );
14
+ Preconditions .checkArgument (!(itemTypes .contains (ItemTypeKeys .AIR )), "ItemTypeChoice cannot contain minecraft:air" );
15
15
}
16
16
17
17
@ Override
18
18
public ItemStack getItemStack () {
19
- throw new UnsupportedOperationException ("ItemTypeRecipeChoice does not support this" );
19
+ throw new UnsupportedOperationException ("ItemTypeChoice does not support this" );
20
20
}
21
21
22
22
@ Override
@@ -31,7 +31,7 @@ public boolean test(final ItemStack itemStack) {
31
31
32
32
@ Override
33
33
public RecipeChoice validate (final boolean allowEmptyRecipes ) {
34
- Preconditions .checkArgument (!(this .itemTypes .contains (ItemTypeKeys .AIR )), "RecipeChoice. ItemTypeChoice cannot contain minecraft:air" );
34
+ Preconditions .checkArgument (!(this .itemTypes .contains (ItemTypeKeys .AIR )), "ItemTypeChoice cannot contain minecraft:air" );
35
35
return this ;
36
36
}
37
37
}
Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ public RecipeChoice validate(final boolean allowEmptyRecipes) {
310
310
*/
311
311
@ ApiStatus .Experimental
312
312
@ ApiStatus .NonExtendable
313
- interface ItemTypeChoice extends RecipeChoice {
313
+ sealed interface ItemTypeChoice extends RecipeChoice permits ItemTypeRecipeChoiceImpl {
314
314
315
315
/**
316
316
* Gets the set of item types that this choice will match.
You can’t perform that action at this time.
0 commit comments