mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 14:33:56 +01:00
Implement isCursed for new enchantments
This commit is contained in:
parent
fa1a44ab5d
commit
bd2d7935c4
@ -59,6 +59,11 @@ public class CraftEnchantment extends Enchantment {
|
|||||||
return target.isTreasure();
|
return target.isTreasure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCursed() {
|
||||||
|
return target.d(); // PAIL isCursed
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canEnchantItem(ItemStack item) {
|
public boolean canEnchantItem(ItemStack item) {
|
||||||
return target.canEnchant(CraftItemStack.asNMSCopy(item));
|
return target.canEnchant(CraftItemStack.asNMSCopy(item));
|
||||||
@ -87,6 +92,8 @@ public class CraftEnchantment extends Enchantment {
|
|||||||
return "DEPTH_STRIDER";
|
return "DEPTH_STRIDER";
|
||||||
case 9:
|
case 9:
|
||||||
return "FROST_WALKER";
|
return "FROST_WALKER";
|
||||||
|
case 10:
|
||||||
|
return "BINDING_CURSE";
|
||||||
case 16:
|
case 16:
|
||||||
return "DAMAGE_ALL";
|
return "DAMAGE_ALL";
|
||||||
case 17:
|
case 17:
|
||||||
@ -121,6 +128,8 @@ public class CraftEnchantment extends Enchantment {
|
|||||||
return "LURE";
|
return "LURE";
|
||||||
case 70:
|
case 70:
|
||||||
return "MENDING";
|
return "MENDING";
|
||||||
|
case 71:
|
||||||
|
return "VANISHING_CURSE";
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN_ENCHANT_" + getId();
|
return "UNKNOWN_ENCHANT_" + getId();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user