Class MinimumStack
java.lang.Object
com.minecolonies.api.colony.requestsystem.requestable.Stack
com.minecolonies.api.colony.requestsystem.requestable.MinimumStack
- All Implemented Interfaces:
IConcreteDeliverable,IDeliverable,IRequestable,IRetryable
Minimum stack request type.
-
Constructor Summary
ConstructorsConstructorDescriptionMinimumStack(@NotNull ItemStorage itemStorage) Transform an itemStorage into this predicate.MinimumStack(@NotNull net.minecraft.world.item.ItemStack stack) Create a Stack deliverable.MinimumStack(@NotNull net.minecraft.world.item.ItemStack stack, boolean matchDurability) Create a Stack deliverable.MinimumStack(@NotNull net.minecraft.world.item.ItemStack stack, boolean matchDamage, boolean matchNBT, @NotNull net.minecraft.world.item.ItemStack result, int count, int minCount) Create a Stack deliverable.MinimumStack(@NotNull net.minecraft.world.item.ItemStack stack, int count, int minCount) Create a Stack deliverable.MinimumStack(@NotNull net.minecraft.world.item.ItemStack stack, int count, int minCount, boolean matchNBT) Create a Stack deliverable with variable nbt.MinimumStack(net.minecraft.world.item.ItemStack stack, boolean matchDamage, boolean matchNBT, net.minecraft.world.item.ItemStack result, int count, int minCount, boolean canBeResolvedByBuilding) Create a Stack deliverable. -
Method Summary
Modifier and TypeMethodDescriptionstatic MinimumStackdeserialize(IFactoryController controller, net.minecraft.nbt.CompoundTag compound) Deserialize the deliverable.static MinimumStackdeserialize(IFactoryController controller, net.minecraft.network.FriendlyByteBuf buffer) Deserialize the deliverable.booleanSet<com.google.common.reflect.TypeToken<?>>Get the super classes associated to this request type.Methods inherited from class com.minecolonies.api.colony.requestsystem.requestable.Stack
canBeResolvedByBuilding, copyWithCount, getCount, getMinimumCount, getRequestedItems, getResult, getStack, hashCode, matchDamage, matches, matchNBT, serialize, serialize, setCanBeResolvedByBuilding, setResult
-
Constructor Details
-
MinimumStack
public MinimumStack(@NotNull @NotNull net.minecraft.world.item.ItemStack stack) Create a Stack deliverable.- Parameters:
stack- the required stack.
-
MinimumStack
public MinimumStack(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, boolean matchDurability) Create a Stack deliverable.- Parameters:
stack- the required stack.matchDurability- whether or not to match Durability
-
MinimumStack
public MinimumStack(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, int count, int minCount) Create a Stack deliverable.- Parameters:
stack- the required stack.count- the count.minCount- the min count.
-
MinimumStack
Transform an itemStorage into this predicate.- Parameters:
itemStorage- the storage to use.
-
MinimumStack
public MinimumStack(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, int count, int minCount, boolean matchNBT) Create a Stack deliverable with variable nbt.- Parameters:
stack- the stack to deliver.count- the count.minCount- the min count.matchNBT- if nbt has to match.
-
MinimumStack
public MinimumStack(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, boolean matchDamage, boolean matchNBT, @NotNull @NotNull net.minecraft.world.item.ItemStack result, int count, int minCount) Create a Stack deliverable.- Parameters:
stack- the required stack.matchDamage- if damage has to be matched.matchNBT- if NBT has to be matched.result- the result stack.count- the count.minCount- the min count.
-
MinimumStack
public MinimumStack(net.minecraft.world.item.ItemStack stack, boolean matchDamage, boolean matchNBT, net.minecraft.world.item.ItemStack result, int count, int minCount, boolean canBeResolvedByBuilding) Create a Stack deliverable.- Parameters:
stack- the required stack.matchDamage- if damage has to be matched.matchNBT- if NBT has to be matched.result- the result stack.count- the count.minCount- the min count.canBeResolvedByBuilding- if can be resolved by building.
-
-
Method Details
-
deserialize
public static MinimumStack deserialize(IFactoryController controller, net.minecraft.nbt.CompoundTag compound) Deserialize the deliverable.- Parameters:
controller- the controller.compound- the compound.- Returns:
- the deliverable.
-
deserialize
public static MinimumStack deserialize(IFactoryController controller, net.minecraft.network.FriendlyByteBuf buffer) Deserialize the deliverable.- Parameters:
controller- the controller.buffer- the buffer to read.- Returns:
- the deliverable.
-
equals
-
getSuperClasses
Description copied from interface:IRequestableGet the super classes associated to this request type.- Specified by:
getSuperClassesin interfaceIRequestable- Overrides:
getSuperClassesin classStack- Returns:
- the type.
-