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

public class AutoEnchanter extends AContainer
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:
  • Constructor Details

  • Method Details

    • getProgressBar

      public ItemStack getProgressBar()
      Description copied from class: AContainer
      This method returns the ItemStack that this AContainer will use as a progress bar. Override this method to set the progress bar.
      Specified by:
      getProgressBar in class AContainer
      Returns:
      The ItemStack to use as the progress bar
    • findNextRecipe

      protected MachineRecipe findNextRecipe(BlockMenu menu)
      Overrides:
      findNextRecipe in class AContainer
    • enchant

      @Nullable @ParametersAreNonnullByDefault protected MachineRecipe enchant(BlockMenu menu, ItemStack target, ItemStack enchantedBook)
    • getMachineIdentifier

      public String getMachineIdentifier()
      Description copied from class: AContainer
      This method returns an internal identifier that is used to identify this AContainer and its recipes. When adding recipes to an AContainer we will use this identifier to identify all instances of the same AContainer. 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:
      getMachineIdentifier in class AContainer
      Returns:
      The identifier of this machine
    • isEnchantmentLevelAllowed

      protected boolean isEnchantmentLevelAllowed(int enchantmentLevel)
    • showEnchantmentLevelWarning

      protected void showEnchantmentLevelWarning(@Nonnull BlockMenu menu)
    • hasIgnoredLore

      protected boolean hasIgnoredLore(@Nonnull ItemStack item)
    • isEnchantmentAmountAllowed

      protected boolean isEnchantmentAmountAllowed(int numberOfEnchants)