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 ofEntitythis 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:
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractEntityAssembler(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe) Constructs a new AbstractEntityAssembler. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconstructMenu(BlockMenuPreset preset) Constructs the menu preset for this entity assembler.abstract org.bukkit.inventory.ItemStackgetBody()Returns the item used as the body/ingredient for entity assembly.abstract org.bukkit.MaterialReturns the material used for the body border in the GUI.This method returns the Type ofEnergyNetComponentTypethisSlimefunItemrepresents.abstract intReturns the amount of energy consumed per assembly operation.abstract org.bukkit.inventory.ItemStackgetHead()Returns the item used as the head/ingredient for entity assembly.abstract org.bukkit.MaterialReturns the material used for the head border in the GUI.This returns theItemHandlerthat will be added to thisSlimefunItem.abstract TspawnEntity(org.bukkit.Location l) Spawns the entity at the given location.Methods inherited from class io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem
preRegisterMethods inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addItemHandler, addItemSetting, addOfficialWikipage, addWikiPage, callItemHandler, canUse, disable, enable, 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, postRegister, 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.EnergyNetComponent
addCharge, addCharge, getCapacity, getCapacityLong, getCharge, getCharge, getCharge, getCharge, getChargeLong, getChargeLong, getChargeLong, isChargeable, removeCharge, removeCharge, setCharge, setChargeMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getIdMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
-
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 toitem- The item stack for this entity assemblerrecipeType- The recipe type used to craft this itemrecipe- The recipe to craft this item
-
-
Method Details
-
getItemHandler
Description copied from class:SimpleSlimefunItemThis returns theItemHandlerthat will be added to thisSlimefunItem.- Specified by:
getItemHandlerin classSimpleSlimefunItem<BlockTicker>- Returns:
- The
ItemHandlerthat should be added to thisSlimefunItem
-
constructMenu
Constructs the menu preset for this entity assembler.- Parameters:
preset- TheBlockMenuPresetto construct
-
getEnergyComponentType
Description copied from interface:EnergyNetComponentThis method returns the Type ofEnergyNetComponentTypethisSlimefunItemrepresents. It describes how this Block will interact with anEnergyNet.- Specified by:
getEnergyComponentTypein interfaceEnergyNetComponent- Returns:
- The
EnergyNetComponentTypethisSlimefunItemrepresents.
-
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
Spawns the entity at the given location.- Parameters:
l- The location to spawn the entity- Returns:
- The spawned entity
-