java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer
io.github.thebusybiscuit.slimefun4.implementation.items.electric.machines.entities.ProduceCollector
All Implemented Interfaces:
EnergyNetComponent, ItemAttribute, MachineProcessHolder<CraftingOperation>, Placeable, RecipeDisplayItem, InventoryBlock

public class ProduceCollector extends AContainer implements RecipeDisplayItem
The ProduceCollector allows you to collect produce from animals. Providing it with a bucket and a nearby Cow will allow you to obtain milk.
Author:
TheBusyBiscuit, Walshy
  • Constructor Details

    • ProduceCollector

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

    • registerDefaultRecipes

      protected void registerDefaultRecipes()
      Description copied from class: AContainer
      This method registers all default recipes for this machine.
      Overrides:
      registerDefaultRecipes in class AContainer
    • addProduce

      public void addProduce(@Nonnull AnimalProduce produce)
      This method adds a new AnimalProduce to this machine.
      Parameters:
      produce - The AnimalProduce to add
    • 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 AContainer
    • getDisplayRecipes

      @Nonnull 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
      Overrides:
      getDisplayRecipes in class AContainer
      Returns:
      The recipes to display in the SlimefunGuide
    • findNextRecipe

      @Nullable protected MachineRecipe findNextRecipe(@Nonnull BlockMenu inv)
      Overrides:
      findNextRecipe in class AContainer
    • getMachineIdentifier

      @Nonnull public String getMachineIdentifier()
      Description copied from class: AContainer
      This method returns an internal identifier that is used to identify this AContainer and its recipes. When adding recipes to an AContainer we will use this identifier to identify all instances of the same AContainer. This way we can add the recipes to all instances of the same machine. This method will be deprecated and replaced in the future
      Specified by:
      getMachineIdentifier in class AContainer
      Returns:
      The identifier of this machine
    • getProgressBar

      @Nonnull public org.bukkit.inventory.ItemStack getProgressBar()
      Description copied from class: AContainer
      This method returns the ItemStack that this AContainer will use as a progress bar. Override this method to set the progress bar.
      Specified by:
      getProgressBar in class AContainer
      Returns:
      The ItemStack to use as the progress bar