use of com.minecolonies.api.util.constant.NbtTagConstants.TAG_CITIZENS in project minecolonies by ldtteam.
the class CitizenManager method write.
@Override
public void write(@NotNull final CompoundNBT compoundNBT) {
@NotNull final ListNBT citizenTagList = citizens.values().stream().map(citizen -> citizen.serializeNBT()).collect(NBTUtils.toListNBT());
compoundNBT.put(TAG_CITIZENS, citizenTagList);
}
use of com.minecolonies.api.util.constant.NbtTagConstants.TAG_CITIZENS in project minecolonies by Minecolonies.
the class CitizenManager method writeToNBT.
@Override
public void writeToNBT(@NotNull final NBTTagCompound compound) {
compound.setInteger(TAG_MAX_CITIZENS, maxCitizens);
@NotNull final NBTTagList citizenTagList = citizens.values().stream().map(citizen -> citizen.writeToNBT(new NBTTagCompound())).collect(NBTUtils.toNBTTagList());
compound.setTag(TAG_CITIZENS, citizenTagList);
}
use of com.minecolonies.api.util.constant.NbtTagConstants.TAG_CITIZENS in project minecolonies by Minecolonies.
the class CitizenManager method write.
@Override
public void write(@NotNull final CompoundNBT compoundNBT) {
@NotNull final ListNBT citizenTagList = citizens.values().stream().map(citizen -> citizen.serializeNBT()).collect(NBTUtils.toListNBT());
compoundNBT.put(TAG_CITIZENS, citizenTagList);
}
Aggregations