Package com.minecolonies.core.colony
Class CitizenDataManager
java.lang.Object
com.minecolonies.core.colony.CitizenDataManager
- All Implemented Interfaces:
ICitizenDataManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFromNBT(net.minecraft.core.HolderLookup.Provider provider, @NotNull net.minecraft.nbt.CompoundTag compound, IColony colony) Creates a citizen data instance from the stored nbt.createFromNetworkData(int id, @NotNull net.minecraft.network.RegistryFriendlyByteBuf networkBuffer, IColonyView colonyView) Creates a citizen data view from a given network buffer, containing the views data.
-
Constructor Details
-
CitizenDataManager
public CitizenDataManager()
-
-
Method Details
-
createFromNBT
public ICitizenData createFromNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound, IColony colony) Description copied from interface:ICitizenDataManagerCreates a citizen data instance from the stored nbt.- Specified by:
createFromNBTin interfaceICitizenDataManager- Parameters:
compound- The nbt data to create an instance from.colony- The colony to create an instance in.- Returns:
- The citizen data, loaded from the nbt into the colony.
-
createFromNetworkData
public ICitizenDataView createFromNetworkData(int id, @NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf networkBuffer, IColonyView colonyView) Description copied from interface:ICitizenDataManagerCreates a citizen data view from a given network buffer, containing the views data.- Specified by:
createFromNetworkDatain interfaceICitizenDataManager- Parameters:
id- the id of the citizen.networkBuffer- The network buffer to read from.colonyView- the colony the citizen belongs to.- Returns:
- The citizen data view.
-