Solved how is the price multiplier for villagers?

Discussion in 'Spigot Plugin Development' started by Swiftlicious, Sep 30, 2020.

Thread Status:
Not open for further replies.
  1. I want to make it so every trade is divided in half by the current amount so if the item costed 32 emeralds it would then turn to 16 (but if the item is 1 then it doesn't do anything of course). How does it even work though does 0.1F take one off?
     
    • Informative Informative x 1
  2. Yes for economy use a double value truncated to 1 decimal place not integer
     
  3. so I'm supposed to change the item amount used to a double value?
    itemCost = 0.0?
    merchant.setPriceMultiplier(Math.ceil(itemCost));
     
  4. Math.ceil(itemCost * 10) /10 this is to get one dp, change 10 to 100 for 2 dp
     
Thread Status:
Not open for further replies.