java.lang.Object
com.minecolonies.api.colony.requestsystem.requestable.deliveryman.AbstractDeliverymanRequestable
com.minecolonies.api.colony.requestsystem.requestable.deliveryman.Pickup
All Implemented Interfaces:
IDeliverymanRequestable, IRequestable

public class Pickup extends AbstractDeliverymanRequestable
Class used to represent pickups inside the request system. This class can be used to request a pickup of
  • 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

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractDeliverymanRequestable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSuperClasses

      public Set<com.google.common.reflect.TypeToken<?>> getSuperClasses()
      Description copied from interface: IRequestable
      Get the super classes associated to this request type.
      Returns:
      the type.