Class MultiTool
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.electric.gadgets.MultiTool
- All Implemented Interfaces:
ItemAttribute
,Placeable
,Rechargeable
The
MultiTool
is an electric device which can mimic
the behaviour of any other SlimefunItem
.- Author:
- TheBusyBiscuit
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench
-
Constructor Summary
ConstructorDescriptionMultiTool
(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, float capacity, String... items) -
Method Summary
Modifier and TypeMethodDescriptionprotected ItemUseHandler
float
getMaxItemCharge
(ItemStack item) This method returns the maximum charge the givenItemStack
is capable of holding.void
This method is called beforeSlimefunItem.register(SlimefunAddon)
.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, load, postRegister, 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.ItemAttribute
getId
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Rechargeable
addItemCharge, getItemCharge, removeItemCharge, setItemCharge
-
Constructor Details
-
MultiTool
@ParametersAreNonnullByDefault public MultiTool(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, float capacity, String... items)
-
-
Method Details
-
getMaxItemCharge
Description copied from interface:Rechargeable
This method returns the maximum charge the givenItemStack
is capable of holding.- Specified by:
getMaxItemCharge
in interfaceRechargeable
- Parameters:
item
- TheItemStack
for which to determine the maximum charge- Returns:
- The maximum energy charge for this
ItemStack
-
getItemUseHandler
-
preRegister
public void preRegister()Description copied from class:SlimefunItem
This method is called beforeSlimefunItem.register(SlimefunAddon)
. Override this method to add any additional setup, adding anItemHandler
for example.- Overrides:
preRegister
in classSlimefunItem
-