Make BiomeRecipe nonNull

This commit is contained in:
tastybento 2021-08-01 15:26:21 -07:00
parent a44d9d1578
commit e61e76134b
2 changed files with 6 additions and 3 deletions

View File

@ -229,11 +229,11 @@ public class Greenhouse implements DataObject {
/**
* Get the biome recipe for this greenhouse
* @return biome recipe or null
* @return biome recipe or a degenerate recipe
*/
@Nullable
@NonNull
public BiomeRecipe getBiomeRecipe() {
return RecipeManager.getBiomeRecipies(biomeRecipeName).orElse(null);
return RecipeManager.getBiomeRecipies(biomeRecipeName).orElse(new BiomeRecipe());
}
/**

View File

@ -75,6 +75,9 @@ public class BiomeRecipe implements Comparable<BiomeRecipe> {
private final Random random = new Random();
/**
* Create a degenerate recipe with nothing in it
*/
public BiomeRecipe() {}
/**