<<" while trying to replace \""
<<m_gamedef->ndef()->get(block->getNodeNoCheck(relpos)).name
<<"\" at "<<PP(p)<<" (block "<<PP(blockpos)<<")"<<std::endl;
- debug_stacks_print_to(errorstream);
+ debug_stacks_print_to(infostream);
return;
}
block->setNodeNoCheck(relpos, n);
std::string metadata_name = nodemgr->get(n).metadata_name;
if(metadata_name != ""){
NodeMetadata *meta = NodeMetadata::create(metadata_name, m_gamedef);
- meta->setOwner(player_name);
- setNodeMetadata(p, meta);
+ if(!meta){
+ errorstream<<"Failed to create node metadata \""
+ <<metadata_name<<"\""<<std::endl;
+ } else {
+ meta->setOwner(player_name);
+ setNodeMetadata(p, meta);
+ }
}
/*
if (nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing) != liquid_kind) {
neutrals[num_neutrals++] = nb;
} else {
- sources[num_sources++] = nb;
+ // Do not count bottom source, it will screw things up
+ if(dirs[i].Y != -1)
+ sources[num_sources++] = nb;
}
break;
case LIQUID_FLOWING: