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_ITEMGROUP
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRandomEnchantment
(ItemStack item, Set<Enchantment> existingEnchantments) This method picks a randomTalismanEnchantment
for the providedItemStack
.boolean
This method checks whether enchantment books can be given an extraEnchantment
or 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, trigger
Methods 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, warn
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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 randomTalismanEnchantment
for the providedItemStack
. The method will return null, if null was provided or no applicableEnchantment
was found.- Parameters:
item
- TheItemStack
to find anEnchantment
forexistingEnchantments
- ASet
containing theEnchantments
that currently exist on theItemStack
- Returns:
- An applicable
TalismanEnchantment
or null
-
isEnchantmentBookAllowed
public boolean isEnchantmentBookAllowed()This method checks whether enchantment books can be given an extraEnchantment
or not.- Returns:
- Whether enchantment books can receive an extra
Enchantment
-