From 057458ae7fcff1cb7e6c482339c6d9c87a9d6a4c Mon Sep 17 00:00:00 2001 From: Vimd0 Date: Thu, 29 Jan 2026 23:22:45 -0500 Subject: [PATCH 1/6] Normal support b1.7.3 assets --- game/assets/patches/patch_data.txt | 12 +- source/client/app/Minecraft.cpp | 2 +- source/client/gui/components/OptionList.cpp | 4 +- .../screens/IngameBlockSelectionScreen.cpp | 19 +- source/client/options/Options.cpp | 4 +- source/client/player/LocalPlayer.cpp | 2 +- source/client/renderer/LevelRenderer.cpp | 4 +- source/client/renderer/PatchManager.cpp | 17 +- source/client/renderer/PatchManager.hpp | 4 +- source/client/renderer/TileRenderer.cpp | 20 +- source/common/Utils.hpp | 88 +++--- source/world/entity/Pig.cpp | 4 +- source/world/item/DoorItem.cpp | 2 +- source/world/item/Inventory.cpp | 17 +- source/world/item/Item.cpp | 285 +++++++++++------- source/world/item/Item.hpp | 214 ++++++------- .../levelgen/chunk/RandomLevelSource.cpp | 12 +- .../level/levelgen/chunk/TestChunkSource.cpp | 18 +- .../levelgen/feature/LargeCaveFeature.cpp | 2 +- .../level/levelgen/feature/OreFeature.cpp | 2 +- .../level/levelgen/feature/SpringFeature.cpp | 14 +- source/world/level/path/PathFinder.cpp | 4 +- source/world/tile/DoorTile.cpp | 4 +- source/world/tile/LiquidTile.cpp | 2 +- source/world/tile/RedStoneOreTile.cpp | 8 +- source/world/tile/StoneSlabTile.cpp | 2 +- source/world/tile/StoneTile.cpp | 2 +- source/world/tile/Tile.cpp | 63 ++-- source/world/tile/Tile.hpp | 24 +- 29 files changed, 457 insertions(+), 398 deletions(-) diff --git a/game/assets/patches/patch_data.txt b/game/assets/patches/patch_data.txt index 399be306d..40e774f92 100755 --- a/game/assets/patches/patch_data.txt +++ b/game/assets/patches/patch_data.txt @@ -13,19 +13,15 @@ # * The X and Y destination coordinates will be multiplied by 16. # * The texture doesn't have to be 16x16, all of it will be patched on to terrain.png. -grass_sides_tint|true - # Add festive patches terrain|2|14|n_rocket_launcher.png terrain|3|14|n_rocket_launched.png items|14|2|n_rocket.png -# Add plant veggie patches -terrain|7|2|tall_grass.png -terrain|7|3|dead_bush.png -# terrain|8|3|fern.png -terrain|15|3|spruce_sapling.png -terrain|15|4|birch_sapling.png +# Add pocket patches +terrain|12|0|p_rose.png +terrain|14|1|p_crying_obsidian.png +items|2|15|p_camera.png # Stop now to ignore the below commands. They're for a patch I'm working on that I don't want to release yet. stop_now diff --git a/source/client/app/Minecraft.cpp b/source/client/app/Minecraft.cpp index 46ebd3e21..3575e5e54 100644 --- a/source/client/app/Minecraft.cpp +++ b/source/client/app/Minecraft.cpp @@ -420,7 +420,7 @@ void Minecraft::handleBuildAction(const BuildActionIntention& action) // @BUG: Hits sometimes pass through fire when done from above //if (extinguished) break; - if (pTile != Tile::unbreakable || (player->field_B94 >= 100 && !m_hitResult.m_bUnk24)) + if (pTile != Tile::bedrock || (player->field_B94 >= 100 && !m_hitResult.m_bUnk24)) { bool destroyed = false; if (action.isDestroyStart()) diff --git a/source/client/gui/components/OptionList.cpp b/source/client/gui/components/OptionList.cpp index ea32ff043..2575ab845 100644 --- a/source/client/gui/components/OptionList.cpp +++ b/source/client/gui/components/OptionList.cpp @@ -306,8 +306,8 @@ void OptionList::initVideoMenu() OPTION(Boolean, m_bDontRenderGui, "Hide GUI"); OPTION(Boolean, m_bDynamicHand, "Dynamic Hand Movement"); - if (!GetPatchManager()->IsGrassSidesTinted()) - m_items[idxGrass]->setDisabled(true); + /*if (!GetPatchManager()->IsGrassSidesTinted()) + m_items[idxGrass]->setDisabled(true);*/ if (!GrassColor::isAvailable() || !FoliageColor::isAvailable()) m_items[idxBiome]->setDisabled(true); diff --git a/source/client/gui/screens/IngameBlockSelectionScreen.cpp b/source/client/gui/screens/IngameBlockSelectionScreen.cpp index a2b8f6d7e..ee3a1c0df 100644 --- a/source/client/gui/screens/IngameBlockSelectionScreen.cpp +++ b/source/client/gui/screens/IngameBlockSelectionScreen.cpp @@ -30,15 +30,15 @@ IngameBlockSelectionScreen::IngameBlockSelectionScreen() : //for (int i = 0; i < 16; i++) // <-- This is an example for all wool colors in order // Original list of items. - addCreativeItem(Tile::rock->m_ID); - addCreativeItem(Tile::stoneBrick->m_ID); + addCreativeItem(Tile::cobblestone->m_ID); + addCreativeItem(Tile::brick->m_ID); addCreativeItem(Tile::sandStone->m_ID); addCreativeItem(Tile::wood->m_ID); addCreativeItem(Tile::treeTrunk->m_ID, 0); addCreativeItem(Tile::goldBlock->m_ID); addCreativeItem(Tile::ironBlock->m_ID); - addCreativeItem(Tile::emeraldBlock->m_ID); - addCreativeItem(Tile::redBrick->m_ID); + addCreativeItem(Tile::diamondBlock->m_ID); + addCreativeItem(Tile::brick->m_ID); addCreativeItem(Tile::leaves->m_ID, 0); addCreativeItem(Tile::cloth->m_ID, 14); addCreativeItem(Tile::cloth->m_ID, 13); @@ -53,8 +53,8 @@ IngameBlockSelectionScreen::IngameBlockSelectionScreen() : addCreativeItem(Tile::cloth->m_ID, 5); addCreativeItem(Tile::cloth->m_ID, 4); addCreativeItem(Tile::cloth->m_ID, 3); - addCreativeItem(Tile::stairs_wood->m_ID); - addCreativeItem(Tile::stairs_stone->m_ID); + addCreativeItem(Tile::stairsWood->m_ID); + addCreativeItem(Tile::stairsStone->m_ID); addCreativeItem(Tile::stoneSlabHalf->m_ID, 0); addCreativeItem(Tile::sand->m_ID); addCreativeItem(Tile::ladder->m_ID); @@ -79,7 +79,7 @@ IngameBlockSelectionScreen::IngameBlockSelectionScreen() : addCreativeItem(Tile::sapling->m_ID); addCreativeItem(Tile::cryingObsidian->m_ID); addCreativeItem(Tile::rocketLauncher->m_ID); - addCreativeItem(Tile::redStoneOre->m_ID); + addCreativeItem(Tile::redstoneOre->m_ID); // test stuff addCreativeItem(Tile::water->m_ID); @@ -88,8 +88,8 @@ IngameBlockSelectionScreen::IngameBlockSelectionScreen() : // items addCreativeItem(Item::camera->m_itemID); - addCreativeItem(Item::door_wood->m_itemID); - addCreativeItem(Item::door_iron->m_itemID); + addCreativeItem(Item::woodDoor->m_itemID); + addCreativeItem(Item::ironDoor->m_itemID); addCreativeItem(Item::rocket->m_itemID); // more stuff @@ -102,6 +102,7 @@ IngameBlockSelectionScreen::IngameBlockSelectionScreen() : addCreativeItem(Tile::treeTrunk->m_ID, 1); addCreativeItem(Tile::treeTrunk->m_ID, 2); addCreativeItem(Tile::cactus->m_ID); + addCreativeItem(Tile::tallGrass->m_ID); addCreativeItem(Tile::deadBush->m_ID); addCreativeItem(Tile::pumpkin->m_ID); addCreativeItem(Tile::pumpkinLantern->m_ID); diff --git a/source/client/options/Options.cpp b/source/client/options/Options.cpp index dbaecd3ab..b26977fec 100644 --- a/source/client/options/Options.cpp +++ b/source/client/options/Options.cpp @@ -126,9 +126,9 @@ void Options::_load() m_bBlockOutlines = readBool(value); else if (key == "gfx_fancygrass") { - if (!(GetPatchManager()->IsGrassSidesTinted())) + /*if (!(GetPatchManager()->IsGrassSidesTinted())) m_bFancyGrass = false; - else + else*/ m_bFancyGrass = readBool(value); } else if (key == "gfx_biomecolors") diff --git a/source/client/player/LocalPlayer.cpp b/source/client/player/LocalPlayer.cpp index 33627ab61..64722dc00 100644 --- a/source/client/player/LocalPlayer.cpp +++ b/source/client/player/LocalPlayer.cpp @@ -256,7 +256,7 @@ void LocalPlayer::move(const Vec3& pos) return; // are we trying to walk into stairs or a slab? - if (tileOnTop != Tile::stairs_stone->m_ID && tileOnTop != Tile::stairs_wood->m_ID && tileOnTop != Tile::stoneSlabHalf->m_ID && m_pMinecraft->getOptions()->m_bAutoJump) + if (tileOnTop != Tile::stairsStone->m_ID && tileOnTop != Tile::stairsWood->m_ID && tileOnTop != Tile::stoneSlabHalf->m_ID && m_pMinecraft->getOptions()->m_bAutoJump) // Nope, we're walking towards a full block. Trigger an auto jump. m_nAutoJumpFrames = 1; } diff --git a/source/client/renderer/LevelRenderer.cpp b/source/client/renderer/LevelRenderer.cpp index 9e51b120c..e59aa7cb8 100644 --- a/source/client/renderer/LevelRenderer.cpp +++ b/source/client/renderer/LevelRenderer.cpp @@ -1275,7 +1275,7 @@ void LevelRenderer::renderCracks(const Entity& camera, const HitResult& hr, int t.setOffset(-px, -py, -pz); t.noColor(); if (!pTile) - pTile = Tile::rock; + pTile = Tile::stone; m_pTileRenderer->tesselateInWorld(pTile, hr.m_tilePos, 240 + int(m_destroyProgress * 10.0f)); @@ -1316,7 +1316,7 @@ void LevelRenderer::renderHitSelect(const Entity& camera, const HitResult& hr, i t.setOffset(-px, -py, -pz); t.noColor(); if (!pTile) - pTile = Tile::rock; + pTile = Tile::stone; m_pTileRenderer->tesselateInWorld(pTile, hr.m_tilePos); diff --git a/source/client/renderer/PatchManager.cpp b/source/client/renderer/PatchManager.cpp index 0ec5d7b0a..f64ee4e69 100644 --- a/source/client/renderer/PatchManager.cpp +++ b/source/client/renderer/PatchManager.cpp @@ -157,7 +157,7 @@ void PatchManager::LoadPatchData(const std::string& patchData) ReadInt(lineStream, m_nMetalSideYOffset); continue; } - if (command == "grass_sides_tint") + /*if (command == "grass_sides_tint") { ReadBool(lineStream, m_bGrassSidesTinted); @@ -166,7 +166,7 @@ void PatchManager::LoadPatchData(const std::string& patchData) m_patchData.push_back(PatchData(TYPE_TERRAIN, 100, 100, "grass_side_transparent.png")); continue; - } + }*/ LOG_W("Unknown command %s from patch data.", command.c_str()); } @@ -185,7 +185,7 @@ void PatchManager::PatchTextures(TextureData& texture, ePatchType patchType) if (pd.m_type != patchType) continue; - bool bDisableFancyGrassIfFailed = false; + //bool bDisableFancyGrassIfFailed = false; // got the magic value, we can determine whether to disable fancy pants grass if the file doesn't exist if (pd.m_destX == 1600 && pd.m_destY == 1600 && pd.m_type == TYPE_TERRAIN) @@ -193,7 +193,7 @@ void PatchManager::PatchTextures(TextureData& texture, ePatchType patchType) pd.m_destX = 4 * 16; pd.m_destY = 5 * 16; - bDisableFancyGrassIfFailed = true; + //bDisableFancyGrassIfFailed = true; } // N.B. Well, in some cases, you do want things to fail nicely. @@ -201,8 +201,8 @@ void PatchManager::PatchTextures(TextureData& texture, ePatchType patchType) if (patchTex.isEmpty()) { LOG_W("Image %s was not found?! Skipping", pd.m_filename.c_str()); - if (bDisableFancyGrassIfFailed) - m_bGrassSidesTinted = false; + /*if (bDisableFancyGrassIfFailed) + m_bGrassSidesTinted = false;*/ continue; } @@ -253,11 +253,6 @@ bool PatchManager::IsGlassSemiTransparent() return m_bGlassSemiTransparent; } -bool PatchManager::IsGrassSidesTinted() -{ - return m_bGrassSidesTinted; -} - void PatchManager::ReadBool(std::istream& is, bool& b) { std::string flag; diff --git a/source/client/renderer/PatchManager.hpp b/source/client/renderer/PatchManager.hpp index 72854e0b4..2449162ba 100644 --- a/source/client/renderer/PatchManager.hpp +++ b/source/client/renderer/PatchManager.hpp @@ -81,7 +81,7 @@ class PatchManager bool IsGrassTinted(); int GetMetalSideYOffset(); bool IsGlassSemiTransparent(); - bool IsGrassSidesTinted(); + //bool IsGrassSidesTinted(); private: void ReadBool(std::istream& is, bool& b); @@ -91,7 +91,7 @@ class PatchManager bool m_bGrassTinted; bool m_bGlassSemiTransparent; int m_nMetalSideYOffset; - bool m_bGrassSidesTinted; + //bool m_bGrassSidesTinted; std::vector m_patchData; }; diff --git a/source/client/renderer/TileRenderer.cpp b/source/client/renderer/TileRenderer.cpp index 5b104ad4d..a73cbf580 100644 --- a/source/client/renderer/TileRenderer.cpp +++ b/source/client/renderer/TileRenderer.cpp @@ -722,7 +722,7 @@ bool TileRenderer::tesselateBlockInWorld(Tile* tile, const TilePos& pos, float r if (m_bFancyGrass && texture == TEXTURE_GRASS_SIDE && this->m_fixedTexture < 0) { t.color(topR * 0.8f * fLight, topG * 0.8f * fLight, topB * 0.8f * fLight); - renderNorth(tile, pos, TEXTURE_NONE84); + renderNorth(tile, pos, TEXTURE_GRASS_SIDE_OVERLAY); } } @@ -741,7 +741,7 @@ bool TileRenderer::tesselateBlockInWorld(Tile* tile, const TilePos& pos, float r if (m_bFancyGrass && texture == TEXTURE_GRASS_SIDE && this->m_fixedTexture < 0) { t.color(topR * 0.8f * fLight, topG * 0.8f * fLight, topB * 0.8f * fLight); - renderSouth(tile, pos, TEXTURE_NONE84); + renderSouth(tile, pos, TEXTURE_GRASS_SIDE_OVERLAY); } } @@ -760,7 +760,7 @@ bool TileRenderer::tesselateBlockInWorld(Tile* tile, const TilePos& pos, float r if (m_bFancyGrass && texture == TEXTURE_GRASS_SIDE && this->m_fixedTexture < 0) { t.color(topR * 0.6f * fLight, topG * 0.6f * fLight, topB * 0.6f * fLight); - renderWest(tile, pos, TEXTURE_NONE84); + renderWest(tile, pos, TEXTURE_GRASS_SIDE_OVERLAY); } } @@ -779,7 +779,7 @@ bool TileRenderer::tesselateBlockInWorld(Tile* tile, const TilePos& pos, float r if (m_bFancyGrass && texture == TEXTURE_GRASS_SIDE && this->m_fixedTexture < 0) { t.color(topR * 0.6f * fLight, topG * 0.6f * fLight, topB * 0.6f * fLight); - renderEast(tile, pos, TEXTURE_NONE84); + renderEast(tile, pos, TEXTURE_GRASS_SIDE_OVERLAY); } } @@ -2965,22 +2965,22 @@ bool TileRenderer::tesselateBlockInWorldWithAmbienceOcclusionV2(Tile* tile, cons switch (dir) { case Facing::DOWN: - renderFaceUp(tile, pos, TEXTURE_NONE84); + renderFaceUp(tile, pos, TEXTURE_GRASS_SIDE_OVERLAY); break; case Facing::UP: - renderFaceDown(tile, pos, TEXTURE_NONE84); + renderFaceDown(tile, pos, TEXTURE_GRASS_SIDE_OVERLAY); break; case Facing::NORTH: - renderNorth(tile, pos, TEXTURE_NONE84); + renderNorth(tile, pos, TEXTURE_GRASS_SIDE_OVERLAY); break; case Facing::SOUTH: - renderSouth(tile, pos, TEXTURE_NONE84); + renderSouth(tile, pos, TEXTURE_GRASS_SIDE_OVERLAY); break; case Facing::WEST: - renderWest(tile, pos, TEXTURE_NONE84); + renderWest(tile, pos, TEXTURE_GRASS_SIDE_OVERLAY); break; case Facing::EAST: - renderEast(tile, pos, TEXTURE_NONE84); + renderEast(tile, pos, TEXTURE_GRASS_SIDE_OVERLAY); break; } } diff --git a/source/common/Utils.hpp b/source/common/Utils.hpp index 5bfdd89cf..b3902c2d9 100644 --- a/source/common/Utils.hpp +++ b/source/common/Utils.hpp @@ -132,7 +132,7 @@ enum eTileID TILE_STONE, TILE_GRASS, TILE_DIRT, - TILE_STONEBRICK, + TILE_COBBLESTONE, TILE_WOOD, TILE_SAPLING, TILE_BEDROCK, @@ -159,7 +159,7 @@ enum eTileID TILE_RAIL_ACTIVATOR, TILE_PISTON_STICKY, TILE_COBWEB, - TILE_TALLGRASS, + TILE_TALL_GRASS, TILE_DEAD_BUSH, TILE_PISTON, TILE_PISTON_HEAD, @@ -184,8 +184,8 @@ enum eTileID TILE_STAIRS_WOOD, TILE_CHEST, TILE_WIRE, - TILE_ORE_EMERALD, - TILE_BLOCK_EMERALD, + TILE_ORE_DIAMOND, + TILE_BLOCK_DIAMOND, TILE_WORKBENCH, TILE_WHEAT, TILE_FARMLAND, @@ -229,21 +229,6 @@ enum eTileID TILE_STONE_BRICKS, TILE_MUSHROOM1_BLOCK, TILE_MUSHROOM2_BLOCK, - TILE_CLOTH_00 = 101, // @TODO: make these save on newer worlds - TILE_CLOTH_10, - TILE_CLOTH_20, - TILE_CLOTH_30, - TILE_CLOTH_40, - TILE_CLOTH_50, - TILE_CLOTH_60, - TILE_CLOTH_70, - TILE_CLOTH_01, - TILE_CLOTH_11, - TILE_CLOTH_21, - TILE_CLOTH_31, - TILE_CLOTH_41, - TILE_CLOTH_51, - TILE_CLOTH_61, TILE_INFO_UPDATEGAME1 = 248, TILE_INFO_UPDATEGAME2 = 249, @@ -260,7 +245,7 @@ enum eTileID ITEM_BOW, ITEM_ARROW, ITEM_COAL, - ITEM_EMERALD, + ITEM_DIAMOND, ITEM_INGOT_IRON, ITEM_INGOT_GOLD, ITEM_SWORD_IRON, @@ -272,10 +257,10 @@ enum eTileID ITEM_SHOVEL_STONE, ITEM_PICKAXE_STONE, ITEM_HATCHET_STONE, - ITEM_SWORD_EMERALD, - ITEM_SHOVEL_EMERALD, - ITEM_PICKAXE_EMERALD, - ITEM_HATCHET_EMERALD, + ITEM_SWORD_DIAMOND, + ITEM_SHOVEL_DIAMOND, + ITEM_PICKAXE_DIAMOND, + ITEM_HATCHET_DIAMOND, ITEM_STICK, ITEM_BOWL, ITEM_STEW_MUSHROOM, @@ -289,7 +274,7 @@ enum eTileID ITEM_HOE_WOOD, ITEM_HOE_STONE, ITEM_HOE_IRON, - ITEM_HOE_EMERALD, + ITEM_HOE_DIAMOND, ITEM_HOE_GOLD, ITEM_SEEDS, ITEM_WHEAT, @@ -306,10 +291,10 @@ enum eTileID ITEM_CHESTPLATE_IRON, ITEM_LEGGINGS_IRON, ITEM_BOOTS_IRON, - ITEM_HELMET_EMERALD, - ITEM_CHESTPLATE_EMERALD, - ITEM_LEGGINGS_EMERALD, - ITEM_BOOTS_EMERALD, + ITEM_HELMET_DIAMOND, + ITEM_CHESTPLATE_DIAMOND, + ITEM_LEGGINGS_DIAMOND, + ITEM_BOOTS_DIAMOND, ITEM_HELMET_GOLD, ITEM_CHESTPLATE_GOLD, ITEM_LEGGINGS_GOLD, @@ -354,7 +339,9 @@ enum eTileID ITEM_BED, ITEM_DIODE, ITEM_COOKIE, - ITEM_RECORD_01, + ITEM_MAP, + ITEM_SHEARS, + ITEM_RECORD_01 = 2000, ITEM_RECORD_02, ITEM_CAMERA = 456, @@ -379,9 +366,9 @@ enum // Textures TEXTURE_COBWEB, TEXTURE_ROSE, TEXTURE_FLOWER, - TEXTURE_WATER_STATIC, + TEXTURE_PORTAL, TEXTURE_SAPLING, - TEXTURE_STONEBRICK, + TEXTURE_COBBLESTONE, TEXTURE_BEDROCK, TEXTURE_SAND, TEXTURE_GRAVEL, @@ -389,13 +376,13 @@ enum // Textures TEXTURE_LOG_TOP, TEXTURE_IRON, TEXTURE_GOLD, - TEXTURE_EMERALD, + TEXTURE_DIAMOND, TEXTURE_CHEST_ONE_TOP, TEXTURE_CHEST_ONE_SIDE, TEXTURE_CHEST_ONE_FRONT, TEXTURE_MUSHROOM_RED, TEXTURE_MUSHROOM_BROWN, - TEXTURE_NONE30, + TEXTURE_OBSIDIAN_CRYING, TEXTURE_FIRE1, TEXTURE_ORE_GOLD, TEXTURE_ORE_IRON, @@ -403,8 +390,8 @@ enum // Textures TEXTURE_BOOKSHELF, TEXTURE_MOSSY_STONE, TEXTURE_OBSIDIAN, - TEXTURE_OBSIDIAN_CRYING, // would become grass side overlay after removel - TEXTURE_NONE39, // tall grass + TEXTURE_GRASS_SIDE_OVERLAY, + TEXTURE_TALL_GRASS, TEXTURE_NONE40, TEXTURE_CHEST_TWO_FRONT_LEFT, TEXTURE_CHEST_TWO_FRONT_RIGHT, @@ -415,12 +402,12 @@ enum // Textures TEXTURE_FIRE2, TEXTURE_SPONGE, TEXTURE_GLASS, - TEXTURE_ORE_EMERALD, + TEXTURE_ORE_DIAMOND, TEXTURE_ORE_RED_STONE, TEXTURE_LEAVES_TRANSPARENT, TEXTURE_LEAVES_OPAQUE, TEXTURE_NONE54, - TEXTURE_NONE55, // dead bush + TEXTURE_DEAD_BUSH, TEXTURE_NONE56, TEXTURE_CHEST_TWO_BACK_LEFT, TEXTURE_CHEST_TWO_BACK_RIGHT, @@ -449,7 +436,7 @@ enum // Textures TEXTURE_DOOR_TOP, TEXTURE_DOOR_IRON_TOP, TEXTURE_LADDER, - TEXTURE_NONE84, + TEXTURE_TRAPDOOR, TEXTURE_NONE85, TEXTURE_FARMLAND, TEXTURE_FARMLAND_DRY, @@ -468,11 +455,11 @@ enum // Textures TEXTURE_NONE100, TEXTURE_NONE101, TEXTURE_PUMPKIN_TOP, - TEXTURE_BLOODSTONE, + TEXTURE_HELLROCK, TEXTURE_SOULSAND, TEXTURE_GLOWSTONE, - TEXTURE_NONE106, - TEXTURE_NONE107, + TEXTURE_STICKY_PISTON, + TEXTURE_PISTON, TEXTURE_NONE108, TEXTURE_NONE109, TEXTURE_NONE110, @@ -493,9 +480,13 @@ enum // Textures TEXTURE_NONE125, TEXTURE_NONE126, TEXTURE_NONE127, + TEXTURE_RAIL, TEXTURE_LAPIS = 144, TEXTURE_ORE_LAPIS = 160, + TEXTURE_POWERED_RAIL = 163, + TEXTURE_REDSTONE_DUST, + TEXTURE_DETECTOR_RAIL = 195, TEXTURE_SANDSTONE_TOP = 176, TEXTURE_SANDSTONE_SIDE = 192, @@ -507,7 +498,7 @@ enum // Textures TEXTURE_INFO_UPDATEGAME1 = 252, TEXTURE_INFO_UPDATEGAME2 = 253, - TEXTURE_LAVA_PLACEHOLDER = 255 + TEXTURE_LAVA_PLACEHOLDER = 255, }; enum eRenderShape @@ -518,14 +509,19 @@ enum eRenderShape SHAPE_TORCH, SHAPE_FIRE, SHAPE_WATER, - SHAPE_UNK5, - SHAPE_UNK6, + SHAPE_DUST, + SHAPE_CROPS, SHAPE_DOOR, SHAPE_LADDER, - SHAPE_UNK9, + SHAPE_RAIL, SHAPE_STAIRS, SHAPE_FENCE, + SHAPE_LEVER, SHAPE_CACTUS, + SHAPE_BED, + SHAPE_REPEATER, + SHAPE_PISTON, + SHAPE_PISTON_HEAD, SHAPE_RANDOM_CROSS }; diff --git a/source/world/entity/Pig.cpp b/source/world/entity/Pig.cpp index 153163f49..f50d5757e 100644 --- a/source/world/entity/Pig.cpp +++ b/source/world/entity/Pig.cpp @@ -18,9 +18,9 @@ Pig::Pig(Level* pLevel) : Animal(pLevel) int Pig::getDeathLoot() const { if (isOnFire()) - return Item::porkChop_cooked->m_itemID; + return Item::cookedPorkchop->m_itemID; else - return Item::porkChop_raw->m_itemID; + return Item::rawPorkchop->m_itemID; } void Pig::setSaddle(bool b) diff --git a/source/world/item/DoorItem.cpp b/source/world/item/DoorItem.cpp index 64d76fbe3..d447e0a54 100644 --- a/source/world/item/DoorItem.cpp +++ b/source/world/item/DoorItem.cpp @@ -23,7 +23,7 @@ bool DoorItem::useOn(ItemStack* inst, Player* player, Level* level, const TilePo if (face != Facing::UP) return false; - Tile* pTile = m_pMaterial == Material::wood ? Tile::door_wood : Tile::door_iron; + Tile* pTile = m_pMaterial == Material::wood ? Tile::doorWood : Tile::doorIron; if (!pTile->mayPlace(level, pos.above())) return false; diff --git a/source/world/item/Inventory.cpp b/source/world/item/Inventory.cpp index 01255eb04..c032c9b53 100644 --- a/source/world/item/Inventory.cpp +++ b/source/world/item/Inventory.cpp @@ -18,9 +18,9 @@ Inventory::~Inventory() void Inventory::prepareCreativeInventory() { - addCreativeItem(Tile::rock->m_ID); - addCreativeItem(Tile::stoneBrick->m_ID); - addCreativeItem(Tile::redBrick->m_ID); + addCreativeItem(Tile::stone->m_ID); + addCreativeItem(Tile::cobblestone->m_ID); + addCreativeItem(Tile::brick->m_ID); addCreativeItem(Tile::dirt->m_ID); addCreativeItem(Tile::wood->m_ID); addCreativeItem(Tile::treeTrunk->m_ID); @@ -40,17 +40,19 @@ void Inventory::prepareSurvivalInventory() addTestItem(Tile::obsidian->m_ID, 64); addTestItem(Tile::fire->m_ID, 64);*/ + // 0.2.1 items +#ifdef MOD_POCKET_SURVIVAL addCreativeItem(ITEM_SHOVEL_STONE); addCreativeItem(ITEM_PICKAXE_STONE); addCreativeItem(ITEM_HATCHET_STONE); - //addCreativeItem(ITEM_SHEARS); + addCreativeItem(ITEM_SHEARS); addCreativeItem(ITEM_SWORD_STONE); addCreativeItem(TILE_LADDER); addCreativeItem(TILE_TORCH); addCreativeItem(ITEM_DOOR_WOOD); addCreativeItem(TILE_FENCE); //addCreativeItem(TILE_FENCEGATE); - addCreativeItem(TILE_STONEBRICK); + addCreativeItem(TILE_COBBLESTONE); addCreativeItem(TILE_TREE_TRUNK, 1); addCreativeItem(TILE_TREE_TRUNK, 2); addCreativeItem(TILE_WOOD); @@ -82,7 +84,7 @@ void Inventory::prepareSurvivalInventory() { addCreativeItem(TILE_BLOCK_GOLD); addCreativeItem(TILE_BLOCK_IRON); - addCreativeItem(TILE_BLOCK_EMERALD); + addCreativeItem(TILE_BLOCK_DIAMOND); addCreativeItem(TILE_OBSIDIAN); addCreativeItem(TILE_BOOKSHELF); } @@ -98,7 +100,6 @@ void Inventory::prepareSurvivalInventory() addCreativeItem(TILE_CACTUS); addCreativeItem(ITEM_REEDS); -#ifdef MOD_POCKET_SURVIVAL for (size_t i = 0; i < m_items.size(); i++) { ItemStack& item = m_items[i]; @@ -341,7 +342,7 @@ bool Inventory::hasUnlimitedResource(const ItemStack& item) const case TILE_MUSHROOM_2: case TILE_FLOWER: case TILE_ROSE: - case TILE_STONEBRICK: + case TILE_COBBLESTONE: case TILE_OBSIDIAN: return false; diff --git a/source/world/item/Item.cpp b/source/world/item/Item.cpp index c5aa77dc1..1efee214b 100644 --- a/source/world/item/Item.cpp +++ b/source/world/item/Item.cpp @@ -15,6 +15,29 @@ #include "TileItem.hpp" #include "TilePlanterItem.hpp" #include "RocketItem.hpp" +//#include "BowlFoodItem.hpp" +//#include "SaddleItem.hpp" +//#include "BucketItem.hpp" +//#include "WeaponItem.hpp" +//#include "PickaxeItem.hpp" +//#include "AxeItem.hpp" +//#include "ShovelItem.hpp" +//#include "HoeItem.hpp" +//#include "ArmorItem.hpp" +//#include "FlintAndSteelItem.hpp" +//#include "CoalItem.hpp" +//#include "BowItem.hpp" +//#include "SeedItem.hpp" +//#include "MinecartItem.hpp" +//#include "BoatItem.hpp" +//#include "BedItem.hpp" +//#include "RecordItem.hpp" +//#include "SignItem.hpp" +//#include "EggItem.hpp" +//#include "PaintingItem.hpp" +//#include "FishingRodItem.hpp" +//#include "MapItem.hpp" +//#include "ShearsItem.hpp" #define ITEM(x) ((x) - 256) @@ -109,197 +132,212 @@ void Item::initItems() g_bInittedItems = true; - // @TODO: Add missing items Item::bow = NEW_ITEM(ITEM_BOW) ->setIcon(5, 1) ->setDescriptionId("bow"); - Item::sword_wood = NEW_ITEM(ITEM_SWORD_WOOD) + Item::woodSword = NEW_ITEM(ITEM_SWORD_WOOD) ->setIcon(0, 4) ->setDescriptionId("swordWood") ->handEquipped(); - Item::pickAxe_wood = NEW_ITEM(ITEM_PICKAXE_WOOD) + Item::woodPickaxe = NEW_ITEM(ITEM_PICKAXE_WOOD) ->setIcon(0, 6) ->setDescriptionId("pickaxeWood") ->handEquipped(); - Item::hatchet_wood = NEW_ITEM(ITEM_HATCHET_WOOD) + Item::woodAxe = NEW_ITEM(ITEM_HATCHET_WOOD) ->setIcon(0, 7) ->setDescriptionId("hatchetWood") ->handEquipped(); - Item::shovel_wood = NEW_ITEM(ITEM_SHOVEL_WOOD) + Item::woodShovel = NEW_ITEM(ITEM_SHOVEL_WOOD) ->setIcon(0, 5) ->setDescriptionId("shovelWood") ->handEquipped(); - Item::hoe_wood = NEW_ITEM(ITEM_HOE_WOOD) + Item::woodHoe = NEW_ITEM(ITEM_HOE_WOOD) ->setIcon(0, 8) ->setDescriptionId("hoeWood") ->handEquipped(); - Item::sword_stone = NEW_ITEM(ITEM_SWORD_STONE) + Item::stoneSword = NEW_ITEM(ITEM_SWORD_STONE) ->setIcon(1, 4) ->setDescriptionId("swordStone") ->handEquipped(); - Item::pickAxe_stone = NEW_ITEM(ITEM_PICKAXE_STONE) + Item::stonePickaxe = NEW_ITEM(ITEM_PICKAXE_STONE) ->setIcon(1, 6) ->setDescriptionId("pickaxeStone") ->handEquipped(); - Item::hatchet_stone = NEW_ITEM(ITEM_HATCHET_STONE) + Item::stoneAxe = NEW_ITEM(ITEM_HATCHET_STONE) ->setIcon(1, 7) ->setDescriptionId("hatchetStone") ->handEquipped(); - Item::shovel_stone = NEW_ITEM(ITEM_SHOVEL_STONE) + Item::stoneShovel = NEW_ITEM(ITEM_SHOVEL_STONE) ->setIcon(1, 5) ->setDescriptionId("shovelStone") ->handEquipped(); - Item::hoe_stone = NEW_ITEM(ITEM_HOE_STONE) + Item::stoneHoe = NEW_ITEM(ITEM_HOE_STONE) ->setIcon(1, 8) ->setDescriptionId("hoeStone") ->handEquipped(); - Item::sword_iron = NEW_ITEM(ITEM_SWORD_IRON) + Item::ironSword = NEW_ITEM(ITEM_SWORD_IRON) ->setIcon(2, 4) ->setDescriptionId("swordIron") ->handEquipped(); - Item::pickAxe_iron = NEW_ITEM(ITEM_PICKAXE_IRON) + Item::ironPickaxe = NEW_ITEM(ITEM_PICKAXE_IRON) ->setIcon(2, 6) ->setDescriptionId("pickaxeIron") ->handEquipped(); - Item::hatchet_iron = NEW_ITEM(ITEM_HATCHET_IRON) + Item::ironAxe = NEW_ITEM(ITEM_HATCHET_IRON) ->setIcon(2, 7) ->setDescriptionId("hatchetIron") ->handEquipped(); - Item::shovel_iron= NEW_ITEM(ITEM_SHOVEL_IRON) + Item::ironShovel = NEW_ITEM(ITEM_SHOVEL_IRON) ->setIcon(2, 5) ->setDescriptionId("shovelIron") ->handEquipped(); - Item::hoe_iron= NEW_ITEM(ITEM_HOE_IRON) + Item::ironHoe = NEW_ITEM(ITEM_HOE_IRON) ->setIcon(2, 8) ->setDescriptionId("hoeIron") ->handEquipped(); - Item::sword_gold = NEW_ITEM(ITEM_SWORD_GOLD) + Item::goldSword = NEW_ITEM(ITEM_SWORD_GOLD) ->setIcon(4, 4) ->setDescriptionId("swordGold") ->handEquipped(); - Item::pickAxe_gold = NEW_ITEM(ITEM_PICKAXE_GOLD) + Item::goldPickaxe = NEW_ITEM(ITEM_PICKAXE_GOLD) ->setIcon(4, 6) ->setDescriptionId("pickaxeGold") ->handEquipped(); - Item::hatchet_gold = NEW_ITEM(ITEM_HATCHET_GOLD) + Item::goldAxe = NEW_ITEM(ITEM_HATCHET_GOLD) ->setIcon(4, 7) ->setDescriptionId("hatchetGold") ->handEquipped(); - Item::shovel_gold = NEW_ITEM(ITEM_SHOVEL_GOLD) + Item::goldShovel = NEW_ITEM(ITEM_SHOVEL_GOLD) ->setIcon(4, 5) ->setDescriptionId("shovelGold") ->handEquipped(); - Item::hoe_gold = NEW_ITEM(ITEM_HOE_GOLD) + Item::goldHoe = NEW_ITEM(ITEM_HOE_GOLD) ->setIcon(4, 8) ->setDescriptionId("hoeGold") ->handEquipped(); - Item::sword_emerald = NEW_ITEM(ITEM_SWORD_EMERALD) + Item::diamondSword = NEW_ITEM(ITEM_SWORD_DIAMOND) ->setIcon(3, 4) ->setDescriptionId("swordDiamond") ->handEquipped(); - Item::pickAxe_emerald = NEW_ITEM(ITEM_PICKAXE_EMERALD) + Item::diamondPickaxe = NEW_ITEM(ITEM_PICKAXE_DIAMOND) ->setIcon(3, 6) ->setDescriptionId("pickaxeDiamond") ->handEquipped(); - Item::hatchet_emerald = NEW_ITEM(ITEM_HATCHET_EMERALD) + Item::diamondAxe = NEW_ITEM(ITEM_HATCHET_DIAMOND) ->setIcon(3, 7) ->setDescriptionId("hatchetDiamond") ->handEquipped(); - Item::shovel_emerald = NEW_ITEM(ITEM_SHOVEL_EMERALD) + Item::diamondShovel = NEW_ITEM(ITEM_SHOVEL_DIAMOND) ->setIcon(3, 5) ->setDescriptionId("shovelDiamond") ->handEquipped(); - Item::hoe_emerald = NEW_ITEM(ITEM_HOE_EMERALD) + Item::diamondHoe = NEW_ITEM(ITEM_HOE_DIAMOND) ->setIcon(3, 8) ->setDescriptionId("hoeDiamond") ->handEquipped(); - Item::helmet_cloth = NEW_ITEM(ITEM_HELMET_CLOTH) + Item::clothHelmet = NEW_ITEM(ITEM_HELMET_CLOTH) ->setIcon(0, 0) ->setDescriptionId("helmetCloth"); - Item::chestplate_cloth = NEW_ITEM(ITEM_CHESTPLATE_CLOTH) + Item::clothChestplate = NEW_ITEM(ITEM_CHESTPLATE_CLOTH) ->setIcon(0, 1) ->setDescriptionId("chestplateCloth"); - Item::leggings_cloth = NEW_ITEM(ITEM_LEGGINGS_CLOTH) + Item::clothLeggings = NEW_ITEM(ITEM_LEGGINGS_CLOTH) ->setIcon(0, 2) ->setDescriptionId("leggingsCloth"); - Item::boots_cloth = NEW_ITEM(ITEM_BOOTS_CLOTH) + Item::clothBoots = NEW_ITEM(ITEM_BOOTS_CLOTH) ->setIcon(0, 3) ->setDescriptionId("bootsCloth"); - Item::helmet_iron = NEW_ITEM(ITEM_HELMET_IRON) + Item::chainHelmet = NEW_ITEM(ITEM_HELMET_CHAIN) + ->setIcon(1, 0) + ->setDescriptionId("helmetChain"); + + Item::chainChestplate = NEW_ITEM(ITEM_CHESTPLATE_CHAIN) + ->setIcon(1, 1) + ->setDescriptionId("chestplateChain"); + + Item::chainLeggings = NEW_ITEM(ITEM_LEGGINGS_CHAIN) + ->setIcon(1, 2) + ->setDescriptionId("leggingsChain"); + + Item::chainBoots = NEW_ITEM(ITEM_BOOTS_CHAIN) + ->setIcon(1, 3) + ->setDescriptionId("bootsChain"); + + Item::ironHelmet = NEW_ITEM(ITEM_HELMET_IRON) ->setIcon(2, 0) ->setDescriptionId("helmetIron"); - Item::chestplate_iron = NEW_ITEM(ITEM_CHESTPLATE_IRON) + Item::ironChestplate = NEW_ITEM(ITEM_CHESTPLATE_IRON) ->setIcon(2, 1) ->setDescriptionId("chestplateIron"); - Item::leggings_iron = NEW_ITEM(ITEM_LEGGINGS_IRON) + Item::ironLeggings = NEW_ITEM(ITEM_LEGGINGS_IRON) ->setIcon(2, 2) ->setDescriptionId("leggingsIron"); - Item::boots_iron = NEW_ITEM(ITEM_BOOTS_IRON) + Item::ironBoots = NEW_ITEM(ITEM_BOOTS_IRON) ->setIcon(2, 3) ->setDescriptionId("bootsIron"); - Item::helmet_gold = NEW_ITEM(ITEM_HELMET_GOLD) + Item::goldHelmet = NEW_ITEM(ITEM_HELMET_GOLD) ->setIcon(4, 0) ->setDescriptionId("helmetGold"); - Item::chestplate_gold = NEW_ITEM(ITEM_CHESTPLATE_GOLD) + Item::goldChestplate = NEW_ITEM(ITEM_CHESTPLATE_GOLD) ->setIcon(4, 1) ->setDescriptionId("chestplateGold"); - Item::leggings_gold = NEW_ITEM(ITEM_LEGGINGS_GOLD) + Item::goldLeggings = NEW_ITEM(ITEM_LEGGINGS_GOLD) ->setIcon(4, 2) ->setDescriptionId("leggingsGold"); - Item::boots_gold = NEW_ITEM(ITEM_BOOTS_GOLD) + Item::goldBoots = NEW_ITEM(ITEM_BOOTS_GOLD) ->setIcon(4, 3) ->setDescriptionId("bootsGold"); - Item::helmet_diamond = NEW_ITEM(ITEM_HELMET_EMERALD) + Item::diamondHelmet = NEW_ITEM(ITEM_HELMET_DIAMOND) ->setIcon(3, 0) ->setDescriptionId("helmetDiamond"); - Item::chestplate_diamond = NEW_ITEM(ITEM_CHESTPLATE_EMERALD) + Item::diamondChestplate = NEW_ITEM(ITEM_CHESTPLATE_DIAMOND) ->setIcon(3, 1) ->setDescriptionId("chestplateDiamond"); - Item::leggings_diamond = NEW_ITEM(ITEM_LEGGINGS_EMERALD) + Item::diamondLeggings = NEW_ITEM(ITEM_LEGGINGS_DIAMOND) ->setIcon(3, 2) ->setDescriptionId("leggingsDiamond"); - Item::boots_diamond = NEW_ITEM(ITEM_BOOTS_EMERALD) + Item::diamondBoots = NEW_ITEM(ITEM_BOOTS_DIAMOND) ->setIcon(3, 3) ->setDescriptionId("bootsDiamond"); @@ -315,9 +353,9 @@ void Item::initItems() ->setIcon(7, 0) ->setDescriptionId("coal"); - Item::emerald = NEW_ITEM(ITEM_EMERALD) + Item::diamond = NEW_ITEM(ITEM_DIAMOND) ->setIcon(7, 3) - ->setDescriptionId("emerald"); + ->setDescriptionId("diamond"); Item::ironIngot = NEW_ITEM(ITEM_INGOT_IRON) ->setIcon(7, 1) @@ -372,11 +410,11 @@ void Item::initItems() ->setIcon(6, 0) ->setDescriptionId("flint"); - Item::porkChop_raw = NEW_ITEM(ITEM_PORKCHOP_RAW) + Item::rawPorkchop = NEW_ITEM(ITEM_PORKCHOP_RAW) ->setIcon(7, 5) ->setDescriptionId("porkchopRaw"); - Item::porkChop_cooked = NEW_ITEM(ITEM_PORKCHOP_COOKED) + Item::cookedPorkchop = NEW_ITEM(ITEM_PORKCHOP_COOKED) ->setIcon(8, 5) ->setDescriptionId("porkchopCooked"); @@ -384,24 +422,24 @@ void Item::initItems() ->setIcon(10, 0) ->setDescriptionId("appleGold"); - Item::apple_gold = NEW_ITEM(ITEM_APPLE_GOLD) + Item::goldApple = NEW_ITEM(ITEM_APPLE_GOLD) ->setIcon(11, 0) ->setDescriptionId("appleGold"); - Item::door_wood = NEW_X_ITEM(DoorItem, ITEM_DOOR_WOOD, Material::wood) + Item::woodDoor = NEW_X_ITEM(DoorItem, ITEM_DOOR_WOOD, Material::wood) ->setIcon(11, 2) ->setDescriptionId("doorWood"); - Item::bucket_empty = NEW_ITEM(ITEM_BUCKET) + Item::emptyBucket = NEW_ITEM(ITEM_BUCKET) ->setIcon(10, 4) ->setDescriptionId("bucket"); - Item::bucket_water = NEW_ITEM(ITEM_BUCKET_WATER) + Item::waterBucket = NEW_ITEM(ITEM_BUCKET_WATER) ->setIcon(11, 4) ->setDescriptionId("bucketWater"); //->setCraftingRemainingItem(emptyBucket); - Item::bucket_lava = NEW_ITEM(ITEM_BUCKET_LAVA) + Item::lavaBucket = NEW_ITEM(ITEM_BUCKET_LAVA) ->setIcon(12, 4) ->setDescriptionId("bucketLava"); //>setCraftingRemainingItem(emptyBucket); @@ -410,11 +448,11 @@ void Item::initItems() ->setIcon(7, 8) ->setDescriptionId("minecart"); - Item::minecart_chest = NEW_ITEM(ITEM_MINECART_CHEST) + Item::chestMinecart = NEW_ITEM(ITEM_MINECART_CHEST) ->setIcon(7, 9) ->setDescriptionId("minecartChest"); - Item::minecart_furnace = NEW_ITEM(ITEM_MINECART_FURNACE) + Item::furnaceMinecart = NEW_ITEM(ITEM_MINECART_FURNACE) ->setIcon(7, 10) ->setDescriptionId("minecartFurnace"); @@ -422,7 +460,7 @@ void Item::initItems() ->setIcon(8, 8) ->setDescriptionId("boat"); - Item::door_iron = NEW_X_ITEM(DoorItem, ITEM_DOOR_IRON, Material::metal) + Item::ironDoor = NEW_X_ITEM(DoorItem, ITEM_DOOR_IRON, Material::metal) ->setIcon(12, 2) ->setDescriptionId("doorIron"); @@ -479,7 +517,7 @@ void Item::initItems() ->setIcon(5, 4) ->setDescriptionId("fishingRod"); - Item::dye_powder = NEW_ITEM(ITEM_DYE_POWDER) + Item::dyePowder = NEW_ITEM(ITEM_DYE_POWDER) ->setIcon(14, 4) ->setDescriptionId("dyePowder"); @@ -491,11 +529,11 @@ void Item::initItems() ->setIcon(9, 4) ->setDescriptionId("yellowDust"); - Item::fish_raw = NEW_ITEM(ITEM_FISH_RAW) + Item::rawFish = NEW_ITEM(ITEM_FISH_RAW) ->setIcon(9, 5) ->setDescriptionId("fishRaw"); - Item::fish_cooked = NEW_ITEM(ITEM_FISH_COOKED) + Item::cookedFish = NEW_ITEM(ITEM_FISH_COOKED) ->setIcon(10, 5) ->setDescriptionId("fishCooked"); @@ -535,6 +573,14 @@ void Item::initItems() ->setIcon(10, 1) ->setDescriptionId("painting"); + Item::map = NEW_ITEM(ITEM_MAP) + ->setIcon(12, 3) + ->setDescriptionId("map"); + + Item::shears = NEW_ITEM(ITEM_SHEARS) + ->setIcon(13, 5) + ->setDescriptionId("shears"); + Item::record_01 = NEW_ITEM(ITEM_RECORD_01) ->setIcon(0, 15) ->setDescriptionId("record"); @@ -695,77 +741,81 @@ int Item::buildIdAux(int16_t auxValue, const CompoundTag* userData) const } Item - *Item::shovel_iron, - *Item::pickAxe_iron, - *Item::hatchet_iron, + *Item::ironShovel, + *Item::ironPickaxe, + *Item::ironAxe, *Item::flintAndSteel, *Item::apple, *Item::bow, *Item::arrow, *Item::coal, - *Item::emerald, + *Item::diamond, *Item::ironIngot, *Item::goldIngot, - *Item::sword_iron, - *Item::sword_wood, - *Item::shovel_wood, - *Item::pickAxe_wood, - *Item::hatchet_wood, - *Item::sword_stone, - *Item::shovel_stone, - *Item::pickAxe_stone, - *Item::hatchet_stone, - *Item::sword_emerald, - *Item::shovel_emerald, - *Item::pickAxe_emerald, - *Item::hatchet_emerald, + *Item::ironSword, + *Item::woodSword, + *Item::woodShovel, + *Item::woodPickaxe, + *Item::woodAxe, + *Item::stoneSword, + *Item::stoneShovel, + *Item::stonePickaxe, + *Item::stoneAxe, + *Item::diamondSword, + *Item::diamondShovel, + *Item::diamondPickaxe, + *Item::diamondAxe, *Item::stick, *Item::bowl, *Item::mushroomStew, - *Item::sword_gold, - *Item::shovel_gold, - *Item::pickAxe_gold, - *Item::hatchet_gold, + *Item::goldSword, + *Item::goldShovel, + *Item::goldPickaxe, + *Item::goldAxe, *Item::string, *Item::feather, *Item::sulphur, - *Item::hoe_wood, - *Item::hoe_stone, - *Item::hoe_iron, - *Item::hoe_emerald, - *Item::hoe_gold, + *Item::woodHoe, + *Item::stoneHoe, + *Item::ironHoe, + *Item::diamondHoe, + *Item::goldHoe, *Item::seeds, *Item::wheat, *Item::bread, - *Item::helmet_cloth, - *Item::chestplate_cloth, - *Item::leggings_cloth, - *Item::boots_cloth, - *Item::helmet_iron, - *Item::chestplate_iron, - *Item::leggings_iron, - *Item::boots_iron, - *Item::helmet_diamond, - *Item::chestplate_diamond, - *Item::leggings_diamond, - *Item::boots_diamond, - *Item::helmet_gold, - *Item::chestplate_gold, - *Item::leggings_gold, - *Item::boots_gold, + *Item::clothHelmet, + *Item::clothChestplate, + *Item::clothLeggings, + *Item::clothBoots, + *Item::chainHelmet, + *Item::chainChestplate, + *Item::chainLeggings, + *Item::chainBoots, + *Item::ironHelmet, + *Item::ironChestplate, + *Item::ironLeggings, + *Item::ironBoots, + *Item::diamondHelmet, + *Item::diamondChestplate, + *Item::diamondLeggings, + *Item::diamondBoots, + *Item::goldHelmet, + *Item::goldChestplate, + *Item::goldLeggings, + *Item::goldBoots, *Item::flint, - *Item::porkChop_raw, - *Item::porkChop_cooked, + *Item::rawPorkchop, + *Item::cookedPorkchop, *Item::painting, - *Item::apple_gold, + *Item::goldApple, *Item::sign, - *Item::door_wood, - *Item::bucket_empty, - *Item::bucket_water, - *Item::bucket_lava, + *Item::woodDoor, + *Item::emptyBucket, + *Item::waterBucket, + *Item::lavaBucket, *Item::minecart, *Item::saddle, - *Item::door_iron, + *Item::ironDoor, *Item::redStone, *Item::snowBall, *Item::boat, @@ -777,22 +827,24 @@ Item *Item::paper, *Item::book, *Item::slimeBall, - *Item::minecart_chest, - *Item::minecart_furnace, + *Item::chestMinecart, + *Item::furnaceMinecart, *Item::egg, *Item::compass, *Item::fishingRod, *Item::clock, *Item::yellowDust, - *Item::fish_raw, - *Item::fish_cooked, - *Item::dye_powder, + *Item::rawFish, + *Item::cookedFish, + *Item::dyePowder, *Item::bone, *Item::sugar, *Item::cake, *Item::bed, *Item::diode, *Item::cookie, + *Item::map, + *Item::shears, *Item::record_01, *Item::record_02, *Item::camera, @@ -803,7 +855,14 @@ Item::Tier Item::Tier::WOOD (0, 59, 2.0f, 0), Item::Tier::STONE (1, 131, 4.0f, 1), Item::Tier::IRON (2, 250, 6.0f, 2), - Item::Tier::EMERALD(3, 1561, 8.0f, 3), + Item::Tier::DIAMOND(3, 1561, 8.0f, 3), Item::Tier::GOLD (0, 32, 12.0f, 0); +/*Item::ArmorTier + Item::ArmorTier::CLOTH(0, "armor/cloth_1.png", "armor/cloth_2.png"), + Item::ArmorTier::CHAIN(1, "armor/chain_1.png", "armor/chain_2.png"), + Item::ArmorTier::IRON(2, "armor/iron_1.png", "armor/iron_2.png"), + Item::ArmorTier::DIAMOND(3, "armor/diamond_1.png", "armor/diamond_2.png"), + Item::ArmorTier::GOLD(1, "armor/gold_1.png", "armor/gold_2.png");*/ + std::string Item::ICON_DESCRIPTION_PREFIX = "item."; diff --git a/source/world/item/Item.hpp b/source/world/item/Item.hpp index 6b713cf76..082ded0c9 100644 --- a/source/world/item/Item.hpp +++ b/source/world/item/Item.hpp @@ -58,7 +58,7 @@ class Item {} // Item tiers - static Tier WOOD, STONE, IRON, EMERALD, GOLD; + static Tier WOOD, STONE, IRON, DIAMOND, GOLD; }; public: // Methods @@ -125,107 +125,113 @@ class Item // Common item definitions static Item - *shovel_iron, - *pickAxe_iron, - *hatchet_iron, - *flintAndSteel, - *apple, - *bow, - *arrow, - *coal, - *emerald, - *ironIngot, - *goldIngot, - *sword_iron, - *sword_wood, - *shovel_wood, - *pickAxe_wood, - *hatchet_wood, - *sword_stone, - *shovel_stone, - *pickAxe_stone, - *hatchet_stone, - *sword_emerald, - *shovel_emerald, - *pickAxe_emerald, - *hatchet_emerald, - *stick, - *bowl, - *mushroomStew, - *sword_gold, - *shovel_gold, - *pickAxe_gold, - *hatchet_gold, - *string, - *feather, - *sulphur, - *hoe_wood, - *hoe_stone, - *hoe_iron, - *hoe_emerald, - *hoe_gold, - *seeds, - *wheat, - *bread, - *helmet_cloth, - *chestplate_cloth, - *leggings_cloth, - *boots_cloth, - *helmet_iron, - *chestplate_iron, - *leggings_iron, - *boots_iron, - *helmet_diamond, - *chestplate_diamond, - *leggings_diamond, - *boots_diamond, - *helmet_gold, - *chestplate_gold, - *leggings_gold, - *boots_gold, - *flint, - *porkChop_raw, - *porkChop_cooked, - *painting, - *apple_gold, - *sign, - *door_wood, - *bucket_empty, - *bucket_water, - *bucket_lava, - *minecart, - *saddle, - *door_iron, - *redStone, - *snowBall, - *boat, - *leather, - *milk, - *brick, - *clay, - *reeds, - *paper, - *book, - *slimeBall, - *minecart_chest, - *minecart_furnace, - *egg, - *compass, - *fishingRod, - *clock, - *yellowDust, - *fish_raw, - *fish_cooked, - *dye_powder, - *bone, - *sugar, - *cake, - *bed, - *diode, - *cookie, - *record_01, - *record_02, - *camera, - *rocket, - *quiver; + *ironShovel, + *ironPickaxe, + *ironAxe, + *flintAndSteel, + *apple, + *bow, + *arrow, + *coal, + *diamond, + *ironIngot, + *goldIngot, + *ironSword, + *woodSword, + *woodShovel, + *woodPickaxe, + *woodAxe, + *stoneSword, + *stoneShovel, + *stonePickaxe, + *stoneAxe, + *diamondSword, + *diamondShovel, + *diamondPickaxe, + *diamondAxe, + *stick, + *bowl, + *mushroomStew, + *goldSword, + *goldShovel, + *goldPickaxe, + *goldAxe, + *string, + *feather, + *sulphur, + *woodHoe, + *stoneHoe, + *ironHoe, + *diamondHoe, + *goldHoe, + *seeds, + *wheat, + *bread, + *clothHelmet, + *clothChestplate, + *clothLeggings, + *clothBoots, + *chainHelmet, + *chainChestplate, + *chainLeggings, + *chainBoots, + *ironHelmet, + *ironChestplate, + *ironLeggings, + *ironBoots, + *diamondHelmet, + *diamondChestplate, + *diamondLeggings, + *diamondBoots, + *goldHelmet, + *goldChestplate, + *goldLeggings, + *goldBoots, + *flint, + *rawPorkchop, + *cookedPorkchop, + *painting, + *goldApple, + *sign, + *woodDoor, + *emptyBucket, + *waterBucket, + *lavaBucket, + *minecart, + *saddle, + *ironDoor, + *redStone, + *snowBall, + *boat, + *leather, + *milk, + *brick, + *clay, + *reeds, + *paper, + *book, + *slimeBall, + *chestMinecart, + *furnaceMinecart, + *egg, + *compass, + *fishingRod, + *clock, + *yellowDust, + *rawFish, + *cookedFish, + *dyePowder, + *bone, + *sugar, + *cake, + *bed, + *diode, + *cookie, + *map, + *shears, + *record_01, + *record_02, + *camera, + *rocket, + *quiver; }; diff --git a/source/world/level/levelgen/chunk/RandomLevelSource.cpp b/source/world/level/levelgen/chunk/RandomLevelSource.cpp index 1908668f1..22cd50069 100644 --- a/source/world/level/levelgen/chunk/RandomLevelSource.cpp +++ b/source/world/level/levelgen/chunk/RandomLevelSource.cpp @@ -248,7 +248,7 @@ void RandomLevelSource::prepareHeights(const ChunkPos& pos, TileID* tiles, void* tile = Tile::calmWater->m_ID; } if (v11 > 0.0f) - tile = Tile::rock->m_ID; + tile = Tile::stone->m_ID; tiles[v12] = tile; v12 += 128; @@ -295,7 +295,7 @@ void RandomLevelSource::buildSurfaces(const ChunkPos& pos, TileID* tiles, Biome* int l1 = (l * 16 + k) * 128 + k1; if (k1 <= int(0 + m_random.nextInt(5))) { - tiles[l1] = Tile::unbreakable->m_ID; + tiles[l1] = Tile::bedrock->m_ID; continue; } @@ -306,7 +306,7 @@ void RandomLevelSource::buildSurfaces(const ChunkPos& pos, TileID* tiles, Biome* continue; } - if (byte3 != Tile::rock->m_ID) + if (byte3 != Tile::stone->m_ID) continue; if (j1 == -1) @@ -314,7 +314,7 @@ void RandomLevelSource::buildSurfaces(const ChunkPos& pos, TileID* tiles, Biome* if (i1 <= 0) { byte1 = 0; - byte2 = Tile::rock->m_ID; + byte2 = Tile::stone->m_ID; } else if (k1 >= byte0 - 4 && k1 <= byte0 + 1) { @@ -427,14 +427,14 @@ void RandomLevelSource::postProcess(ChunkSource* src, const ChunkPos& pos) int xo = m_random.nextInt(16); int yo = m_random.nextInt(16); int zo = m_random.nextInt(16); - OreFeature(Tile::redStoneOre->m_ID, 7).place(m_pLevel, &m_random, TilePos(tp.x + xo, yo, tp.z + zo)); + OreFeature(Tile::redstoneOre->m_ID, 7).place(m_pLevel, &m_random, TilePos(tp.x + xo, yo, tp.z + zo)); } for (int i = 0; i < 1; i++) { int xo = m_random.nextInt(16); int yo = m_random.nextInt(16); int zo = m_random.nextInt(16); - OreFeature(Tile::emeraldOre->m_ID, 7).place(m_pLevel, &m_random, TilePos(tp.x + xo, yo, tp.z + zo)); + OreFeature(Tile::diamondOre->m_ID, 7).place(m_pLevel, &m_random, TilePos(tp.x + xo, yo, tp.z + zo)); } for (int i = 0; i < 1; i++) { diff --git a/source/world/level/levelgen/chunk/TestChunkSource.cpp b/source/world/level/levelgen/chunk/TestChunkSource.cpp index d0f5bde69..00e87871d 100644 --- a/source/world/level/levelgen/chunk/TestChunkSource.cpp +++ b/source/world/level/levelgen/chunk/TestChunkSource.cpp @@ -78,7 +78,7 @@ LevelChunk* TestChunkSource::generateChunk(const ChunkPos& pos) else if (i > 3) *p = TILE_STONE; else - *p = TILE_STONEBRICK; + *p = TILE_COBBLESTONE; // generate a hole at (128,0,128) for testing //if (i == 0 && j == 0 && k == 0 && x == 8 && z == 8) @@ -99,14 +99,14 @@ LevelChunk* TestChunkSource::generateChunk(const ChunkPos& pos) // encode this chunk's X/Z coordinate by setting bits in it pChunk->setTile(0, 65, 0, TILE_WOOD); pChunk->setTile(0, 65, 1, TILE_STONE); - pChunk->setTile(3+1, 65, 0, (x & (1 << 0)) ? TILE_STONEBRICK : TILE_BEDROCK); - pChunk->setTile(2+1, 65, 0, (x & (1 << 1)) ? TILE_STONEBRICK : TILE_BEDROCK); - pChunk->setTile(1+1, 65, 0, (x & (1 << 2)) ? TILE_STONEBRICK : TILE_BEDROCK); - pChunk->setTile(0+1, 65, 0, (x & (1 << 3)) ? TILE_STONEBRICK : TILE_BEDROCK); - pChunk->setTile(3+1, 65, 1, (z & (1 << 0)) ? TILE_STONEBRICK : TILE_BEDROCK); - pChunk->setTile(2+1, 65, 1, (z & (1 << 1)) ? TILE_STONEBRICK : TILE_BEDROCK); - pChunk->setTile(1+1, 65, 1, (z & (1 << 2)) ? TILE_STONEBRICK : TILE_BEDROCK); - pChunk->setTile(0+1, 65, 1, (z & (1 << 3)) ? TILE_STONEBRICK : TILE_BEDROCK); + pChunk->setTile(3+1, 65, 0, (x & (1 << 0)) ? TILE_COBBLESTONE : TILE_BEDROCK); + pChunk->setTile(2+1, 65, 0, (x & (1 << 1)) ? TILE_COBBLESTONE : TILE_BEDROCK); + pChunk->setTile(1+1, 65, 0, (x & (1 << 2)) ? TILE_COBBLESTONE : TILE_BEDROCK); + pChunk->setTile(0+1, 65, 0, (x & (1 << 3)) ? TILE_COBBLESTONE : TILE_BEDROCK); + pChunk->setTile(3+1, 65, 1, (z & (1 << 0)) ? TILE_COBBLESTONE : TILE_BEDROCK); + pChunk->setTile(2+1, 65, 1, (z & (1 << 1)) ? TILE_COBBLESTONE : TILE_BEDROCK); + pChunk->setTile(1+1, 65, 1, (z & (1 << 2)) ? TILE_COBBLESTONE : TILE_BEDROCK); + pChunk->setTile(0+1, 65, 1, (z & (1 << 3)) ? TILE_COBBLESTONE : TILE_BEDROCK); m_pLevel->m_bUpdateLights = bOldState; diff --git a/source/world/level/levelgen/feature/LargeCaveFeature.cpp b/source/world/level/levelgen/feature/LargeCaveFeature.cpp index ad627ba46..54b365421 100644 --- a/source/world/level/levelgen/feature/LargeCaveFeature.cpp +++ b/source/world/level/levelgen/feature/LargeCaveFeature.cpp @@ -179,7 +179,7 @@ void LargeCaveFeature::addTunnel(int x, int z, TileID* tiles, float rx, float ry TileID v34 = tiles[v37]; if (Tile::grass->m_ID == v34) v66 = 1; - if (Tile::rock->m_ID == v34 || + if (Tile::stone->m_ID == v34 || Tile::dirt->m_ID == v34 || Tile::grass->m_ID == v34) { diff --git a/source/world/level/levelgen/feature/OreFeature.cpp b/source/world/level/levelgen/feature/OreFeature.cpp index e530915e2..f843f8904 100644 --- a/source/world/level/levelgen/feature/OreFeature.cpp +++ b/source/world/level/levelgen/feature/OreFeature.cpp @@ -66,7 +66,7 @@ bool OreFeature::place(Level* level, Random* random, const TilePos& pos) if (distX * distX + distY * distY + distZ * distZ >= 1.0f) continue; - if (level->getTile(tp) == Tile::rock->m_ID) + if (level->getTile(tp) == Tile::stone->m_ID) level->setTileNoUpdate(tp, m_ID); } } diff --git a/source/world/level/levelgen/feature/SpringFeature.cpp b/source/world/level/levelgen/feature/SpringFeature.cpp index 40090e0d0..809117cfa 100644 --- a/source/world/level/levelgen/feature/SpringFeature.cpp +++ b/source/world/level/levelgen/feature/SpringFeature.cpp @@ -16,22 +16,22 @@ SpringFeature::SpringFeature(TileID id) bool SpringFeature::place(Level* level, Random* random, const TilePos& pos) { - if (level->getTile(pos.above()) != Tile::rock->m_ID) + if (level->getTile(pos.above()) != Tile::stone->m_ID) return false; - if (level->getTile(pos.below()) != Tile::rock->m_ID) + if (level->getTile(pos.below()) != Tile::stone->m_ID) return false; - if (level->getTile(pos) && level->getTile(pos) != Tile::rock->m_ID) + if (level->getTile(pos) && level->getTile(pos) != Tile::stone->m_ID) return false; int nRockTiles = 0; int nEmptyTiles = 0; - if (level->getTile(pos.west()) == Tile::rock->m_ID) nRockTiles++; - if (level->getTile(pos.east()) == Tile::rock->m_ID) nRockTiles++; - if (level->getTile(pos.north()) == Tile::rock->m_ID) nRockTiles++; - if (level->getTile(pos.south()) == Tile::rock->m_ID) nRockTiles++; + if (level->getTile(pos.west()) == Tile::stone->m_ID) nRockTiles++; + if (level->getTile(pos.east()) == Tile::stone->m_ID) nRockTiles++; + if (level->getTile(pos.north()) == Tile::stone->m_ID) nRockTiles++; + if (level->getTile(pos.south()) == Tile::stone->m_ID) nRockTiles++; if (level->isEmptyTile(pos.west())) nEmptyTiles++; if (level->isEmptyTile(pos.east())) nEmptyTiles++; diff --git a/source/world/level/path/PathFinder.cpp b/source/world/level/path/PathFinder.cpp index 1a25b4a08..63f7c90d0 100644 --- a/source/world/level/path/PathFinder.cpp +++ b/source/world/level/path/PathFinder.cpp @@ -53,9 +53,9 @@ int PathFinder::isFree(Entity* pEntity, const TilePos& pos, const Node* node) if (id <= 0) continue; - if (id == Tile::door_iron->m_ID || id == Tile::door_wood->m_ID) + if (id == Tile::doorIron->m_ID || id == Tile::doorWood->m_ID) { - if (id != Tile::door_wood->m_ID || !m_bEntityIsDoorBreaker) + if (id != Tile::doorWood->m_ID || !m_bEntityIsDoorBreaker) { if (!DoorTile::isOpen(m_pLevel->getData(tp))) return 0; // 4 on 0.2.1 diff --git a/source/world/tile/DoorTile.cpp b/source/world/tile/DoorTile.cpp index 0b8b818bb..224701fc6 100644 --- a/source/world/tile/DoorTile.cpp +++ b/source/world/tile/DoorTile.cpp @@ -99,9 +99,9 @@ int DoorTile::getResource(TileData data, Random* random) const return 0; if (m_pMaterial == Material::metal) - return Item::door_wood->m_itemID; + return Item::ironDoor->m_itemID; - return Item::door_iron->m_itemID; + return Item::woodDoor->m_itemID; } int DoorTile::getTexture(Facing::Name face, TileData data) const diff --git a/source/world/tile/LiquidTile.cpp b/source/world/tile/LiquidTile.cpp index f6314e4f8..0dae6856e 100644 --- a/source/world/tile/LiquidTile.cpp +++ b/source/world/tile/LiquidTile.cpp @@ -271,7 +271,7 @@ void LiquidTile::updateLiquid(Level* level, const TilePos& pos) } else { - newTile = Tile::stoneBrick; + newTile = Tile::cobblestone; } level->setTile(pos, newTile->m_ID); diff --git a/source/world/tile/RedStoneOreTile.cpp b/source/world/tile/RedStoneOreTile.cpp index 40f12c04e..1139e5e14 100644 --- a/source/world/tile/RedStoneOreTile.cpp +++ b/source/world/tile/RedStoneOreTile.cpp @@ -85,16 +85,16 @@ void RedStoneOreTile::animateTick(Level* level, const TilePos& pos, Random* rand void RedStoneOreTile::tick(Level* level, const TilePos& pos, Random* random) { - if (m_ID == Tile::redStoneOre_lit->m_ID) - level->setTile(pos, Tile::redStoneOre->m_ID); + if (m_ID == Tile::redstoneOre_lit->m_ID) + level->setTile(pos, Tile::redstoneOre->m_ID); } void RedStoneOreTile::interact(Level* level, const TilePos& pos) { poofParticles(level, pos); - if (m_ID == Tile::redStoneOre->m_ID) - level->setTile(pos, Tile::redStoneOre_lit->m_ID); + if (m_ID == Tile::redstoneOre->m_ID) + level->setTile(pos, Tile::redstoneOre_lit->m_ID); } void RedStoneOreTile::attack(Level* level, const TilePos& pos, Player* player) diff --git a/source/world/tile/StoneSlabTile.cpp b/source/world/tile/StoneSlabTile.cpp index ced2f2332..e03842f06 100644 --- a/source/world/tile/StoneSlabTile.cpp +++ b/source/world/tile/StoneSlabTile.cpp @@ -69,7 +69,7 @@ int StoneSlabTile::getTexture(Facing::Name face, TileData data) const case WOOD: return TEXTURE_PLANKS; case COBBLE: - return TEXTURE_STONEBRICK; + return TEXTURE_COBBLESTONE; default: return TEXTURE_STONE_SLAB_TOP; } diff --git a/source/world/tile/StoneTile.cpp b/source/world/tile/StoneTile.cpp index 4bd191290..8c3974dc8 100644 --- a/source/world/tile/StoneTile.cpp +++ b/source/world/tile/StoneTile.cpp @@ -15,5 +15,5 @@ StoneTile::StoneTile(TileID id, int b, Material* c) : Tile(id, b, c) int StoneTile::getResource(TileData data, Random* b) const { - return Tile::stoneBrick->m_ID; + return Tile::cobblestone->m_ID; } diff --git a/source/world/tile/Tile.cpp b/source/world/tile/Tile.cpp index eafaad6ad..7c603129d 100644 --- a/source/world/tile/Tile.cpp +++ b/source/world/tile/Tile.cpp @@ -13,6 +13,7 @@ #include "world/item/AuxTileItem.hpp" #include "world/item/ClothItem.hpp" #include "world/item/SlabItem.hpp" +//#include "world/item/PistonItem.hpp" // Include tile definitions here #include "SandStoneTile.hpp" @@ -276,7 +277,7 @@ int Tile::getSpawnResourcesAuxValue(int x) const void Tile::initTiles() { - Tile::rock = (new StoneTile(TILE_STONE, TEXTURE_STONE, Material::stone)) + Tile::stone = (new StoneTile(TILE_STONE, TEXTURE_STONE, Material::stone)) ->init() ->setDestroyTime(1.5f) ->setExplodeable(10.0f) @@ -295,12 +296,12 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_GRAVEL) ->setDescriptionId("dirt"); - Tile::stoneBrick = (new Tile(TILE_STONEBRICK, TEXTURE_STONEBRICK, Material::stone)) + Tile::cobblestone = (new Tile(TILE_COBBLESTONE, TEXTURE_COBBLESTONE, Material::stone)) ->init() ->setDestroyTime(2.0f) ->setExplodeable(10.0f) ->setSoundType(Tile::SOUND_STONE) - ->setDescriptionId("stonebrick"); + ->setDescriptionId("cobblestone"); Tile::wood = (new Tile(TILE_WOOD, TEXTURE_PLANKS, Material::wood)) ->init() @@ -309,7 +310,7 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_WOOD) ->setDescriptionId("wood"); - Tile::unbreakable = (new Tile(TILE_BEDROCK, TEXTURE_BEDROCK, Material::stone)) + Tile::bedrock = (new Tile(TILE_BEDROCK, TEXTURE_BEDROCK, Material::stone)) ->init() ->setDestroyTime(-1.0f) ->setExplodeable(6000000.f) @@ -473,7 +474,7 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_STONE) ->setDescriptionId("stoneSlab"); - Tile::redBrick = (new Tile(TILE_BRICKS, TEXTURE_BRICKS, Material::stone)) + Tile::brick = (new Tile(TILE_BRICKS, TEXTURE_BRICKS, Material::stone)) ->init() ->setDestroyTime(2.0f) ->setExplodeable(10.0f) @@ -513,18 +514,18 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_WOOD) ->setDescriptionId("torch"); - Tile::stairs_wood = (new StairTile(TILE_STAIRS_WOOD, Tile::wood)) + Tile::stairsWood = (new StairTile(TILE_STAIRS_WOOD, Tile::wood)) ->init() ->setDescriptionId("stairsWood"); - Tile::emeraldOre = (new OreTile(TILE_ORE_EMERALD, TEXTURE_ORE_EMERALD)) + Tile::diamondOre = (new OreTile(TILE_ORE_DIAMOND, TEXTURE_ORE_DIAMOND)) ->init() ->setDestroyTime(3.0f) ->setExplodeable(5.0f) ->setSoundType(Tile::SOUND_STONE) ->setDescriptionId("oreDiamond"); - Tile::emeraldBlock = (new MetalTile(TILE_BLOCK_EMERALD, TEXTURE_EMERALD, Material::metal)) + Tile::diamondBlock = (new MetalTile(TILE_BLOCK_DIAMOND, TEXTURE_DIAMOND, Material::metal)) ->init() ->setDestroyTime(5.0f) ->setExplodeable(10.0f) @@ -537,7 +538,7 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_GRAVEL) ->setDescriptionId("farmland"); - Tile::door_wood = (new DoorTile(TILE_DOOR_WOOD, Material::wood)) + Tile::doorWood = (new DoorTile(TILE_DOOR_WOOD, Material::wood)) ->init() ->setDestroyTime(3.0f) ->setSoundType(Tile::SOUND_WOOD) @@ -549,24 +550,24 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_WOOD) ->setDescriptionId("ladder"); - Tile::stairs_stone = (new StairTile(TILE_STAIRS_STONE, Tile::stoneBrick)) + Tile::stairsStone = (new StairTile(TILE_STAIRS_STONE, Tile::cobblestone)) ->init() ->setDescriptionId("stairsStone"); - Tile::door_iron = (new DoorTile(TILE_DOOR_IRON, Material::metal)) + Tile::doorIron = (new DoorTile(TILE_DOOR_IRON, Material::metal)) ->init() ->setDestroyTime(5.0f) ->setSoundType(Tile::SOUND_METAL) ->setDescriptionId("doorIron"); - Tile::redStoneOre = (new RedStoneOreTile(TILE_ORE_REDSTONE, TEXTURE_ORE_RED_STONE, false)) + Tile::redstoneOre = (new RedStoneOreTile(TILE_ORE_REDSTONE, TEXTURE_ORE_RED_STONE, false)) ->init() ->setDestroyTime(3.0f) ->setExplodeable(5.0f) ->setSoundType(Tile::SOUND_STONE) ->setDescriptionId("oreRedstone"); - Tile::redStoneOre_lit = (new RedStoneOreTile(TILE_ORE_REDSTONE_LIT, TEXTURE_ORE_RED_STONE, true)) + Tile::redstoneOre_lit = (new RedStoneOreTile(TILE_ORE_REDSTONE_LIT, TEXTURE_ORE_RED_STONE, true)) ->init() ->setDestroyTime(3.0f) ->setLightEmission(0.625f) @@ -689,13 +690,13 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_STONE) ->setDescriptionId("rocketLauncher"); - Tile::tallGrass = (new TallGrass(TILE_TALLGRASS, TEXTURE_NONE39)) + Tile::tallGrass = (new TallGrass(TILE_TALL_GRASS, TEXTURE_TALL_GRASS)) ->init() ->setSoundType(Tile::SOUND_GRASS) ->setDestroyTime(0.0f) ->setDescriptionId("tallGrass"); - Tile::deadBush = (new DeadBush(TILE_DEAD_BUSH, TEXTURE_NONE55)) + Tile::deadBush = (new DeadBush(TILE_DEAD_BUSH, TEXTURE_DEAD_BUSH)) ->init() ->setSoundType(Tile::SOUND_GRASS) ->setDestroyTime(0.0f) @@ -714,7 +715,7 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_WOOD) ->setDescriptionId("litpumpkin"); - Tile::netherrack = (new Tile(TILE_NETHERRACK, TEXTURE_BLOODSTONE, Material::stone)) + Tile::netherrack = (new Tile(TILE_NETHERRACK, TEXTURE_HELLROCK, Material::stone)) ->init() ->setDestroyTime(0.4f) ->setSoundType(Tile::SOUND_STONE) @@ -736,7 +737,7 @@ void Tile::initTiles() Tile::web = (new Web(TILE_COBWEB, TEXTURE_COBWEB)) ->init() ->setDestroyTime(4.0f) - //->setLightBlock(1) + ->setLightBlock(1) ->setSoundType(Tile::SOUND_CLOTH) ->setDescriptionId("web"); @@ -756,6 +757,10 @@ void Tile::initTiles() Item::items[Tile::sapling->m_ID] = (new AuxTileItem(Tile::sapling->m_ID - C_MAX_TILES)) ->setDescriptionId("sapling"); + //Item::items[Tile::piston->m_ID] = (new PistonItem(Tile::piston->m_ID - C_MAX_TILES)); + + //Item::items[Tile::stickyPiston->m_ID] = (new PistonItem(Tile::stickyPiston->m_ID - C_MAX_TILES)); + for (int i = 0; i < C_MAX_TILES; i++) { if (Tile::tiles[i] && !Item::items[i]) @@ -1155,15 +1160,15 @@ const Tile::SoundType Tile *Tile::sand, *Tile::sandStone, - *Tile::stoneBrick, - *Tile::redBrick, + *Tile::cobblestone, + *Tile::brick, *Tile::wood, *Tile::glass, *Tile::calmWater, *Tile::calmLava, *Tile::gravel, - *Tile::rock, - *Tile::unbreakable, + *Tile::stone, + *Tile::bedrock, *Tile::dirt, *Tile::grass, *Tile::ice, @@ -1182,9 +1187,9 @@ Tile *Tile::leaves, *Tile::leaves_carried, *Tile::info_reserved6, - *Tile::emeraldOre, //! actually diamond ore - *Tile::redStoneOre, - *Tile::redStoneOre_lit, + *Tile::diamondOre, + *Tile::redstoneOre, + *Tile::redstoneOre_lit, *Tile::goldOre, *Tile::ironOre, *Tile::coalOre, @@ -1200,11 +1205,11 @@ Tile *Tile::invisible_bedrock, *Tile::goldBlock, *Tile::ironBlock, - *Tile::emeraldBlock, //! actually diamond block - *Tile::stairs_wood, - *Tile::stairs_stone, - *Tile::door_wood, - *Tile::door_iron, + *Tile::diamondBlock, + *Tile::stairsWood, + *Tile::stairsStone, + *Tile::doorWood, + *Tile::doorIron, *Tile::info_updateGame1, *Tile::info_updateGame2, // custom additions here diff --git a/source/world/tile/Tile.hpp b/source/world/tile/Tile.hpp index 01690bd16..7c6a3aee8 100644 --- a/source/world/tile/Tile.hpp +++ b/source/world/tile/Tile.hpp @@ -165,15 +165,15 @@ class Tile static Tile * sand, * sandStone, - * stoneBrick, - * redBrick, + * cobblestone, + * brick, * wood, * glass, * calmWater, * calmLava, * gravel, - * rock, - * unbreakable, + * stone, + * bedrock, * dirt, * grass, * ice, @@ -192,9 +192,9 @@ class Tile * leaves, * leaves_carried, * info_reserved6, - * emeraldOre, //! actually diamond ore - * redStoneOre, - * redStoneOre_lit, + * diamondOre, + * redstoneOre, + * redstoneOre_lit, * goldOre, * ironOre, * coalOre, @@ -210,11 +210,11 @@ class Tile * invisible_bedrock, * goldBlock, * ironBlock, - * emeraldBlock, //! actually diamond block - * stairs_wood, - * stairs_stone, - * door_wood, - * door_iron, + * diamondBlock, + * stairsWood, + * stairsStone, + * doorWood, + * doorIron, * info_updateGame1, * info_updateGame2, // custom additions here From e07614630e050247691023e7d16b724bb868f609 Mon Sep 17 00:00:00 2001 From: Vimd0 Date: Thu, 29 Jan 2026 23:42:48 -0500 Subject: [PATCH 2/6] why --- source/common/Utils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/Utils.hpp b/source/common/Utils.hpp index b3902c2d9..c660541a3 100644 --- a/source/common/Utils.hpp +++ b/source/common/Utils.hpp @@ -498,7 +498,7 @@ enum // Textures TEXTURE_INFO_UPDATEGAME1 = 252, TEXTURE_INFO_UPDATEGAME2 = 253, - TEXTURE_LAVA_PLACEHOLDER = 255, + TEXTURE_LAVA_PLACEHOLDER = 255 }; enum eRenderShape From 885f46e56e33cd55e0e757473450ea54fc6b0081 Mon Sep 17 00:00:00 2001 From: Vimd0 Date: Fri, 30 Jan 2026 00:03:46 -0500 Subject: [PATCH 3/6] this will do it --- source/client/gui/components/OptionList.cpp | 10 ++-------- source/client/options/Options.cpp | 7 +------ source/client/renderer/PatchManager.cpp | 16 ---------------- source/client/renderer/PatchManager.hpp | 2 -- 4 files changed, 3 insertions(+), 32 deletions(-) diff --git a/source/client/gui/components/OptionList.cpp b/source/client/gui/components/OptionList.cpp index 2575ab845..ca0399311 100644 --- a/source/client/gui/components/OptionList.cpp +++ b/source/client/gui/components/OptionList.cpp @@ -292,7 +292,6 @@ void OptionList::initVideoMenu() { Options* pOptions = m_pMinecraft->getOptions(); int currentIndex = -1; - int idxGrass = -1, idxBiome = -1; OPTION(Distance, m_iViewDistance, "Render Distance"); OPTION(Boolean, m_bThirdPerson, "Third Person View"); @@ -301,16 +300,11 @@ void OptionList::initVideoMenu() OPTION(Boolean, m_bViewBobbing, "View Bobbing"); OPTION(Boolean, m_bAnaglyphs, "3D Anaglyph"); OPTION(Boolean, m_bBlockOutlines, "Block Outlines"); - OPTION(Render, m_bFancyGrass, "Fancy Grass"); idxGrass = currentIndex; // renders colored grass side overlay - OPTION(Render, m_bBiomeColors, "Biome Colors"); idxBiome = currentIndex; // colors the grass based on the current biome + OPTION(Render, m_bFancyGrass, "Fancy Grass"); + OPTION(Render, m_bBiomeColors, "Biome Colors"); OPTION(Boolean, m_bDontRenderGui, "Hide GUI"); OPTION(Boolean, m_bDynamicHand, "Dynamic Hand Movement"); - /*if (!GetPatchManager()->IsGrassSidesTinted()) - m_items[idxGrass]->setDisabled(true);*/ - - if (!GrassColor::isAvailable() || !FoliageColor::isAvailable()) - m_items[idxBiome]->setDisabled(true); } void OptionList::initControlsMenu() diff --git a/source/client/options/Options.cpp b/source/client/options/Options.cpp index b26977fec..9e0afc239 100644 --- a/source/client/options/Options.cpp +++ b/source/client/options/Options.cpp @@ -125,12 +125,7 @@ void Options::_load() else if (key == "gfx_blockoutlines") m_bBlockOutlines = readBool(value); else if (key == "gfx_fancygrass") - { - /*if (!(GetPatchManager()->IsGrassSidesTinted())) - m_bFancyGrass = false; - else*/ - m_bFancyGrass = readBool(value); - } + m_bFancyGrass = readBool(value); else if (key == "gfx_biomecolors") { if (!GrassColor::isAvailable() && !FoliageColor::isAvailable()) diff --git a/source/client/renderer/PatchManager.cpp b/source/client/renderer/PatchManager.cpp index f64ee4e69..9ae274b3b 100644 --- a/source/client/renderer/PatchManager.cpp +++ b/source/client/renderer/PatchManager.cpp @@ -157,16 +157,6 @@ void PatchManager::LoadPatchData(const std::string& patchData) ReadInt(lineStream, m_nMetalSideYOffset); continue; } - /*if (command == "grass_sides_tint") - { - ReadBool(lineStream, m_bGrassSidesTinted); - - if (m_bGrassSidesTinted) - // push a magic value so we can determine whether to disable it if the file doesn't exist - m_patchData.push_back(PatchData(TYPE_TERRAIN, 100, 100, "grass_side_transparent.png")); - - continue; - }*/ LOG_W("Unknown command %s from patch data.", command.c_str()); } @@ -185,15 +175,11 @@ void PatchManager::PatchTextures(TextureData& texture, ePatchType patchType) if (pd.m_type != patchType) continue; - //bool bDisableFancyGrassIfFailed = false; - // got the magic value, we can determine whether to disable fancy pants grass if the file doesn't exist if (pd.m_destX == 1600 && pd.m_destY == 1600 && pd.m_type == TYPE_TERRAIN) { pd.m_destX = 4 * 16; pd.m_destY = 5 * 16; - - //bDisableFancyGrassIfFailed = true; } // N.B. Well, in some cases, you do want things to fail nicely. @@ -201,8 +187,6 @@ void PatchManager::PatchTextures(TextureData& texture, ePatchType patchType) if (patchTex.isEmpty()) { LOG_W("Image %s was not found?! Skipping", pd.m_filename.c_str()); - /*if (bDisableFancyGrassIfFailed) - m_bGrassSidesTinted = false;*/ continue; } diff --git a/source/client/renderer/PatchManager.hpp b/source/client/renderer/PatchManager.hpp index 2449162ba..2699f1a53 100644 --- a/source/client/renderer/PatchManager.hpp +++ b/source/client/renderer/PatchManager.hpp @@ -81,7 +81,6 @@ class PatchManager bool IsGrassTinted(); int GetMetalSideYOffset(); bool IsGlassSemiTransparent(); - //bool IsGrassSidesTinted(); private: void ReadBool(std::istream& is, bool& b); @@ -91,7 +90,6 @@ class PatchManager bool m_bGrassTinted; bool m_bGlassSemiTransparent; int m_nMetalSideYOffset; - //bool m_bGrassSidesTinted; std::vector m_patchData; }; From 7d651437ed24cc4c538111337f09fed3ef0e26e7 Mon Sep 17 00:00:00 2001 From: Vimd0 Date: Fri, 30 Jan 2026 00:55:30 -0500 Subject: [PATCH 4/6] fix --- .../gui/screens/IngameBlockSelectionScreen.cpp | 4 ++-- source/common/Utils.hpp | 17 ++++++++++++++++- .../level/levelgen/chunk/RandomLevelSource.cpp | 2 +- source/world/tile/Tile.cpp | 6 +++--- source/world/tile/Tile.hpp | 2 +- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/source/client/gui/screens/IngameBlockSelectionScreen.cpp b/source/client/gui/screens/IngameBlockSelectionScreen.cpp index ee3a1c0df..45b305b32 100644 --- a/source/client/gui/screens/IngameBlockSelectionScreen.cpp +++ b/source/client/gui/screens/IngameBlockSelectionScreen.cpp @@ -30,9 +30,9 @@ IngameBlockSelectionScreen::IngameBlockSelectionScreen() : //for (int i = 0; i < 16; i++) // <-- This is an example for all wool colors in order // Original list of items. + addCreativeItem(Tile::stone->m_ID); addCreativeItem(Tile::cobblestone->m_ID); - addCreativeItem(Tile::brick->m_ID); - addCreativeItem(Tile::sandStone->m_ID); + addCreativeItem(Tile::sandstone->m_ID); addCreativeItem(Tile::wood->m_ID); addCreativeItem(Tile::treeTrunk->m_ID, 0); addCreativeItem(Tile::goldBlock->m_ID); diff --git a/source/common/Utils.hpp b/source/common/Utils.hpp index c660541a3..e33a2595f 100644 --- a/source/common/Utils.hpp +++ b/source/common/Utils.hpp @@ -229,6 +229,21 @@ enum eTileID TILE_STONE_BRICKS, TILE_MUSHROOM1_BLOCK, TILE_MUSHROOM2_BLOCK, + TILE_CLOTH_00 = 101, + TILE_CLOTH_10, + TILE_CLOTH_20, + TILE_CLOTH_30, + TILE_CLOTH_40, + TILE_CLOTH_50, + TILE_CLOTH_60, + TILE_CLOTH_70, + TILE_CLOTH_01, + TILE_CLOTH_11, + TILE_CLOTH_21, + TILE_CLOTH_31, + TILE_CLOTH_41, + TILE_CLOTH_51, + TILE_CLOTH_61, TILE_INFO_UPDATEGAME1 = 248, TILE_INFO_UPDATEGAME2 = 249, @@ -366,7 +381,7 @@ enum // Textures TEXTURE_COBWEB, TEXTURE_ROSE, TEXTURE_FLOWER, - TEXTURE_PORTAL, + TEXTURE_WATER_STATIC, TEXTURE_SAPLING, TEXTURE_COBBLESTONE, TEXTURE_BEDROCK, diff --git a/source/world/level/levelgen/chunk/RandomLevelSource.cpp b/source/world/level/levelgen/chunk/RandomLevelSource.cpp index 22cd50069..7e470619f 100644 --- a/source/world/level/levelgen/chunk/RandomLevelSource.cpp +++ b/source/world/level/levelgen/chunk/RandomLevelSource.cpp @@ -352,7 +352,7 @@ void RandomLevelSource::buildSurfaces(const ChunkPos& pos, TileID* tiles, Biome* if (j1 == 0 && byte2 == Tile::sand->m_ID) { j1 = m_random.nextInt(4); - byte2 = Tile::sandStone->m_ID; + byte2 = Tile::sandstone->m_ID; } } } diff --git a/source/world/tile/Tile.cpp b/source/world/tile/Tile.cpp index 7c603129d..e2796c565 100644 --- a/source/world/tile/Tile.cpp +++ b/source/world/tile/Tile.cpp @@ -409,11 +409,11 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_METAL) ->setDescriptionId("blockLapis"); - Tile::sandStone = (new SandStoneTile(TILE_SANDSTONE, TEXTURE_SANDSTONE_SIDE, Material::stone)) + Tile::sandstone = (new SandStoneTile(TILE_SANDSTONE, TEXTURE_SANDSTONE_SIDE, Material::stone)) ->init() ->setSoundType(Tile::SOUND_STONE) ->setDestroyTime(0.8f) - ->setDescriptionId("sandStone"); + ->setDescriptionId("sandstone"); Tile::cloth = (new ClothTile(TILE_CLOTH)) ->init() @@ -1159,7 +1159,7 @@ const Tile::SoundType // @TODO: Refactor this so that Tile::fire is already a FireTile* etc Tile *Tile::sand, - *Tile::sandStone, + *Tile::sandstone, *Tile::cobblestone, *Tile::brick, *Tile::wood, diff --git a/source/world/tile/Tile.hpp b/source/world/tile/Tile.hpp index 7c6a3aee8..1fa3f176c 100644 --- a/source/world/tile/Tile.hpp +++ b/source/world/tile/Tile.hpp @@ -164,7 +164,7 @@ class Tile // TODO static Tile * sand, - * sandStone, + * sandstone, * cobblestone, * brick, * wood, From 2cd083e64ac5f4af846ea6eb7d8f7ae3c0e9246a Mon Sep 17 00:00:00 2001 From: Vimd0 Date: Fri, 30 Jan 2026 02:45:37 -0500 Subject: [PATCH 5/6] restore old names and fix --- source/client/app/Minecraft.cpp | 2 +- source/client/gui/components/OptionList.cpp | 3 +- .../screens/IngameBlockSelectionScreen.cpp | 20 +- source/client/player/LocalPlayer.cpp | 2 +- source/client/renderer/LevelRenderer.cpp | 4 +- source/common/Utils.hpp | 34 +-- source/world/entity/Pig.cpp | 4 +- source/world/item/DoorItem.cpp | 2 +- source/world/item/Inventory.cpp | 12 +- source/world/item/Item.cpp | 248 +++++++++--------- source/world/item/Item.hpp | 220 ++++++++-------- .../levelgen/chunk/RandomLevelSource.cpp | 14 +- .../level/levelgen/chunk/TestChunkSource.cpp | 18 +- .../levelgen/feature/LargeCaveFeature.cpp | 2 +- .../level/levelgen/feature/OreFeature.cpp | 2 +- .../level/levelgen/feature/SpringFeature.cpp | 14 +- source/world/level/path/PathFinder.cpp | 4 +- source/world/tile/DoorTile.cpp | 4 +- source/world/tile/LiquidTile.cpp | 2 +- source/world/tile/RedStoneOreTile.cpp | 8 +- source/world/tile/StoneSlabTile.cpp | 2 +- source/world/tile/StoneTile.cpp | 2 +- source/world/tile/Tile.cpp | 58 ++-- source/world/tile/Tile.hpp | 26 +- 24 files changed, 350 insertions(+), 357 deletions(-) diff --git a/source/client/app/Minecraft.cpp b/source/client/app/Minecraft.cpp index 3575e5e54..46ebd3e21 100644 --- a/source/client/app/Minecraft.cpp +++ b/source/client/app/Minecraft.cpp @@ -420,7 +420,7 @@ void Minecraft::handleBuildAction(const BuildActionIntention& action) // @BUG: Hits sometimes pass through fire when done from above //if (extinguished) break; - if (pTile != Tile::bedrock || (player->field_B94 >= 100 && !m_hitResult.m_bUnk24)) + if (pTile != Tile::unbreakable || (player->field_B94 >= 100 && !m_hitResult.m_bUnk24)) { bool destroyed = false; if (action.isDestroyStart()) diff --git a/source/client/gui/components/OptionList.cpp b/source/client/gui/components/OptionList.cpp index ca0399311..8520d5ff0 100644 --- a/source/client/gui/components/OptionList.cpp +++ b/source/client/gui/components/OptionList.cpp @@ -291,7 +291,7 @@ void OptionList::initDefaultMenu() void OptionList::initVideoMenu() { Options* pOptions = m_pMinecraft->getOptions(); - int currentIndex = -1; + int currentIndex = false; OPTION(Distance, m_iViewDistance, "Render Distance"); OPTION(Boolean, m_bThirdPerson, "Third Person View"); @@ -304,7 +304,6 @@ void OptionList::initVideoMenu() OPTION(Render, m_bBiomeColors, "Biome Colors"); OPTION(Boolean, m_bDontRenderGui, "Hide GUI"); OPTION(Boolean, m_bDynamicHand, "Dynamic Hand Movement"); - } void OptionList::initControlsMenu() diff --git a/source/client/gui/screens/IngameBlockSelectionScreen.cpp b/source/client/gui/screens/IngameBlockSelectionScreen.cpp index 45b305b32..3922e89ed 100644 --- a/source/client/gui/screens/IngameBlockSelectionScreen.cpp +++ b/source/client/gui/screens/IngameBlockSelectionScreen.cpp @@ -30,15 +30,15 @@ IngameBlockSelectionScreen::IngameBlockSelectionScreen() : //for (int i = 0; i < 16; i++) // <-- This is an example for all wool colors in order // Original list of items. - addCreativeItem(Tile::stone->m_ID); - addCreativeItem(Tile::cobblestone->m_ID); - addCreativeItem(Tile::sandstone->m_ID); + addCreativeItem(Tile::rock->m_ID); + addCreativeItem(Tile::stoneBrick->m_ID); + addCreativeItem(Tile::sandStone->m_ID); addCreativeItem(Tile::wood->m_ID); addCreativeItem(Tile::treeTrunk->m_ID, 0); addCreativeItem(Tile::goldBlock->m_ID); addCreativeItem(Tile::ironBlock->m_ID); - addCreativeItem(Tile::diamondBlock->m_ID); - addCreativeItem(Tile::brick->m_ID); + addCreativeItem(Tile::emeraldBlock->m_ID); + addCreativeItem(Tile::redBrick->m_ID); addCreativeItem(Tile::leaves->m_ID, 0); addCreativeItem(Tile::cloth->m_ID, 14); addCreativeItem(Tile::cloth->m_ID, 13); @@ -53,8 +53,8 @@ IngameBlockSelectionScreen::IngameBlockSelectionScreen() : addCreativeItem(Tile::cloth->m_ID, 5); addCreativeItem(Tile::cloth->m_ID, 4); addCreativeItem(Tile::cloth->m_ID, 3); - addCreativeItem(Tile::stairsWood->m_ID); - addCreativeItem(Tile::stairsStone->m_ID); + addCreativeItem(Tile::stairs_wood->m_ID); + addCreativeItem(Tile::stairs_stone->m_ID); addCreativeItem(Tile::stoneSlabHalf->m_ID, 0); addCreativeItem(Tile::sand->m_ID); addCreativeItem(Tile::ladder->m_ID); @@ -79,7 +79,7 @@ IngameBlockSelectionScreen::IngameBlockSelectionScreen() : addCreativeItem(Tile::sapling->m_ID); addCreativeItem(Tile::cryingObsidian->m_ID); addCreativeItem(Tile::rocketLauncher->m_ID); - addCreativeItem(Tile::redstoneOre->m_ID); + addCreativeItem(Tile::redStoneOre->m_ID); // test stuff addCreativeItem(Tile::water->m_ID); @@ -88,8 +88,8 @@ IngameBlockSelectionScreen::IngameBlockSelectionScreen() : // items addCreativeItem(Item::camera->m_itemID); - addCreativeItem(Item::woodDoor->m_itemID); - addCreativeItem(Item::ironDoor->m_itemID); + addCreativeItem(Item::door_wood->m_itemID); + addCreativeItem(Item::door_iron->m_itemID); addCreativeItem(Item::rocket->m_itemID); // more stuff diff --git a/source/client/player/LocalPlayer.cpp b/source/client/player/LocalPlayer.cpp index 64722dc00..33627ab61 100644 --- a/source/client/player/LocalPlayer.cpp +++ b/source/client/player/LocalPlayer.cpp @@ -256,7 +256,7 @@ void LocalPlayer::move(const Vec3& pos) return; // are we trying to walk into stairs or a slab? - if (tileOnTop != Tile::stairsStone->m_ID && tileOnTop != Tile::stairsWood->m_ID && tileOnTop != Tile::stoneSlabHalf->m_ID && m_pMinecraft->getOptions()->m_bAutoJump) + if (tileOnTop != Tile::stairs_stone->m_ID && tileOnTop != Tile::stairs_wood->m_ID && tileOnTop != Tile::stoneSlabHalf->m_ID && m_pMinecraft->getOptions()->m_bAutoJump) // Nope, we're walking towards a full block. Trigger an auto jump. m_nAutoJumpFrames = 1; } diff --git a/source/client/renderer/LevelRenderer.cpp b/source/client/renderer/LevelRenderer.cpp index e59aa7cb8..9e51b120c 100644 --- a/source/client/renderer/LevelRenderer.cpp +++ b/source/client/renderer/LevelRenderer.cpp @@ -1275,7 +1275,7 @@ void LevelRenderer::renderCracks(const Entity& camera, const HitResult& hr, int t.setOffset(-px, -py, -pz); t.noColor(); if (!pTile) - pTile = Tile::stone; + pTile = Tile::rock; m_pTileRenderer->tesselateInWorld(pTile, hr.m_tilePos, 240 + int(m_destroyProgress * 10.0f)); @@ -1316,7 +1316,7 @@ void LevelRenderer::renderHitSelect(const Entity& camera, const HitResult& hr, i t.setOffset(-px, -py, -pz); t.noColor(); if (!pTile) - pTile = Tile::stone; + pTile = Tile::rock; m_pTileRenderer->tesselateInWorld(pTile, hr.m_tilePos); diff --git a/source/common/Utils.hpp b/source/common/Utils.hpp index e33a2595f..c994576c8 100644 --- a/source/common/Utils.hpp +++ b/source/common/Utils.hpp @@ -132,7 +132,7 @@ enum eTileID TILE_STONE, TILE_GRASS, TILE_DIRT, - TILE_COBBLESTONE, + TILE_STONEBRICK, TILE_WOOD, TILE_SAPLING, TILE_BEDROCK, @@ -184,8 +184,8 @@ enum eTileID TILE_STAIRS_WOOD, TILE_CHEST, TILE_WIRE, - TILE_ORE_DIAMOND, - TILE_BLOCK_DIAMOND, + TILE_ORE_EMERALD, + TILE_BLOCK_EMERALD, TILE_WORKBENCH, TILE_WHEAT, TILE_FARMLAND, @@ -260,7 +260,7 @@ enum eTileID ITEM_BOW, ITEM_ARROW, ITEM_COAL, - ITEM_DIAMOND, + ITEM_EMERALD, ITEM_INGOT_IRON, ITEM_INGOT_GOLD, ITEM_SWORD_IRON, @@ -272,10 +272,10 @@ enum eTileID ITEM_SHOVEL_STONE, ITEM_PICKAXE_STONE, ITEM_HATCHET_STONE, - ITEM_SWORD_DIAMOND, - ITEM_SHOVEL_DIAMOND, - ITEM_PICKAXE_DIAMOND, - ITEM_HATCHET_DIAMOND, + ITEM_SWORD_EMERALD, + ITEM_SHOVEL_EMERALD, + ITEM_PICKAXE_EMERALD, + ITEM_HATCHET_EMERALD, ITEM_STICK, ITEM_BOWL, ITEM_STEW_MUSHROOM, @@ -289,7 +289,7 @@ enum eTileID ITEM_HOE_WOOD, ITEM_HOE_STONE, ITEM_HOE_IRON, - ITEM_HOE_DIAMOND, + ITEM_HOE_EMERALD, ITEM_HOE_GOLD, ITEM_SEEDS, ITEM_WHEAT, @@ -306,10 +306,10 @@ enum eTileID ITEM_CHESTPLATE_IRON, ITEM_LEGGINGS_IRON, ITEM_BOOTS_IRON, - ITEM_HELMET_DIAMOND, - ITEM_CHESTPLATE_DIAMOND, - ITEM_LEGGINGS_DIAMOND, - ITEM_BOOTS_DIAMOND, + ITEM_HELMET_EMERALD, + ITEM_CHESTPLATE_EMERALD, + ITEM_LEGGINGS_EMERALD, + ITEM_BOOTS_EMERALD, ITEM_HELMET_GOLD, ITEM_CHESTPLATE_GOLD, ITEM_LEGGINGS_GOLD, @@ -383,7 +383,7 @@ enum // Textures TEXTURE_FLOWER, TEXTURE_WATER_STATIC, TEXTURE_SAPLING, - TEXTURE_COBBLESTONE, + TEXTURE_STONEBRICK, TEXTURE_BEDROCK, TEXTURE_SAND, TEXTURE_GRAVEL, @@ -391,7 +391,7 @@ enum // Textures TEXTURE_LOG_TOP, TEXTURE_IRON, TEXTURE_GOLD, - TEXTURE_DIAMOND, + TEXTURE_EMERALD, TEXTURE_CHEST_ONE_TOP, TEXTURE_CHEST_ONE_SIDE, TEXTURE_CHEST_ONE_FRONT, @@ -417,7 +417,7 @@ enum // Textures TEXTURE_FIRE2, TEXTURE_SPONGE, TEXTURE_GLASS, - TEXTURE_ORE_DIAMOND, + TEXTURE_ORE_EMERALD, TEXTURE_ORE_RED_STONE, TEXTURE_LEAVES_TRANSPARENT, TEXTURE_LEAVES_OPAQUE, @@ -470,7 +470,7 @@ enum // Textures TEXTURE_NONE100, TEXTURE_NONE101, TEXTURE_PUMPKIN_TOP, - TEXTURE_HELLROCK, + TEXTURE_BLOODSTONE, TEXTURE_SOULSAND, TEXTURE_GLOWSTONE, TEXTURE_STICKY_PISTON, diff --git a/source/world/entity/Pig.cpp b/source/world/entity/Pig.cpp index f50d5757e..153163f49 100644 --- a/source/world/entity/Pig.cpp +++ b/source/world/entity/Pig.cpp @@ -18,9 +18,9 @@ Pig::Pig(Level* pLevel) : Animal(pLevel) int Pig::getDeathLoot() const { if (isOnFire()) - return Item::cookedPorkchop->m_itemID; + return Item::porkChop_cooked->m_itemID; else - return Item::rawPorkchop->m_itemID; + return Item::porkChop_raw->m_itemID; } void Pig::setSaddle(bool b) diff --git a/source/world/item/DoorItem.cpp b/source/world/item/DoorItem.cpp index d447e0a54..64d76fbe3 100644 --- a/source/world/item/DoorItem.cpp +++ b/source/world/item/DoorItem.cpp @@ -23,7 +23,7 @@ bool DoorItem::useOn(ItemStack* inst, Player* player, Level* level, const TilePo if (face != Facing::UP) return false; - Tile* pTile = m_pMaterial == Material::wood ? Tile::doorWood : Tile::doorIron; + Tile* pTile = m_pMaterial == Material::wood ? Tile::door_wood : Tile::door_iron; if (!pTile->mayPlace(level, pos.above())) return false; diff --git a/source/world/item/Inventory.cpp b/source/world/item/Inventory.cpp index c032c9b53..113cdb577 100644 --- a/source/world/item/Inventory.cpp +++ b/source/world/item/Inventory.cpp @@ -18,9 +18,9 @@ Inventory::~Inventory() void Inventory::prepareCreativeInventory() { - addCreativeItem(Tile::stone->m_ID); - addCreativeItem(Tile::cobblestone->m_ID); - addCreativeItem(Tile::brick->m_ID); + addCreativeItem(Tile::rock->m_ID); + addCreativeItem(Tile::stoneBrick->m_ID); + addCreativeItem(Tile::redBrick->m_ID); addCreativeItem(Tile::dirt->m_ID); addCreativeItem(Tile::wood->m_ID); addCreativeItem(Tile::treeTrunk->m_ID); @@ -52,7 +52,7 @@ void Inventory::prepareSurvivalInventory() addCreativeItem(ITEM_DOOR_WOOD); addCreativeItem(TILE_FENCE); //addCreativeItem(TILE_FENCEGATE); - addCreativeItem(TILE_COBBLESTONE); + addCreativeItem(TILE_STONEBRICK); addCreativeItem(TILE_TREE_TRUNK, 1); addCreativeItem(TILE_TREE_TRUNK, 2); addCreativeItem(TILE_WOOD); @@ -84,7 +84,7 @@ void Inventory::prepareSurvivalInventory() { addCreativeItem(TILE_BLOCK_GOLD); addCreativeItem(TILE_BLOCK_IRON); - addCreativeItem(TILE_BLOCK_DIAMOND); + addCreativeItem(TILE_BLOCK_EMERALD); addCreativeItem(TILE_OBSIDIAN); addCreativeItem(TILE_BOOKSHELF); } @@ -342,7 +342,7 @@ bool Inventory::hasUnlimitedResource(const ItemStack& item) const case TILE_MUSHROOM_2: case TILE_FLOWER: case TILE_ROSE: - case TILE_COBBLESTONE: + case TILE_STONEBRICK: case TILE_OBSIDIAN: return false; diff --git a/source/world/item/Item.cpp b/source/world/item/Item.cpp index 1efee214b..ec292d5a7 100644 --- a/source/world/item/Item.cpp +++ b/source/world/item/Item.cpp @@ -132,212 +132,213 @@ void Item::initItems() g_bInittedItems = true; + // @TODO: Add missing items Item::bow = NEW_ITEM(ITEM_BOW) ->setIcon(5, 1) ->setDescriptionId("bow"); - Item::woodSword = NEW_ITEM(ITEM_SWORD_WOOD) + Item::sword_wood = NEW_ITEM(ITEM_SWORD_WOOD) ->setIcon(0, 4) ->setDescriptionId("swordWood") ->handEquipped(); - Item::woodPickaxe = NEW_ITEM(ITEM_PICKAXE_WOOD) + Item::pickAxe_wood = NEW_ITEM(ITEM_PICKAXE_WOOD) ->setIcon(0, 6) ->setDescriptionId("pickaxeWood") ->handEquipped(); - Item::woodAxe = NEW_ITEM(ITEM_HATCHET_WOOD) + Item::hatchet_wood = NEW_ITEM(ITEM_HATCHET_WOOD) ->setIcon(0, 7) ->setDescriptionId("hatchetWood") ->handEquipped(); - Item::woodShovel = NEW_ITEM(ITEM_SHOVEL_WOOD) + Item::shovel_wood = NEW_ITEM(ITEM_SHOVEL_WOOD) ->setIcon(0, 5) ->setDescriptionId("shovelWood") ->handEquipped(); - Item::woodHoe = NEW_ITEM(ITEM_HOE_WOOD) + Item::hoe_wood = NEW_ITEM(ITEM_HOE_WOOD) ->setIcon(0, 8) ->setDescriptionId("hoeWood") ->handEquipped(); - Item::stoneSword = NEW_ITEM(ITEM_SWORD_STONE) + Item::sword_stone = NEW_ITEM(ITEM_SWORD_STONE) ->setIcon(1, 4) ->setDescriptionId("swordStone") ->handEquipped(); - Item::stonePickaxe = NEW_ITEM(ITEM_PICKAXE_STONE) + Item::pickAxe_stone = NEW_ITEM(ITEM_PICKAXE_STONE) ->setIcon(1, 6) ->setDescriptionId("pickaxeStone") ->handEquipped(); - Item::stoneAxe = NEW_ITEM(ITEM_HATCHET_STONE) + Item::hatchet_stone = NEW_ITEM(ITEM_HATCHET_STONE) ->setIcon(1, 7) ->setDescriptionId("hatchetStone") ->handEquipped(); - Item::stoneShovel = NEW_ITEM(ITEM_SHOVEL_STONE) + Item::shovel_stone = NEW_ITEM(ITEM_SHOVEL_STONE) ->setIcon(1, 5) ->setDescriptionId("shovelStone") ->handEquipped(); - Item::stoneHoe = NEW_ITEM(ITEM_HOE_STONE) + Item::hoe_stone = NEW_ITEM(ITEM_HOE_STONE) ->setIcon(1, 8) ->setDescriptionId("hoeStone") ->handEquipped(); - Item::ironSword = NEW_ITEM(ITEM_SWORD_IRON) + Item::sword_iron = NEW_ITEM(ITEM_SWORD_IRON) ->setIcon(2, 4) ->setDescriptionId("swordIron") ->handEquipped(); - Item::ironPickaxe = NEW_ITEM(ITEM_PICKAXE_IRON) + Item::pickAxe_iron = NEW_ITEM(ITEM_PICKAXE_IRON) ->setIcon(2, 6) ->setDescriptionId("pickaxeIron") ->handEquipped(); - Item::ironAxe = NEW_ITEM(ITEM_HATCHET_IRON) + Item::hatchet_iron = NEW_ITEM(ITEM_HATCHET_IRON) ->setIcon(2, 7) ->setDescriptionId("hatchetIron") ->handEquipped(); - Item::ironShovel = NEW_ITEM(ITEM_SHOVEL_IRON) + Item::shovel_iron= NEW_ITEM(ITEM_SHOVEL_IRON) ->setIcon(2, 5) ->setDescriptionId("shovelIron") ->handEquipped(); - Item::ironHoe = NEW_ITEM(ITEM_HOE_IRON) + Item::hoe_iron= NEW_ITEM(ITEM_HOE_IRON) ->setIcon(2, 8) ->setDescriptionId("hoeIron") ->handEquipped(); - Item::goldSword = NEW_ITEM(ITEM_SWORD_GOLD) + Item::sword_gold = NEW_ITEM(ITEM_SWORD_GOLD) ->setIcon(4, 4) ->setDescriptionId("swordGold") ->handEquipped(); - Item::goldPickaxe = NEW_ITEM(ITEM_PICKAXE_GOLD) + Item::pickAxe_gold = NEW_ITEM(ITEM_PICKAXE_GOLD) ->setIcon(4, 6) ->setDescriptionId("pickaxeGold") ->handEquipped(); - Item::goldAxe = NEW_ITEM(ITEM_HATCHET_GOLD) + Item::hatchet_gold = NEW_ITEM(ITEM_HATCHET_GOLD) ->setIcon(4, 7) ->setDescriptionId("hatchetGold") ->handEquipped(); - Item::goldShovel = NEW_ITEM(ITEM_SHOVEL_GOLD) + Item::shovel_gold = NEW_ITEM(ITEM_SHOVEL_GOLD) ->setIcon(4, 5) ->setDescriptionId("shovelGold") ->handEquipped(); - Item::goldHoe = NEW_ITEM(ITEM_HOE_GOLD) + Item::hoe_gold = NEW_ITEM(ITEM_HOE_GOLD) ->setIcon(4, 8) ->setDescriptionId("hoeGold") ->handEquipped(); - Item::diamondSword = NEW_ITEM(ITEM_SWORD_DIAMOND) + Item::sword_emerald = NEW_ITEM(ITEM_SWORD_EMERALD) ->setIcon(3, 4) ->setDescriptionId("swordDiamond") ->handEquipped(); - Item::diamondPickaxe = NEW_ITEM(ITEM_PICKAXE_DIAMOND) + Item::pickAxe_emerald = NEW_ITEM(ITEM_PICKAXE_EMERALD) ->setIcon(3, 6) ->setDescriptionId("pickaxeDiamond") ->handEquipped(); - Item::diamondAxe = NEW_ITEM(ITEM_HATCHET_DIAMOND) + Item::hatchet_emerald = NEW_ITEM(ITEM_HATCHET_EMERALD) ->setIcon(3, 7) ->setDescriptionId("hatchetDiamond") ->handEquipped(); - Item::diamondShovel = NEW_ITEM(ITEM_SHOVEL_DIAMOND) + Item::shovel_emerald = NEW_ITEM(ITEM_SHOVEL_EMERALD) ->setIcon(3, 5) ->setDescriptionId("shovelDiamond") ->handEquipped(); - Item::diamondHoe = NEW_ITEM(ITEM_HOE_DIAMOND) + Item::hoe_emerald = NEW_ITEM(ITEM_HOE_EMERALD) ->setIcon(3, 8) ->setDescriptionId("hoeDiamond") ->handEquipped(); - Item::clothHelmet = NEW_ITEM(ITEM_HELMET_CLOTH) + Item::helmet_cloth = NEW_ITEM(ITEM_HELMET_CLOTH) ->setIcon(0, 0) ->setDescriptionId("helmetCloth"); - Item::clothChestplate = NEW_ITEM(ITEM_CHESTPLATE_CLOTH) + Item::chestplate_cloth = NEW_ITEM(ITEM_CHESTPLATE_CLOTH) ->setIcon(0, 1) ->setDescriptionId("chestplateCloth"); - Item::clothLeggings = NEW_ITEM(ITEM_LEGGINGS_CLOTH) + Item::leggings_cloth = NEW_ITEM(ITEM_LEGGINGS_CLOTH) ->setIcon(0, 2) ->setDescriptionId("leggingsCloth"); - Item::clothBoots = NEW_ITEM(ITEM_BOOTS_CLOTH) + Item::boots_cloth = NEW_ITEM(ITEM_BOOTS_CLOTH) ->setIcon(0, 3) ->setDescriptionId("bootsCloth"); - Item::chainHelmet = NEW_ITEM(ITEM_HELMET_CHAIN) + Item::helmet_chain = NEW_ITEM(ITEM_HELMET_CHAIN) ->setIcon(1, 0) ->setDescriptionId("helmetChain"); - Item::chainChestplate = NEW_ITEM(ITEM_CHESTPLATE_CHAIN) + Item::chestplate_chain = NEW_ITEM(ITEM_CHESTPLATE_CHAIN) ->setIcon(1, 1) ->setDescriptionId("chestplateChain"); - Item::chainLeggings = NEW_ITEM(ITEM_LEGGINGS_CHAIN) + Item::leggings_chain = NEW_ITEM(ITEM_LEGGINGS_CHAIN) ->setIcon(1, 2) ->setDescriptionId("leggingsChain"); - Item::chainBoots = NEW_ITEM(ITEM_BOOTS_CHAIN) + Item::boots_chain = NEW_ITEM(ITEM_BOOTS_CHAIN) ->setIcon(1, 3) ->setDescriptionId("bootsChain"); - Item::ironHelmet = NEW_ITEM(ITEM_HELMET_IRON) + Item::helmet_iron = NEW_ITEM(ITEM_HELMET_IRON) ->setIcon(2, 0) ->setDescriptionId("helmetIron"); - Item::ironChestplate = NEW_ITEM(ITEM_CHESTPLATE_IRON) + Item::chestplate_iron = NEW_ITEM(ITEM_CHESTPLATE_IRON) ->setIcon(2, 1) ->setDescriptionId("chestplateIron"); - Item::ironLeggings = NEW_ITEM(ITEM_LEGGINGS_IRON) + Item::leggings_iron = NEW_ITEM(ITEM_LEGGINGS_IRON) ->setIcon(2, 2) ->setDescriptionId("leggingsIron"); - Item::ironBoots = NEW_ITEM(ITEM_BOOTS_IRON) + Item::boots_iron = NEW_ITEM(ITEM_BOOTS_IRON) ->setIcon(2, 3) ->setDescriptionId("bootsIron"); - Item::goldHelmet = NEW_ITEM(ITEM_HELMET_GOLD) + Item::helmet_gold = NEW_ITEM(ITEM_HELMET_GOLD) ->setIcon(4, 0) ->setDescriptionId("helmetGold"); - Item::goldChestplate = NEW_ITEM(ITEM_CHESTPLATE_GOLD) + Item::chestplate_gold = NEW_ITEM(ITEM_CHESTPLATE_GOLD) ->setIcon(4, 1) ->setDescriptionId("chestplateGold"); - Item::goldLeggings = NEW_ITEM(ITEM_LEGGINGS_GOLD) + Item::leggings_gold = NEW_ITEM(ITEM_LEGGINGS_GOLD) ->setIcon(4, 2) ->setDescriptionId("leggingsGold"); - Item::goldBoots = NEW_ITEM(ITEM_BOOTS_GOLD) + Item::boots_gold = NEW_ITEM(ITEM_BOOTS_GOLD) ->setIcon(4, 3) ->setDescriptionId("bootsGold"); - Item::diamondHelmet = NEW_ITEM(ITEM_HELMET_DIAMOND) + Item::helmet_diamond = NEW_ITEM(ITEM_HELMET_EMERALD) ->setIcon(3, 0) ->setDescriptionId("helmetDiamond"); - Item::diamondChestplate = NEW_ITEM(ITEM_CHESTPLATE_DIAMOND) + Item::chestplate_diamond = NEW_ITEM(ITEM_CHESTPLATE_EMERALD) ->setIcon(3, 1) ->setDescriptionId("chestplateDiamond"); - Item::diamondLeggings = NEW_ITEM(ITEM_LEGGINGS_DIAMOND) + Item::leggings_diamond = NEW_ITEM(ITEM_LEGGINGS_EMERALD) ->setIcon(3, 2) ->setDescriptionId("leggingsDiamond"); - Item::diamondBoots = NEW_ITEM(ITEM_BOOTS_DIAMOND) + Item::boots_diamond = NEW_ITEM(ITEM_BOOTS_EMERALD) ->setIcon(3, 3) ->setDescriptionId("bootsDiamond"); @@ -353,9 +354,9 @@ void Item::initItems() ->setIcon(7, 0) ->setDescriptionId("coal"); - Item::diamond = NEW_ITEM(ITEM_DIAMOND) + Item::emerald = NEW_ITEM(ITEM_EMERALD) ->setIcon(7, 3) - ->setDescriptionId("diamond"); + ->setDescriptionId("emerald"); Item::ironIngot = NEW_ITEM(ITEM_INGOT_IRON) ->setIcon(7, 1) @@ -410,11 +411,11 @@ void Item::initItems() ->setIcon(6, 0) ->setDescriptionId("flint"); - Item::rawPorkchop = NEW_ITEM(ITEM_PORKCHOP_RAW) + Item::porkChop_raw = NEW_ITEM(ITEM_PORKCHOP_RAW) ->setIcon(7, 5) ->setDescriptionId("porkchopRaw"); - Item::cookedPorkchop = NEW_ITEM(ITEM_PORKCHOP_COOKED) + Item::porkChop_cooked = NEW_ITEM(ITEM_PORKCHOP_COOKED) ->setIcon(8, 5) ->setDescriptionId("porkchopCooked"); @@ -422,24 +423,24 @@ void Item::initItems() ->setIcon(10, 0) ->setDescriptionId("appleGold"); - Item::goldApple = NEW_ITEM(ITEM_APPLE_GOLD) + Item::apple_gold = NEW_ITEM(ITEM_APPLE_GOLD) ->setIcon(11, 0) ->setDescriptionId("appleGold"); - Item::woodDoor = NEW_X_ITEM(DoorItem, ITEM_DOOR_WOOD, Material::wood) + Item::door_wood = NEW_X_ITEM(DoorItem, ITEM_DOOR_WOOD, Material::wood) ->setIcon(11, 2) ->setDescriptionId("doorWood"); - Item::emptyBucket = NEW_ITEM(ITEM_BUCKET) + Item::bucket_empty = NEW_ITEM(ITEM_BUCKET) ->setIcon(10, 4) ->setDescriptionId("bucket"); - Item::waterBucket = NEW_ITEM(ITEM_BUCKET_WATER) + Item::bucket_water = NEW_ITEM(ITEM_BUCKET_WATER) ->setIcon(11, 4) ->setDescriptionId("bucketWater"); //->setCraftingRemainingItem(emptyBucket); - Item::lavaBucket = NEW_ITEM(ITEM_BUCKET_LAVA) + Item::bucket_lava = NEW_ITEM(ITEM_BUCKET_LAVA) ->setIcon(12, 4) ->setDescriptionId("bucketLava"); //>setCraftingRemainingItem(emptyBucket); @@ -448,11 +449,11 @@ void Item::initItems() ->setIcon(7, 8) ->setDescriptionId("minecart"); - Item::chestMinecart = NEW_ITEM(ITEM_MINECART_CHEST) + Item::minecart_chest = NEW_ITEM(ITEM_MINECART_CHEST) ->setIcon(7, 9) ->setDescriptionId("minecartChest"); - Item::furnaceMinecart = NEW_ITEM(ITEM_MINECART_FURNACE) + Item::minecart_furnace = NEW_ITEM(ITEM_MINECART_FURNACE) ->setIcon(7, 10) ->setDescriptionId("minecartFurnace"); @@ -460,7 +461,7 @@ void Item::initItems() ->setIcon(8, 8) ->setDescriptionId("boat"); - Item::ironDoor = NEW_X_ITEM(DoorItem, ITEM_DOOR_IRON, Material::metal) + Item::door_iron = NEW_X_ITEM(DoorItem, ITEM_DOOR_IRON, Material::metal) ->setIcon(12, 2) ->setDescriptionId("doorIron"); @@ -517,7 +518,7 @@ void Item::initItems() ->setIcon(5, 4) ->setDescriptionId("fishingRod"); - Item::dyePowder = NEW_ITEM(ITEM_DYE_POWDER) + Item::dye_powder = NEW_ITEM(ITEM_DYE_POWDER) ->setIcon(14, 4) ->setDescriptionId("dyePowder"); @@ -529,11 +530,11 @@ void Item::initItems() ->setIcon(9, 4) ->setDescriptionId("yellowDust"); - Item::rawFish = NEW_ITEM(ITEM_FISH_RAW) + Item::fish_raw = NEW_ITEM(ITEM_FISH_RAW) ->setIcon(9, 5) ->setDescriptionId("fishRaw"); - Item::cookedFish = NEW_ITEM(ITEM_FISH_COOKED) + Item::fish_cooked = NEW_ITEM(ITEM_FISH_COOKED) ->setIcon(10, 5) ->setDescriptionId("fishCooked"); @@ -741,81 +742,81 @@ int Item::buildIdAux(int16_t auxValue, const CompoundTag* userData) const } Item - *Item::ironShovel, - *Item::ironPickaxe, - *Item::ironAxe, + *Item::shovel_iron, + *Item::pickAxe_iron, + *Item::hatchet_iron, *Item::flintAndSteel, *Item::apple, *Item::bow, *Item::arrow, *Item::coal, - *Item::diamond, + *Item::emerald, *Item::ironIngot, *Item::goldIngot, - *Item::ironSword, - *Item::woodSword, - *Item::woodShovel, - *Item::woodPickaxe, - *Item::woodAxe, - *Item::stoneSword, - *Item::stoneShovel, - *Item::stonePickaxe, - *Item::stoneAxe, - *Item::diamondSword, - *Item::diamondShovel, - *Item::diamondPickaxe, - *Item::diamondAxe, + *Item::sword_iron, + *Item::sword_wood, + *Item::shovel_wood, + *Item::pickAxe_wood, + *Item::hatchet_wood, + *Item::sword_stone, + *Item::shovel_stone, + *Item::pickAxe_stone, + *Item::hatchet_stone, + *Item::sword_emerald, + *Item::shovel_emerald, + *Item::pickAxe_emerald, + *Item::hatchet_emerald, *Item::stick, *Item::bowl, *Item::mushroomStew, - *Item::goldSword, - *Item::goldShovel, - *Item::goldPickaxe, - *Item::goldAxe, + *Item::sword_gold, + *Item::shovel_gold, + *Item::pickAxe_gold, + *Item::hatchet_gold, *Item::string, *Item::feather, *Item::sulphur, - *Item::woodHoe, - *Item::stoneHoe, - *Item::ironHoe, - *Item::diamondHoe, - *Item::goldHoe, + *Item::hoe_wood, + *Item::hoe_stone, + *Item::hoe_iron, + *Item::hoe_emerald, + *Item::hoe_gold, *Item::seeds, *Item::wheat, *Item::bread, - *Item::clothHelmet, - *Item::clothChestplate, - *Item::clothLeggings, - *Item::clothBoots, - *Item::chainHelmet, - *Item::chainChestplate, - *Item::chainLeggings, - *Item::chainBoots, - *Item::ironHelmet, - *Item::ironChestplate, - *Item::ironLeggings, - *Item::ironBoots, - *Item::diamondHelmet, - *Item::diamondChestplate, - *Item::diamondLeggings, - *Item::diamondBoots, - *Item::goldHelmet, - *Item::goldChestplate, - *Item::goldLeggings, - *Item::goldBoots, + *Item::helmet_cloth, + *Item::chestplate_cloth, + *Item::leggings_cloth, + *Item::boots_cloth, + *Item::helmet_chain, + *Item::chestplate_chain, + *Item::leggings_chain, + *Item::boots_chain, + *Item::helmet_iron, + *Item::chestplate_iron, + *Item::leggings_iron, + *Item::boots_iron, + *Item::helmet_diamond, + *Item::chestplate_diamond, + *Item::leggings_diamond, + *Item::boots_diamond, + *Item::helmet_gold, + *Item::chestplate_gold, + *Item::leggings_gold, + *Item::boots_gold, *Item::flint, - *Item::rawPorkchop, - *Item::cookedPorkchop, + *Item::porkChop_raw, + *Item::porkChop_cooked, *Item::painting, - *Item::goldApple, + *Item::apple_gold, *Item::sign, - *Item::woodDoor, - *Item::emptyBucket, - *Item::waterBucket, - *Item::lavaBucket, + *Item::door_wood, + *Item::bucket_empty, + *Item::bucket_water, + *Item::bucket_lava, *Item::minecart, *Item::saddle, - *Item::ironDoor, + *Item::door_iron, *Item::redStone, *Item::snowBall, *Item::boat, @@ -827,16 +828,16 @@ Item *Item::paper, *Item::book, *Item::slimeBall, - *Item::chestMinecart, - *Item::furnaceMinecart, + *Item::minecart_chest, + *Item::minecart_furnace, *Item::egg, *Item::compass, *Item::fishingRod, *Item::clock, *Item::yellowDust, - *Item::rawFish, - *Item::cookedFish, - *Item::dyePowder, + *Item::fish_raw, + *Item::fish_cooked, + *Item::dye_powder, *Item::bone, *Item::sugar, *Item::cake, @@ -855,14 +856,7 @@ Item::Tier Item::Tier::WOOD (0, 59, 2.0f, 0), Item::Tier::STONE (1, 131, 4.0f, 1), Item::Tier::IRON (2, 250, 6.0f, 2), - Item::Tier::DIAMOND(3, 1561, 8.0f, 3), + Item::Tier::EMERALD(3, 1561, 8.0f, 3), Item::Tier::GOLD (0, 32, 12.0f, 0); -/*Item::ArmorTier - Item::ArmorTier::CLOTH(0, "armor/cloth_1.png", "armor/cloth_2.png"), - Item::ArmorTier::CHAIN(1, "armor/chain_1.png", "armor/chain_2.png"), - Item::ArmorTier::IRON(2, "armor/iron_1.png", "armor/iron_2.png"), - Item::ArmorTier::DIAMOND(3, "armor/diamond_1.png", "armor/diamond_2.png"), - Item::ArmorTier::GOLD(1, "armor/gold_1.png", "armor/gold_2.png");*/ - std::string Item::ICON_DESCRIPTION_PREFIX = "item."; diff --git a/source/world/item/Item.hpp b/source/world/item/Item.hpp index 082ded0c9..c89760569 100644 --- a/source/world/item/Item.hpp +++ b/source/world/item/Item.hpp @@ -58,7 +58,7 @@ class Item {} // Item tiers - static Tier WOOD, STONE, IRON, DIAMOND, GOLD; + static Tier WOOD, STONE, IRON, EMERALD, GOLD; }; public: // Methods @@ -125,113 +125,113 @@ class Item // Common item definitions static Item - *ironShovel, - *ironPickaxe, - *ironAxe, - *flintAndSteel, - *apple, - *bow, - *arrow, - *coal, - *diamond, - *ironIngot, - *goldIngot, - *ironSword, - *woodSword, - *woodShovel, - *woodPickaxe, - *woodAxe, - *stoneSword, - *stoneShovel, - *stonePickaxe, - *stoneAxe, - *diamondSword, - *diamondShovel, - *diamondPickaxe, - *diamondAxe, - *stick, - *bowl, - *mushroomStew, - *goldSword, - *goldShovel, - *goldPickaxe, - *goldAxe, - *string, - *feather, - *sulphur, - *woodHoe, - *stoneHoe, - *ironHoe, - *diamondHoe, - *goldHoe, - *seeds, - *wheat, - *bread, - *clothHelmet, - *clothChestplate, - *clothLeggings, - *clothBoots, - *chainHelmet, - *chainChestplate, - *chainLeggings, - *chainBoots, - *ironHelmet, - *ironChestplate, - *ironLeggings, - *ironBoots, - *diamondHelmet, - *diamondChestplate, - *diamondLeggings, - *diamondBoots, - *goldHelmet, - *goldChestplate, - *goldLeggings, - *goldBoots, - *flint, - *rawPorkchop, - *cookedPorkchop, - *painting, - *goldApple, - *sign, - *woodDoor, - *emptyBucket, - *waterBucket, - *lavaBucket, - *minecart, - *saddle, - *ironDoor, - *redStone, - *snowBall, - *boat, - *leather, - *milk, - *brick, - *clay, - *reeds, - *paper, - *book, - *slimeBall, - *chestMinecart, - *furnaceMinecart, - *egg, - *compass, - *fishingRod, - *clock, - *yellowDust, - *rawFish, - *cookedFish, - *dyePowder, - *bone, - *sugar, - *cake, - *bed, - *diode, - *cookie, - *map, - *shears, - *record_01, - *record_02, - *camera, - *rocket, - *quiver; + *shovel_iron, + *pickAxe_iron, + *hatchet_iron, + *flintAndSteel, + *apple, + *bow, + *arrow, + *coal, + *emerald, + *ironIngot, + *goldIngot, + *sword_iron, + *sword_wood, + *shovel_wood, + *pickAxe_wood, + *hatchet_wood, + *sword_stone, + *shovel_stone, + *pickAxe_stone, + *hatchet_stone, + *sword_emerald, + *shovel_emerald, + *pickAxe_emerald, + *hatchet_emerald, + *stick, + *bowl, + *mushroomStew, + *sword_gold, + *shovel_gold, + *pickAxe_gold, + *hatchet_gold, + *string, + *feather, + *sulphur, + *hoe_wood, + *hoe_stone, + *hoe_iron, + *hoe_emerald, + *hoe_gold, + *seeds, + *wheat, + *bread, + *helmet_cloth, + *chestplate_cloth, + *leggings_cloth, + *boots_cloth, + *helmet_chain, + *chestplate_chain, + *leggings_chain, + *boots_chain, + *helmet_iron, + *chestplate_iron, + *leggings_iron, + *boots_iron, + *helmet_diamond, + *chestplate_diamond, + *leggings_diamond, + *boots_diamond, + *helmet_gold, + *chestplate_gold, + *leggings_gold, + *boots_gold, + *flint, + *porkChop_raw, + *porkChop_cooked, + *painting, + *apple_gold, + *sign, + *door_wood, + *bucket_empty, + *bucket_water, + *bucket_lava, + *minecart, + *saddle, + *door_iron, + *redStone, + *snowBall, + *boat, + *leather, + *milk, + *brick, + *clay, + *reeds, + *paper, + *book, + *slimeBall, + *minecart_chest, + *minecart_furnace, + *egg, + *compass, + *fishingRod, + *clock, + *yellowDust, + *fish_raw, + *fish_cooked, + *dye_powder, + *bone, + *sugar, + *cake, + *bed, + *diode, + *cookie, + *map, + *shears, + *record_01, + *record_02, + *camera, + *rocket, + *quiver; }; diff --git a/source/world/level/levelgen/chunk/RandomLevelSource.cpp b/source/world/level/levelgen/chunk/RandomLevelSource.cpp index 7e470619f..1908668f1 100644 --- a/source/world/level/levelgen/chunk/RandomLevelSource.cpp +++ b/source/world/level/levelgen/chunk/RandomLevelSource.cpp @@ -248,7 +248,7 @@ void RandomLevelSource::prepareHeights(const ChunkPos& pos, TileID* tiles, void* tile = Tile::calmWater->m_ID; } if (v11 > 0.0f) - tile = Tile::stone->m_ID; + tile = Tile::rock->m_ID; tiles[v12] = tile; v12 += 128; @@ -295,7 +295,7 @@ void RandomLevelSource::buildSurfaces(const ChunkPos& pos, TileID* tiles, Biome* int l1 = (l * 16 + k) * 128 + k1; if (k1 <= int(0 + m_random.nextInt(5))) { - tiles[l1] = Tile::bedrock->m_ID; + tiles[l1] = Tile::unbreakable->m_ID; continue; } @@ -306,7 +306,7 @@ void RandomLevelSource::buildSurfaces(const ChunkPos& pos, TileID* tiles, Biome* continue; } - if (byte3 != Tile::stone->m_ID) + if (byte3 != Tile::rock->m_ID) continue; if (j1 == -1) @@ -314,7 +314,7 @@ void RandomLevelSource::buildSurfaces(const ChunkPos& pos, TileID* tiles, Biome* if (i1 <= 0) { byte1 = 0; - byte2 = Tile::stone->m_ID; + byte2 = Tile::rock->m_ID; } else if (k1 >= byte0 - 4 && k1 <= byte0 + 1) { @@ -352,7 +352,7 @@ void RandomLevelSource::buildSurfaces(const ChunkPos& pos, TileID* tiles, Biome* if (j1 == 0 && byte2 == Tile::sand->m_ID) { j1 = m_random.nextInt(4); - byte2 = Tile::sandstone->m_ID; + byte2 = Tile::sandStone->m_ID; } } } @@ -427,14 +427,14 @@ void RandomLevelSource::postProcess(ChunkSource* src, const ChunkPos& pos) int xo = m_random.nextInt(16); int yo = m_random.nextInt(16); int zo = m_random.nextInt(16); - OreFeature(Tile::redstoneOre->m_ID, 7).place(m_pLevel, &m_random, TilePos(tp.x + xo, yo, tp.z + zo)); + OreFeature(Tile::redStoneOre->m_ID, 7).place(m_pLevel, &m_random, TilePos(tp.x + xo, yo, tp.z + zo)); } for (int i = 0; i < 1; i++) { int xo = m_random.nextInt(16); int yo = m_random.nextInt(16); int zo = m_random.nextInt(16); - OreFeature(Tile::diamondOre->m_ID, 7).place(m_pLevel, &m_random, TilePos(tp.x + xo, yo, tp.z + zo)); + OreFeature(Tile::emeraldOre->m_ID, 7).place(m_pLevel, &m_random, TilePos(tp.x + xo, yo, tp.z + zo)); } for (int i = 0; i < 1; i++) { diff --git a/source/world/level/levelgen/chunk/TestChunkSource.cpp b/source/world/level/levelgen/chunk/TestChunkSource.cpp index 00e87871d..d0f5bde69 100644 --- a/source/world/level/levelgen/chunk/TestChunkSource.cpp +++ b/source/world/level/levelgen/chunk/TestChunkSource.cpp @@ -78,7 +78,7 @@ LevelChunk* TestChunkSource::generateChunk(const ChunkPos& pos) else if (i > 3) *p = TILE_STONE; else - *p = TILE_COBBLESTONE; + *p = TILE_STONEBRICK; // generate a hole at (128,0,128) for testing //if (i == 0 && j == 0 && k == 0 && x == 8 && z == 8) @@ -99,14 +99,14 @@ LevelChunk* TestChunkSource::generateChunk(const ChunkPos& pos) // encode this chunk's X/Z coordinate by setting bits in it pChunk->setTile(0, 65, 0, TILE_WOOD); pChunk->setTile(0, 65, 1, TILE_STONE); - pChunk->setTile(3+1, 65, 0, (x & (1 << 0)) ? TILE_COBBLESTONE : TILE_BEDROCK); - pChunk->setTile(2+1, 65, 0, (x & (1 << 1)) ? TILE_COBBLESTONE : TILE_BEDROCK); - pChunk->setTile(1+1, 65, 0, (x & (1 << 2)) ? TILE_COBBLESTONE : TILE_BEDROCK); - pChunk->setTile(0+1, 65, 0, (x & (1 << 3)) ? TILE_COBBLESTONE : TILE_BEDROCK); - pChunk->setTile(3+1, 65, 1, (z & (1 << 0)) ? TILE_COBBLESTONE : TILE_BEDROCK); - pChunk->setTile(2+1, 65, 1, (z & (1 << 1)) ? TILE_COBBLESTONE : TILE_BEDROCK); - pChunk->setTile(1+1, 65, 1, (z & (1 << 2)) ? TILE_COBBLESTONE : TILE_BEDROCK); - pChunk->setTile(0+1, 65, 1, (z & (1 << 3)) ? TILE_COBBLESTONE : TILE_BEDROCK); + pChunk->setTile(3+1, 65, 0, (x & (1 << 0)) ? TILE_STONEBRICK : TILE_BEDROCK); + pChunk->setTile(2+1, 65, 0, (x & (1 << 1)) ? TILE_STONEBRICK : TILE_BEDROCK); + pChunk->setTile(1+1, 65, 0, (x & (1 << 2)) ? TILE_STONEBRICK : TILE_BEDROCK); + pChunk->setTile(0+1, 65, 0, (x & (1 << 3)) ? TILE_STONEBRICK : TILE_BEDROCK); + pChunk->setTile(3+1, 65, 1, (z & (1 << 0)) ? TILE_STONEBRICK : TILE_BEDROCK); + pChunk->setTile(2+1, 65, 1, (z & (1 << 1)) ? TILE_STONEBRICK : TILE_BEDROCK); + pChunk->setTile(1+1, 65, 1, (z & (1 << 2)) ? TILE_STONEBRICK : TILE_BEDROCK); + pChunk->setTile(0+1, 65, 1, (z & (1 << 3)) ? TILE_STONEBRICK : TILE_BEDROCK); m_pLevel->m_bUpdateLights = bOldState; diff --git a/source/world/level/levelgen/feature/LargeCaveFeature.cpp b/source/world/level/levelgen/feature/LargeCaveFeature.cpp index 54b365421..ad627ba46 100644 --- a/source/world/level/levelgen/feature/LargeCaveFeature.cpp +++ b/source/world/level/levelgen/feature/LargeCaveFeature.cpp @@ -179,7 +179,7 @@ void LargeCaveFeature::addTunnel(int x, int z, TileID* tiles, float rx, float ry TileID v34 = tiles[v37]; if (Tile::grass->m_ID == v34) v66 = 1; - if (Tile::stone->m_ID == v34 || + if (Tile::rock->m_ID == v34 || Tile::dirt->m_ID == v34 || Tile::grass->m_ID == v34) { diff --git a/source/world/level/levelgen/feature/OreFeature.cpp b/source/world/level/levelgen/feature/OreFeature.cpp index f843f8904..e530915e2 100644 --- a/source/world/level/levelgen/feature/OreFeature.cpp +++ b/source/world/level/levelgen/feature/OreFeature.cpp @@ -66,7 +66,7 @@ bool OreFeature::place(Level* level, Random* random, const TilePos& pos) if (distX * distX + distY * distY + distZ * distZ >= 1.0f) continue; - if (level->getTile(tp) == Tile::stone->m_ID) + if (level->getTile(tp) == Tile::rock->m_ID) level->setTileNoUpdate(tp, m_ID); } } diff --git a/source/world/level/levelgen/feature/SpringFeature.cpp b/source/world/level/levelgen/feature/SpringFeature.cpp index 809117cfa..40090e0d0 100644 --- a/source/world/level/levelgen/feature/SpringFeature.cpp +++ b/source/world/level/levelgen/feature/SpringFeature.cpp @@ -16,22 +16,22 @@ SpringFeature::SpringFeature(TileID id) bool SpringFeature::place(Level* level, Random* random, const TilePos& pos) { - if (level->getTile(pos.above()) != Tile::stone->m_ID) + if (level->getTile(pos.above()) != Tile::rock->m_ID) return false; - if (level->getTile(pos.below()) != Tile::stone->m_ID) + if (level->getTile(pos.below()) != Tile::rock->m_ID) return false; - if (level->getTile(pos) && level->getTile(pos) != Tile::stone->m_ID) + if (level->getTile(pos) && level->getTile(pos) != Tile::rock->m_ID) return false; int nRockTiles = 0; int nEmptyTiles = 0; - if (level->getTile(pos.west()) == Tile::stone->m_ID) nRockTiles++; - if (level->getTile(pos.east()) == Tile::stone->m_ID) nRockTiles++; - if (level->getTile(pos.north()) == Tile::stone->m_ID) nRockTiles++; - if (level->getTile(pos.south()) == Tile::stone->m_ID) nRockTiles++; + if (level->getTile(pos.west()) == Tile::rock->m_ID) nRockTiles++; + if (level->getTile(pos.east()) == Tile::rock->m_ID) nRockTiles++; + if (level->getTile(pos.north()) == Tile::rock->m_ID) nRockTiles++; + if (level->getTile(pos.south()) == Tile::rock->m_ID) nRockTiles++; if (level->isEmptyTile(pos.west())) nEmptyTiles++; if (level->isEmptyTile(pos.east())) nEmptyTiles++; diff --git a/source/world/level/path/PathFinder.cpp b/source/world/level/path/PathFinder.cpp index 63f7c90d0..1a25b4a08 100644 --- a/source/world/level/path/PathFinder.cpp +++ b/source/world/level/path/PathFinder.cpp @@ -53,9 +53,9 @@ int PathFinder::isFree(Entity* pEntity, const TilePos& pos, const Node* node) if (id <= 0) continue; - if (id == Tile::doorIron->m_ID || id == Tile::doorWood->m_ID) + if (id == Tile::door_iron->m_ID || id == Tile::door_wood->m_ID) { - if (id != Tile::doorWood->m_ID || !m_bEntityIsDoorBreaker) + if (id != Tile::door_wood->m_ID || !m_bEntityIsDoorBreaker) { if (!DoorTile::isOpen(m_pLevel->getData(tp))) return 0; // 4 on 0.2.1 diff --git a/source/world/tile/DoorTile.cpp b/source/world/tile/DoorTile.cpp index 224701fc6..428c03d67 100644 --- a/source/world/tile/DoorTile.cpp +++ b/source/world/tile/DoorTile.cpp @@ -99,9 +99,9 @@ int DoorTile::getResource(TileData data, Random* random) const return 0; if (m_pMaterial == Material::metal) - return Item::ironDoor->m_itemID; + return Item::door_iron->m_itemID; - return Item::woodDoor->m_itemID; + return Item::door_wood->m_itemID; } int DoorTile::getTexture(Facing::Name face, TileData data) const diff --git a/source/world/tile/LiquidTile.cpp b/source/world/tile/LiquidTile.cpp index 0dae6856e..f6314e4f8 100644 --- a/source/world/tile/LiquidTile.cpp +++ b/source/world/tile/LiquidTile.cpp @@ -271,7 +271,7 @@ void LiquidTile::updateLiquid(Level* level, const TilePos& pos) } else { - newTile = Tile::cobblestone; + newTile = Tile::stoneBrick; } level->setTile(pos, newTile->m_ID); diff --git a/source/world/tile/RedStoneOreTile.cpp b/source/world/tile/RedStoneOreTile.cpp index 1139e5e14..40f12c04e 100644 --- a/source/world/tile/RedStoneOreTile.cpp +++ b/source/world/tile/RedStoneOreTile.cpp @@ -85,16 +85,16 @@ void RedStoneOreTile::animateTick(Level* level, const TilePos& pos, Random* rand void RedStoneOreTile::tick(Level* level, const TilePos& pos, Random* random) { - if (m_ID == Tile::redstoneOre_lit->m_ID) - level->setTile(pos, Tile::redstoneOre->m_ID); + if (m_ID == Tile::redStoneOre_lit->m_ID) + level->setTile(pos, Tile::redStoneOre->m_ID); } void RedStoneOreTile::interact(Level* level, const TilePos& pos) { poofParticles(level, pos); - if (m_ID == Tile::redstoneOre->m_ID) - level->setTile(pos, Tile::redstoneOre_lit->m_ID); + if (m_ID == Tile::redStoneOre->m_ID) + level->setTile(pos, Tile::redStoneOre_lit->m_ID); } void RedStoneOreTile::attack(Level* level, const TilePos& pos, Player* player) diff --git a/source/world/tile/StoneSlabTile.cpp b/source/world/tile/StoneSlabTile.cpp index e03842f06..ced2f2332 100644 --- a/source/world/tile/StoneSlabTile.cpp +++ b/source/world/tile/StoneSlabTile.cpp @@ -69,7 +69,7 @@ int StoneSlabTile::getTexture(Facing::Name face, TileData data) const case WOOD: return TEXTURE_PLANKS; case COBBLE: - return TEXTURE_COBBLESTONE; + return TEXTURE_STONEBRICK; default: return TEXTURE_STONE_SLAB_TOP; } diff --git a/source/world/tile/StoneTile.cpp b/source/world/tile/StoneTile.cpp index 8c3974dc8..4bd191290 100644 --- a/source/world/tile/StoneTile.cpp +++ b/source/world/tile/StoneTile.cpp @@ -15,5 +15,5 @@ StoneTile::StoneTile(TileID id, int b, Material* c) : Tile(id, b, c) int StoneTile::getResource(TileData data, Random* b) const { - return Tile::cobblestone->m_ID; + return Tile::stoneBrick->m_ID; } diff --git a/source/world/tile/Tile.cpp b/source/world/tile/Tile.cpp index e2796c565..49d32b539 100644 --- a/source/world/tile/Tile.cpp +++ b/source/world/tile/Tile.cpp @@ -277,7 +277,7 @@ int Tile::getSpawnResourcesAuxValue(int x) const void Tile::initTiles() { - Tile::stone = (new StoneTile(TILE_STONE, TEXTURE_STONE, Material::stone)) + Tile::rock = (new StoneTile(TILE_STONE, TEXTURE_STONE, Material::stone)) ->init() ->setDestroyTime(1.5f) ->setExplodeable(10.0f) @@ -296,12 +296,12 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_GRAVEL) ->setDescriptionId("dirt"); - Tile::cobblestone = (new Tile(TILE_COBBLESTONE, TEXTURE_COBBLESTONE, Material::stone)) + Tile::stoneBrick = (new Tile(TILE_STONEBRICK, TEXTURE_STONEBRICK, Material::stone)) ->init() ->setDestroyTime(2.0f) ->setExplodeable(10.0f) ->setSoundType(Tile::SOUND_STONE) - ->setDescriptionId("cobblestone"); + ->setDescriptionId("stonebrick"); Tile::wood = (new Tile(TILE_WOOD, TEXTURE_PLANKS, Material::wood)) ->init() @@ -310,7 +310,7 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_WOOD) ->setDescriptionId("wood"); - Tile::bedrock = (new Tile(TILE_BEDROCK, TEXTURE_BEDROCK, Material::stone)) + Tile::unbreakable = (new Tile(TILE_BEDROCK, TEXTURE_BEDROCK, Material::stone)) ->init() ->setDestroyTime(-1.0f) ->setExplodeable(6000000.f) @@ -409,11 +409,11 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_METAL) ->setDescriptionId("blockLapis"); - Tile::sandstone = (new SandStoneTile(TILE_SANDSTONE, TEXTURE_SANDSTONE_SIDE, Material::stone)) + Tile::sandStone = (new SandStoneTile(TILE_SANDSTONE, TEXTURE_SANDSTONE_SIDE, Material::stone)) ->init() ->setSoundType(Tile::SOUND_STONE) ->setDestroyTime(0.8f) - ->setDescriptionId("sandstone"); + ->setDescriptionId("sandStone"); Tile::cloth = (new ClothTile(TILE_CLOTH)) ->init() @@ -474,7 +474,7 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_STONE) ->setDescriptionId("stoneSlab"); - Tile::brick = (new Tile(TILE_BRICKS, TEXTURE_BRICKS, Material::stone)) + Tile::redBrick = (new Tile(TILE_BRICKS, TEXTURE_BRICKS, Material::stone)) ->init() ->setDestroyTime(2.0f) ->setExplodeable(10.0f) @@ -514,18 +514,18 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_WOOD) ->setDescriptionId("torch"); - Tile::stairsWood = (new StairTile(TILE_STAIRS_WOOD, Tile::wood)) + Tile::stairs_wood = (new StairTile(TILE_STAIRS_WOOD, Tile::wood)) ->init() ->setDescriptionId("stairsWood"); - Tile::diamondOre = (new OreTile(TILE_ORE_DIAMOND, TEXTURE_ORE_DIAMOND)) + Tile::emeraldOre = (new OreTile(TILE_ORE_EMERALD, TEXTURE_ORE_EMERALD)) ->init() ->setDestroyTime(3.0f) ->setExplodeable(5.0f) ->setSoundType(Tile::SOUND_STONE) ->setDescriptionId("oreDiamond"); - Tile::diamondBlock = (new MetalTile(TILE_BLOCK_DIAMOND, TEXTURE_DIAMOND, Material::metal)) + Tile::emeraldBlock = (new MetalTile(TILE_BLOCK_EMERALD, TEXTURE_EMERALD, Material::metal)) ->init() ->setDestroyTime(5.0f) ->setExplodeable(10.0f) @@ -538,7 +538,7 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_GRAVEL) ->setDescriptionId("farmland"); - Tile::doorWood = (new DoorTile(TILE_DOOR_WOOD, Material::wood)) + Tile::door_wood = (new DoorTile(TILE_DOOR_WOOD, Material::wood)) ->init() ->setDestroyTime(3.0f) ->setSoundType(Tile::SOUND_WOOD) @@ -550,24 +550,24 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_WOOD) ->setDescriptionId("ladder"); - Tile::stairsStone = (new StairTile(TILE_STAIRS_STONE, Tile::cobblestone)) + Tile::stairs_stone = (new StairTile(TILE_STAIRS_STONE, Tile::stoneBrick)) ->init() ->setDescriptionId("stairsStone"); - Tile::doorIron = (new DoorTile(TILE_DOOR_IRON, Material::metal)) + Tile::door_iron = (new DoorTile(TILE_DOOR_IRON, Material::metal)) ->init() ->setDestroyTime(5.0f) ->setSoundType(Tile::SOUND_METAL) ->setDescriptionId("doorIron"); - Tile::redstoneOre = (new RedStoneOreTile(TILE_ORE_REDSTONE, TEXTURE_ORE_RED_STONE, false)) + Tile::redStoneOre = (new RedStoneOreTile(TILE_ORE_REDSTONE, TEXTURE_ORE_RED_STONE, false)) ->init() ->setDestroyTime(3.0f) ->setExplodeable(5.0f) ->setSoundType(Tile::SOUND_STONE) ->setDescriptionId("oreRedstone"); - Tile::redstoneOre_lit = (new RedStoneOreTile(TILE_ORE_REDSTONE_LIT, TEXTURE_ORE_RED_STONE, true)) + Tile::redStoneOre_lit = (new RedStoneOreTile(TILE_ORE_REDSTONE_LIT, TEXTURE_ORE_RED_STONE, true)) ->init() ->setDestroyTime(3.0f) ->setLightEmission(0.625f) @@ -715,7 +715,7 @@ void Tile::initTiles() ->setSoundType(Tile::SOUND_WOOD) ->setDescriptionId("litpumpkin"); - Tile::netherrack = (new Tile(TILE_NETHERRACK, TEXTURE_HELLROCK, Material::stone)) + Tile::netherrack = (new Tile(TILE_NETHERRACK, TEXTURE_BLOODSTONE, Material::stone)) ->init() ->setDestroyTime(0.4f) ->setSoundType(Tile::SOUND_STONE) @@ -1159,16 +1159,16 @@ const Tile::SoundType // @TODO: Refactor this so that Tile::fire is already a FireTile* etc Tile *Tile::sand, - *Tile::sandstone, - *Tile::cobblestone, - *Tile::brick, + *Tile::sandStone, + *Tile::stoneBrick, + *Tile::redBrick, *Tile::wood, *Tile::glass, *Tile::calmWater, *Tile::calmLava, *Tile::gravel, - *Tile::stone, - *Tile::bedrock, + *Tile::rock, + *Tile::unbreakable, *Tile::dirt, *Tile::grass, *Tile::ice, @@ -1187,9 +1187,9 @@ Tile *Tile::leaves, *Tile::leaves_carried, *Tile::info_reserved6, - *Tile::diamondOre, - *Tile::redstoneOre, - *Tile::redstoneOre_lit, + *Tile::emeraldOre, //! actually diamond ore + *Tile::redStoneOre, + *Tile::redStoneOre_lit, *Tile::goldOre, *Tile::ironOre, *Tile::coalOre, @@ -1205,11 +1205,11 @@ Tile *Tile::invisible_bedrock, *Tile::goldBlock, *Tile::ironBlock, - *Tile::diamondBlock, - *Tile::stairsWood, - *Tile::stairsStone, - *Tile::doorWood, - *Tile::doorIron, + *Tile::emeraldBlock, //! actually diamond block + *Tile::stairs_wood, + *Tile::stairs_stone, + *Tile::door_wood, + *Tile::door_iron, *Tile::info_updateGame1, *Tile::info_updateGame2, // custom additions here diff --git a/source/world/tile/Tile.hpp b/source/world/tile/Tile.hpp index 1fa3f176c..01690bd16 100644 --- a/source/world/tile/Tile.hpp +++ b/source/world/tile/Tile.hpp @@ -164,16 +164,16 @@ class Tile // TODO static Tile * sand, - * sandstone, - * cobblestone, - * brick, + * sandStone, + * stoneBrick, + * redBrick, * wood, * glass, * calmWater, * calmLava, * gravel, - * stone, - * bedrock, + * rock, + * unbreakable, * dirt, * grass, * ice, @@ -192,9 +192,9 @@ class Tile * leaves, * leaves_carried, * info_reserved6, - * diamondOre, - * redstoneOre, - * redstoneOre_lit, + * emeraldOre, //! actually diamond ore + * redStoneOre, + * redStoneOre_lit, * goldOre, * ironOre, * coalOre, @@ -210,11 +210,11 @@ class Tile * invisible_bedrock, * goldBlock, * ironBlock, - * diamondBlock, - * stairsWood, - * stairsStone, - * doorWood, - * doorIron, + * emeraldBlock, //! actually diamond block + * stairs_wood, + * stairs_stone, + * door_wood, + * door_iron, * info_updateGame1, * info_updateGame2, // custom additions here From 7c334232a8cbffa9810b6b4530cea632001d7074 Mon Sep 17 00:00:00 2001 From: Vimd0 Date: Fri, 30 Jan 2026 21:11:35 -0500 Subject: [PATCH 6/6] try --- source/client/gui/components/OptionList.cpp | 3 ++- source/client/renderer/PatchManager.cpp | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/source/client/gui/components/OptionList.cpp b/source/client/gui/components/OptionList.cpp index 8520d5ff0..9a4dabdbe 100644 --- a/source/client/gui/components/OptionList.cpp +++ b/source/client/gui/components/OptionList.cpp @@ -291,7 +291,8 @@ void OptionList::initDefaultMenu() void OptionList::initVideoMenu() { Options* pOptions = m_pMinecraft->getOptions(); - int currentIndex = false; + int currentIndex = 0; + (void)currentIndex; OPTION(Distance, m_iViewDistance, "Render Distance"); OPTION(Boolean, m_bThirdPerson, "Third Person View"); diff --git a/source/client/renderer/PatchManager.cpp b/source/client/renderer/PatchManager.cpp index 9ae274b3b..3234ec2dd 100644 --- a/source/client/renderer/PatchManager.cpp +++ b/source/client/renderer/PatchManager.cpp @@ -175,13 +175,6 @@ void PatchManager::PatchTextures(TextureData& texture, ePatchType patchType) if (pd.m_type != patchType) continue; - // got the magic value, we can determine whether to disable fancy pants grass if the file doesn't exist - if (pd.m_destX == 1600 && pd.m_destY == 1600 && pd.m_type == TYPE_TERRAIN) - { - pd.m_destX = 4 * 16; - pd.m_destY = 5 * 16; - } - // N.B. Well, in some cases, you do want things to fail nicely. TextureData patchTex = Resource::loadTexture("patches/" + pd.m_filename); if (patchTex.isEmpty())