- // Read some settings
- bool new_style_water = g_settings.getBool("new_style_water");
- bool new_style_leaves = g_settings.getBool("new_style_leaves");
- bool invisible_stone = g_settings.getBool("invisible_stone");
-
- content_t i;
- ContentFeatures *f = NULL;
-
- i = CONTENT_STONE;
- f = &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";
- setStoneLikeDiggingProperties(f->digging_properties, 1.0);
- if(invisible_stone)
- f->solidness = 0; // For debugging, hides regular stone
-
- i = CONTENT_GRASS;
- f = &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";
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_GRASS_FOOTSTEPS;
- f = &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";
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_MUD;
- f = &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";
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_SAND;
- f = &content_features(i);
- f->setAllTextures("sand.png");
- f->setInventoryTextureCube("sand.png", "sand.png", "sand.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_GRAVEL;
- f = &content_features(i);
- f->setAllTextures("gravel.png");
- f->setInventoryTextureCube("gravel.png", "gravel.png", "gravel.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
- setDirtLikeDiggingProperties(f->digging_properties, 1.75);
-
- i = CONTENT_SANDSTONE;
- f = &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";
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_CLAY;
- f = &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");
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_BRICK;
- f = &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");
- setStoneLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_TREE;
- f = &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";
- setWoodLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_JUNGLETREE;
- f = &content_features(i);
- f->setAllTextures("jungletree.png");
- f->setTexture(0, "jungletree_top.png");
- f->setTexture(1, "jungletree_top.png");
- f->param_type = CPT_MINERAL;
- //f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
- setWoodLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_JUNGLEGRASS;
- f = &content_features(i);
- f->setInventoryTexture("junglegrass.png");
- f->light_propagates = true;
- f->param_type = CPT_LIGHT;
- //f->is_ground_content = true;
- f->air_equivalent = false; // grass grows underneath
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
- f->solidness = 0; // drawn separately, makes no faces
- f->walkable = false;
- setWoodLikeDiggingProperties(f->digging_properties, 0.10);
-
- i = CONTENT_LEAVES;
- f = &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";
- setWoodLikeDiggingProperties(f->digging_properties, 0.15);
-
- i = CONTENT_CACTUS;
- f = &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";
- setWoodLikeDiggingProperties(f->digging_properties, 0.75);
-
- i = CONTENT_PAPYRUS;
- f = &content_features(i);
- f->setInventoryTexture("papyrus.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->walkable = false;
- setWoodLikeDiggingProperties(f->digging_properties, 0.25);
-
- i = CONTENT_BOOKSHELF;
- f = &content_features(i);
- f->setAllTextures("bookshelf.png");
- f->setTexture(0, "wood.png");
- f->setTexture(1, "wood.png");
- // FIXME: setInventoryTextureCube() only cares for the first texture
- f->setInventoryTextureCube("bookshelf.png", "bookshelf.png", "bookshelf.png");
- //f->setInventoryTextureCube("wood.png", "bookshelf.png", "bookshelf.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- setWoodLikeDiggingProperties(f->digging_properties, 0.75);
-
- i = CONTENT_GLASS;
- f = &content_features(i);
- f->light_propagates = true;
- f->sunlight_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");
- setWoodLikeDiggingProperties(f->digging_properties, 0.15);
-
- i = CONTENT_FENCE;
- f = &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->air_equivalent = true; // grass grows underneath
- f->setInventoryTexture("item_fence.png");
- setWoodLikeDiggingProperties(f->digging_properties, 0.75);
-
- i = CONTENT_RAIL;
- f = &content_features(i);
- f->setInventoryTexture("rail.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
- f->walkable = false;
- setDirtLikeDiggingProperties(f->digging_properties, 0.75);
+ nimap->set(0, "default:stone");
+ nimap->set(2, "default:water_flowing");
+ nimap->set(3, "default:torch");
+ nimap->set(9, "default:water_source");
+ nimap->set(14, "default:sign_wall");
+ nimap->set(15, "default:chest");
+ nimap->set(16, "default:furnace");
+ nimap->set(17, "default:chest_locked");
+ nimap->set(21, "default:fence_wood");
+ nimap->set(30, "default:rail");
+ nimap->set(31, "default:ladder");
+ nimap->set(32, "default:lava_flowing");
+ nimap->set(33, "default:lava_source");
+ nimap->set(0x800, "default:dirt_with_grass");
+ nimap->set(0x801, "default:tree");
+ nimap->set(0x802, "default:leaves");
+ nimap->set(0x803, "default:dirt_with_grass_footsteps");
+ nimap->set(0x804, "default:mese");
+ nimap->set(0x805, "default:dirt");
+ nimap->set(0x806, "default:cloud");
+ nimap->set(0x807, "default:coalstone");
+ nimap->set(0x808, "default:wood");
+ nimap->set(0x809, "default:sand");
+ nimap->set(0x80a, "default:cobble");
+ nimap->set(0x80b, "default:steelblock");
+ nimap->set(0x80c, "default:glass");
+ nimap->set(0x80d, "default:mossycobble");
+ nimap->set(0x80e, "default:gravel");
+ nimap->set(0x80f, "default:sandstone");
+ nimap->set(0x810, "default:cactus");
+ nimap->set(0x811, "default:brick");
+ nimap->set(0x812, "default:clay");
+ nimap->set(0x813, "default:papyrus");
+ nimap->set(0x814, "default:bookshelf");
+ nimap->set(0x815, "default:jungletree");
+ nimap->set(0x816, "default:junglegrass");
+ nimap->set(0x817, "default:nyancat");
+ nimap->set(0x818, "default:nyancat_rainbow");
+ nimap->set(0x819, "default:apple");
+ nimap->set(0x820, "default:sapling");
+ // Static types
+ nimap->set(CONTENT_IGNORE, "ignore");
+ nimap->set(CONTENT_AIR, "air");
+}