1.15.2 Villagers prices wrong [still help needed]

Discussion in 'Spigot Plugin Development' started by Rafael2000, Jan 26, 2020.

  1. Hello guys following problem:
    I have done the following (Pseudocode):
    all worlds -> all Villagers -> all Recipes, maxUses(99999), setUses (0) and set PriceMultiplier(1, 0.1f, -0.1f, 0.01, -0.01 etc)

    But all results are the same, I get 64 in the villager price except by one, where i get weird results like 1 -> 3 emeralds etc, the effect hero of the village changes exactly nothing, I already tried to iterate all ingredients and set their amount to 0 or 1, still didn't helped, can anyone help me to get the prices down to 1 emerald?
  2. I’d assume that hero of the village wouldn’t change this as you’re overriding the trade values. Some code would be helpful here as opposed to pseudo code because it could be an error in that
  3. List<World> worlds = Bukkit.getWorlds();
    worlds.forEach((world) -> {
    Collection<Villager> villager = world.getEntitiesByClass(Villager.class);
    villager.forEach((vil) -> {
    List<MerchantRecipe> recipies = vil.getRecipes();
    recipies.forEach((rec) -> {
    sender.sendMessage(Color.GREEN + "Finished");
    Hope its okay to send it in here