mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 16:57:42 +01:00
Add new fishing enchants. Fixes BUKKIT-5035
By: GJ <gjmcferrin@gmail.com>
This commit is contained in:
parent
832e4cc761
commit
ca95b136be
@ -120,6 +120,16 @@ public abstract class Enchantment {
|
||||
*/
|
||||
public static final Enchantment ARROW_INFINITE = new EnchantmentWrapper(51);
|
||||
|
||||
/**
|
||||
* Decreases odds of catching worthless junk
|
||||
*/
|
||||
public static final Enchantment LUCK = new EnchantmentWrapper(61);
|
||||
|
||||
/**
|
||||
* Increases rate of fish biting your hook
|
||||
*/
|
||||
public static final Enchantment LURE = new EnchantmentWrapper(62);
|
||||
|
||||
private static final Map<Integer, Enchantment> byId = new HashMap<Integer, Enchantment>();
|
||||
private static final Map<String, Enchantment> byName = new HashMap<String, Enchantment>();
|
||||
private static boolean acceptingNew = true;
|
||||
|
@ -127,7 +127,6 @@ public enum EnchantmentTarget {
|
||||
|| item.equals(Material.DIAMOND_AXE)
|
||||
|| item.equals(Material.GOLD_AXE)
|
||||
|| item.equals(Material.SHEARS) // NOTE: No vanilla enchantments for this
|
||||
|| item.equals(Material.FISHING_ROD) // NOTE: No vanilla enchantments for this
|
||||
|| item.equals(Material.FLINT_AND_STEEL); // NOTE: No vanilla enchantments for this
|
||||
}
|
||||
},
|
||||
@ -140,6 +139,16 @@ public enum EnchantmentTarget {
|
||||
public boolean includes(Material item) {
|
||||
return item.equals(Material.BOW);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Allows the Enchantment to be placed on fishing rods.
|
||||
*/
|
||||
FISHING_ROD {
|
||||
@Override
|
||||
public boolean includes(Material item) {
|
||||
return item.equals(Material.FISHING_ROD);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user