Class CitizenBuriedModEvent
java.lang.Object
com.minecolonies.api.eventbus.events.AbstractModEvent
com.minecolonies.api.eventbus.events.colony.AbstractColonyModEvent
com.minecolonies.api.eventbus.events.colony.citizens.CitizenBuriedModEvent
- All Implemented Interfaces:
IModEvent
Event fired after an undertaker successfully buries a citizen.
-
Constructor Summary
ConstructorsConstructorDescriptionCitizenBuriedModEvent(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. -
Method Summary
Modifier and TypeMethodDescriptionintGet the colony day on which the burial occurred.Get the last job name of the buried citizen.Get the name of the buried citizen.net.minecraft.core.BlockPosGet the position of the citizen's grave.net.minecraft.nbt.CompoundTagGet a copy of the saved citizen data suitable for resurrection.Get the undertaker who buried the citizen.Methods inherited from class com.minecolonies.api.eventbus.events.colony.AbstractColonyModEvent
getColonyMethods inherited from class com.minecolonies.api.eventbus.events.AbstractModEvent
getEventId
-
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, ornullif 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
Get the undertaker who buried the citizen.- Returns:
- the undertaker.
-
getCitizenName
Get the name of the buried citizen.- Returns:
- the citizen name.
-
getCitizenJobName
Get the last job name of the buried citizen.- Returns:
- the translated job name, or
nullif 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.
-