Class AbstractBuildingGuards.View

java.lang.Object
com.minecolonies.core.colony.buildings.views.AbstractBuildingView
com.minecolonies.core.colony.buildings.AbstractBuildingGuards.View
All Implemented Interfaces:
ICommonBuilding, IBuildingView, IModuleContainerView, IRequester
Direct Known Subclasses:
BuildingGateHouse.View, BuildingGuardTower.View
Enclosing class:
AbstractBuildingGuards

public static class AbstractBuildingGuards.View extends AbstractBuildingView
The client view for the Guard building.
  • Constructor Details

    • View

      public View(IColonyView c, @NotNull @NotNull net.minecraft.core.BlockPos l)
      The client view constructor for the AbstractGuardBuilding.
      Parameters:
      c - the colony.
      l - the location.
  • Method Details

    • getGuards

      @NotNull public @NotNull List<Integer> getGuards()
      Getter for the list of residents.
      Returns:
      an unmodifiable list.
    • deserialize

      public void deserialize(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf)
      Description copied from class: AbstractBuildingView
      Read this view from a RegistryFriendlyByteBuf.
      Specified by:
      deserialize in interface IBuildingView
      Overrides:
      deserialize in class AbstractBuildingView
      Parameters:
      buf - The buffer to read this view from.
    • getPatrolTargets

      public List<net.minecraft.core.BlockPos> getPatrolTargets()
    • getMinePos

      public net.minecraft.core.BlockPos getMinePos()
      Return the position of the mine the guard is patrolling
      Returns:
      the position of the mine
    • setMinePos

      public void setMinePos(net.minecraft.core.BlockPos pos)
      Set the position of the mine the guard is patrolling
      Parameters:
      pos - the position of the mine
    • getRange

      public int getRange()
      Description copied from interface: IBuildingView
      Get functional range around building.
      Returns:
      the range.