All Superinterfaces:
IRequestable, IRetryable
All Known Subinterfaces:
IConcreteDeliverable, INonExhaustiveDeliverable
All Known Implementing Classes:
Burnable, Food, MinimumStack, RequestTag, SmeltableOre, Stack, StackList, Tool

public interface IDeliverable extends IRetryable
An IDeliverable is an Requestable that can be delivered.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Can this type of request be resolved by the building, or only by external resolvers.
    copyWithCount(int newCount)
    Creates a new instance of this requestable with the given count.
    int
    Method called to get the amount of items that need to be in the stack.
    int
    Method called to get the minimum amount required to fulfill this request.
    @NotNull net.minecraft.world.item.ItemStack
    Method to get the result of the delivery.
    boolean
    matches(@NotNull net.minecraft.world.item.ItemStack stack)
    Method called to check if a given stack matches this deliverable.
    void
    setResult(@NotNull net.minecraft.world.item.ItemStack result)
    Method to set the result of a delivery.

    Methods inherited from interface com.minecolonies.api.colony.requestsystem.requestable.IRequestable

    getSuperClasses
  • Method Details

    • matches

      boolean matches(@NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      Method called to check if a given stack matches this deliverable. The first stack that returns true from this method is returned as a Deliverable.
      Parameters:
      stack - The stack to test.
      Returns:
      true when the stack matches. False when not.
    • getCount

      int getCount()
      Method called to get the amount of items that need to be in the stack.
      Returns:
      The amount of items.
    • getMinimumCount

      int getMinimumCount()
      Method called to get the minimum amount required to fulfill this request.
      Returns:
      the minimum amount.
    • getResult

      @NotNull @NotNull net.minecraft.world.item.ItemStack getResult()
      Method to get the result of the delivery.
      Returns:
      The result of the delivery.
    • setResult

      void setResult(@NotNull @NotNull net.minecraft.world.item.ItemStack result)
      Method to set the result of a delivery.
      Parameters:
      result - The result of the delivery.
    • copyWithCount

      IDeliverable copyWithCount(int newCount)
      Creates a new instance of this requestable with the given count.
      Parameters:
      newCount - The new requestable, with the requested count.
      Returns:
      the deliverable.
    • canBeResolvedByBuilding

      default boolean canBeResolvedByBuilding()
      Can this type of request be resolved by the building, or only by external resolvers.
      Returns:
      true if so.