data[i].param2 = s[i+nodecount*2];
}
}
+
+ /*
+ Translate nodes as specified in the translate_to fields of
+ node features
+ */
+ for(u32 i=0; i<MAP_BLOCKSIZE*MAP_BLOCKSIZE*MAP_BLOCKSIZE; i++)
+ {
+ MapNode &n = data[i];
+
+ MapNode *translate_to = content_features(n.d).translate_to;
+ if(translate_to)
+ {
+ dstream<<"MapBlock: WARNING: Translating node "<<n.d<<" to "
+ <<translate_to->d<<std::endl;
+ n = *translate_to;
+ }
+ }
}
i = CONTENT_COALSTONE;
f = &g_content_features[i];
- f->translate_to = new MapNode(CONTENT_STONE, MINERAL_COAL);
- /*f->setAllTextures(irrlicht->getTextureId("coalstone.png"));
- f->is_ground_content = true;*/
+ //f->translate_to = new MapNode(CONTENT_STONE, MINERAL_COAL);
+ f->setAllTextures(TextureSpec(irrlicht->getTextureId("coal.png"),
+ irrlicht->getTextureId("mineral_coal.png")));
+ f->is_ground_content = true;
i = CONTENT_WOOD;
f = &g_content_features[i];
}
// Translate deprecated stuff
+ // NOTE: This doesn't get used because MapBlock handles node
+ // parameters directly
MapNode *translate_to = content_features(d).translate_to;
if(translate_to)
{