Scrapbox fixes and recipes. Closes #1752

This commit is contained in:
modmuss50 2019-08-08 12:30:09 +01:00
parent a08ee3d17a
commit 7217e84358
292 changed files with 4368 additions and 230 deletions

View file

@ -51,6 +51,10 @@ public class ScrapboxRecipeCrafter extends RecipeCrafter {
@Override
public void updateCurrentRecipe(){
List<RebornRecipe> scrapboxRecipeList = ModRecipes.SCRAPBOX.getRecipes(blockEntity.getWorld());
if(scrapboxRecipeList.isEmpty()){
setCurrentRecipe(null);
return;
}
int random = blockEntity.getWorld().random.nextInt(scrapboxRecipeList.size());
// Sets the current recipe then syncs
setCurrentRecipe(scrapboxRecipeList.get(random));