Class CitizenDiseaseHandler

java.lang.Object
com.minecolonies.core.entity.citizen.citizenhandlers.CitizenDiseaseHandler
All Implemented Interfaces:
ICitizenDiseaseHandler

public class CitizenDiseaseHandler extends Object implements ICitizenDiseaseHandler
Handler taking care of citizens getting stuck.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
    Health at which citizens seek a doctor.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the experience handler.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cure the citizen.
    @Nullable Disease
    Get the current disease, if any.
    boolean
    True when the citizen needs to go to a hospital because its hurt
    boolean
    Check if the citizen is sick and must be healed..
    void
    Called when two citizens collide.
    void
    read(net.minecraft.nbt.CompoundTag compound)
    Read the handler from NBT.
    boolean
    setDisease(@Nullable Disease disease)
    Set a disease on the citizen.
    void
    setSleepsAtHospital(boolean isAtHospital)
    Sets a flag that the citizen is now at the hospital.
    boolean
    Whether the citizen sleeps at a hospital
    void
    update(int tickRate)
    Called in the citizen every few ticks to check for illness.
    void
    write(net.minecraft.nbt.CompoundTag compound)
    Write the handler to NBT.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait