RuntimeExceptions are not to be thrown
as a PR to be sure this still compiles and I haven't introduced a typo here by chance. Will merge once checks say it's okay
This commit is contained in:
parent
0f9512efc5
commit
8394a9940b
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ public class RecipeManager {
|
||||||
|
|
||||||
public static <R extends RebornRecipe> RebornRecipeType<R> newRecipeType(RecipeSerde<R> recipeSerde, Identifier name) {
|
public static <R extends RebornRecipe> RebornRecipeType<R> newRecipeType(RecipeSerde<R> recipeSerde, Identifier name) {
|
||||||
if (recipeTypes.containsKey(name)) {
|
if (recipeTypes.containsKey(name)) {
|
||||||
throw new RuntimeException("RebornRecipe type with this name already registered");
|
throw new IllegalStateException("RebornRecipe type with this name already registered");
|
||||||
}
|
}
|
||||||
RebornRecipeType<R> type = new RebornRecipeType<>(recipeSerde, name);
|
RebornRecipeType<R> type = new RebornRecipeType<>(recipeSerde, name);
|
||||||
recipeTypes.put(name, type);
|
recipeTypes.put(name, type);
|
||||||
|
|
Loading…
Reference in a new issue