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 TypeMethodDescriptionvoid
addItems
(org.bukkit.block.Block b, org.bukkit.inventory.ItemStack... items) protected void
attack
(org.bukkit.block.Block b, org.bukkit.block.BlockFace face, Predicate<org.bukkit.entity.LivingEntity> predicate) protected boolean
chopTree
(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.BlockFace face) protected void
depositItems
(UniversalMenu menu, org.bukkit.block.Block facedBlock) protected void
dig
(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.Block block) protected void
editInstruction
(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData, String[] script, int index) protected void
farm
(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.Block block, boolean isAdvanced) protected void
fish
(org.bukkit.block.Block b, UniversalMenu menu) This returns theAndroidType
that is associated with thisProgrammableAndroid
.List
<org.bukkit.inventory.ItemStack> This is the list of items to display alongside thisSlimefunItem
.This returns theAndroidFuelSource
for thisProgrammableAndroid
.int[]
This method returns anArray
of slots that serve as the input for theInventory
of this block.int[]
This method returns anArray
of slots that serve as the output for theInventory
of this block.int
getTier()
protected List
<Instruction> protected void
move
(org.bukkit.block.Block from, org.bukkit.block.BlockFace face, org.bukkit.block.Block to) protected void
moveAndDig
(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.BlockFace face, org.bukkit.block.Block block) void
openScript
(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData, String sourceCode) protected void
openScriptDownloader
(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData, int page) void
openScriptEditor
(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData) void
This method is called beforeSlimefunItem.register(SlimefunAddon)
.protected void
refuel
(UniversalMenu menu, org.bukkit.block.Block facedBlock) void
registerFuelType
(MachineFuel fuel) protected void
rotate
(org.bukkit.block.Block b, SlimefunUniversalBlockData uniData, org.bukkit.block.BlockFace current, int mod) void
setScript
(SlimefunUniversalBlockData ubd, String script) protected void
tick
(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, warn
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock
createPreset, createPreset
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getId
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.rotations.NotDiagonallyRotatable
getRotation
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
Methods 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 theAndroidType
that is associated with thisProgrammableAndroid
.- Returns:
- The type of this
ProgrammableAndroid
-
getFuelSource
This returns theAndroidFuelSource
for 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:SlimefunItem
This method is called beforeSlimefunItem.register(SlimefunAddon)
. Override this method to add any additional setup, adding anItemHandler
for example.- Overrides:
preRegister
in 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:
getLabelLocalPath
in interfaceRecipeDisplayItem
-
getDisplayRecipes
Description copied from interface:RecipeDisplayItem
This 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 inputItemStack
and then your outputItemStack
.- Specified by:
getDisplayRecipes
in interfaceRecipeDisplayItem
- Returns:
- The recipes to display in the
SlimefunGuide
-
getInputSlots
public int[] getInputSlots()Description copied from interface:InventoryBlock
This method returns anArray
of slots that serve as the input for theInventory
of this block.- Specified by:
getInputSlots
in interfaceInventoryBlock
- Returns:
- The input slots for the
Inventory
of this block
-
getOutputSlots
public int[] getOutputSlots()Description copied from interface:InventoryBlock
This method returns anArray
of slots that serve as the output for theInventory
of this block.- Specified by:
getOutputSlots
in interfaceInventoryBlock
- Returns:
- The output slots for the
Inventory
of 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)
-