Class DefaultJobView

java.lang.Object
com.minecolonies.core.colony.jobs.views.DefaultJobView
All Implemented Interfaces:
IJobView
Direct Known Subclasses:
CrafterJobView, DmanJobView

public class DefaultJobView extends Object implements IJobView
Basic job information on the client side, valid for all job types.
  • Constructor Details

    • DefaultJobView

      public DefaultJobView(IColonyView iColonyView, ICitizenDataView iCitizenDataView)
      Instantiate the default job view.
      Parameters:
      iColonyView - the colony it belongs to.
      iCitizenDataView - the citizen it belongs to.
  • Method Details

    • deserialize

      public void deserialize(net.minecraft.network.RegistryFriendlyByteBuf buffer)
      Description copied from interface: IJobView
      Deserialize the job from the buffer.
      Specified by:
      deserialize in interface IJobView
      Parameters:
      buffer - the buffer to read it from.
    • getName

      public String getName()
      Description copied from interface: IJobView
      Return a Localization textContent for the Job.
      Specified by:
      getName in interface IJobView
      Returns:
      localization textContent String.
    • getEntry

      public JobEntry getEntry()
      Description copied from interface: IJobView
      Getter for the job entry of the job.
      Specified by:
      getEntry in interface IJobView
      Returns:
      the entry.
    • getColonyView

      protected IColonyView getColonyView()
      Get the colony view this job belongs to.
      Returns:
      the view.
    • getAsyncRequests

      public Set<IToken<?>> getAsyncRequests()
      Get a set of async requests connected to this job.
      Specified by:
      getAsyncRequests in interface IJobView
      Returns:
      a set of ITokens.
    • setEntry

      public void setEntry(JobEntry entry)
      Description copied from interface: IJobView
      Set the job entry of the view.
      Specified by:
      setEntry in interface IJobView
      Parameters:
      entry - the entry to set.