Class JobEntry.Builder
java.lang.Object
com.minecolonies.api.colony.jobs.registry.JobEntry.Builder
- Enclosing class:
JobEntry
Builder for a
JobEntry.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a newJobEntrybuilder.setJobProducer(Function<ICitizenData, IJob<?>> jobProducer) Setter the for the producer.setJobViewProducer(Supplier<BiFunction<IColonyView, ICitizenDataView, IJobView>> jobViewProducer) Sets the callback that is used to create theIJobViewfrom theIColonyViewand its position in the world.setRegistryName(net.minecraft.resources.ResourceLocation registryName) Setter for the registry name.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setJobProducer
Setter the for the producer.- Parameters:
jobProducer- The producer forIJob.- Returns:
- The builder.
-
setJobViewProducer
public JobEntry.Builder setJobViewProducer(Supplier<BiFunction<IColonyView, ICitizenDataView, IJobView>> jobViewProducer) Sets the callback that is used to create theIJobViewfrom theIColonyViewand its position in the world.- Parameters:
jobViewProducer- The callback used to create theIJobView.- Returns:
- The builder.
-
setRegistryName
Setter for the registry name.- Parameters:
registryName- The registry name.- Returns:
- The builder.
-
createJobEntry
Creates a newJobEntrybuilder.- Returns:
- The created
JobEntry.
-