Class Pickup
java.lang.Object
com.minecolonies.api.colony.requestsystem.requestable.deliveryman.AbstractDeliverymanRequestable
com.minecolonies.api.colony.requestsystem.requestable.deliveryman.Pickup
- All Implemented Interfaces:
IDeliverymanRequestable,IRequestable
Class used to represent pickups inside the request system. This class can be used to request a pickup of
-
Field Summary
Fields inherited from class com.minecolonies.api.colony.requestsystem.requestable.deliveryman.AbstractDeliverymanRequestable
DEFAULT_DELIVERY_PRIORITY, MAX_BUILDING_PRIORITY, NBT_DAY, NBT_PRIORITY, NBT_QTY, priority -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Pickupdeserialize(IFactoryController controller, net.minecraft.network.RegistryFriendlyByteBuf buffer) Deserialize the deliverable.static @NotNull Pickupdeserialize(net.minecraft.core.HolderLookup.Provider provider, @NotNull IFactoryController controller, @NotNull net.minecraft.nbt.CompoundTag compound) booleanintgetDay()Get the pickup day.intGet the pickup quantity.Set<com.google.common.reflect.TypeToken<?>> Get the super classes associated to this request type.static voidserialize(IFactoryController controller, net.minecraft.network.RegistryFriendlyByteBuf buffer, Pickup input) Serialize the deliverable.static @NotNull net.minecraft.nbt.CompoundTagserialize(net.minecraft.core.HolderLookup.Provider provider, @NotNull IFactoryController controller, Pickup pickup) voidsetDay(int day) Setter for the day.voidsetQuantity(int qty) Setter for the qty.toString()Methods inherited from class com.minecolonies.api.colony.requestsystem.requestable.deliveryman.AbstractDeliverymanRequestable
getDefaultDeliveryPriority, getMaxAgingPriority, getMaxBuildingPriority, getPlayerActionPriority, getPriority, hashCode, incrementPriorityDueToAging, scaledPriority
-
Constructor Details
-
Pickup
public Pickup(int priority, int day, int qty) Constructor for Delivery requests- Parameters:
priority- The priority of the request.
-
-
Method Details
-
serialize
@NotNull public static @NotNull net.minecraft.nbt.CompoundTag serialize(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull IFactoryController controller, Pickup pickup) -
getDay
public int getDay()Get the pickup day.- Returns:
- the day.
-
getQuantity
public int getQuantity()Get the pickup quantity.- Returns:
- the qty.
-
setDay
public void setDay(int day) Setter for the day.- Parameters:
day- the new day.
-
setQuantity
public void setQuantity(int qty) Setter for the qty.- Parameters:
qty- the new qty.
-
deserialize
@NotNull public static @NotNull Pickup deserialize(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull IFactoryController controller, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound) -
serialize
public static void serialize(IFactoryController controller, net.minecraft.network.RegistryFriendlyByteBuf buffer, Pickup input) Serialize the deliverable.- Parameters:
controller- the controller.buffer- the the buffer to write to.input- the input to serialize.
-
deserialize
public static Pickup deserialize(IFactoryController controller, net.minecraft.network.RegistryFriendlyByteBuf buffer) Deserialize the deliverable.- Parameters:
controller- the controller.buffer- the buffer to read.- Returns:
- the deliverable.
-
equals
- Overrides:
equalsin classAbstractDeliverymanRequestable
-
toString
-
getSuperClasses
Description copied from interface:IRequestableGet the super classes associated to this request type.- Returns:
- the type.
-