Class StandardRequests.PickupRequest
java.lang.Object
com.minecolonies.core.colony.requestsystem.requests.AbstractRequest<Pickup>
com.minecolonies.core.colony.requestsystem.requests.StandardRequests.PickupRequest
- Enclosing class:
- StandardRequests
Generic delivery request.
-
Field Summary
Fields inherited from class com.minecolonies.core.colony.requestsystem.requests.AbstractRequest
MISSING -
Constructor Summary
ConstructorsConstructorDescriptionPickupRequest(@NotNull IRequester requester, @NotNull IToken<?> token, @NotNull RequestState state, @NotNull Pickup requested) -
Method Summary
Modifier and TypeMethodDescription@NotNull com.google.common.collect.ImmutableList<net.minecraft.world.item.ItemStack>Method to get the ItemStacks used for the delivery.@NotNull net.minecraft.resources.ResourceLocationMethod used to get a ResourceLocation that is displayed instead of theIRequest.getDisplayStacks(), whenIRequest.getDisplayStacks()returns an empty list.@NotNull List<net.minecraft.world.item.ItemStack>Method used to get a List of ItemStacks that represents the stack.List<net.minecraft.network.chat.MutableComponent>getResolverToolTip(IColonyView colony) Get the resolver tooltip for a request.@NotNull net.minecraft.network.chat.ComponentMethod used to get aComponentthat can be displayed to the Player and describes the request in short.Methods inherited from class com.minecolonies.core.colony.requestsystem.requests.AbstractRequest
addChild, addChildren, addChildren, addDelivery, addDelivery, canBeDelivered, childStateUpdated, equals, getChildren, getId, getLongDisplayString, getParent, getRequest, getRequester, getRequestOfType, getResult, getState, getSuperClasses, getType, hasChildren, hashCode, hasParent, hasResult, overrideCurrentDeliveries, removeChild, removeChildren, removeChildren, resetDeliveries, setParent, setResult, setStateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.requestsystem.request.IRequest
getStrategy
-
Constructor Details
-
PickupRequest
public PickupRequest(@NotNull @NotNull IRequester requester, @NotNull @NotNull IToken<?> token, @NotNull @NotNull RequestState state, @NotNull @NotNull Pickup requested)
-
-
Method Details
-
getDeliveries
@NotNull public @NotNull com.google.common.collect.ImmutableList<net.minecraft.world.item.ItemStack> getDeliveries()Description copied from interface:IRequestMethod to get the ItemStacks used for the delivery.- Specified by:
getDeliveriesin interfaceIRequest<Pickup>- Overrides:
getDeliveriesin classAbstractRequest<Pickup>- 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:IRequestMethod used to get aComponentthat 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.- Returns:
- The text that describes this Request.
-
getDisplayStacks
Description copied from interface:IRequestMethod 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:
getDisplayStacksin interfaceIRequest<Pickup>- Overrides:
getDisplayStacksin classAbstractRequest<Pickup>- Returns:
- A List of ItemStacks that represents this request.
-
getDisplayIcon
@NotNull public @NotNull net.minecraft.resources.ResourceLocation getDisplayIcon()Description copied from interface:IRequestMethod used to get a ResourceLocation that is displayed instead of theIRequest.getDisplayStacks(), whenIRequest.getDisplayStacks()returns an empty list.- Specified by:
getDisplayIconin interfaceIRequest<Pickup>- Overrides:
getDisplayIconin classAbstractRequest<Pickup>- Returns:
- The ResourceLocation of the Image dat is displayed when their are no DisplayStacks.
-
getResolverToolTip
Description copied from interface:IRequestGet the resolver tooltip for a request.- Specified by:
getResolverToolTipin interfaceIRequest<Pickup>- Overrides:
getResolverToolTipin classAbstractRequest<Pickup>- Parameters:
colony- the colony view to obtain information if necessary.- Returns:
- a list of strings or empty.
-