Interface ICitizenMournHandler
- All Known Implementing Classes:
CitizenMournHandler
public interface ICitizenMournHandler
The citizen happiness handler interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDeceasedCitizen(String name) Add a deceased citizen to the handler.voidClear the list of deceased citizens.Gets a set with all the recently deceased citizens.booleanCheck if the citizen is already mourning.voidread(net.minecraft.nbt.CompoundTag compound) Read the handler from NBT.voidremoveDeceasedCitizen(String name) Remove a deceased citizen from the handler.voidsetMourning(boolean mourn) Set if the citizen is mourning atm.booleanCheck if the citizen should mourn.voidwrite(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
Add a deceased citizen to the handler.- Parameters:
name- the name of the citizen.
-
getDeceasedCitizens
Gets a set with all the recently deceased citizens.- Returns:
- a set with all the recently deceased citizens.
-
removeDeceasedCitizen
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.
-