Class ProgrammableAndroid
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.androids.ProgrammableAndroid
- All Implemented Interfaces:
ItemAttribute
,Placeable
,RecipeDisplayItem
,InventoryBlock
- Direct Known Subclasses:
ButcherAndroid
,FarmerAndroid
,FishermanAndroid
,MinerAndroid
,WoodcutterAndroid
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench
-
Constructor Summary
ConstructorDescriptionProgrammableAndroid
(ItemGroup itemGroup, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
attack
(Block b, BlockFace face, Predicate<LivingEntity> predicate) protected boolean
protected void
depositItems
(BlockMenu menu, Block facedBlock) protected void
protected void
editInstruction
(Player p, Block b, String[] script, int index) protected void
protected void
This returns theAndroidType
that is associated with thisProgrammableAndroid
.This is the list of items to display alongside thisSlimefunItem
.This returns theAndroidFuelSource
for thisProgrammableAndroid
.int[]
int[]
int
getTier()
protected List<Instruction>
protected void
protected void
moveAndDig
(Block b, BlockMenu menu, BlockFace face, Block block) void
openScript
(Player p, Block b, String sourceCode) protected void
openScriptDownloader
(Player p, Block b, int page) void
openScriptEditor
(Player p, Block b) void
This method is called beforeSlimefunItem.register(SlimefunAddon)
.protected void
void
registerFuelType
(MachineFuel fuel) protected void
void
protected void
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 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.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, 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
-
openScriptDownloader
-
openScriptEditor
-
getValidScriptInstructions
-
editInstruction
-
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
- Specified by:
getInputSlots
in interfaceInventoryBlock
- Returns:
- The input slots for the
Inventory
of this block
-
getOutputSlots
public int[] getOutputSlots()Description copied from interface:InventoryBlock
- Specified by:
getOutputSlots
in interfaceInventoryBlock
- Returns:
- The output slots for the
Inventory
of this block
-
getTier
public int getTier() -
tick
-
rotate
-
depositItems
-
refuel
-
addItems
-
move
-
attack
-
fish
-
dig
-
moveAndDig
-
chopTree
-
farm
-