RollbackNode::RollbackNode(Map *map, v3s16 p, IGameDef *gamedef)
{
const NodeDefManager *ndef = gamedef->ndef();
- MapNode n = map->getNodeNoEx(p);
+ MapNode n = map->getNode(p);
name = ndef->get(n).name;
param1 = n.param1;
param2 = n.param2;
// Make sure position is loaded from disk
map->emergeBlock(getContainerPos(p, MAP_BLOCKSIZE), false);
// Check current node
- MapNode current_node = map->getNodeNoEx(p);
+ MapNode current_node = map->getNode(p);
std::string current_name = ndef->get(current_node).name;
// If current node not the new node, it's bad
if (current_name != n_new.name) {
// Inform other things that the meta data has changed
MapEditEvent event;
event.type = MEET_BLOCK_NODE_METADATA_CHANGED;
- event.p = p;
- map->dispatchEvent(&event);
+ event.setPositionModified(p);
+ map->dispatchEvent(event);
} catch (InvalidPositionException &e) {
infostream << "RollbackAction::applyRevert(): "
<< "InvalidPositionException: " << e.what()