Class AbstractEntityAssembler<T extends org.bukkit.entity.Entity>

java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem<BlockTicker>
io.github.thebusybiscuit.slimefun4.implementation.items.electric.machines.entities.AbstractEntityAssembler<T>
Type Parameters:
T - the type of Entity this assembler spawns
All Implemented Interfaces:
EnergyNetComponent, ItemAttribute, Placeable
Direct Known Subclasses:
IronGolemAssembler, WitherAssembler

public abstract class AbstractEntityAssembler<T extends org.bukkit.entity.Entity> extends SimpleSlimefunItem<BlockTicker> implements EnergyNetComponent
This is an abstract super class for Entity Assemblers.
Author:
TheBusyBiscuit
See Also:
  • Constructor Details

    • AbstractEntityAssembler

      @ParametersAreNonnullByDefault protected AbstractEntityAssembler(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe)
      Constructs a new AbstractEntityAssembler.
      Parameters:
      itemGroup - The item group this item belongs to
      item - The item stack for this entity assembler
      recipeType - The recipe type used to craft this item
      recipe - The recipe to craft this item
  • Method Details

    • getItemHandler

      public BlockTicker getItemHandler()
      Description copied from class: SimpleSlimefunItem
      This returns the ItemHandler that will be added to this SlimefunItem.
      Specified by:
      getItemHandler in class SimpleSlimefunItem<BlockTicker>
      Returns:
      The ItemHandler that should be added to this SlimefunItem
    • constructMenu

      protected void constructMenu(BlockMenuPreset preset)
      Constructs the menu preset for this entity assembler.
      Parameters:
      preset - The BlockMenuPreset to construct
    • getEnergyComponentType

      public EnergyNetComponentType getEnergyComponentType()
      Description copied from interface: EnergyNetComponent
      This method returns the Type of EnergyNetComponentType this SlimefunItem represents. It describes how this Block will interact with an EnergyNet.
      Specified by:
      getEnergyComponentType in interface EnergyNetComponent
      Returns:
      The EnergyNetComponentType this SlimefunItem represents.
    • getEnergyConsumption

      public abstract int getEnergyConsumption()
      Returns the amount of energy consumed per assembly operation.
      Returns:
      The energy consumption
    • getHead

      public abstract org.bukkit.inventory.ItemStack getHead()
      Returns the item used as the head/ingredient for entity assembly.
      Returns:
      The head item
    • getBody

      public abstract org.bukkit.inventory.ItemStack getBody()
      Returns the item used as the body/ingredient for entity assembly.
      Returns:
      The body item
    • getHeadBorder

      public abstract org.bukkit.Material getHeadBorder()
      Returns the material used for the head border in the GUI.
      Returns:
      The head border material
    • getBodyBorder

      public abstract org.bukkit.Material getBodyBorder()
      Returns the material used for the body border in the GUI.
      Returns:
      The body border material
    • spawnEntity

      public abstract T spawnEntity(org.bukkit.Location l)
      Spawns the entity at the given location.
      Parameters:
      l - The location to spawn the entity
      Returns:
      The spawned entity