Skip to content

Commit

Permalink
Make BiomeRecipe nonNull
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Aug 1, 2021
1 parent a44d9d1 commit e61e761
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/world/bentobox/greenhouses/data/Greenhouse.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@ public void setBiomeRecipe(BiomeRecipe greenhouseRecipe) {

/**
* 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());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}

/**
Expand Down

0 comments on commit e61e761

Please sign in to comment.