mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-26 20:27:38 +01:00
Added particle-amount option to villagers
This commit is contained in:
parent
90288261ff
commit
10b4ed559c
@ -118,7 +118,7 @@ public class VillagerListeners extends PluginDependent<EcoPlugin> implements Lis
|
||||
recipe.setIngredients(ingredients);
|
||||
event.setRecipe(recipe);
|
||||
|
||||
if (this.getPlugin().getConfigYml().getBool("villager.notify-on-special")) {
|
||||
if (this.getPlugin().getConfigYml().getBool("villager.notify-on-special.enabled")) {
|
||||
if (applied.getType().equals(EnchantmentType.SPECIAL)) {
|
||||
showParticles(event.getEntity());
|
||||
}
|
||||
@ -236,7 +236,7 @@ public class VillagerListeners extends PluginDependent<EcoPlugin> implements Lis
|
||||
recipe.setIngredients(ingredients);
|
||||
event.setRecipe(recipe);
|
||||
|
||||
if (this.getPlugin().getConfigYml().getBool("villager.notify-on-special")) {
|
||||
if (this.getPlugin().getConfigYml().getBool("villager.notify-on-special.enabled")) {
|
||||
if (toAdd.keySet().stream().anyMatch(enchant -> enchant.getType().equals(EnchantmentType.SPELL))) {
|
||||
showParticles(event.getEntity());
|
||||
}
|
||||
@ -256,7 +256,7 @@ public class VillagerListeners extends PluginDependent<EcoPlugin> implements Lis
|
||||
|
||||
location.add(0, 1, 0);
|
||||
|
||||
int limit = NumberUtils.randInt(8, 13);
|
||||
int limit = this.getPlugin().getConfigYml().getInt("villager.notify-on-special.particle-amount");
|
||||
|
||||
for (int i = 0; i < limit; i++) {
|
||||
Location spawnLoc = location.clone();
|
||||
|
@ -86,7 +86,9 @@ enchanting-table:
|
||||
villager:
|
||||
enabled: true # Enable EcoEnchants through villagers
|
||||
book-times-less-likely: 7 # Times less likely to get an enchantment from a book with a villager. Recommended to be higher as books can only have one enchantment on them.
|
||||
notify-on-special: true # Show particles when the villager unlocks a special enchantment trade
|
||||
notify-on-special: # Show particles when the villager unlocks a special enchantment trade
|
||||
enabled: true
|
||||
particle-amount: 14
|
||||
|
||||
reduce-probability: # Reduce probability of adding new enchantment by factor after each enchantment added. Does not apply to books as they only ever contain one enchantment.
|
||||
enabled: true # Enable reduction
|
||||
|
Loading…
Reference in New Issue
Block a user