Class CitizenBuriedModEvent

All Implemented Interfaces:
IModEvent

public final class CitizenBuriedModEvent extends AbstractColonyModEvent
Event fired after an undertaker successfully buries a citizen.
  • Constructor Details

    • CitizenBuriedModEvent

      public CitizenBuriedModEvent(IColony colony, net.minecraft.core.BlockPos gravePosition, net.minecraft.nbt.CompoundTag savedCitizenNbt, String citizenName, String citizenJobName, ICitizen undertaker)
      Construct an event for a successfully buried citizen.
      Parameters:
      colony - the colony in which the citizen was buried.
      gravePosition - the position of the citizen's grave.
      savedCitizenNbt - the saved citizen data that can be used to resurrect the citizen.
      citizenName - the buried citizen's name.
      citizenJobName - the buried citizen's job name, or null if unemployed.
      undertaker - the undertaker who buried the citizen.
  • Method Details

    • getGravePosition

      public net.minecraft.core.BlockPos getGravePosition()
      Get the position of the citizen's grave.
      Returns:
      the immutable grave position.
    • getSavedCitizenNbt

      public net.minecraft.nbt.CompoundTag getSavedCitizenNbt()
      Get a copy of the saved citizen data suitable for resurrection.
      Returns:
      a defensive copy of the saved citizen NBT.
    • getUndertaker

      public ICitizen getUndertaker()
      Get the undertaker who buried the citizen.
      Returns:
      the undertaker.
    • getCitizenName

      public String getCitizenName()
      Get the name of the buried citizen.
      Returns:
      the citizen name.
    • getCitizenJobName

      public String getCitizenJobName()
      Get the last job name of the buried citizen.
      Returns:
      the translated job name, or null if the citizen was unemployed.
    • getBurialDay

      public int getBurialDay()
      Get the colony day on which the burial occurred.
      Returns:
      the burial day captured when the event was created.