Villagers can only have two recipes max.

master
sigonasr2 6 years ago
parent 8ffdf2e3b0
commit 5196c48402
  1. 2
      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()); prev.getUses(),prev.getMaxUses(),true,prev.getVillagerExperience(),prev.getPriceMultiplier());
List<ItemStack> ingredients = new ArrayList<ItemStack>(); List<ItemStack> ingredients = new ArrayList<ItemStack>();
ingredients.add(new ItemStack(Material.getMaterial(Template.archivedshufflelist.get(Template.r.nextInt(Template.archivedshufflelist.size()))),Template.randomizeAmount())); 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())); ingredients.add(new ItemStack(Material.getMaterial(Template.archivedshufflelist.get(Template.r.nextInt(Template.archivedshufflelist.size()))),Template.randomizeAmount()));
} }
newRecipe.setIngredients(ingredients); newRecipe.setIngredients(ingredients);

Loading…
Cancel
Save