Class AutoEnchanter
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer
io.github.thebusybiscuit.slimefun4.implementation.items.electric.machines.enchanting.AutoEnchanter
- All Implemented Interfaces:
EnergyNetComponent,ItemAttribute,MachineProcessHolder<CraftingOperation>,Placeable,InventoryBlock
The
AutoEnchanter, in contrast to the AutoDisenchanter, adds
Enchantments from a given enchanted book and transfers them onto
an ItemStack.- Author:
- TheBusyBiscuit, Poslovitch, Mooy1, StarWishSama, martinbrom
- See Also:
-
Field Summary
Fields inherited from class me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer
recipesFields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
ConstructorsConstructorDescriptionAutoEnchanter(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionprotected MachineRecipeenchant(BlockMenu menu, org.bukkit.inventory.ItemStack target, org.bukkit.inventory.ItemStack enchantedBook) protected MachineRecipefindNextRecipe(BlockMenu menu) This method returns an internal identifier that is used to identify thisAContainerand its recipes.org.bukkit.inventory.ItemStackThis method returns theItemStackthat thisAContainerwill use as a progress bar.protected booleanhasIgnoredLore(org.bukkit.inventory.ItemStack item) protected booleanisEnchantmentCountAllowed(int count) protected booleanisEnchantmentLevelAllowed(int enchantmentLevel) protected voidprotected voidMethods inherited from class me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer
constructMenu, disable, enable, getCapacity, getDisplayRecipes, getEnergyComponentType, getEnergyConsumption, getInputSlots, getInventoryTitle, getMachineProcessor, getMachineRecipes, getOutputSlots, getSpeed, onBlockBreak, postRegister, preRegister, register, registerDefaultRecipes, registerRecipe, registerRecipe, registerRecipe, setCapacity, setEnergyConsumption, setProcessingSpeed, takeCharge, tickMethods inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addItemHandler, addItemSetting, addOfficialWikipage, addWikiPage, 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, load, loadDataByDefault, 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.EnergyNetComponent
addCharge, addCharge, getCapacityLong, getCharge, getCharge, getCharge, getCharge, getChargeLong, getChargeLong, getChargeLong, isChargeable, removeCharge, removeCharge, setCharge, setChargeMethods inherited from interface me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock
createPreset, createPresetMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getIdMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
-
Constructor Details
-
AutoEnchanter
@ParametersAreNonnullByDefault public AutoEnchanter(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe)
-
-
Method Details
-
getProgressBar
public org.bukkit.inventory.ItemStack getProgressBar()Description copied from class:AContainerThis method returns theItemStackthat thisAContainerwill use as a progress bar. Override this method to set the progress bar.- Specified by:
getProgressBarin classAContainer- Returns:
- The
ItemStackto use as the progress bar
-
findNextRecipe
- Overrides:
findNextRecipein classAContainer
-
enchant
@Nullable @ParametersAreNonnullByDefault protected MachineRecipe enchant(BlockMenu menu, org.bukkit.inventory.ItemStack target, org.bukkit.inventory.ItemStack enchantedBook) -
getMachineIdentifier
Description copied from class:AContainerThis method returns an internal identifier that is used to identify thisAContainerand its recipes. When adding recipes to anAContainerwe will use this identifier to identify all instances of the sameAContainer. This way we can add the recipes to all instances of the same machine. This method will be deprecated and replaced in the future- Specified by:
getMachineIdentifierin classAContainer- Returns:
- The identifier of this machine
-
isEnchantmentLevelAllowed
protected boolean isEnchantmentLevelAllowed(int enchantmentLevel) -
isEnchantmentCountAllowed
protected boolean isEnchantmentCountAllowed(int count) -
showEnchantmentLevelWarning
-
showEnchantmentLimitWarning
-
hasIgnoredLore
protected boolean hasIgnoredLore(@Nonnull org.bukkit.inventory.ItemStack item)
-