support custom bed texture and model

#83
#685
#695
This commit is contained in:
SoftFever 2023-04-15 01:37:34 +08:00
parent 9671cdfc68
commit 7f12c18a4a
7 changed files with 36 additions and 20 deletions

View file

@ -1308,7 +1308,7 @@ void ConfigBase::save_to_json(const std::string &file, const std::string &name,
{
const ConfigOption* opt = this->option(opt_key);
if ( opt->is_scalar() ) {
if (opt->type() == coString)
if (opt->type() == coString && (opt_key != "bed_custom_texture" && opt_key != "bed_custom_model"))
//keep \n, \r, \t
j[opt_key] = (dynamic_cast<const ConfigOptionString *>(opt))->value;
else