Class StandardRequests.AbstractCraftingRequest<C extends AbstractCrafting>
java.lang.Object
com.minecolonies.core.colony.requestsystem.requests.AbstractRequest<C>
com.minecolonies.core.colony.requestsystem.requests.StandardRequests.AbstractCraftingRequest<C>
- All Implemented Interfaces:
IRequest<C>,IStackBasedTask
- Direct Known Subclasses:
StandardRequests.PrivateCraftingRequest,StandardRequests.PublicCraftingRequest
- Enclosing class:
- StandardRequests
public abstract static class StandardRequests.AbstractCraftingRequest<C extends AbstractCrafting>
extends AbstractRequest<C>
implements IStackBasedTask
An abstract implementation for crafting requests
-
Field Summary
Fields inherited from class com.minecolonies.core.colony.requestsystem.requests.AbstractRequest
MISSING -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCraftingRequest(@NotNull IRequester requester, @NotNull IToken<?> token, @NotNull RequestState state, C requested) protectedAbstractCraftingRequest(@NotNull IRequester requester, @NotNull IToken<?> token, C requested) -
Method Summary
Modifier and TypeMethodDescriptionintGet the request related count.final @NotNull net.minecraft.resources.ResourceLocationMethod used to get a ResourceLocation that is displayed instead of theIRequest.getDisplayStacks(), whenIRequest.getDisplayStacks()returns an empty list.protected abstract Stringnet.minecraft.network.chat.MutableComponentGet a display prefix component.final @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.final @NotNull net.minecraft.network.chat.ComponentMethod used to get aComponentthat can be displayed to the Player and describes the request in short.net.minecraft.world.item.ItemStackGet the stack associated to the task.protected abstract StringMethods inherited from class com.minecolonies.core.colony.requestsystem.requests.AbstractRequest
addChild, addChildren, addChildren, addDelivery, addDelivery, canBeDelivered, childStateUpdated, equals, getChildren, getDeliveries, 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
-
AbstractCraftingRequest
protected AbstractCraftingRequest(@NotNull @NotNull IRequester requester, @NotNull @NotNull IToken<?> token, @NotNull C requested) -
AbstractCraftingRequest
protected AbstractCraftingRequest(@NotNull @NotNull IRequester requester, @NotNull @NotNull IToken<?> token, @NotNull @NotNull RequestState state, @NotNull C requested)
-
-
Method Details
-
getShortDisplayString
@NotNull public final @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.- Specified by:
getShortDisplayStringin interfaceIRequest<C extends AbstractCrafting>- Returns:
- The text that describes this Request.
-
getDisplayPrefix
public net.minecraft.network.chat.MutableComponent getDisplayPrefix()Description copied from interface:IStackBasedTaskGet a display prefix component.- Specified by:
getDisplayPrefixin interfaceIStackBasedTask- Returns:
- the component.
-
getDisplayCount
public int getDisplayCount()Description copied from interface:IStackBasedTaskGet the request related count.- Specified by:
getDisplayCountin interfaceIStackBasedTask- Returns:
- the count.
-
getTaskStack
public net.minecraft.world.item.ItemStack getTaskStack()Description copied from interface:IStackBasedTaskGet the stack associated to the task.- Specified by:
getTaskStackin interfaceIStackBasedTask- Returns:
- the stack.
-
getTranslationKey
-
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<C extends AbstractCrafting>- Overrides:
getDisplayStacksin classAbstractRequest<C extends AbstractCrafting>- Returns:
- A List of ItemStacks that represents this request.
-
getResolverToolTip
Description copied from interface:IRequestGet the resolver tooltip for a request.- Specified by:
getResolverToolTipin interfaceIRequest<C extends AbstractCrafting>- Overrides:
getResolverToolTipin classAbstractRequest<C extends AbstractCrafting>- Parameters:
colony- the colony view to obtain information if necessary.- Returns:
- a list of strings or empty.
-
getDisplayIcon
@NotNull public final @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<C extends AbstractCrafting>- Overrides:
getDisplayIconin classAbstractRequest<C extends AbstractCrafting>- Returns:
- The ResourceLocation of the Image dat is displayed when their are no DisplayStacks.
-
getDisplayIconFile
-