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.
-
Field Summary
Fields inherited from class com.minecolonies.api.colony.buildings.modules.AbstractBuildingModule
building, isDirty -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidburyCitizenHere(Tuple<net.minecraft.core.BlockPos, net.minecraft.core.Direction> positionAndDirection, AbstractEntityCitizen worker) Add a citizen to the list of resting citizen in this graveyardvoiddeserializeNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound) Deserialize the module.Get for the last grave.booleanhasRestingCitizen(Set<String> citizens) Check if one of the citizens in the list is resting.voidserializeNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound) Serialize the module from a compound.voidserializeToView(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Serialization method to send the module data to the client side.voidsetLastGraveData(GraveData graveData) Setter for the last grave data.Methods inherited from class com.minecolonies.api.colony.buildings.modules.AbstractBuildingModule
checkDirty, clearDirty, getBuilding, getProducer, markDirty, setBuilding, setProducerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.buildings.modules.IBuildingEventsModule
onDestroyed, onPlayerEnterBuilding, onUpgradeComplete, onWakeUpMethods inherited from interface com.minecolonies.api.colony.buildings.modules.IBuildingModule
getBuilding, getProducer, serializeToView, setBuilding, setProducerMethods inherited from interface com.minecolonies.api.util.IHasDirty
checkDirty, clearDirty, markDirty
-
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:IPersistentModuleDeserialize the module.- Specified by:
deserializeNBTin interfaceIPersistentModule- 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:IPersistentModuleSerialize the module from a compound.- Specified by:
serializeNBTin interfaceIPersistentModule- Parameters:
compound- the compound.
-
serializeToView
public void serializeToView(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Description copied from interface:IBuildingModuleSerialization method to send the module data to the client side.- Specified by:
serializeToViewin interfaceIBuildingModule- Parameters:
buf- the buffer to write it to.
-
setLastGraveData
Setter for the last grave data.- Parameters:
graveData- the last grave the worker has dug.
-
getLastGraveData
Get for the last grave.- Returns:
- the last grave the worker has dug.
-
hasRestingCitizen
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
-