Interface ICitizenDataManager

All Known Implementing Classes:
CitizenDataManager

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

    Modifier and Type
    Method
    Description
    createFromNBT(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.
     
  • Method Details

    • getInstance

      static ICitizenDataManager getInstance()
    • createFromNBT

      ICitizenData createFromNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, @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.RegistryFriendlyByteBuf 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.