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

public abstract class LivingBuildingView extends AbstractBuildingView
Living building view.
  • Constructor Details

    • LivingBuildingView

      public LivingBuildingView(IColonyView c, net.minecraft.core.BlockPos l)
      Creates an instance of the citizen hut window.
      Parameters:
      c - the colonyView.
      l - the position the hut is at.
  • Method Details

    • getResidents

      @NotNull public @NotNull List<Integer> 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

      public HiringMode getHiringMode()
      Get the hiring mode.
      Returns:
      the mode.
    • setHiringMode

      public void setHiringMode(HiringMode value)
      Adjust the hiring mode.
      Parameters:
      value - the value to set it to.
    • getHoverWarningForLevel

      public String getHoverWarningForLevel()
      Description copied from interface: IBuildingView
      Get lang key of pre-upgrade warning for building level.
      Returns:
      empty-string by default. Override for respective building.