From 5196c484027cbfda5d7d928e618af0e87a36ad3d Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sun, 9 Jun 2019 20:21:23 +0900 Subject: [PATCH] Villagers can only have two recipes max. --- MCRandomizer/src/scramble/plugin/listener/ExampleListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MCRandomizer/src/scramble/plugin/listener/ExampleListener.java b/MCRandomizer/src/scramble/plugin/listener/ExampleListener.java index e0dc998..cb24ab8 100644 --- a/MCRandomizer/src/scramble/plugin/listener/ExampleListener.java +++ b/MCRandomizer/src/scramble/plugin/listener/ExampleListener.java @@ -62,7 +62,7 @@ public class ExampleListener implements Listener { prev.getUses(),prev.getMaxUses(),true,prev.getVillagerExperience(),prev.getPriceMultiplier()); List ingredients = new ArrayList(); ingredients.add(new ItemStack(Material.getMaterial(Template.archivedshufflelist.get(Template.r.nextInt(Template.archivedshufflelist.size()))),Template.randomizeAmount())); - while (Template.r.nextInt(10)==0) { + if (Template.r.nextInt(10)==0) { ingredients.add(new ItemStack(Material.getMaterial(Template.archivedshufflelist.get(Template.r.nextInt(Template.archivedshufflelist.size()))),Template.randomizeAmount())); } newRecipe.setIngredients(ingredients);