Class WorkerBuildingModuleView
java.lang.Object
com.minecolonies.api.colony.buildings.modules.AbstractBuildingModuleView
com.minecolonies.core.colony.buildings.moduleviews.WorkerBuildingModuleView
- All Implemented Interfaces:
IAssignmentModuleView,IBuildingModuleView
- Direct Known Subclasses:
ArcherSquireModuleView,CombinedHiringLimitModuleView,KnightSquireBuildingModuleView,PupilBuildingModuleView,StudentBuildingModuleView
public class WorkerBuildingModuleView
extends AbstractBuildingModuleView
implements IAssignmentModuleView
AbstractBuilding View for clients.
-
Field Summary
Fields inherited from class com.minecolonies.api.colony.buildings.modules.AbstractBuildingModuleView
buildingView, colonyView -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCitizen(@NotNull ICitizenDataView citizen) Add a citizen.booleancanAssign(ICitizenDataView citizen) Check if citizens can be assigned.voiddeserialize(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Deserialize the data on the client side.Get the list of assigned people.net.minecraft.network.chat.ComponentgetDesc()Get the lang string for the title.Get the hiring mode.net.minecraft.resources.ResourceLocationGet the resource location of the icon for the module view.Get the display name of the job.Getter for the job entry of the module view.intGet the max number of inhabitants@NotNull Skillnet.minecraft.resources.ResourceLocationIf unlocked by research it returns a research requirement.@NotNull Skill@NotNull com.ldtteam.blockui.views.BOWindowGet the matching window for the module.booleanisFull()Check if the module is full.booleanWhether this module appears as a GUI page.voidremoveCitizen(@NotNull ICitizenDataView citizen) Remove a citizen.voidsetHiringMode(HiringMode hiringMode) Set the hiring mode.Methods inherited from class com.minecolonies.api.colony.buildings.modules.AbstractBuildingModuleView
canBeHiredAs, getBuildingView, getColony, getProducer, setBuildingView, setColonyView, setProducerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.buildings.modules.IBuildingModuleView
getBuildingView, getColony, getIcon, getProducer, setBuildingView, setColonyView, setProducer
-
Constructor Details
-
WorkerBuildingModuleView
public WorkerBuildingModuleView()
-
-
Method Details
-
getAssignedCitizens
Description copied from interface:IAssignmentModuleViewGet the list of assigned people.- Specified by:
getAssignedCitizensin interfaceIAssignmentModuleView- Returns:
- the list
-
addCitizen
Description copied from interface:IAssignmentModuleViewAdd a citizen.- Specified by:
addCitizenin interfaceIAssignmentModuleView- Parameters:
citizen- the citizen id.
-
removeCitizen
Description copied from interface:IAssignmentModuleViewRemove a citizen.- Specified by:
removeCitizenin interfaceIAssignmentModuleView- Parameters:
citizen- the citizen id/
-
deserialize
public void deserialize(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Description copied from interface:IBuildingModuleViewDeserialize the data on the client side.- Specified by:
deserializein interfaceIBuildingModuleView- Parameters:
buf- the buffer to read it from.
-
getIconResourceLocation
public net.minecraft.resources.ResourceLocation getIconResourceLocation()Description copied from interface:IBuildingModuleViewGet the resource location of the icon for the module view.- Specified by:
getIconResourceLocationin interfaceIBuildingModuleView- Returns:
- the resource location.
-
getDesc
public net.minecraft.network.chat.Component getDesc()Description copied from interface:IBuildingModuleViewGet the lang string for the title.- Specified by:
getDescin interfaceIBuildingModuleView- Returns:
- the lang string.
-
isPageVisible
public boolean isPageVisible()Description copied from interface:IBuildingModuleViewWhether this module appears as a GUI page.- Specified by:
isPageVisiblein interfaceIBuildingModuleView- Returns:
- true to show the GUI page.
-
getPrimarySkill
-
getSecondarySkill
-
getHiringMode
Description copied from interface:IAssignmentModuleViewGet the hiring mode.- Specified by:
getHiringModein interfaceIAssignmentModuleView- Returns:
- the set mode.
-
setHiringMode
Description copied from interface:IAssignmentModuleViewSet the hiring mode.- Specified by:
setHiringModein interfaceIAssignmentModuleView- Parameters:
hiringMode- the set mode.
-
canAssign
Description copied from interface:IAssignmentModuleViewCheck if citizens can be assigned.- Specified by:
canAssignin interfaceIAssignmentModuleView- Parameters:
citizen- the data to check.- Returns:
- true if so.
-
getMaxInhabitants
public int getMaxInhabitants()Description copied from interface:IAssignmentModuleViewGet the max number of inhabitants- Specified by:
getMaxInhabitantsin interfaceIAssignmentModuleView- Returns:
- max inhabitants
-
getJobDisplayName
Get the display name of the job.- Returns:
- the display name.
-
getWindow
@NotNull public @NotNull com.ldtteam.blockui.views.BOWindow getWindow()Description copied from interface:IBuildingModuleViewGet the matching window for the module.- Specified by:
getWindowin interfaceIBuildingModuleView- Returns:
- the window.
-
getJobEntry
Getter for the job entry of the module view.- Specified by:
getJobEntryin interfaceIAssignmentModuleView- Returns:
- the entry.
-
isFull
public boolean isFull()Description copied from interface:IAssignmentModuleViewCheck if the module is full.- Specified by:
isFullin interfaceIAssignmentModuleView- Returns:
- true if so.
-
getResearchRequirement
public net.minecraft.resources.ResourceLocation getResearchRequirement()Description copied from interface:IAssignmentModuleViewIf unlocked by research it returns a research requirement.- Specified by:
getResearchRequirementin interfaceIAssignmentModuleView- Returns:
- return null by default, otherwise String research effect key.
-