Interface ICitizenMournHandler

All Known Implementing Classes:
CitizenMournHandler

public interface ICitizenMournHandler
The citizen happiness handler interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add a deceased citizen to the handler.
    void
    Clear the list of deceased citizens.
    Gets a set with all the recently deceased citizens.
    boolean
    Check if the citizen is already mourning.
    void
    read(net.minecraft.nbt.CompoundTag compound)
    Read the handler from NBT.
    void
    Remove a deceased citizen from the handler.
    void
    setMourning(boolean mourn)
    Set if the citizen is mourning atm.
    boolean
    Check if the citizen should mourn.
    void
    write(net.minecraft.nbt.CompoundTag compound)
    Write the handler to NBT.
  • Method Details

    • read

      void read(net.minecraft.nbt.CompoundTag compound)
      Read the handler from NBT.
      Parameters:
      compound - the compound to read it from.
    • write

      void write(net.minecraft.nbt.CompoundTag compound)
      Write the handler to NBT.
      Parameters:
      compound - the compound to write it to.
    • addDeceasedCitizen

      void addDeceasedCitizen(String name)
      Add a deceased citizen to the handler.
      Parameters:
      name - the name of the citizen.
    • getDeceasedCitizens

      Set<String> getDeceasedCitizens()
      Gets a set with all the recently deceased citizens.
      Returns:
      a set with all the recently deceased citizens.
    • removeDeceasedCitizen

      void removeDeceasedCitizen(String name)
      Remove a deceased citizen from the handler.
      Parameters:
      name - the name of the citizen.
    • clearDeceasedCitizen

      void clearDeceasedCitizen()
      Clear the list of deceased citizens.
    • shouldMourn

      boolean shouldMourn()
      Check if the citizen should mourn.
      Returns:
      true if so.
    • isMourning

      boolean isMourning()
      Check if the citizen is already mourning.
      Returns:
      true if so.
    • setMourning

      void setMourning(boolean mourn)
      Set if the citizen is mourning atm.
      Parameters:
      mourn - true if so.