From 6af82612d38c36b42d51e47c1af635ff8e64d693 Mon Sep 17 00:00:00 2001 From: Lord Cambion Date: Thu, 19 Mar 2026 11:45:24 +0100 Subject: [PATCH] stone bricks crafting and mossy cobblestone --- Minecraft.World/DarkOakFeature.cpp | 22 ++++++++++++++++++---- Minecraft.World/HugeMushroomFeature.cpp | 2 +- Minecraft.World/RoofedForestBiome.cpp | 4 ++-- Minecraft.World/SmoothStoneBrickTile.cpp | 2 ++ Minecraft.World/StructureRecipies.cpp | 22 ++++++++++++++++++++++ Minecraft.World/Tile.cpp | 2 +- 6 files changed, 46 insertions(+), 8 deletions(-) diff --git a/Minecraft.World/DarkOakFeature.cpp b/Minecraft.World/DarkOakFeature.cpp index ff93f90e..84de0a16 100644 --- a/Minecraft.World/DarkOakFeature.cpp +++ b/Minecraft.World/DarkOakFeature.cpp @@ -122,22 +122,36 @@ bool DarkOakFeature::place(Level *worldIn, Random *rand, int x, int y, int z) { bool DarkOakFeature::checkSpace(Level *worldIn, int x, int y, int z, int height) { + + for (int l = 0; l <= height + 1; ++l) { int i1 = 1; - if (l == 0) i1 = 0; - if (l >= height - 1) i1 = 2; + if (l == 0) { + i1 = 0; + } + if (l >= height - 1) { + i1 = 2; + } for (int j1 = -i1; j1 <= i1; ++j1) { for (int k1 = -i1; k1 <= i1; ++k1) { + + if (l == 0 && j1 == 0 && k1 == 0) continue; + int tile = worldIn->getTile(x + j1, y + l, z + k1); - // ignores grass, dirt e trunks. + if (tile != 0 && tile != Tile::leaves_Id && tile != Tile::leaves2_Id && tile != Tile::tallgrass_Id && tile != Tile::sapling_Id && tile != Tile::grass_Id && tile != Tile::dirt_Id && tile != Tile::treeTrunk_Id && tile != Tile::tree2Trunk_Id) { - return false; + return false; + } + + + if (tile == Tile::water_Id) { + return false; } } } diff --git a/Minecraft.World/HugeMushroomFeature.cpp b/Minecraft.World/HugeMushroomFeature.cpp index 3ab565f4..33f34259 100644 --- a/Minecraft.World/HugeMushroomFeature.cpp +++ b/Minecraft.World/HugeMushroomFeature.cpp @@ -34,7 +34,7 @@ bool HugeMushroomFeature::place(Level *level, Random *random, int x, int y, int if (yy >= 0 && yy < Level::maxBuildHeight) { int tt = level->getTile(xx, yy, zz); - if (tt != 0 && tt != Tile::leaves_Id && tt != Tile::leaves2_Id && tt != Tile::tallgrass_Id && tt != Tile::mushroom_brown_Id && tt != Tile::mushroom_red_Id &&tt != Tile::sapling_Id && tt != Tile::sapling2_Id) + if (tt != 0 && tt != Tile::leaves_Id && tt != Tile::leaves2_Id && tt != Tile::tallgrass_Id && tt != Tile::sapling_Id && tt != Tile::sapling2_Id) free = false; } else diff --git a/Minecraft.World/RoofedForestBiome.cpp b/Minecraft.World/RoofedForestBiome.cpp index fcb53b67..e75a9117 100644 --- a/Minecraft.World/RoofedForestBiome.cpp +++ b/Minecraft.World/RoofedForestBiome.cpp @@ -28,10 +28,10 @@ RoofedForestBiome::RoofedForestBiome(int id) : Biome(id) Feature* RoofedForestBiome::getTreeFeature(Random* random) { - ; - if (random->nextInt(5) == 0) + + if (random->nextInt(15) == 0) { return new HugeMushroomFeature(); diff --git a/Minecraft.World/SmoothStoneBrickTile.cpp b/Minecraft.World/SmoothStoneBrickTile.cpp index a42af97b..54bfe373 100644 --- a/Minecraft.World/SmoothStoneBrickTile.cpp +++ b/Minecraft.World/SmoothStoneBrickTile.cpp @@ -1,6 +1,7 @@ #include "stdafx.h" #include "SmoothStoneBrickTile.h" #include "net.minecraft.world.h" +#include "Item.h" const wstring SmoothStoneBrickTile::TEXTURE_NAMES[] = {L"", L"mossy", L"cracked", L"carved"}; @@ -12,6 +13,7 @@ const unsigned int SmoothStoneBrickTile::SMOOTH_STONE_BRICK_NAMES[SMOOTH_STONE_B SmoothStoneBrickTile::SmoothStoneBrickTile(int id) : Tile(id, Material::stone) { + setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone); icons = nullptr; } diff --git a/Minecraft.World/StructureRecipies.cpp b/Minecraft.World/StructureRecipies.cpp index 1706a7ce..8f7b2bb1 100644 --- a/Minecraft.World/StructureRecipies.cpp +++ b/Minecraft.World/StructureRecipies.cpp @@ -46,6 +46,7 @@ void StructureRecipies::addRecipes(Recipes *r) L'#', new ItemInstance(Tile::quartzBlock, 1, QuartzBlockTile::TYPE_DEFAULT), L'S'); + // 4J Stu - Changed the order, as the blocks that go with sandstone cause a 3-icon scroll // that touches the text "Structures" in the title in 720 fullscreen. @@ -98,6 +99,27 @@ void StructureRecipies::addRecipes(Recipes *r) L'#', Tile::stone, L'S'); + r->addShapedRecipy(new ItemInstance(Tile::stoneBrick, 1, SmoothStoneBrickTile::TYPE_DETAIL), // + L"ssczg", + L"#", // + L"#", // + + L'#', new ItemInstance(Tile::stoneSlabHalf, 1, StoneSlabTile::SMOOTHBRICK_SLAB), + L'S'); + r->addShapedRecipy(new ItemInstance(Tile::stoneBrick, 1, SmoothStoneBrickTile::TYPE_MOSSY), // + L"sczc zg", + L"#1", + L'#', new ItemInstance(Tile::stoneBrick,1), + L'1', new ItemInstance(Tile::vine, 1), + L'S'); + + r->addShapedRecipy(new ItemInstance(Tile::mossyCobblestone, 1), // + L"sczc zg", + L"#1", // + + L'#', new ItemInstance(Tile::cobblestone,1), + L'1', new ItemInstance(Tile::vine, 1), + L'S'); // 4J Stu - Move this into "Recipes" to change the order things are displayed on the crafting menu //r->addShapedRecipy(new ItemInstance(Tile::ironFence, 16), // diff --git a/Minecraft.World/Tile.cpp b/Minecraft.World/Tile.cpp index 276f43e9..bb5a7517 100644 --- a/Minecraft.World/Tile.cpp +++ b/Minecraft.World/Tile.cpp @@ -350,7 +350,7 @@ void Tile::staticCtor() Tile::redBrick = (new Tile(45, Material::stone)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_brick)->setDestroyTime(2.0f)->setExplodeable(10)->setSoundType(Tile::SOUND_STONE)->setIconName(L"brick")->setDescriptionId(IDS_TILE_BRICK)->setUseDescriptionId(IDS_DESC_BRICK); Tile::tnt = (new TntTile(46)) ->setDestroyTime(0.0f)->setSoundType(Tile::SOUND_GRASS)->setIconName(L"tnt")->setDescriptionId(IDS_TILE_TNT)->setUseDescriptionId(IDS_DESC_TNT); Tile::bookshelf = (new BookshelfTile(47)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_paper, Item::eMaterial_bookshelf)->setDestroyTime(1.5f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"bookshelf")->setDescriptionId(IDS_TILE_BOOKSHELF)->setUseDescriptionId(IDS_DESC_BOOKSHELF); - Tile::mossyCobblestone = (new Tile(48, Material::stone)) ->setDestroyTime(2.0f)->setExplodeable(10)->setSoundType(Tile::SOUND_STONE)->setIconName(L"cobblestone_mossy")->setDescriptionId(IDS_TILE_STONE_MOSS)->setUseDescriptionId(IDS_DESC_MOSS_STONE); + Tile::mossyCobblestone = (new Tile(48, Material::stone)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone)->setDestroyTime(2.0f)->setExplodeable(10)->setSoundType(Tile::SOUND_STONE)->setIconName(L"cobblestone_mossy")->setDescriptionId(IDS_TILE_STONE_MOSS)->setUseDescriptionId(IDS_DESC_MOSS_STONE); Tile::obsidian = (new ObsidianTile(49)) ->setDestroyTime(50.0f)->setExplodeable(2000)->setSoundType(Tile::SOUND_STONE)->setIconName(L"obsidian")->setDescriptionId(IDS_TILE_OBSIDIAN)->setUseDescriptionId(IDS_DESC_OBSIDIAN); Tile::torch = (new TorchTile(50)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_torch, Item::eMaterial_wood)->setDestroyTime(0.0f)->setLightEmission(15 / 16.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"torch_on")->setDescriptionId(IDS_TILE_TORCH)->setUseDescriptionId(IDS_DESC_TORCH)->disableMipmap();