Interface ICitizenDataManager

All Known Implementing Classes:
CitizenDataManager

public interface ICitizenDataManager
Manages access to citizen data types.
  • Method Details

    • getInstance

      static ICitizenDataManager getInstance()
    • createFromNBT

      ICitizenData createFromNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound, IColony colony)
      Creates a citizen data instance from the stored nbt.
      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

      ICitizenDataView createFromNetworkData(int id, @NotNull @NotNull net.minecraft.network.FriendlyByteBuf networkBuffer, IColonyView colonyView)
      Creates a citizen data view from a given network buffer, containing the views data.
      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.