Class StandardRequests.DeliveryRequest

java.lang.Object
com.minecolonies.core.colony.requestsystem.requests.AbstractRequest<Delivery>
com.minecolonies.core.colony.requestsystem.requests.StandardRequests.DeliveryRequest
All Implemented Interfaces:
IRequest<Delivery>, IStackBasedTask
Enclosing class:
StandardRequests

public static class StandardRequests.DeliveryRequest extends AbstractRequest<Delivery> implements IStackBasedTask
Generic delivery request.
  • Constructor Details

    • DeliveryRequest

      public DeliveryRequest(@NotNull @NotNull IRequester requester, @NotNull @NotNull IToken<?> token, @NotNull @NotNull RequestState state, @NotNull @NotNull Delivery requested)
  • Method Details

    • getDeliveries

      @NotNull public @NotNull com.google.common.collect.ImmutableList<net.minecraft.world.item.ItemStack> getDeliveries()
      Description copied from interface: IRequest
      Method to get the ItemStacks used for the delivery.
      Specified by:
      getDeliveries in interface IRequest<Delivery>
      Overrides:
      getDeliveries in class AbstractRequest<Delivery>
      Returns:
      The ItemStacks that the Deliveryman transports around. AbstractCollection.isEmpty() means no delivery possible.
    • getShortDisplayString

      @NotNull public @NotNull net.minecraft.network.chat.Component getShortDisplayString()
      Description copied from interface: IRequest
      Method used to get a Component that can be displayed to the Player and describes the request in short. Should represent the request, in case the player needs to fulfill it, or information about this request is required.
      Specified by:
      getShortDisplayString in interface IRequest<Delivery>
      Returns:
      The text that describes this Request.
    • getDisplayStacks

      @NotNull public @NotNull List<net.minecraft.world.item.ItemStack> getDisplayStacks()
      Description copied from interface: IRequest
      Method used to get a List of ItemStacks that represents the stack. This list is used in GUI to show what the request is. If an empty list is returned then no stack is shown. If a list with multiple stacks is returned it will switch between the stacks once every second unless the player holds the shift key.
      Specified by:
      getDisplayStacks in interface IRequest<Delivery>
      Overrides:
      getDisplayStacks in class AbstractRequest<Delivery>
      Returns:
      A List of ItemStacks that represents this request.
    • getDisplayPrefix

      public net.minecraft.network.chat.MutableComponent getDisplayPrefix()
      Description copied from interface: IStackBasedTask
      Get a display prefix component.
      Specified by:
      getDisplayPrefix in interface IStackBasedTask
      Returns:
      the component.
    • getDisplayCount

      public int getDisplayCount()
      Description copied from interface: IStackBasedTask
      Get the request related count.
      Specified by:
      getDisplayCount in interface IStackBasedTask
      Returns:
      the count.
    • getTaskStack

      public net.minecraft.world.item.ItemStack getTaskStack()
      Description copied from interface: IStackBasedTask
      Get the stack associated to the task.
      Specified by:
      getTaskStack in interface IStackBasedTask
      Returns:
      the stack.
    • getResolverToolTip

      public List<net.minecraft.network.chat.MutableComponent> getResolverToolTip(IColonyView colony)
      Description copied from interface: IRequest
      Get the resolver tooltip for a request.
      Specified by:
      getResolverToolTip in interface IRequest<Delivery>
      Overrides:
      getResolverToolTip in class AbstractRequest<Delivery>
      Parameters:
      colony - the colony view to obtain information if necessary.
      Returns:
      a list of strings or empty.
    • getDisplayIcon

      @NotNull public @NotNull net.minecraft.resources.ResourceLocation getDisplayIcon()
      Description copied from interface: IRequest
      Method used to get a ResourceLocation that is displayed instead of the IRequest.getDisplayStacks(), when IRequest.getDisplayStacks() returns an empty list.
      Specified by:
      getDisplayIcon in interface IRequest<Delivery>
      Overrides:
      getDisplayIcon in class AbstractRequest<Delivery>
      Returns:
      The ResourceLocation of the Image dat is displayed when their are no DisplayStacks.