} else {
NodeMetadata *meta = map->getNodeMetadata(p);
if (!meta) {
- meta = new NodeMetadata(gamedef);
+ meta = new NodeMetadata(gamedef->idef());
if (!map->setNodeMetadata(p, meta)) {
delete meta;
infostream << "RollbackAction::applyRevert(): "
MapBlock *block = map->getBlockNoCreateNoEx(blockpos);
if (block) {
block->raiseModified(MOD_STATE_WRITE_NEEDED,
- "NodeMetaRef::reportMetadataChange");
+ MOD_REASON_REPORT_META_CHANGE);
}
} catch (InvalidPositionException &e) {
infostream << "RollbackAction::applyRevert(): "
<< inventory_index << " too large in "
<< "inventory list \"" << inventory_list << "\" in "
<< inventory_location << std::endl;
+ return false;
}
// If item was added, take away item, otherwise add removed item
if (inventory_add) {