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 Details

  • Constructor Details

    • ProgrammableAndroid

      @ParametersAreNonnullByDefault public ProgrammableAndroid(ItemGroup itemGroup, int tier, SlimefunItemStack item, RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe)
  • Method Details

    • getAndroidType

      public AndroidType getAndroidType()
      This returns the AndroidType that is associated with this ProgrammableAndroid.
      Returns:
      The type of this ProgrammableAndroid
    • getFuelSource

      public AndroidFuelSource getFuelSource()
      This returns the AndroidFuelSource for this ProgrammableAndroid. 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 before SlimefunItem.register(SlimefunAddon). Override this method to add any additional setup, adding an ItemHandler for example.
      Overrides:
      preRegister in class SlimefunItem
    • 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

      public void openScriptEditor(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData)
    • getValidScriptInstructions

      @Nonnull protected List<Instruction> getValidScriptInstructions()
    • editInstruction

      protected void editInstruction(org.bukkit.entity.Player p, SlimefunUniversalBlockData uniData, String[] script, int index)
    • getScript

      @Nonnull public String getScript(@Nonnull SlimefunUniversalBlockData ubd)
    • setScript

      public void setScript(@Nonnull SlimefunUniversalBlockData ubd, @Nonnull String script)
    • registerFuelType

      public void registerFuelType(@Nonnull MachineFuel fuel)
    • getLabelLocalPath

      public String getLabelLocalPath()
      Specified by:
      getLabelLocalPath in interface RecipeDisplayItem
    • getDisplayRecipes

      public List<org.bukkit.inventory.ItemStack> getDisplayRecipes()
      Description copied from interface: RecipeDisplayItem
      This is the list of items to display alongside this SlimefunItem. Note that these items will be filled in from top to bottom first. So if you want it to express a recipe, add your input ItemStack and then your output ItemStack.
      Specified by:
      getDisplayRecipes in interface RecipeDisplayItem
      Returns:
      The recipes to display in the SlimefunGuide
    • getInputSlots

      public int[] getInputSlots()
      Description copied from interface: InventoryBlock
      This method returns an Array of slots that serve as the input for the Inventory of this block.
      Specified by:
      getInputSlots in interface InventoryBlock
      Returns:
      The input slots for the Inventory of this block
    • getOutputSlots

      public int[] getOutputSlots()
      Description copied from interface: InventoryBlock
      This method returns an Array of slots that serve as the output for the Inventory of this block.
      Specified by:
      getOutputSlots in interface InventoryBlock
      Returns:
      The output slots for the Inventory of this block
    • getTier

      public int getTier()
    • tick

      protected void tick(org.bukkit.block.Block b, SlimefunUniversalData data)
    • rotate

      protected void rotate(org.bukkit.block.Block b, SlimefunUniversalBlockData uniData, org.bukkit.block.BlockFace current, int mod)
    • depositItems

      protected void depositItems(UniversalMenu menu, org.bukkit.block.Block facedBlock)
    • refuel

      protected void refuel(UniversalMenu menu, org.bukkit.block.Block facedBlock)
    • 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)
    • fish

      protected void fish(org.bukkit.block.Block b, UniversalMenu menu)
    • dig

      protected void dig(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.Block block)
    • moveAndDig

      protected void moveAndDig(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.BlockFace face, org.bukkit.block.Block block)
    • chopTree

      protected boolean chopTree(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.BlockFace face)
    • farm

      protected void farm(org.bukkit.block.Block b, UniversalMenu menu, org.bukkit.block.Block block, boolean isAdvanced)