mirror of
https://github.com/BentoBoxWorld/Greenhouses.git
synced 2024-11-25 03:55:29 +01:00
Make BiomeRecipe nonNull
This commit is contained in:
parent
a44d9d1578
commit
e61e76134b
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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() {}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user