Class LivingBuildingView
java.lang.Object
com.minecolonies.core.colony.buildings.views.AbstractBuildingView
com.minecolonies.core.colony.buildings.views.LivingBuildingView
- All Implemented Interfaces:
ICommonBuilding,IBuildingView,IModuleContainerView,IRequester
- Direct Known Subclasses:
HomeBuildingModule.View,TavernBuildingModule.View
Living building view.
-
Field Summary
Fields inherited from class com.minecolonies.core.colony.buildings.views.AbstractBuildingView
moduleViews -
Constructor Summary
ConstructorsConstructorDescriptionLivingBuildingView(IColonyView c, net.minecraft.core.BlockPos l) Creates an instance of the citizen hut window. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResident(int id) Add a resident from the building.Get the hiring mode.Get lang key of pre-upgrade warning for building level.intgetMax()Get the max citizens.Getter for the list of residents.voidremoveResident(int id) Removes a resident from the building.voidsetHiringMode(HiringMode value) Adjust the hiring mode.Methods inherited from class com.minecolonies.core.colony.buildings.views.AbstractBuildingView
allowsAssignment, deserialize, getAllAssignedCitizens, getAllModuleViews, getBuildingDmPrio, getBuildingLevel, getBuildingMaxLevel, getBuildingType, getCitizensByRequest, getClaimRadius, getColony, getContainers, getCurrentWorkOrderLevel, getCustomName, getId, getID, getLocation, getModuleView, getModuleView, getModuleViewByType, getModuleViewMatching, getModuleViews, getOpenRequests, getOpenRequestsByCitizen, getOpenRequestsOfBuilding, getOpenRequestsOfType, getOpenRequestsOfTypeFiltered, getParent, getPosition, getPrestige, getRequesterDisplayName, getResolverIds, getRotationMirror, getStructurePack, getStructurePath, getWindow, hasModuleView, hasWorkOrder, isBuilding, isBuildingMaxLevel, isDeconstructed, isDeconstructing, isRepairing, onRequestedRequestCancelled, onRequestedRequestComplete, openGui, registerModule, setBuildingType, setCustomNameMethods 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.views.IBuildingView
getBuildingDisplayName, getRangeMethods inherited from interface com.minecolonies.api.colony.buildings.ICommonBuilding
getBuildingLevelEquivalent
-
Constructor Details
-
LivingBuildingView
Creates an instance of the citizen hut window.- Parameters:
c- the colonyView.l- the position the hut is at.
-
-
Method Details
-
getResidents
Getter for the list of residents.- Returns:
- an unmodifiable list.
-
removeResident
public void removeResident(int id) Removes a resident from the building.- Parameters:
id- the index to remove it from.
-
addResident
public void addResident(int id) Add a resident from the building.- Parameters:
id- the id of the citizen.
-
getMax
public int getMax()Get the max citizens.- Returns:
- the max.
-
getHiringMode
Get the hiring mode.- Returns:
- the mode.
-
setHiringMode
Adjust the hiring mode.- Parameters:
value- the value to set it to.
-
getHoverWarningForLevel
Description copied from interface:IBuildingViewGet lang key of pre-upgrade warning for building level.- Returns:
- empty-string by default. Override for respective building.
-