mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-26 20:27:38 +01:00
Improved reaper
This commit is contained in:
parent
eb87c1dc06
commit
dd9181f615
@ -223,7 +223,7 @@ import com.willfp.ecoenchants.enchantments.ecoenchants.special.Pentashot;
|
||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Preservation;
|
||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Prosperity;
|
||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Razor;
|
||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Reaper;
|
||||
import com.willfp.ecoenchants.enchantments.ecoenchants.normal.Reaper;
|
||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Repairing;
|
||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Soulbound;
|
||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Spring;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.special;
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -6,7 +6,9 @@ import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
public class Reaper extends EcoEnchant {
|
||||
public Reaper() {
|
||||
super(
|
||||
"reaper", EnchantmentType.SPECIAL
|
||||
"reaper", EnchantmentType.NORMAL
|
||||
);
|
||||
}
|
||||
|
||||
// Actual code is in soulbound.
|
||||
}
|
@ -42,17 +42,18 @@ public class Soulbound extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.getKiller() instanceof Player) {
|
||||
Player killer = (Player) player.getKiller();
|
||||
if (EnchantChecks.mainhand(killer, EcoEnchants.REAPER)) {
|
||||
if (player.getKiller() != null) {
|
||||
Player killer = player.getKiller();
|
||||
int reaperLevel = EnchantChecks.getMainhandLevel(killer, EcoEnchants.REAPER);
|
||||
if (reaperLevel > 0) {
|
||||
if (!(EcoEnchants.REAPER.getDisabledWorlds().contains(killer.getWorld()))) {
|
||||
int points = EnchantChecks.getMainhandLevel(killer, EcoEnchants.REAPER);
|
||||
if (EnchantmentUtils.passedChance(EcoEnchants.REAPER, points)) {
|
||||
if (EnchantmentUtils.passedChance(EcoEnchants.REAPER, reaperLevel)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (ItemStack itemStack : player.getInventory().getContents()) {
|
||||
if (itemStack == null) {
|
||||
continue;
|
||||
|
@ -3,22 +3,23 @@
|
||||
#
|
||||
|
||||
name: "Reaper"
|
||||
description: Gives you a chance to knock out things with a soulbound.
|
||||
description: Chance to prevent your opponents soulbound from working.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
table: true
|
||||
villager: false
|
||||
loot: false
|
||||
rarity: veryspecial
|
||||
rarity: legendary
|
||||
|
||||
general-config:
|
||||
targets:
|
||||
- hoe
|
||||
- sword
|
||||
- axe
|
||||
grindstoneable: true
|
||||
disabled-in-worlds: []
|
||||
conflicts: []
|
||||
maximum-level: 5
|
||||
maximum-level: 3
|
||||
|
||||
config:
|
||||
chance-per-level: 2
|
Loading…
Reference in New Issue
Block a user