Interface IBuildingView

All Superinterfaces:
ICommonBuilding, IModuleContainerView, IRequester
All Known Subinterfaces:
IBuildingWorkerView, ITownHallView
All Known Implementing Classes:
AbstractBuildingBuilderView, AbstractBuildingGuards.View, AbstractBuildingView, BuildingBarracks.View, BuildingBeekeeper.View, BuildingBuilder.View, BuildingCook.View, BuildingGateHouse.View, BuildingGuardTower.View, BuildingLumberjack.View, BuildingMysticalSite.View, BuildingTownHall.View, BuildingWareHouse.View, EmptyView, HomeBuildingModule.View, LivingBuildingView, PostBox.View, TavernBuildingModule.View

public interface IBuildingView extends IRequester, IModuleContainerView, ICommonBuilding
  • Method Details

    • getID

      @NotNull @NotNull net.minecraft.core.BlockPos getID()
      Gets the id for this building.
      Returns:
      A BlockPos because the building ID is its location.
    • getParent

      net.minecraft.core.BlockPos getParent()
      Get the parent building
      Returns:
    • getBuildingMaxLevel

      int getBuildingMaxLevel()
      Get the max level of the building.
      Returns:
      AbstractBuilding max level.
    • isBuildingMaxLevel

      boolean isBuildingMaxLevel()
      Checks if this building is at its max level.
      Returns:
      true if the building is at its max level.
    • getCurrentWorkOrderLevel

      int getCurrentWorkOrderLevel()
      Get the current work order level.
      Returns:
      0 if none, othewise the current level worked on
    • getStructurePath

      String getStructurePath()
      Getter for the schematic name.
      Returns:
      the schematic name.
    • getCustomName

      String getCustomName()
      Getter for the custom building name.
      Returns:
      the name.
    • getBuildingDisplayName

      default String getBuildingDisplayName()
      Gets the display name (either the custom name or a type-based name).
      Returns:
      the name (or translation key).
    • getStructurePack

      String getStructurePack()
      Getter for the style.
      Returns:
      the style string.
    • getRotationMirror

      com.ldtteam.structurize.api.RotationMirror getRotationMirror()
      Getter for the rotation and the mirror.
      Returns:
      true if mirrored.
    • hasWorkOrder

      boolean hasWorkOrder()
      Get the current work order level.
      Returns:
      0 if none, othewise the current level worked on
    • isBuilding

      boolean isBuilding()
      Check if the building is current being built.
      Returns:
      true if so.
    • isRepairing

      boolean isRepairing()
      Check if the building is currently being repaired.
      Returns:
      true if so.
    • isDeconstructing

      boolean isDeconstructing()
      Check if the building is currently being deconstructed..
      Returns:
      true if so.
    • getClaimRadius

      int getClaimRadius()
      Get the claim radius for the building.
      Returns:
      the radius.
    • openGui

      void openGui(boolean shouldOpenInv)
      Open the associated blockui window for this building. If the player is sneaking open the inventory else open the GUI directly.
      Parameters:
      shouldOpenInv - if the player is sneaking.
    • getWindow

      @NotNull @NotNull com.ldtteam.blockui.views.BOWindow getWindow()
      Will return the window if this building has an associated blockui window.
      Returns:
      blockui window.
    • deserialize

      void deserialize(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf)
      Read this view from a RegistryFriendlyByteBuf.
      Parameters:
      buf - The buffer to read this view from.
    • getOpenRequestsByCitizen

      Map<Integer,Collection<IToken<?>>> getOpenRequestsByCitizen()
    • getOpenRequestsOfType

      <R> com.google.common.collect.ImmutableList<IRequest<? extends R>> getOpenRequestsOfType(@NotNull @NotNull ICitizenDataView citizenData, Class<R> requestType)
    • getOpenRequests

      com.google.common.collect.ImmutableList<IRequest<?>> getOpenRequests(@NotNull @NotNull ICitizenDataView data)
    • getOpenRequestsOfBuilding

      com.google.common.collect.ImmutableList<IRequest<?>> getOpenRequestsOfBuilding()
    • getColony

      IColonyView getColony()
      Gets the ColonyView that this building belongs to.
      Specified by:
      getColony in interface ICommonBuilding
      Returns:
      ColonyView, client side interpretations of Colony.
    • getOpenRequestsOfTypeFiltered

      <R> com.google.common.collect.ImmutableList<IRequest<? extends R>> getOpenRequestsOfTypeFiltered(@NotNull @NotNull ICitizenDataView citizenData, Class<R> requestType, Predicate<IRequest<? extends R>> filter)
    • getBuildingDmPrio

      int getBuildingDmPrio()
      Get the delivery priority of the building.
      Returns:
      int, delivery priority.
    • getResolverIds

      com.google.common.collect.ImmutableCollection<IToken<?>> getResolverIds()
    • setCustomName

      void setCustomName(String name)
      Setter for the custom name. Sets the name on the client side and sends it to the server.
      Parameters:
      name - the new name.
    • isDeconstructed

      boolean isDeconstructed()
      Check if the building was deconstructed.
      Returns:
      true if so.
    • setBuildingType

      void setBuildingType(BuildingEntry buildingType)
      Set the building type
      Parameters:
      buildingType -
    • getAllAssignedCitizens

      Set<Integer> getAllAssignedCitizens()
      Get the citizen ids of all assigned citizens to this building.
      Returns:
      the set of ids.
    • allowsAssignment

      boolean allowsAssignment()
      Check if the building currently allows assignment of citizens.
      Returns:
      true if so.
    • getRange

      default int getRange()
      Get functional range around building.
      Returns:
      the range.
    • getHoverWarningForLevel

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