Interface ICitizenDataView

All Superinterfaces:
ICitizen
All Known Subinterfaces:
IVisitorViewData
All Known Implementing Classes:
CitizenDataView, VisitorDataView

public interface ICitizenDataView extends ICitizen
  • Method Details

    • getEntityId

      int getEntityId()
      Entity Id getter.
      Returns:
      entity id.
    • getJob

      String getJob()
      Entity job getter.
      Returns:
      the job as a string.
    • getJobComponent

      net.minecraft.network.chat.MutableComponent getJobComponent()
      Get the job as mutable component.
      Returns:
      the job desc.
    • getHomeBuilding

      @Nullable @Nullable net.minecraft.core.BlockPos getHomeBuilding()
      Get the entities home building.
      Returns:
      the home coordinates.
    • getWorkBuilding

      @Nullable @Nullable net.minecraft.core.BlockPos getWorkBuilding()
      Get the entities work building.
      Returns:
      the work coordinates.
    • setWorkBuilding

      void setWorkBuilding(net.minecraft.core.BlockPos bp)
      DEPRECATED
      Parameters:
      bp - the position.
    • getColonyId

      int getColonyId()
      Get the colony id of the citizen.
      Returns:
      unique id of the colony.
    • getHappiness

      double getHappiness()
      Gets the current Happiness value for the citizen
      Returns:
      citizens current Happiness value
    • getPosition

      net.minecraft.core.BlockPos getPosition()
      Get the last registered position of the citizen.
      Returns:
      the BlockPos.
    • deserialize

      void deserialize(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Deserialize the attributes and variables from transition.
      Parameters:
      buf - Byte buffer to deserialize.
    • getHealth

      double getHealth()
      Returns:
      current health.
    • getMaxHealth

      double getMaxHealth()
      Returns:
      max health.
    • getOrderedInteractions

      List<IInteractionResponseHandler> getOrderedInteractions()
      Get the list of ordered interactions.
      Returns:
      the list.
    • getSpecificInteraction

      @Nullable @Nullable IInteractionResponseHandler getSpecificInteraction(@NotNull @NotNull net.minecraft.network.chat.Component component)
      Get a specific interaction by key.
      Parameters:
      component - the key.
      Returns:
      the interaction or null.
    • hasBlockingInteractions

      boolean hasBlockingInteractions()
      Check if the citizen has important interactions.
      Returns:
      true if so.
    • hasVisibleStatus

      boolean hasVisibleStatus()
      Check if the citizen has any visible interactions.
      Returns:
      true if so.
    • hasPendingInteractions

      boolean hasPendingInteractions()
      Check if the citizen has any interactions.
      Returns:
      true if so.
    • getCitizenSkillHandler

      ICitizenSkillHandler getCitizenSkillHandler()
      Get an instance of the skill handler.
      Returns:
      the instance.
    • getHappinessHandler

      ICitizenHappinessHandler getHappinessHandler()
      The citizen happiness handler.
      Returns:
      the handler.
    • getStatusIcon

      net.minecraft.resources.ResourceLocation getStatusIcon()
      The texture to render for interactions
      Returns:
      resourcelocation
    • getVisibleStatus

      VisibleCitizenStatus getVisibleStatus()
      Get the visible citizen status
      Returns:
      status
    • getStatusPosition

      @Nullable @Nullable net.minecraft.core.BlockPos getStatusPosition()
      Gets a location of interest of this citizen's job.
      Returns:
      the location, or null if nowhere is particularly interesting right now.
    • getJobView

      @Nullable @Nullable IJobView getJobView()
      Get the job view that belongs to this citizen (or null).
      Returns:
      the job.
    • getPartner

      @Nullable @Nullable Integer getPartner()
      Get the partner of the citizen.
      Returns:
      the partner or null if non existent.
    • getChildren

      List<Integer> getChildren()
      Get the list of children of a citizen.
      Returns:
      the citizen ids.
    • getSiblings

      List<Integer> getSiblings()
      Get the list of children of a citizen.
      Returns:
      the citizen ids.
    • getParents

      Tuple<String,String> getParents()
      Get the names of the parents.
      Returns:
      the name.
    • getCustomTexture

      net.minecraft.resources.ResourceLocation getCustomTexture()
      Get the custom texture of the citizen.
      Returns:
      the res location.
    • setJobView

      void setJobView(IJobView view)
      Force set the job view.
      Parameters:
      view - the job view to set.
    • setHomeBuilding

      void setHomeBuilding(net.minecraft.core.BlockPos position)
      Set the home building on the client side.
      Parameters:
      position - the pos of the home building.
    • getCustomTextureUUID

      UUID getCustomTextureUUID()
      Get UUID of the custom texture.
      Returns:
      the uuid.
    • getDisplayArmor

      net.minecraft.world.item.ItemStack getDisplayArmor(net.minecraft.world.entity.EquipmentSlot equipmentSlot)
      Get Armor in slot of citizen data view.
      Parameters:
      equipmentSlot - the equipment slot to get it from.
      Returns:
      the armor in the slot.
    • isSick

      boolean isSick()
      Check if sick.
      Returns:
      true if so.
    • getColony

      IColonyView getColony()
      Description copied from interface: ICitizen
      Returns the visitor's colony
      Specified by:
      getColony in interface ICitizen
      Returns:
      colony