mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-27 06:21:59 +01:00
Added works-on to transfuse
This commit is contained in:
parent
d6abbf6d73
commit
3dbb602ee3
@ -12,6 +12,8 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class Transfuse extends EcoEnchant {
|
||||
public Transfuse() {
|
||||
super(
|
||||
@ -32,6 +34,9 @@ public final class Transfuse extends EcoEnchant {
|
||||
|
||||
event.setDropItems(false);
|
||||
|
||||
if(!this.getConfig().getStrings(EcoEnchants.CONFIG_LOCATION + "works-on").stream().map(string -> Material.getMaterial(string.toUpperCase())).collect(Collectors.toList()).contains(block.getType()))
|
||||
return;
|
||||
|
||||
Material material;
|
||||
double random = NumberUtils.randFloat(0, 1);
|
||||
double band = 1/(double) this.getConfig().getStrings(EcoEnchants.CONFIG_LOCATION + "blocks").size();
|
||||
|
@ -29,3 +29,5 @@ config:
|
||||
- redstone_ore
|
||||
- iron_ore
|
||||
chance-per-level: 0.03 # Chance for drop to be switched
|
||||
works-on:
|
||||
- stone
|
||||
|
Loading…
Reference in New Issue
Block a user