Class GraveyardManagementModule

java.lang.Object
com.minecolonies.api.colony.buildings.modules.AbstractBuildingModule
com.minecolonies.core.colony.buildings.modules.GraveyardManagementModule
All Implemented Interfaces:
IBuildingEventsModule, IBuildingModule, IPersistentModule, IHasDirty

public class GraveyardManagementModule extends AbstractBuildingModule implements IBuildingModule, IPersistentModule, IBuildingEventsModule
The graveyard list module.
  • Constructor Details

    • GraveyardManagementModule

      public GraveyardManagementModule()
  • Method Details

    • deserializeNBT

      public void deserializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: IPersistentModule
      Deserialize the module.
      Specified by:
      deserializeNBT in interface IPersistentModule
      Parameters:
      compound - the nbt compound.
    • serializeNBT

      public void serializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: IPersistentModule
      Serialize the module from a compound.
      Specified by:
      serializeNBT in interface IPersistentModule
      Parameters:
      compound - the compound.
    • serializeToView

      public void serializeToView(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf)
      Description copied from interface: IBuildingModule
      Serialization method to send the module data to the client side.
      Specified by:
      serializeToView in interface IBuildingModule
      Parameters:
      buf - the buffer to write it to.
    • setLastGraveData

      public void setLastGraveData(GraveData graveData)
      Setter for the last grave data.
      Parameters:
      graveData - the last grave the worker has dug.
    • getLastGraveData

      public GraveData getLastGraveData()
      Get for the last grave.
      Returns:
      the last grave the worker has dug.
    • hasRestingCitizen

      public boolean hasRestingCitizen(Set<String> citizens)
      Check if one of the citizens in the list is resting.
      Parameters:
      citizens - the citizens to check.
      Returns:
      true if so.
    • buryCitizenHere

      public void buryCitizenHere(Tuple<net.minecraft.core.BlockPos,net.minecraft.core.Direction> positionAndDirection, AbstractEntityCitizen worker)
      Add a citizen to the list of resting citizen in this graveyard