void ContentFeatures::serialize(std::ostream &os)
{
- writeU8(os, 5); // version
+ writeU8(os, 6); // version
os<<serializeString(name);
writeU16(os, groups.size());
for(ItemGroupList::const_iterator
os<<serializeString(liquid_alternative_flowing);
os<<serializeString(liquid_alternative_source);
writeU8(os, liquid_viscosity);
+ writeU8(os, liquid_renewable);
writeU8(os, light_source);
writeU32(os, damage_per_second);
node_box.serialize(os);
serializeSimpleSoundSpec(sound_dug, os);
// Stuff below should be moved to correct place in a version that otherwise changes
// the protocol version
- writeU8(os, liquid_renewable);
}
void ContentFeatures::deSerialize(std::istream &is)
{
int version = readU8(is);
- if(version != 5)
+ if(version != 6)
throw SerializationError("unsupported ContentFeatures version");
name = deSerializeString(is);
groups.clear();
liquid_alternative_flowing = deSerializeString(is);
liquid_alternative_source = deSerializeString(is);
liquid_viscosity = readU8(is);
+ liquid_renewable = readU8(is);
light_source = readU8(is);
damage_per_second = readU32(is);
node_box.deSerialize(is);
try{
// Stuff below should be moved to correct place in a version that
// otherwise changes the protocol version
- liquid_renewable = readU8(is);
}catch(SerializationError &e) {};
}