Class ProgrammableAndroid
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.androids.ProgrammableAndroid
- All Implemented Interfaces:
UniversalBlock,ItemAttribute,Placeable,RecipeDisplayItem,NotDiagonallyRotatable,InventoryBlock
- Direct Known Subclasses:
ButcherAndroid,FarmerAndroid,FishermanAndroid,MinerAndroid,WoodcutterAndroid
public class ProgrammableAndroid
extends SlimefunItem
implements InventoryBlock, RecipeDisplayItem, NotDiagonallyRotatable, UniversalBlock
-
Field Summary
FieldsFields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
ConstructorsConstructorDescriptionProgrammableAndroid(ItemGroup itemGroup, int tier, SlimefunItemStack item, RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddItems(org.bukkit.block.Block b, org.bukkit.inventory.ItemStack... items) protected voidattack(org.bukkit.block.Block b, org.bukkit.block.BlockFace face, Predicate<org.bukkit.entity.LivingEntity> predicate) protected booleanchopTree(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.BlockFace face) protected voiddepositItems(UniversalMenu menu, org.bukkit.block.Block facedBlock) protected voiddig(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.Block block) protected voideditInstruction(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData, String[] script, int index) protected voidfarm(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.Block block, boolean isAdvanced) protected voidfish(org.bukkit.block.Block b, UniversalMenu menu) This returns theAndroidTypethat is associated with thisProgrammableAndroid.List<org.bukkit.inventory.ItemStack> This is the list of items to display alongside thisSlimefunItem.This returns theAndroidFuelSourcefor thisProgrammableAndroid.int[]This method returns anArrayof slots that serve as the input for theInventoryof this block.int[]This method returns anArrayof slots that serve as the output for theInventoryof this block.intgetTier()protected List<Instruction> protected voidmove(org.bukkit.block.Block from, org.bukkit.block.BlockFace face, org.bukkit.block.Block to) protected voidmoveAndDig(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.BlockFace face, org.bukkit.block.Block block) voidopenScript(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData, String sourceCode) protected voidopenScriptDownloader(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData, int page) voidopenScriptEditor(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData) voidThis method is called beforeSlimefunItem.register(SlimefunAddon).protected voidrefuel(UniversalMenu menu, org.bukkit.block.Block facedBlock) voidregisterFuelType(MachineFuel fuel) protected voidrotate(org.bukkit.block.Block b, SlimefunUniversalBlockData uniData, org.bukkit.block.BlockFace current, int mod) voidsetScript(SlimefunUniversalBlockData ubd, String script) protected voidtick(org.bukkit.block.Block b, SlimefunUniversalData data) Methods 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 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.rotations.NotDiagonallyRotatable
getRotationMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreakingMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem
getRecipeSectionLabel
-
Field Details
-
fuelTypes
-
texture
-
-
Constructor Details
-
ProgrammableAndroid
@ParametersAreNonnullByDefault public ProgrammableAndroid(ItemGroup itemGroup, int tier, SlimefunItemStack item, RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe)
-
-
Method Details
-
getAndroidType
This returns theAndroidTypethat is associated with thisProgrammableAndroid.- Returns:
- The type of this
ProgrammableAndroid
-
getFuelSource
This returns theAndroidFuelSourcefor thisProgrammableAndroid. It determines what kind of fuel is required to run it.- Returns:
- The required type of fuel
-
preRegister
public void preRegister()Description copied from class:SlimefunItemThis method is called beforeSlimefunItem.register(SlimefunAddon). Override this method to add any additional setup, adding anItemHandlerfor example.- Overrides:
preRegisterin classSlimefunItem
-
openScript
@ParametersAreNonnullByDefault public void openScript(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData, String sourceCode) -
openScriptDownloader
protected void openScriptDownloader(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData, int page) -
openScriptEditor
-
getValidScriptInstructions
-
editInstruction
protected void editInstruction(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData, String[] script, int index) -
getScript
-
setScript
-
registerFuelType
-
getLabelLocalPath
- Specified by:
getLabelLocalPathin interfaceRecipeDisplayItem
-
getDisplayRecipes
Description copied from interface:RecipeDisplayItemThis is the list of items to display alongside thisSlimefunItem. Note that these items will be filled in from top to bottom first. So if you want it to express a recipe, add your inputItemStackand then your outputItemStack.- Specified by:
getDisplayRecipesin interfaceRecipeDisplayItem- Returns:
- The recipes to display in the
SlimefunGuide
-
getInputSlots
public int[] getInputSlots()Description copied from interface:InventoryBlockThis method returns anArrayof slots that serve as the input for theInventoryof this block.- Specified by:
getInputSlotsin interfaceInventoryBlock- Returns:
- The input slots for the
Inventoryof this block
-
getOutputSlots
public int[] getOutputSlots()Description copied from interface:InventoryBlockThis method returns anArrayof slots that serve as the output for theInventoryof this block.- Specified by:
getOutputSlotsin interfaceInventoryBlock- Returns:
- The output slots for the
Inventoryof this block
-
getTier
public int getTier() -
tick
-
rotate
protected void rotate(org.bukkit.block.Block b, SlimefunUniversalBlockData uniData, org.bukkit.block.BlockFace current, int mod) -
addItems
@ParametersAreNonnullByDefault public void addItems(org.bukkit.block.Block b, org.bukkit.inventory.ItemStack... items) -
move
@ParametersAreNonnullByDefault protected void move(org.bukkit.block.Block from, org.bukkit.block.BlockFace face, org.bukkit.block.Block to) -
attack
protected void attack(org.bukkit.block.Block b, org.bukkit.block.BlockFace face, Predicate<org.bukkit.entity.LivingEntity> predicate)
-