Class MagicianTalisman
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.magical.talismans.Talisman
io.github.thebusybiscuit.slimefun4.implementation.items.magical.talismans.MagicianTalisman
- All Implemented Interfaces:
Placeable
The
MagicianTalisman is a special kind of Talisman which awards a Player
with an extra Enchantment when they enchant their ItemStack.- Author:
- TheBusyBiscuit
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun4.implementation.items.magical.talismans.Talisman
cancel, chance, consumable, effects, suffix, TALISMANS_ITEMGROUPFields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRandomEnchantment(ItemStack item, Set<Enchantment> existingEnchantments) This method picks a randomTalismanEnchantmentfor the providedItemStack.booleanThis method checks whether enchantment books can be given an extraEnchantmentor not.Methods inherited from class io.github.thebusybiscuit.slimefun4.implementation.items.magical.talismans.Talisman
getChance, getEffects, getMessageSuffix, isConsumable, isEventCancelled, isSilent, load, postRegister, sendMessage, trigger, trigger, trigger, triggerMethods inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addItemHandler, addItemSetting, addOfficialWikipage, callItemHandler, canUse, equals, error, getAddon, getBlockTicker, getById, getByItem, getDrops, getDrops, getHandlers, getId, getItem, getItemGroup, getItemName, getItemSetting, getItemSettings, getOptionalById, getOptionalByItem, getRecipe, getRecipeOutput, getRecipeType, getResearch, getState, getWikipage, hashCode, hasResearch, info, isDisabled, isDisabledIn, isDisenchantable, isEnchantable, isHidden, isItem, isItemStackImmutable, isTicking, isUseableInWorkbench, preRegister, register, sendDeprecationWarning, setHidden, setItemGroup, setRecipe, setRecipeOutput, setRecipeType, setResearch, setUseableInWorkbench, toString, warnMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
-
Constructor Details
-
MagicianTalisman
-
-
Method Details
-
getRandomEnchantment
@Nullable public TalismanEnchantment getRandomEnchantment(@Nonnull ItemStack item, @Nonnull Set<Enchantment> existingEnchantments) This method picks a randomTalismanEnchantmentfor the providedItemStack. The method will return null, if null was provided or no applicableEnchantmentwas found.- Parameters:
item- TheItemStackto find anEnchantmentforexistingEnchantments- ASetcontaining theEnchantmentsthat currently exist on theItemStack- Returns:
- An applicable
TalismanEnchantmentor null
-
isEnchantmentBookAllowed
public boolean isEnchantmentBookAllowed()This method checks whether enchantment books can be given an extraEnchantmentor not.- Returns:
- Whether enchantment books can receive an extra
Enchantment
-