-
- u8 i;
- ContentFeatures *f = NULL;
-
- i = CONTENT_STONE;
- f = &g_content_features[i];
- f->setAllTextures("stone.png");
- f->setInventoryTextureCube("stone.png", "stone.png", "stone.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(CONTENT_COBBLE)+" 1";
-
- i = CONTENT_GRASS;
- f = &g_content_features[i];
- f->setAllTextures("mud.png^grass_side.png");
- f->setTexture(0, "grass.png");
- f->setTexture(1, "mud.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(CONTENT_MUD)+" 1";
-
- i = CONTENT_GRASS_FOOTSTEPS;
- f = &g_content_features[i];
- f->setAllTextures("mud.png^grass_side.png");
- f->setTexture(0, "grass_footsteps.png");
- f->setTexture(1, "mud.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(CONTENT_MUD)+" 1";
-
- i = CONTENT_MUD;
- f = &g_content_features[i];
- f->setAllTextures("mud.png");
- f->setInventoryTextureCube("mud.png", "mud.png", "mud.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
-
- i = CONTENT_SAND;
- f = &g_content_features[i];
- f->setAllTextures("sand.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
-
- i = CONTENT_SANDSTONE;
- f = &g_content_features[i];
- f->setAllTextures("sandstone.png");
- f->setInventoryTextureCube("sandstone.png", "sandstone.png", "sandstone.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(CONTENT_SAND)+" 1";
-
- i = CONTENT_CLAY;
- f = &g_content_features[i];
- f->setAllTextures("clay.png");
- f->setInventoryTextureCube("clay.png", "clay.png", "clay.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("CraftItem lump_of_clay 4");
-
- i = CONTENT_BRICK;
- f = &g_content_features[i];
- f->setAllTextures("brick.png");
- f->setInventoryTextureCube("brick.png", "brick.png", "brick.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("CraftItem clay_brick 4");
-
- i = CONTENT_TREE;
- f = &g_content_features[i];
- f->setAllTextures("tree.png");
- f->setTexture(0, "tree_top.png");
- f->setTexture(1, "tree_top.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
-
- i = CONTENT_LEAVES;
- f = &g_content_features[i];
- f->light_propagates = true;
- //f->param_type = CPT_MINERAL;
- f->param_type = CPT_LIGHT;
- f->is_ground_content = true;
- if(new_style_leaves)
- {
- f->solidness = 0; // drawn separately, makes no faces
- f->setInventoryTextureCube("leaves.png", "leaves.png", "leaves.png");
- }
- else
- {
- f->setAllTextures("[noalpha:leaves.png");
- }
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
-
- i = CONTENT_CACTUS;
- f = &g_content_features[i];
- f->setAllTextures("cactus_side.png");
- f->setTexture(0, "cactus_top.png");
- f->setTexture(1, "cactus_top.png");
- f->setInventoryTextureCube("cactus_top.png", "cactus_side.png", "cactus_side.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
-
- i = CONTENT_GLASS;
- f = &g_content_features[i];
- f->light_propagates = true;
- f->param_type = CPT_LIGHT;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
- f->solidness = 0; // drawn separately, makes no faces
- f->setInventoryTextureCube("glass.png", "glass.png", "glass.png");
-
- i = CONTENT_FENCE;
- f = &g_content_features[i];
- f->setInventoryTexture("fence.png");
- f->light_propagates = true;
- f->param_type = CPT_LIGHT;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
- f->solidness = 0; // drawn separately, makes no faces
- f->air_equivalent = true; // grass grows underneath
-
- // Deprecated
- i = CONTENT_COALSTONE;
- f = &g_content_features[i];
- //f->translate_to = new MapNode(CONTENT_STONE, MINERAL_COAL);
- f->setAllTextures("stone.png^mineral_coal.png");
- f->is_ground_content = true;
-
- i = CONTENT_WOOD;
- f = &g_content_features[i];
- f->setAllTextures("wood.png");
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
-
- i = CONTENT_MESE;
- f = &g_content_features[i];
- f->setAllTextures("mese.png");
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
-
- i = CONTENT_CLOUD;
- f = &g_content_features[i];
- f->setAllTextures("cloud.png");
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
-
- i = CONTENT_AIR;
- f = &g_content_features[i];
- f->param_type = CPT_LIGHT;
- f->light_propagates = true;
- f->sunlight_propagates = true;
- f->solidness = 0;
- f->walkable = false;
- f->pointable = false;
- f->diggable = false;
- f->buildable_to = true;
- f->air_equivalent = true;
-
- i = CONTENT_WATER;
- f = &g_content_features[i];
- f->setInventoryTextureCube("water.png", "water.png", "water.png");
- f->param_type = CPT_LIGHT;
- f->light_propagates = true;
- f->solidness = 0; // Drawn separately, makes no faces
- f->walkable = false;
- f->pointable = false;
- f->diggable = false;
- f->buildable_to = true;
- f->liquid_type = LIQUID_FLOWING;
-
- i = CONTENT_WATERSOURCE;
- f = &g_content_features[i];
- f->setInventoryTexture("water.png");
- if(new_style_water)