diff --git a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp index 852af5946..571625ebc 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp @@ -416,8 +416,8 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::porkChop_raw_Id) ITEM(Item::beef_cooked_Id) ITEM(Item::beef_raw_Id) - //ITEM(Item::mutton_cooked_Id) - //ITEM(Item::mutton_raw_Id) + ITEM(Item::mutton_raw_Id) + ITEM(Item::mutton_cooked_Id) ITEM(Item::chicken_raw_Id) ITEM(Item::chicken_cooked_Id) ITEM(Item::rotten_flesh_Id) diff --git a/Minecraft.World/BiomeDecorator.cpp b/Minecraft.World/BiomeDecorator.cpp index 38b3259f2..ed6ea22a4 100644 --- a/Minecraft.World/BiomeDecorator.cpp +++ b/Minecraft.World/BiomeDecorator.cpp @@ -88,7 +88,7 @@ void BiomeDecorator::_init() void BiomeDecorator::decorate() { PIXBeginNamedEvent(0,"Decorate Islands"); - for (int i = 0; i < random->nextInt(3)-1; i++) + for (int i = 0; i < random->nextInt(5)-1; i++) { int x = xo + random->nextInt(16) + 8; int z = zo + random->nextInt(16) + 8; @@ -139,6 +139,21 @@ void BiomeDecorator::decorate() } PIXEndNamedEvent(); + for (int i = 0; i < forests; i++) + { + + int x = xo + random->nextInt(16) + 8; + int z = zo + random->nextInt(16) + 8; + Feature *tree = biome->getTreeFeature(random); + tree->init(1, 1, 1); + if (!level->isEmptyTile(x, level->getHeightmap(x, z)+105, z)) + { + tree->place(level, random, x, level->getHeightmap(x, z)+105, z); + delete tree; + } + } + PIXEndNamedEvent(); + PIXBeginNamedEvent(0,"Decorate mushrooms/flowers/grass"); for (int i = 0; i < hugeMushrooms; i++) { @@ -362,6 +377,16 @@ void BiomeDecorator::decorateOres() decorateDepthAverage(1, lapisOreFeature, Level::genDepth / 8, Level::genDepth / 8); decorateDepthSpan(3, emeraldOreFeature, 64, Level::genDepth *8); + decorateDepthSpan(10, gravelOreFeature, 150, 256); + decorateDepthSpan(20, coalOreFeature, 150, 256); + decorateDepthSpan(20, ironOreFeature, 150, 256); + decorateDepthSpan(10, rubyOreFeature, 150, 256); + + decorateDepthSpan(20, coalOreFeature, 175, 256); + decorateDepthSpan(20, ironOreFeature, 175, 256); + decorateDepthSpan(10, rubyOreFeature, 175, 256); + + decorateDepthSpan(10, rubyOreFeature, 0, Level::genDepth / 6); level->setInstaTick(false); diff --git a/Minecraft.World/IslandFeature.cpp b/Minecraft.World/IslandFeature.cpp index 0cdf97860..75fee6eef 100644 --- a/Minecraft.World/IslandFeature.cpp +++ b/Minecraft.World/IslandFeature.cpp @@ -3,6 +3,7 @@ #include "net.minecraft.world.level.h" #include "net.minecraft.world.level.tile.h" #include "net.minecraft.world.level.biome.h" +#include "TreeFeature.h" IslandFeature::IslandFeature(int tile) { @@ -110,10 +111,37 @@ bool IslandFeature::place(Level *level, Random *random, int x, int y, int z) level->setTileAndData(x + xx, y + yy+99+height, z + zz, Tile::dirt_Id, 0, Tile::UPDATE_CLIENTS); level->setTileAndData(x + xx, y + yy+98+height, z + zz, Tile::stone_Id, 0, Tile::UPDATE_CLIENTS); } + } + } + } + for (int xx = 0; xx < 4; xx++) + { + for (int zz = 0; zz < 4; zz++) + { + for (int yy = 0; yy < 6; yy++) + { if (grid[((xx) * 16 + (zz)) * 8 + (yy)]) { - level->setTileAndData(x + xx, y + yy+101+height, z + zz, Tile::water_Id, 0, Tile::UPDATE_CLIENTS); + level->setTileAndData(x + xx, y + yy+93+height, z + zz, Tile::stone_Id, 0, Tile::UPDATE_CLIENTS); + } + } + } + } + + for (int xx = 0; xx < 12; xx++) + { + for (int zz = 0; zz < 12; zz++) + { + for (int yy = 0; yy < 3; yy++) + { + if (grid[((xx) * 16 + (zz)) * 8 + (yy)]) + { + if (!level->isEmptyTile(x + xx+1, y + yy+105+height, z + zz+1)) + { + level->setTileAndData(x + xx, y + yy+105+height, z + zz, 0, 0, Tile::UPDATE_CLIENTS); + level->setTileAndData(x + xx, y + yy+104+height, z + zz, Tile::water_Id, 0, Tile::UPDATE_CLIENTS); + } } } } diff --git a/Minecraft.World/IslandFeature.h b/Minecraft.World/IslandFeature.h index 835f8fac3..94340c300 100644 --- a/Minecraft.World/IslandFeature.h +++ b/Minecraft.World/IslandFeature.h @@ -1,6 +1,8 @@ #pragma once #include "Feature.h" -#include "Material.h" + +class Level; +class Random; class IslandFeature : public Feature { @@ -9,6 +11,7 @@ private: public: IslandFeature (int tile); + virtual bool place(Level *level, Random *random, int x, int y, int z); }; \ No newline at end of file diff --git a/Minecraft.World/Item.cpp b/Minecraft.World/Item.cpp index 52f9f0940..c4d165b27 100644 --- a/Minecraft.World/Item.cpp +++ b/Minecraft.World/Item.cpp @@ -518,8 +518,8 @@ void Item::staticCtor() //ArmorItem *Item::chestplate_ruby = static_cast((new ArmorItem(173, ArmorItem::ArmorMaterial::RUBY, 3, ArmorItem::SLOT_TORSO))->setBaseItemTypeAndMaterial(eBaseItemType_chestplate, eMaterial_ruby)->setIconName(L"ruby_chestplate")->setDescriptionId(IDS_ITEM_CHESTPLATE_DIAMOND)->setUseDescriptionId(IDS_DESC_CHESTPLATE_DIAMOND)); //ArmorItem *Item::leggings_ruby = static_cast((new ArmorItem(174, ArmorItem::ArmorMaterial::RUBY, 3, ArmorItem::SLOT_LEGS))->setBaseItemTypeAndMaterial(eBaseItemType_leggings, eMaterial_ruby)->setIconName(L"ruby_leggings")->setDescriptionId(IDS_ITEM_LEGGINGS_DIAMOND)->setUseDescriptionId(IDS_DESC_LEGGINGS_DIAMOND)); //ArmorItem *Item::boots_ruby = static_cast((new ArmorItem(175, ArmorItem::ArmorMaterial::RUBY, 3, ArmorItem::SLOT_FEET))->setBaseItemTypeAndMaterial(eBaseItemType_boots, eMaterial_ruby)->setIconName(L"ruby_boots")->setDescriptionId(IDS_ITEM_BOOTS_DIAMOND)->setUseDescriptionId(IDS_DESC_BOOTS_DIAMOND)); - //Item *Item::mutton_raw = (new FoodItem(172, 3, FoodConstants::FOOD_SATURATION_LOW, true)) ->setIconName(L"mutton_Raw")->setDescriptionId(IDS_ITEM_BEEF_RAW)->setUseDescriptionId(IDS_DESC_BEEF_RAW); - //Item *Item::mutton_cooked = (new FoodItem(173, 6, FoodConstants::FOOD_SATURATION_GOOD, true))->setIconName(L"mutton_Cooked")->setDescriptionId(IDS_ITEM_BEEF_COOKED)->setUseDescriptionId(IDS_DESC_BEEF_COOKED); + Item *Item::mutton_raw = (new FoodItem(172, 3, FoodConstants::FOOD_SATURATION_LOW, true)) ->setIconName(L"mutton_Raw")->setDescriptionId(IDS_ITEM_BEEF_RAW)->setUseDescriptionId(IDS_DESC_BEEF_RAW); + Item *Item::mutton_cooked = (new FoodItem(173, 6, FoodConstants::FOOD_SATURATION_GOOD, true))->setIconName(L"mutton_Cooked")->setDescriptionId(IDS_ITEM_BEEF_COOKED)->setUseDescriptionId(IDS_DESC_BEEF_COOKED); //Item *Item::apple_ruby = ( new GoldenAppleItem(174, 4, FoodConstants::FOOD_SATURATION_SUPERNATURAL, false) )->setCanAlwaysEat()->setEatEffect(MobEffect::regeneration->id, 5, 1, 1.0f) // ->setBaseItemTypeAndMaterial(eBaseItemType_giltFruit,eMaterial_apple)->setIconName(L"appleRuby")->setDescriptionId(IDS_ITEM_APPLE_GOLD);//->setUseDescriptionId(IDS_DESC_GOLDENAPPLE);