diff --git a/.gitignore b/.gitignore index 7cdb166d..57d0e629 100644 --- a/.gitignore +++ b/.gitignore @@ -340,4 +340,5 @@ ASALocalRun/ # Release folder (thats on my computer - Whisper) x64_Release/ - +# aether asset stuff +Minecraft.Client/Common/res/TitleUpdate/res/aether_temp diff --git a/Minecraft.Client/ClientConnection.cpp b/Minecraft.Client/ClientConnection.cpp index b80eaed9..c092a3a0 100644 --- a/Minecraft.Client/ClientConnection.cpp +++ b/Minecraft.Client/ClientConnection.cpp @@ -2493,6 +2493,14 @@ void ClientConnection::handleRespawn(shared_ptr packet) { param->stringId = IDS_PROGRESS_LEAVING_END; } + else if( packet->dimension == 2) + { + param->stringId = IDS_PROGRESS_ENTERING_AETHER; + } + else if( oldDimension == 2) + { + param->stringId = IDS_PROGRESS_LEAVING_AETHER; + } param->showTooltips = false; param->setFailTimer = false; diff --git a/Minecraft.Client/Common/App_enums.h b/Minecraft.Client/Common/App_enums.h index b1928786..7638c301 100644 --- a/Minecraft.Client/Common/App_enums.h +++ b/Minecraft.Client/Common/App_enums.h @@ -218,6 +218,7 @@ enum eMinecraftColour eMinecraftColour_Foliage_ExtremeHillsEdge, eMinecraftColour_Foliage_Jungle, eMinecraftColour_Foliage_JungleHills, + eMinecraftColour_Foliage_Aether, eMinecraftColour_Grass_Common, eMinecraftColour_Grass_Ocean, @@ -243,6 +244,7 @@ enum eMinecraftColour eMinecraftColour_Grass_ExtremeHillsEdge, eMinecraftColour_Grass_Jungle, eMinecraftColour_Grass_JungleHills, + eMinecraftColour_Grass_Aether, eMinecraftColour_Water_Ocean, eMinecraftColour_Water_Plains, @@ -267,6 +269,7 @@ enum eMinecraftColour eMinecraftColour_Water_ExtremeHillsEdge, eMinecraftColour_Water_Jungle, eMinecraftColour_Water_JungleHills, + eMinecraftColour_Water_Aether, eMinecraftColour_Sky_Ocean, eMinecraftColour_Sky_Plains, @@ -291,6 +294,7 @@ enum eMinecraftColour eMinecraftColour_Sky_ExtremeHillsEdge, eMinecraftColour_Sky_Jungle, eMinecraftColour_Sky_JungleHills, + eMinecraftColour_Sky_Aether, eMinecraftColour_Tile_RedstoneDust, eMinecraftColour_Tile_RedstoneDustUnlit, diff --git a/Minecraft.Client/Common/Colours/ColourTable.cpp b/Minecraft.Client/Common/Colours/ColourTable.cpp index dc58cfb1..83f3393a 100644 --- a/Minecraft.Client/Common/Colours/ColourTable.cpp +++ b/Minecraft.Client/Common/Colours/ColourTable.cpp @@ -35,6 +35,7 @@ wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] = L"Foliage_ExtremeHillsEdge", L"Foliage_Jungle", L"Foliage_JungleHills", + L"Foliage_Aether", L"Grass_Common", L"Grass_Ocean", @@ -60,6 +61,7 @@ wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] = L"Grass_ExtremeHillsEdge", L"Grass_Jungle", L"Grass_JungleHills", + L"Grass_Aether", L"Water_Ocean", L"Water_Plains", @@ -84,6 +86,7 @@ wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] = L"Water_ExtremeHillsEdge", L"Water_Jungle", L"Water_JungleHills", + L"Water_Aether", L"Sky_Ocean", L"Sky_Plains", @@ -108,6 +111,7 @@ wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] = L"Sky_ExtremeHillsEdge", L"Sky_Jungle", L"Sky_JungleHills", + L"Sky_Aether", L"Tile_RedstoneDust", L"Tile_RedstoneDustUnlit", diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 62891130..56a1c0b6 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -3259,7 +3259,7 @@ void CMinecraftApp::HandleXuiActions(void) bool gameStarted = false; for(int i = 0; i < pMinecraft->levels.length; i++) { - if (pMinecraft->levels.data[i] != NULL) + if (pMinecraft->levels.data[i] != nullptr) { gameStarted = true; break; @@ -4197,6 +4197,107 @@ void CMinecraftApp::loadStringTable() byteArray locFile = m_mediaArchive->getFile(localisationFile); m_stringTable = new StringTable(locFile.data, locFile.length); delete locFile.data; + + // Register Aether strings + m_stringTable->registerString(IDS_PROGRESS_ENTERING_AETHER, L"Entering the Aether"); + m_stringTable->registerString(IDS_PROGRESS_LEAVING_AETHER, L"Leaving the Aether"); + m_stringTable->registerString(IDS_TILE_AETHER_GRASS, L"Aether Grass"); + m_stringTable->registerString(IDS_TILE_AETHER_DIRT, L"Aether Dirt"); + m_stringTable->registerString(IDS_TILE_HOLYSTONE, L"Holystone"); + m_stringTable->registerString(IDS_TILE_MOSSY_HOLYSTONE, L"Mossy Holystone"); + m_stringTable->registerString(IDS_TILE_AMBROSIUM_ORE, L"Ambrosium Ore"); + m_stringTable->registerString(IDS_TILE_ZANITE_ORE, L"Zanite Ore"); + m_stringTable->registerString(IDS_TILE_GRAVITITE_ORE, L"Gravitite Ore"); + m_stringTable->registerString(IDS_TILE_SKYROOT_LOG, L"Skyroot Log"); + m_stringTable->registerString(IDS_TILE_SKYROOT_PLANKS, L"Skyroot Planks"); + m_stringTable->registerString(IDS_TILE_SKYROOT_LEAVES, L"Skyroot Leaves"); + m_stringTable->registerString(IDS_TILE_GOLDEN_OAK_LOG, L"Golden Oak Log"); + m_stringTable->registerString(IDS_TILE_GOLDEN_OAK_LEAVES, L"Golden Oak Leaves"); + m_stringTable->registerString(IDS_TILE_QUICKSOIL, L"Quicksoil"); + m_stringTable->registerString(IDS_TILE_QUICKSOIL_GLASS, L"Quicksoil Glass"); + m_stringTable->registerString(IDS_TILE_AERCLOUD, L"Aercloud"); + m_stringTable->registerString(IDS_TILE_AEROGEL, L"Aerogel"); + m_stringTable->registerString(IDS_TILE_ICESTONE, L"Icestone"); + m_stringTable->registerString(IDS_TILE_AMBROSIUM_TORCH, L"Ambrosium Torch"); + m_stringTable->registerString(IDS_TILE_SKYROOT_SAPLING, L"Skyroot Sapling"); + m_stringTable->registerString(IDS_TILE_GOLDEN_OAK_SAPLING, L"Golden Oak Sapling"); + m_stringTable->registerString(IDS_TILE_PURPLE_FLOWER, L"Purple Flower"); + m_stringTable->registerString(IDS_TILE_WHITE_FLOWER, L"White Flower"); + m_stringTable->registerString(IDS_TILE_ANGELIC_STONE, L"Angelic Stone"); + m_stringTable->registerString(IDS_TILE_LIGHT_ANGELIC_STONE, L"Light Angelic Stone"); + m_stringTable->registerString(IDS_TILE_CARVED_STONE, L"Carved Stone"); + m_stringTable->registerString(IDS_TILE_LIGHT_CARVED_STONE, L"Light Carved Stone"); + m_stringTable->registerString(IDS_TILE_HELLFIRE_STONE, L"Hellfire Stone"); + m_stringTable->registerString(IDS_TILE_LIGHT_HELLFIRE_STONE, L"Light Hellfire Stone"); + m_stringTable->registerString(IDS_TILE_PILLAR, L"Pillar"); + m_stringTable->registerString(IDS_TILE_PILLAR_CARVED, L"Carved Pillar"); + m_stringTable->registerString(IDS_TILE_ENCHANTER, L"Enchanter"); + m_stringTable->registerString(IDS_TILE_FREEZER, L"Freezer"); + m_stringTable->registerString(IDS_TILE_INCUBATOR, L"Incubator"); + m_stringTable->registerString(IDS_TILE_LIBRARY_LORE, L"Book of Lore"); + m_stringTable->registerString(IDS_TILE_GOLD_AERCLOUD, L"Gold Aercloud"); + m_stringTable->registerString(IDS_TILE_BLUE_AERCLOUD, L"Blue Aercloud"); + + // Aether Items + m_stringTable->registerString(IDS_ITEM_AMBROSIUM_SHARD, L"Ambrosium Shard"); + m_stringTable->registerString(IDS_ITEM_ZANITE_GEMSTONE, L"Zanite Gemstone"); + m_stringTable->registerString(IDS_ITEM_FLAMING_GEMSTONE, L"Flaming Gemstone"); + m_stringTable->registerString(IDS_ITEM_SKYROOT_STICK, L"Skyroot Stick"); + m_stringTable->registerString(IDS_ITEM_AECHOR_PETAL, L"Aechor Petal"); + m_stringTable->registerString(IDS_ITEM_GOLDEN_AMBER, L"Golden Amber"); + m_stringTable->registerString(IDS_ITEM_GUMMIE_SWET, L"Gummie Swet"); + m_stringTable->registerString(IDS_ITEM_LIFE_SHARD, L"Life Shard"); + m_stringTable->registerString(IDS_ITEM_REGENERATION_STONE, L"Regeneration Stone"); + m_stringTable->registerString(IDS_ITEM_MOA_EGG, L"Moa Egg"); + m_stringTable->registerString(IDS_ITEM_GOLDEN_FEATHER, L"Golden Feather"); + m_stringTable->registerString(IDS_ITEM_AETHER_KEY, L"Key"); + m_stringTable->registerString(IDS_ITEM_SKYROOT_BUCKET, L"Skyroot Bucket"); + m_stringTable->registerString(IDS_ITEM_SKYROOT_BUCKET_WATER, L"Skyroot Water Bucket"); + m_stringTable->registerString(IDS_ITEM_SKYROOT_BUCKET_MILK, L"Skyroot Milk Bucket"); + m_stringTable->registerString(IDS_ITEM_SKYROOT_BUCKET_POISON, L"Skyroot Poison Bucket"); + m_stringTable->registerString(IDS_ITEM_DART_GOLDEN, L"Golden Dart"); + m_stringTable->registerString(IDS_ITEM_DART_ENCHANTED, L"Enchanted Dart"); + m_stringTable->registerString(IDS_ITEM_DART_POISON, L"Poison Dart"); + m_stringTable->registerString(IDS_ITEM_DART_SHOOTER, L"Dart Shooter"); + m_stringTable->registerString(IDS_ITEM_DART_SHOOTER_ENCHANTED, L"Enchanted Dart Shooter"); + m_stringTable->registerString(IDS_ITEM_DART_SHOOTER_POISON, L"Poison Dart Shooter"); + m_stringTable->registerString(IDS_ITEM_CLOUD_PARACHUTE, L"Cloud Parachute"); + m_stringTable->registerString(IDS_ITEM_CLOUD_STAFF, L"Cloud Staff"); + m_stringTable->registerString(IDS_ITEM_NATURE_STAFF, L"Nature Staff"); + m_stringTable->registerString(IDS_ITEM_REPULSION_SHIELD, L"Repulsion Shield"); + m_stringTable->registerString(IDS_ITEM_LANCE, L"Lance"); + m_stringTable->registerString(IDS_ITEM_PIG_SLAYER, L"Pig Slayer"); + m_stringTable->registerString(IDS_ITEM_VAMPIRE_BLADE, L"Vampire Blade"); + m_stringTable->registerString(IDS_ITEM_LIGHTNING_KNIFE, L"Lightning Knife"); + m_stringTable->registerString(IDS_ITEM_SWORD_SKYROOT, L"Skyroot Sword"); + m_stringTable->registerString(IDS_ITEM_SHOVEL_SKYROOT, L"Skyroot Shovel"); + m_stringTable->registerString(IDS_ITEM_PICKAXE_SKYROOT, L"Skyroot Pickaxe"); + m_stringTable->registerString(IDS_ITEM_HATCHET_SKYROOT, L"Skyroot Axe"); + m_stringTable->registerString(IDS_ITEM_SWORD_HOLYSTONE, L"Holystone Sword"); + m_stringTable->registerString(IDS_ITEM_SHOVEL_HOLYSTONE, L"Holystone Shovel"); + m_stringTable->registerString(IDS_ITEM_PICKAXE_HOLYSTONE, L"Holystone Pickaxe"); + m_stringTable->registerString(IDS_ITEM_HATCHET_HOLYSTONE, L"Holystone Axe"); + m_stringTable->registerString(IDS_ITEM_SWORD_ZANITE, L"Zanite Sword"); + m_stringTable->registerString(IDS_ITEM_SHOVEL_ZANITE, L"Zanite Shovel"); + m_stringTable->registerString(IDS_ITEM_PICKAXE_ZANITE, L"Zanite Pickaxe"); + m_stringTable->registerString(IDS_ITEM_HATCHET_ZANITE, L"Zanite Axe"); + m_stringTable->registerString(IDS_ITEM_SWORD_GRAVITITE, L"Gravitite Sword"); + m_stringTable->registerString(IDS_ITEM_SHOVEL_GRAVITITE, L"Gravitite Shovel"); + m_stringTable->registerString(IDS_ITEM_PICKAXE_GRAVITITE, L"Gravitite Pickaxe"); + m_stringTable->registerString(IDS_ITEM_HATCHET_GRAVITITE, L"Gravitite Axe"); + m_stringTable->registerString(IDS_ITEM_PHOENIX_SWORD, L"Phoenix Sword"); + m_stringTable->registerString(IDS_ITEM_PHOENIX_SHOVEL, L"Phoenix Shovel"); + m_stringTable->registerString(IDS_ITEM_PHOENIX_PICKAXE, L"Phoenix Pickaxe"); + m_stringTable->registerString(IDS_ITEM_PHOENIX_AXE, L"Phoenix Axe"); + m_stringTable->registerString(IDS_ITEM_HELMET_ZANITE, L"Zanite Helmet"); + m_stringTable->registerString(IDS_ITEM_CHESTPLATE_ZANITE, L"Zanite Chestplate"); + m_stringTable->registerString(IDS_ITEM_LEGGINGS_ZANITE, L"Zanite Leggings"); + m_stringTable->registerString(IDS_ITEM_BOOTS_ZANITE, L"Zanite Boots"); + m_stringTable->registerString(IDS_ITEM_HELMET_GRAVITITE, L"Gravitite Helmet"); + m_stringTable->registerString(IDS_ITEM_CHESTPLATE_GRAVITITE, L"Gravitite Chestplate"); + m_stringTable->registerString(IDS_ITEM_LEGGINGS_GRAVITITE, L"Gravitite Leggings"); + m_stringTable->registerString(IDS_ITEM_BOOTS_GRAVITITE, L"Gravitite Boots"); + m_stringTable->registerString(IDS_ITEM_GRAVITITE_PLATE, L"Gravitite Plate"); } else { diff --git a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp index 7ce33234..9e6c9411 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp @@ -107,6 +107,44 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Tile::stairs_sandstone_Id) ITEM(Tile::stairs_quartz_Id) + // Aether Blocks + ITEM(Tile::aetherGrass_Id) + ITEM(Tile::aetherDirt_Id) + ITEM(Tile::holystone_Id) + ITEM(Tile::mossyHolystone_Id) + ITEM(Tile::ambrosiumOre_Id) + ITEM(Tile::zaniteOre_Id) + ITEM(Tile::gravititeOre_Id) + ITEM(Tile::skyrootLog_Id) + ITEM(Tile::skyrootPlanks_Id) + ITEM(Tile::skyrootLeaves_Id) + ITEM(Tile::goldenOakLog_Id) + ITEM(Tile::goldenOakLeaves_Id) + ITEM(Tile::quicksoil_Id) + ITEM(Tile::quicksoilGlass_Id) + ITEM(Tile::aercloud_Id) + ITEM(Tile::goldAercloud_Id) + ITEM(Tile::blueAercloud_Id) + ITEM(Tile::aerogel_Id) + ITEM(Tile::icestone_Id) + ITEM(Tile::ambrosiumTorch_Id) + ITEM(Tile::skyrootSapling_Id) + ITEM(Tile::goldenOakSapling_Id) + ITEM(Tile::purpleFlower_Id) + ITEM(Tile::whiteFlower_Id) + ITEM(Tile::angelicStone_Id) + ITEM(Tile::lightAngelicStone_Id) + ITEM(Tile::carvedStone_Id) + ITEM(Tile::lightCarvedStone_Id) + ITEM(Tile::hellfireStone_Id) + ITEM(Tile::lightHellfireStone_Id) + ITEM(Tile::pillarTop_Id) + ITEM(Tile::enchanter_Id) + ITEM(Tile::freezer_Id) + ITEM(Tile::incubator_Id) + ITEM(Tile::libraryLore_Id) + ITEM(Tile::pillarCarved_Id) + // Decoration DEF(eCreativeInventory_Decoration) @@ -359,6 +397,52 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::hatchet_diamond_Id) ITEM(Item::hoe_diamond_Id) + // Aether Tools & Armor + ITEM(Item::helmet_zanite_Id) + ITEM(Item::chestplate_zanite_Id) + ITEM(Item::leggings_zanite_Id) + ITEM(Item::boots_zanite_Id) + ITEM(Item::sword_skyroot_Id) + ITEM(Item::shovel_skyroot_Id) + ITEM(Item::pickAxe_skyroot_Id) + ITEM(Item::hatchet_skyroot_Id) + + ITEM(Item::helmet_gravitite_Id) + ITEM(Item::chestplate_gravitite_Id) + ITEM(Item::leggings_gravitite_Id) + ITEM(Item::boots_gravitite_Id) + ITEM(Item::sword_holystone_Id) + ITEM(Item::shovel_holystone_Id) + ITEM(Item::pickAxe_holystone_Id) + ITEM(Item::hatchet_holystone_Id) + + ITEM(Item::sword_zanite_Id) + ITEM(Item::shovel_zanite_Id) + ITEM(Item::pickAxe_zanite_Id) + ITEM(Item::hatchet_zanite_Id) + + ITEM(Item::sword_gravitite_Id) + ITEM(Item::shovel_gravitite_Id) + ITEM(Item::pickAxe_gravitite_Id) + ITEM(Item::hatchet_gravitite_Id) + + ITEM(Item::phoenixSword_Id) + ITEM(Item::phoenixShovel_Id) + ITEM(Item::phoenixPickaxe_Id) + ITEM(Item::phoenixAxe_Id) + + // Aether Special Weapons + ITEM(Item::vampireBlade_Id) + ITEM(Item::pigSlayer_Id) + ITEM(Item::aetherLance_Id) + ITEM(Item::lightningKnife_Id) + ITEM(Item::dartShooter_Id) + ITEM(Item::dartShooterEnchanted_Id) + ITEM(Item::dartShooterPoison_Id) + ITEM(Item::repulsionShield_Id) + ITEM(Item::cloudStaff_Id) + ITEM(Item::natureStaff_Id) + ITEM(Item::fireball_Id) ITEM(Item::clock_Id) ITEM(Item::shears_Id) @@ -381,6 +465,27 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::ironIngot_Id) ITEM(Item::goldIngot_Id) ITEM(Item::netherQuartz_Id) + // Aether Materials + ITEM(Item::ambrosiumShard_Id) + ITEM(Item::zaniteGemstone_Id) + ITEM(Item::flamingGemstone_Id) + ITEM(Item::goldenAmber_Id) + ITEM(Item::skyrootStick_Id) + ITEM(Item::aechorPetal_Id) + ITEM(Item::gummieSwet_Id) + ITEM(Item::lifeShard_Id) + ITEM(Item::regenerationStone_Id) + ITEM(Item::moaEgg_Id) + ITEM(Item::goldenFeather_Id) + ITEM(Item::aetherKey_Id) + ITEM(Item::skyrootBucket_Id) + ITEM(Item::skyrootBucketWater_Id) + ITEM(Item::skyrootBucketMilk_Id) + ITEM(Item::skyrootBucketPoison_Id) + ITEM(Item::dartGolden_Id) + ITEM(Item::dartEnchanted_Id) + ITEM(Item::dartPoison_Id) + ITEM(Item::cloudParachute_Id) ITEM(Item::brick_Id) ITEM(Item::netherbrick_Id) ITEM(Item::stick_Id) diff --git a/Minecraft.Client/Common/res/1_2_2/armor/gravitite_layer_1.png b/Minecraft.Client/Common/res/1_2_2/armor/gravitite_layer_1.png new file mode 100644 index 00000000..01a498bd Binary files /dev/null and b/Minecraft.Client/Common/res/1_2_2/armor/gravitite_layer_1.png differ diff --git a/Minecraft.Client/Common/res/1_2_2/armor/gravitite_layer_2.png b/Minecraft.Client/Common/res/1_2_2/armor/gravitite_layer_2.png new file mode 100644 index 00000000..f7eb3bcb Binary files /dev/null and b/Minecraft.Client/Common/res/1_2_2/armor/gravitite_layer_2.png differ diff --git a/Minecraft.Client/Common/res/1_2_2/armor/zanite_layer_1.png b/Minecraft.Client/Common/res/1_2_2/armor/zanite_layer_1.png new file mode 100644 index 00000000..b3940ad2 Binary files /dev/null and b/Minecraft.Client/Common/res/1_2_2/armor/zanite_layer_1.png differ diff --git a/Minecraft.Client/Common/res/1_2_2/armor/zanite_layer_2.png b/Minecraft.Client/Common/res/1_2_2/armor/zanite_layer_2.png new file mode 100644 index 00000000..7c2ddf10 Binary files /dev/null and b/Minecraft.Client/Common/res/1_2_2/armor/zanite_layer_2.png differ diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/items.png b/Minecraft.Client/Common/res/TitleUpdate/res/items.png index c86026a0..2c7134f0 100644 Binary files a/Minecraft.Client/Common/res/TitleUpdate/res/items.png and b/Minecraft.Client/Common/res/TitleUpdate/res/items.png differ diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/items_aether.psd b/Minecraft.Client/Common/res/TitleUpdate/res/items_aether.psd new file mode 100644 index 00000000..045386e5 Binary files /dev/null and b/Minecraft.Client/Common/res/TitleUpdate/res/items_aether.psd differ diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/terrain.png b/Minecraft.Client/Common/res/TitleUpdate/res/terrain.png index d5d3751d..17e50af2 100644 Binary files a/Minecraft.Client/Common/res/TitleUpdate/res/terrain.png and b/Minecraft.Client/Common/res/TitleUpdate/res/terrain.png differ diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/terrainMipMapLevel2.png b/Minecraft.Client/Common/res/TitleUpdate/res/terrainMipMapLevel2.png index 771bb2d5..c2683f1c 100644 Binary files a/Minecraft.Client/Common/res/TitleUpdate/res/terrainMipMapLevel2.png and b/Minecraft.Client/Common/res/TitleUpdate/res/terrainMipMapLevel2.png differ diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/terrainMipMapLevel3.png b/Minecraft.Client/Common/res/TitleUpdate/res/terrainMipMapLevel3.png index 900ba0f3..1f91271e 100644 Binary files a/Minecraft.Client/Common/res/TitleUpdate/res/terrainMipMapLevel3.png and b/Minecraft.Client/Common/res/TitleUpdate/res/terrainMipMapLevel3.png differ diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/terrain_old/terrain.png b/Minecraft.Client/Common/res/TitleUpdate/res/terrain_old/terrain.png new file mode 100644 index 00000000..d5d3751d Binary files /dev/null and b/Minecraft.Client/Common/res/TitleUpdate/res/terrain_old/terrain.png differ diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/terrain_old/terrainMipMapLevel2.png b/Minecraft.Client/Common/res/TitleUpdate/res/terrain_old/terrainMipMapLevel2.png new file mode 100644 index 00000000..771bb2d5 Binary files /dev/null and b/Minecraft.Client/Common/res/TitleUpdate/res/terrain_old/terrainMipMapLevel2.png differ diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/terrain_old/terrainMipMapLevel3.png b/Minecraft.Client/Common/res/TitleUpdate/res/terrain_old/terrainMipMapLevel3.png new file mode 100644 index 00000000..900ba0f3 Binary files /dev/null and b/Minecraft.Client/Common/res/TitleUpdate/res/terrain_old/terrainMipMapLevel3.png differ diff --git a/Minecraft.Client/GameRenderer.cpp b/Minecraft.Client/GameRenderer.cpp index e8d6afe4..82302b51 100644 --- a/Minecraft.Client/GameRenderer.cpp +++ b/Minecraft.Client/GameRenderer.cpp @@ -691,7 +691,7 @@ void GameRenderer::setupCamera(float a, int eye) if(app.GetGameSettings(mc->player->GetXboxPad(),eGameSetting_ViewBob) && !mc->player->abilities.flying && !bNoLegAnim && !bNoBobbingAnim) bobView(a); float pt = mc->player->oPortalTime + (mc->player->portalTime - mc->player->oPortalTime) * a; - if (pt > 0) + if (pt > 0 && !mc->player->inAetherPortalOverlay) { int multiplier = 20; if (mc->player->hasEffect(MobEffect::confusion)) diff --git a/Minecraft.Client/Gui.cpp b/Minecraft.Client/Gui.cpp index 7d76edbd..e8bd6110 100644 --- a/Minecraft.Client/Gui.cpp +++ b/Minecraft.Client/Gui.cpp @@ -235,7 +235,10 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) float pt = minecraft->player->oPortalTime + (minecraft->player->portalTime - minecraft->player->oPortalTime) * a; if (pt > 0) { - renderTp(pt, screenWidth, screenHeight); + if (minecraft->player->inAetherPortalOverlay) + renderAetherTp(pt, screenWidth, screenHeight); + else + renderTp(pt, screenWidth, screenHeight); } } @@ -1146,6 +1149,42 @@ void Gui::renderTp(float br, int w, int h) } +void Gui::renderAetherTp(float br, int w, int h) +{ + if (br < 1) + { + br = br * br; + br = br * br; + br = br * 0.8f + 0.2f; + } + + glDisable(GL_ALPHA_TEST); + glDisable(GL_DEPTH_TEST); + glDepthMask(false); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glColor4f(1, 1, 1, br); + MemSect(31); + minecraft->textures->bindTexture(TN_TERRAIN); + MemSect(0); + + Icon *slot = Tile::calmWater->getTexture(Facing::UP); + float u0 = slot->getU0(); + float v0 = slot->getV0(); + float u1 = slot->getU1(); + float v1 = slot->getV1(); + Tesselator *t = Tesselator::getInstance(); + t->begin(); + t->vertexUV((float)(0), (float)( h), (float)( -90), (float)( u0), (float)( v1)); + t->vertexUV((float)(w), (float)( h), (float)( -90), (float)( u1), (float)( v1)); + t->vertexUV((float)(w), (float)( 0), (float)( -90), (float)( u1), (float)( v0)); + t->vertexUV((float)(0), (float)( 0), (float)( -90), (float)( u0), (float)( v0)); + t->end(); + glDepthMask(true); + glEnable(GL_DEPTH_TEST); + glEnable(GL_ALPHA_TEST); + glColor4f(1, 1, 1, 1); +} + void Gui::renderSlot(int slot, int x, int y, float a) { shared_ptr item = minecraft->player->inventory->items[slot]; diff --git a/Minecraft.Client/Gui.h b/Minecraft.Client/Gui.h index 41762016..98a3ae59 100644 --- a/Minecraft.Client/Gui.h +++ b/Minecraft.Client/Gui.h @@ -46,6 +46,7 @@ private: void renderPumpkin(int w, int h); void renderVignette(float br, int w, int h); void renderTp(float br, int w, int h); + void renderAetherTp(float br, int w, int h); void renderSlot(int slot, int x, int y, float a); public: void tick(); diff --git a/Minecraft.Client/ItemInHandRenderer.cpp b/Minecraft.Client/ItemInHandRenderer.cpp index cee9254d..2e92a33b 100644 --- a/Minecraft.Client/ItemInHandRenderer.cpp +++ b/Minecraft.Client/ItemInHandRenderer.cpp @@ -47,9 +47,9 @@ ItemInHandRenderer::ItemInHandRenderer(Minecraft *mc, bool optimisedMinimap) for( int xp = 0; xp < 16; xp++ ) { float u = (15-xp) / 256.0f; - float v = (15-yp) / 256.0f; + float v = (15-yp) / 384.0f; // 4J - items.png is 256x384, V must use height not width u += 0.5f / 256.0f; - v += 0.5f / 256.0f; + v += 0.5f / 384.0f; float x0 = xp / 16.0f; float x1 = x0 + 1.0f/16.0f; float y0 = yp / 16.0f; diff --git a/Minecraft.Client/LocalPlayer.cpp b/Minecraft.Client/LocalPlayer.cpp index da4d27f4..0964b3c4 100644 --- a/Minecraft.Client/LocalPlayer.cpp +++ b/Minecraft.Client/LocalPlayer.cpp @@ -238,7 +238,7 @@ void LocalPlayer::aiStep() return; } oPortalTime = portalTime; - if (isInsidePortal) + if (isInsidePortal || isInsideAetherPortal) { if (!level->isClientSide) { @@ -246,7 +246,9 @@ void LocalPlayer::aiStep() } if (minecraft->screen != NULL) minecraft->setScreen(NULL); - if (portalTime == 0) + inAetherPortalOverlay = isInsideAetherPortal; + + if (portalTime == 0 && !isInsideAetherPortal) { minecraft->soundEngine->playUI(eSoundType_PORTAL_TRIGGER, 1, random->nextFloat() * 0.4f + 0.8f); } @@ -256,6 +258,7 @@ void LocalPlayer::aiStep() portalTime = 1; } isInsidePortal = false; + isInsideAetherPortal = false; } else if (hasEffect(MobEffect::confusion) && getEffect(MobEffect::confusion)->getDuration() > (SharedConstants::TICKS_PER_SECOND * 3)) { diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index acb7d91d..e14e14c3 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -126,7 +126,7 @@ Minecraft::Minecraft(Component *mouseComponent, Canvas *parent, MinecraftApplet timer = new Timer(SharedConstants::TICKS_PER_SECOND); oldLevel = NULL; //4J Stu added level = NULL; - levels = MultiPlayerLevelArray(3); // 4J Added + levels = MultiPlayerLevelArray(4); // 4J Added levelRenderer = NULL; player = nullptr; cameraTargetPlayer = nullptr; @@ -3939,6 +3939,7 @@ MultiPlayerLevel *Minecraft::getLevel(int dimension) { if (dimension == -1) return levels[1]; else if(dimension == 1) return levels[2]; + else if(dimension == 2) return levels[3]; else return levels[0]; } @@ -3960,6 +3961,7 @@ void Minecraft::forceaddLevel(MultiPlayerLevel *level) int dimId = level->dimension->id; if (dimId == -1) levels[1] = level; else if(dimId == 1) levels[2] = level; + else if(dimId == 2) levels[3] = level; else levels[0] = level; } @@ -4024,6 +4026,12 @@ void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_pt delete levels[2]; levels[2] = NULL; } + if(levels[3]!=NULL) + { + levels[3]->savedDataStorage = NULL; // shared with overworld + delete levels[3]; + levels[3] = NULL; + } // Delete all the player objects for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) @@ -4065,6 +4073,7 @@ void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_pt int dimId = level->dimension->id; if (dimId == -1) levels[1] = level; else if(dimId == 1) levels[2] = level; + else if(dimId == 2) levels[3] = level; else levels[0] = level; // If no player has been set, then this is the first level to be set this game, so set up @@ -5008,3 +5017,4 @@ int Minecraft::MustSignInReturnedPSN(void *pParam, int iPad, C4JStorage::EMessag return 0; } #endif + diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index ceb9554b..a1ae0ae0 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -385,7 +385,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring ProgressRenderer *mcprogress = Minecraft::GetInstance()->progressRenderer; // 4J TODO - free levels here if there are already some? - levels = ServerLevelArray(3); + levels = ServerLevelArray(4); int gameTypeId = settings->getInt(L"gamemode", app.GetGameHostOption(eGameHostOption_GameType));//LevelSettings::GAMETYPE_SURVIVAL); GameType *gameType = LevelSettings::validateGameType(gameTypeId); @@ -458,6 +458,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring int dimension = 0; if (i == 1) dimension = -1; if (i == 2) dimension = 1; + if (i == 3) dimension = 2; if (i == 0) { levels[i] = new ServerLevel(this, storage, name, dimension, levelSettings); @@ -706,6 +707,13 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring if( s_bServerHalted || !g_NetworkManager.IsInSession() ) return false; + if( levels[3]->isNew ) + { + levels[3]->save(true, mcprogress); + } + + if( s_bServerHalted || !g_NetworkManager.IsInSession() ) return false; + // 4J - added - immediately save newly created level, like single player game // 4J Stu - We also want to immediately save the tutorial if ( levels[0]->isNew ) @@ -718,7 +726,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring if( s_bServerHalted || !g_NetworkManager.IsInSession() ) return false; - if( levels[0]->isNew || levels[1]->isNew || levels[2]->isNew ) + if( levels[0]->isNew || levels[1]->isNew || levels[2]->isNew || levels[3]->isNew ) { levels[0]->saveToDisc(mcprogress, false); } @@ -1608,6 +1616,7 @@ ServerLevel *MinecraftServer::getLevel(int dimension) { if (dimension == -1) return levels[1]; else if (dimension == 1) return levels[2]; + else if (dimension == 2) return levels[3]; else return levels[0]; } @@ -1616,6 +1625,7 @@ void MinecraftServer::setLevel(int dimension, ServerLevel *level) { if (dimension == -1) levels[1] = level; else if (dimension == 1) levels[2] = level; + else if (dimension == 2) levels[3] = level; else levels[0] = level; } diff --git a/Minecraft.Client/PlayerList.cpp b/Minecraft.Client/PlayerList.cpp index 7921cbf8..31a8b98b 100644 --- a/Minecraft.Client/PlayerList.cpp +++ b/Minecraft.Client/PlayerList.cpp @@ -717,6 +717,16 @@ void PlayerList::toggleDimension(shared_ptr player, int targetDime { player->displayClientMessage(IDS_PLAYER_LEFT_END); } + // Aether dimension messages + else if(player->dimension != 2 && targetDimension == 2) + { + // Entering The Aether — reuse a generic progress message + player->displayClientMessage(IDS_PLAYER_ENTERED_END); // TODO: Add IDS_PLAYER_ENTERED_AETHER + } + else if( player->dimension == 2 ) + { + player->displayClientMessage(IDS_PLAYER_LEFT_END); // TODO: Add IDS_PLAYER_LEFT_AETHER + } player->dimension = targetDimension; @@ -750,14 +760,28 @@ void PlayerList::toggleDimension(shared_ptr player, int targetDime } else if (player->dimension == 0) { - xt *= scale; - zt *= scale; + if (lastDimension == -1) + { + // Coming from Nether — scale up + xt *= scale; + zt *= scale; + } + // Coming from Aether or End — keep coordinates as-is (1:1) player->moveTo(xt, player->y, zt, player->yRot, player->xRot); if (player->isAlive()) { oldLevel->tick(player, false); } } + else if (player->dimension == 2) + { + // Entering The Aether — 1:1 coordinate mapping with Overworld + player->moveTo(xt, player->y, zt, player->yRot, player->xRot); + if (player->isAlive()) + { + oldLevel->tick(player, false); + } + } else { Pos *p = newLevel->getDimensionSpecificSpawn(); @@ -789,7 +813,7 @@ void PlayerList::toggleDimension(shared_ptr player, int targetDime player->moveTo(xt, player->y, zt, player->yRot, player->xRot); newLevel->tick(player, false); newLevel->cache->autoCreate = true; - (new PortalForcer())->force(newLevel, player); + (new PortalForcer())->force(newLevel, player, lastDimension); newLevel->cache->autoCreate = false; } } diff --git a/Minecraft.Client/PlayerRenderer.cpp b/Minecraft.Client/PlayerRenderer.cpp index c332b41c..034a020f 100644 --- a/Minecraft.Client/PlayerRenderer.cpp +++ b/Minecraft.Client/PlayerRenderer.cpp @@ -27,7 +27,7 @@ const unsigned int PlayerRenderer::s_nametagColors[MINECRAFT_NET_MAX_PLAYERS] = #endif }; -const wstring PlayerRenderer::MATERIAL_NAMES[5] = { L"cloth", L"chain", L"iron", L"diamond", L"gold" }; +const wstring PlayerRenderer::MATERIAL_NAMES[7] = { L"cloth", L"chain", L"iron", L"diamond", L"gold", L"zanite_layer", L"gravitite_layer" }; PlayerRenderer::PlayerRenderer() : MobRenderer( new HumanoidModel(0), 0.5f ) { diff --git a/Minecraft.Client/PlayerRenderer.h b/Minecraft.Client/PlayerRenderer.h index 10564104..1ed9a076 100644 --- a/Minecraft.Client/PlayerRenderer.h +++ b/Minecraft.Client/PlayerRenderer.h @@ -20,7 +20,7 @@ public: static unsigned int getNametagColour(int index); private: - static const wstring MATERIAL_NAMES[5]; + static const wstring MATERIAL_NAMES[7]; protected: virtual int prepareArmor(shared_ptr _player, int layer, float a); diff --git a/Minecraft.Client/PreStitchedTextureMap.cpp b/Minecraft.Client/PreStitchedTextureMap.cpp index b6c22223..b3e0417d 100644 --- a/Minecraft.Client/PreStitchedTextureMap.cpp +++ b/Minecraft.Client/PreStitchedTextureMap.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "..\Minecraft.World\net.minecraft.world.h" #include "..\Minecraft.World\net.minecraft.world.level.tile.h" #include "..\Minecraft.World\net.minecraft.world.item.h" @@ -301,231 +301,308 @@ void PreStitchedTextureMap::loadUVs() texturesByName.clear(); texturesToAnimate.clear(); - float slotSize = 1.0f/16.0f; + float slotW = 1.0f/16.0f; + float slotH; if(iconType != Icon::TYPE_TERRAIN) { - texturesByName.insert(stringIconMap::value_type(L"helmetCloth",new SimpleIcon(L"helmetCloth",slotSize*0,slotSize*0,slotSize*(0+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"helmetChain",new SimpleIcon(L"helmetChain",slotSize*1,slotSize*0,slotSize*(1+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"helmetIron",new SimpleIcon(L"helmetIron",slotSize*2,slotSize*0,slotSize*(2+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"helmetDiamond",new SimpleIcon(L"helmetDiamond",slotSize*3,slotSize*0,slotSize*(3+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"helmetGold",new SimpleIcon(L"helmetGold",slotSize*4,slotSize*0,slotSize*(4+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"flintAndSteel",new SimpleIcon(L"flintAndSteel",slotSize*5,slotSize*0,slotSize*(5+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"flint",new SimpleIcon(L"flint",slotSize*6,slotSize*0,slotSize*(6+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"coal",new SimpleIcon(L"coal",slotSize*7,slotSize*0,slotSize*(7+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"string",new SimpleIcon(L"string",slotSize*8,slotSize*0,slotSize*(8+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"seeds",new SimpleIcon(L"seeds",slotSize*9,slotSize*0,slotSize*(9+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"apple",new SimpleIcon(L"apple",slotSize*10,slotSize*0,slotSize*(10+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"appleGold",new SimpleIcon(L"appleGold",slotSize*11,slotSize*0,slotSize*(11+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"egg",new SimpleIcon(L"egg",slotSize*12,slotSize*0,slotSize*(12+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"sugar",new SimpleIcon(L"sugar",slotSize*13,slotSize*0,slotSize*(13+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"snowball",new SimpleIcon(L"snowball",slotSize*14,slotSize*0,slotSize*(14+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"slot_empty_helmet",new SimpleIcon(L"slot_empty_helmet",slotSize*15,slotSize*0,slotSize*(15+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"chestplateCloth",new SimpleIcon(L"chestplateCloth",slotSize*0,slotSize*1,slotSize*(0+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"chestplateChain",new SimpleIcon(L"chestplateChain",slotSize*1,slotSize*1,slotSize*(1+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"chestplateIron",new SimpleIcon(L"chestplateIron",slotSize*2,slotSize*1,slotSize*(2+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"chestplateDiamond",new SimpleIcon(L"chestplateDiamond",slotSize*3,slotSize*1,slotSize*(3+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"chestplateGold",new SimpleIcon(L"chestplateGold",slotSize*4,slotSize*1,slotSize*(4+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"bow",new SimpleIcon(L"bow",slotSize*5,slotSize*1,slotSize*(5+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"brick",new SimpleIcon(L"brick",slotSize*6,slotSize*1,slotSize*(6+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"ingotIron",new SimpleIcon(L"ingotIron",slotSize*7,slotSize*1,slotSize*(7+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"feather",new SimpleIcon(L"feather",slotSize*8,slotSize*1,slotSize*(8+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"wheat",new SimpleIcon(L"wheat",slotSize*9,slotSize*1,slotSize*(9+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"painting",new SimpleIcon(L"painting",slotSize*10,slotSize*1,slotSize*(10+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"reeds",new SimpleIcon(L"reeds",slotSize*11,slotSize*1,slotSize*(11+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"bone",new SimpleIcon(L"bone",slotSize*12,slotSize*1,slotSize*(12+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"cake",new SimpleIcon(L"cake",slotSize*13,slotSize*1,slotSize*(13+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"slimeball",new SimpleIcon(L"slimeball",slotSize*14,slotSize*1,slotSize*(14+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"slot_empty_chestplate",new SimpleIcon(L"slot_empty_chestplate",slotSize*15,slotSize*1,slotSize*(15+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"leggingsCloth",new SimpleIcon(L"leggingsCloth",slotSize*0,slotSize*2,slotSize*(0+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"leggingsChain",new SimpleIcon(L"leggingsChain",slotSize*1,slotSize*2,slotSize*(1+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"leggingsIron",new SimpleIcon(L"leggingsIron",slotSize*2,slotSize*2,slotSize*(2+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"leggingsDiamond",new SimpleIcon(L"leggingsDiamond",slotSize*3,slotSize*2,slotSize*(3+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"leggingsGold",new SimpleIcon(L"leggingsGold",slotSize*4,slotSize*2,slotSize*(4+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"arrow",new SimpleIcon(L"arrow",slotSize*5,slotSize*2,slotSize*(5+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"quiver",new SimpleIcon(L"quiver",slotSize*6,slotSize*2,slotSize*(6+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"ingotGold",new SimpleIcon(L"ingotGold",slotSize*7,slotSize*2,slotSize*(7+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"sulphur",new SimpleIcon(L"sulphur",slotSize*8,slotSize*2,slotSize*(8+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"bread",new SimpleIcon(L"bread",slotSize*9,slotSize*2,slotSize*(9+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"sign",new SimpleIcon(L"sign",slotSize*10,slotSize*2,slotSize*(10+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"doorWood",new SimpleIcon(L"doorWood",slotSize*11,slotSize*2,slotSize*(11+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"doorIron",new SimpleIcon(L"doorIron",slotSize*12,slotSize*2,slotSize*(12+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"bed",new SimpleIcon(L"bed",slotSize*13,slotSize*2,slotSize*(13+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"fireball",new SimpleIcon(L"fireball",slotSize*14,slotSize*2,slotSize*(14+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"slot_empty_leggings",new SimpleIcon(L"slot_empty_leggings",slotSize*15,slotSize*2,slotSize*(15+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"bootsCloth",new SimpleIcon(L"bootsCloth",slotSize*0,slotSize*3,slotSize*(0+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"bootsChain",new SimpleIcon(L"bootsChain",slotSize*1,slotSize*3,slotSize*(1+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"bootsIron",new SimpleIcon(L"bootsIron",slotSize*2,slotSize*3,slotSize*(2+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"bootsDiamond",new SimpleIcon(L"bootsDiamond",slotSize*3,slotSize*3,slotSize*(3+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"bootsGold",new SimpleIcon(L"bootsGold",slotSize*4,slotSize*3,slotSize*(4+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"stick",new SimpleIcon(L"stick",slotSize*5,slotSize*3,slotSize*(5+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"compass",new SimpleIcon(L"compass",slotSize*6,slotSize*3,slotSize*(6+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"compassP0",new SimpleIcon(L"compassP0",slotSize*7,slotSize*14,slotSize*(7+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"compassP1",new SimpleIcon(L"compassP1",slotSize*8,slotSize*14,slotSize*(8+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"compassP2",new SimpleIcon(L"compassP2",slotSize*9,slotSize*14,slotSize*(9+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"compassP3",new SimpleIcon(L"compassP3",slotSize*10,slotSize*14,slotSize*(10+1),slotSize*(14+1)))); + slotH = 1.0f/24.0f; // items.png is 256x384 = 16x24 grid + texturesByName.insert(stringIconMap::value_type(L"helmetCloth",new SimpleIcon(L"helmetCloth",slotW*0,slotH*0,slotW*(0+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"helmetChain",new SimpleIcon(L"helmetChain",slotW*1,slotH*0,slotW*(1+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"helmetIron",new SimpleIcon(L"helmetIron",slotW*2,slotH*0,slotW*(2+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"helmetDiamond",new SimpleIcon(L"helmetDiamond",slotW*3,slotH*0,slotW*(3+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"helmetGold",new SimpleIcon(L"helmetGold",slotW*4,slotH*0,slotW*(4+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"flintAndSteel",new SimpleIcon(L"flintAndSteel",slotW*5,slotH*0,slotW*(5+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"flint",new SimpleIcon(L"flint",slotW*6,slotH*0,slotW*(6+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"coal",new SimpleIcon(L"coal",slotW*7,slotH*0,slotW*(7+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"string",new SimpleIcon(L"string",slotW*8,slotH*0,slotW*(8+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"seeds",new SimpleIcon(L"seeds",slotW*9,slotH*0,slotW*(9+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"apple",new SimpleIcon(L"apple",slotW*10,slotH*0,slotW*(10+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"appleGold",new SimpleIcon(L"appleGold",slotW*11,slotH*0,slotW*(11+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"egg",new SimpleIcon(L"egg",slotW*12,slotH*0,slotW*(12+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"sugar",new SimpleIcon(L"sugar",slotW*13,slotH*0,slotW*(13+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"snowball",new SimpleIcon(L"snowball",slotW*14,slotH*0,slotW*(14+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"slot_empty_helmet",new SimpleIcon(L"slot_empty_helmet",slotW*15,slotH*0,slotW*(15+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"chestplateCloth",new SimpleIcon(L"chestplateCloth",slotW*0,slotH*1,slotW*(0+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"chestplateChain",new SimpleIcon(L"chestplateChain",slotW*1,slotH*1,slotW*(1+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"chestplateIron",new SimpleIcon(L"chestplateIron",slotW*2,slotH*1,slotW*(2+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"chestplateDiamond",new SimpleIcon(L"chestplateDiamond",slotW*3,slotH*1,slotW*(3+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"chestplateGold",new SimpleIcon(L"chestplateGold",slotW*4,slotH*1,slotW*(4+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"bow",new SimpleIcon(L"bow",slotW*5,slotH*1,slotW*(5+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"brick",new SimpleIcon(L"brick",slotW*6,slotH*1,slotW*(6+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"ingotIron",new SimpleIcon(L"ingotIron",slotW*7,slotH*1,slotW*(7+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"feather",new SimpleIcon(L"feather",slotW*8,slotH*1,slotW*(8+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"wheat",new SimpleIcon(L"wheat",slotW*9,slotH*1,slotW*(9+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"painting",new SimpleIcon(L"painting",slotW*10,slotH*1,slotW*(10+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"reeds",new SimpleIcon(L"reeds",slotW*11,slotH*1,slotW*(11+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"bone",new SimpleIcon(L"bone",slotW*12,slotH*1,slotW*(12+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"cake",new SimpleIcon(L"cake",slotW*13,slotH*1,slotW*(13+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"slimeball",new SimpleIcon(L"slimeball",slotW*14,slotH*1,slotW*(14+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"slot_empty_chestplate",new SimpleIcon(L"slot_empty_chestplate",slotW*15,slotH*1,slotW*(15+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"leggingsCloth",new SimpleIcon(L"leggingsCloth",slotW*0,slotH*2,slotW*(0+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"leggingsChain",new SimpleIcon(L"leggingsChain",slotW*1,slotH*2,slotW*(1+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"leggingsIron",new SimpleIcon(L"leggingsIron",slotW*2,slotH*2,slotW*(2+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"leggingsDiamond",new SimpleIcon(L"leggingsDiamond",slotW*3,slotH*2,slotW*(3+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"leggingsGold",new SimpleIcon(L"leggingsGold",slotW*4,slotH*2,slotW*(4+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"arrow",new SimpleIcon(L"arrow",slotW*5,slotH*2,slotW*(5+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"quiver",new SimpleIcon(L"quiver",slotW*6,slotH*2,slotW*(6+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"ingotGold",new SimpleIcon(L"ingotGold",slotW*7,slotH*2,slotW*(7+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"sulphur",new SimpleIcon(L"sulphur",slotW*8,slotH*2,slotW*(8+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"bread",new SimpleIcon(L"bread",slotW*9,slotH*2,slotW*(9+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"sign",new SimpleIcon(L"sign",slotW*10,slotH*2,slotW*(10+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"doorWood",new SimpleIcon(L"doorWood",slotW*11,slotH*2,slotW*(11+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"doorIron",new SimpleIcon(L"doorIron",slotW*12,slotH*2,slotW*(12+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"bed",new SimpleIcon(L"bed",slotW*13,slotH*2,slotW*(13+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"fireball",new SimpleIcon(L"fireball",slotW*14,slotH*2,slotW*(14+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"slot_empty_leggings",new SimpleIcon(L"slot_empty_leggings",slotW*15,slotH*2,slotW*(15+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"bootsCloth",new SimpleIcon(L"bootsCloth",slotW*0,slotH*3,slotW*(0+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"bootsChain",new SimpleIcon(L"bootsChain",slotW*1,slotH*3,slotW*(1+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"bootsIron",new SimpleIcon(L"bootsIron",slotW*2,slotH*3,slotW*(2+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"bootsDiamond",new SimpleIcon(L"bootsDiamond",slotW*3,slotH*3,slotW*(3+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"bootsGold",new SimpleIcon(L"bootsGold",slotW*4,slotH*3,slotW*(4+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"stick",new SimpleIcon(L"stick",slotW*5,slotH*3,slotW*(5+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"compass",new SimpleIcon(L"compass",slotW*6,slotH*3,slotW*(6+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"compassP0",new SimpleIcon(L"compassP0",slotW*7,slotH*14,slotW*(7+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"compassP1",new SimpleIcon(L"compassP1",slotW*8,slotH*14,slotW*(8+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"compassP2",new SimpleIcon(L"compassP2",slotW*9,slotH*14,slotW*(9+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"compassP3",new SimpleIcon(L"compassP3",slotW*10,slotH*14,slotW*(10+1),slotH*(14+1)))); texturesToAnimate.push_back(pair(L"compass",L"compass")); texturesToAnimate.push_back(pair(L"compassP0",L"compass")); texturesToAnimate.push_back(pair(L"compassP1",L"compass")); texturesToAnimate.push_back(pair(L"compassP2",L"compass")); texturesToAnimate.push_back(pair(L"compassP3",L"compass")); - texturesByName.insert(stringIconMap::value_type(L"diamond",new SimpleIcon(L"diamond",slotSize*7,slotSize*3,slotSize*(7+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"redstone",new SimpleIcon(L"redstone",slotSize*8,slotSize*3,slotSize*(8+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"clay",new SimpleIcon(L"clay",slotSize*9,slotSize*3,slotSize*(9+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"paper",new SimpleIcon(L"paper",slotSize*10,slotSize*3,slotSize*(10+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"book",new SimpleIcon(L"book",slotSize*11,slotSize*3,slotSize*(11+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"map",new SimpleIcon(L"map",slotSize*12,slotSize*3,slotSize*(12+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"seeds_pumpkin",new SimpleIcon(L"seeds_pumpkin",slotSize*13,slotSize*3,slotSize*(13+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"seeds_melon",new SimpleIcon(L"seeds_melon",slotSize*14,slotSize*3,slotSize*(14+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"slot_empty_boots",new SimpleIcon(L"slot_empty_boots",slotSize*15,slotSize*3,slotSize*(15+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"swordWood",new SimpleIcon(L"swordWood",slotSize*0,slotSize*4,slotSize*(0+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"swordStone",new SimpleIcon(L"swordStone",slotSize*1,slotSize*4,slotSize*(1+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"swordIron",new SimpleIcon(L"swordIron",slotSize*2,slotSize*4,slotSize*(2+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"swordDiamond",new SimpleIcon(L"swordDiamond",slotSize*3,slotSize*4,slotSize*(3+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"swordGold",new SimpleIcon(L"swordGold",slotSize*4,slotSize*4,slotSize*(4+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"fishingRod",new SimpleIcon(L"fishingRod",slotSize*5,slotSize*4,slotSize*(5+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"clock",new SimpleIcon(L"clock",slotSize*6,slotSize*4,slotSize*(6+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"clockP0",new SimpleIcon(L"clockP0",slotSize*11,slotSize*14,slotSize*(11+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"clockP1",new SimpleIcon(L"clockP1",slotSize*12,slotSize*14,slotSize*(12+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"clockP2",new SimpleIcon(L"clockP2",slotSize*13,slotSize*14,slotSize*(13+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"clockP3",new SimpleIcon(L"clockP3",slotSize*14,slotSize*14,slotSize*(14+1),slotSize*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"diamond",new SimpleIcon(L"diamond",slotW*7,slotH*3,slotW*(7+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"redstone",new SimpleIcon(L"redstone",slotW*8,slotH*3,slotW*(8+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"clay",new SimpleIcon(L"clay",slotW*9,slotH*3,slotW*(9+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"paper",new SimpleIcon(L"paper",slotW*10,slotH*3,slotW*(10+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"book",new SimpleIcon(L"book",slotW*11,slotH*3,slotW*(11+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"map",new SimpleIcon(L"map",slotW*12,slotH*3,slotW*(12+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"seeds_pumpkin",new SimpleIcon(L"seeds_pumpkin",slotW*13,slotH*3,slotW*(13+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"seeds_melon",new SimpleIcon(L"seeds_melon",slotW*14,slotH*3,slotW*(14+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"slot_empty_boots",new SimpleIcon(L"slot_empty_boots",slotW*15,slotH*3,slotW*(15+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"swordWood",new SimpleIcon(L"swordWood",slotW*0,slotH*4,slotW*(0+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"swordStone",new SimpleIcon(L"swordStone",slotW*1,slotH*4,slotW*(1+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"swordIron",new SimpleIcon(L"swordIron",slotW*2,slotH*4,slotW*(2+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"swordDiamond",new SimpleIcon(L"swordDiamond",slotW*3,slotH*4,slotW*(3+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"swordGold",new SimpleIcon(L"swordGold",slotW*4,slotH*4,slotW*(4+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"fishingRod",new SimpleIcon(L"fishingRod",slotW*5,slotH*4,slotW*(5+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"clock",new SimpleIcon(L"clock",slotW*6,slotH*4,slotW*(6+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"clockP0",new SimpleIcon(L"clockP0",slotW*11,slotH*14,slotW*(11+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"clockP1",new SimpleIcon(L"clockP1",slotW*12,slotH*14,slotW*(12+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"clockP2",new SimpleIcon(L"clockP2",slotW*13,slotH*14,slotW*(13+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"clockP3",new SimpleIcon(L"clockP3",slotW*14,slotH*14,slotW*(14+1),slotH*(14+1)))); texturesToAnimate.push_back(pair(L"clock",L"clock")); texturesToAnimate.push_back(pair(L"clockP0",L"clock")); texturesToAnimate.push_back(pair(L"clockP1",L"clock")); texturesToAnimate.push_back(pair(L"clockP2",L"clock")); texturesToAnimate.push_back(pair(L"clockP3",L"clock")); - texturesByName.insert(stringIconMap::value_type(L"bowl",new SimpleIcon(L"bowl",slotSize*7,slotSize*4,slotSize*(7+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"mushroomStew",new SimpleIcon(L"mushroomStew",slotSize*8,slotSize*4,slotSize*(8+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"yellowDust",new SimpleIcon(L"yellowDust",slotSize*9,slotSize*4,slotSize*(9+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"bucket",new SimpleIcon(L"bucket",slotSize*10,slotSize*4,slotSize*(10+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"bucketWater",new SimpleIcon(L"bucketWater",slotSize*11,slotSize*4,slotSize*(11+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"bucketLava",new SimpleIcon(L"bucketLava",slotSize*12,slotSize*4,slotSize*(12+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"milk",new SimpleIcon(L"milk",slotSize*13,slotSize*4,slotSize*(13+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_black",new SimpleIcon(L"dyePowder_black",slotSize*14,slotSize*4,slotSize*(14+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_gray",new SimpleIcon(L"dyePowder_gray",slotSize*15,slotSize*4,slotSize*(15+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"shovelWood",new SimpleIcon(L"shovelWood",slotSize*0,slotSize*5,slotSize*(0+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"shovelStone",new SimpleIcon(L"shovelStone",slotSize*1,slotSize*5,slotSize*(1+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"shovelIron",new SimpleIcon(L"shovelIron",slotSize*2,slotSize*5,slotSize*(2+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"shovelDiamond",new SimpleIcon(L"shovelDiamond",slotSize*3,slotSize*5,slotSize*(3+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"shovelGold",new SimpleIcon(L"shovelGold",slotSize*4,slotSize*5,slotSize*(4+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"fishingRod_empty",new SimpleIcon(L"fishingRod_empty",slotSize*5,slotSize*5,slotSize*(5+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"diode",new SimpleIcon(L"diode",slotSize*6,slotSize*5,slotSize*(6+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"porkchopRaw",new SimpleIcon(L"porkchopRaw",slotSize*7,slotSize*5,slotSize*(7+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"porkchopCooked",new SimpleIcon(L"porkchopCooked",slotSize*8,slotSize*5,slotSize*(8+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"fishRaw",new SimpleIcon(L"fishRaw",slotSize*9,slotSize*5,slotSize*(9+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"fishCooked",new SimpleIcon(L"fishCooked",slotSize*10,slotSize*5,slotSize*(10+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"rottenFlesh",new SimpleIcon(L"rottenFlesh",slotSize*11,slotSize*5,slotSize*(11+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"cookie",new SimpleIcon(L"cookie",slotSize*12,slotSize*5,slotSize*(12+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"shears",new SimpleIcon(L"shears",slotSize*13,slotSize*5,slotSize*(13+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_red",new SimpleIcon(L"dyePowder_red",slotSize*14,slotSize*5,slotSize*(14+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_pink",new SimpleIcon(L"dyePowder_pink",slotSize*15,slotSize*5,slotSize*(15+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"pickaxeWood",new SimpleIcon(L"pickaxeWood",slotSize*0,slotSize*6,slotSize*(0+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"pickaxeStone",new SimpleIcon(L"pickaxeStone",slotSize*1,slotSize*6,slotSize*(1+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"pickaxeIron",new SimpleIcon(L"pickaxeIron",slotSize*2,slotSize*6,slotSize*(2+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"pickaxeDiamond",new SimpleIcon(L"pickaxeDiamond",slotSize*3,slotSize*6,slotSize*(3+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"pickaxeGold",new SimpleIcon(L"pickaxeGold",slotSize*4,slotSize*6,slotSize*(4+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"bow_pull_0",new SimpleIcon(L"bow_pull_0",slotSize*5,slotSize*6,slotSize*(5+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"carrotOnAStick",new SimpleIcon(L"carrotOnAStick",slotSize*6,slotSize*6,slotSize*(6+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"leather",new SimpleIcon(L"leather",slotSize*7,slotSize*6,slotSize*(7+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"saddle",new SimpleIcon(L"saddle",slotSize*8,slotSize*6,slotSize*(8+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"beefRaw",new SimpleIcon(L"beefRaw",slotSize*9,slotSize*6,slotSize*(9+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"beefCooked",new SimpleIcon(L"beefCooked",slotSize*10,slotSize*6,slotSize*(10+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"enderPearl",new SimpleIcon(L"enderPearl",slotSize*11,slotSize*6,slotSize*(11+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"blazeRod",new SimpleIcon(L"blazeRod",slotSize*12,slotSize*6,slotSize*(12+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"melon",new SimpleIcon(L"melon",slotSize*13,slotSize*6,slotSize*(13+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_green",new SimpleIcon(L"dyePowder_green",slotSize*14,slotSize*6,slotSize*(14+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_lime",new SimpleIcon(L"dyePowder_lime",slotSize*15,slotSize*6,slotSize*(15+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"hatchetWood",new SimpleIcon(L"hatchetWood",slotSize*0,slotSize*7,slotSize*(0+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"hatchetStone",new SimpleIcon(L"hatchetStone",slotSize*1,slotSize*7,slotSize*(1+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"hatchetIron",new SimpleIcon(L"hatchetIron",slotSize*2,slotSize*7,slotSize*(2+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"hatchetDiamond",new SimpleIcon(L"hatchetDiamond",slotSize*3,slotSize*7,slotSize*(3+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"hatchetGold",new SimpleIcon(L"hatchetGold",slotSize*4,slotSize*7,slotSize*(4+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"bow_pull_1",new SimpleIcon(L"bow_pull_1",slotSize*5,slotSize*7,slotSize*(5+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"potatoBaked",new SimpleIcon(L"potatoBaked",slotSize*6,slotSize*7,slotSize*(6+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"potato",new SimpleIcon(L"potato",slotSize*7,slotSize*7,slotSize*(7+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"carrots",new SimpleIcon(L"carrots",slotSize*8,slotSize*7,slotSize*(8+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"chickenRaw",new SimpleIcon(L"chickenRaw",slotSize*9,slotSize*7,slotSize*(9+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"chickenCooked",new SimpleIcon(L"chickenCooked",slotSize*10,slotSize*7,slotSize*(10+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"ghastTear",new SimpleIcon(L"ghastTear",slotSize*11,slotSize*7,slotSize*(11+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"goldNugget",new SimpleIcon(L"goldNugget",slotSize*12,slotSize*7,slotSize*(12+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"netherStalkSeeds",new SimpleIcon(L"netherStalkSeeds",slotSize*13,slotSize*7,slotSize*(13+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_brown",new SimpleIcon(L"dyePowder_brown",slotSize*14,slotSize*7,slotSize*(14+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_yellow",new SimpleIcon(L"dyePowder_yellow",slotSize*15,slotSize*7,slotSize*(15+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"hoeWood",new SimpleIcon(L"hoeWood",slotSize*0,slotSize*8,slotSize*(0+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"hoeStone",new SimpleIcon(L"hoeStone",slotSize*1,slotSize*8,slotSize*(1+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"hoeIron",new SimpleIcon(L"hoeIron",slotSize*2,slotSize*8,slotSize*(2+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"hoeDiamond",new SimpleIcon(L"hoeDiamond",slotSize*3,slotSize*8,slotSize*(3+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"hoeGold",new SimpleIcon(L"hoeGold",slotSize*4,slotSize*8,slotSize*(4+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"bow_pull_2",new SimpleIcon(L"bow_pull_2",slotSize*5,slotSize*8,slotSize*(5+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"potatoPoisonous",new SimpleIcon(L"potatoPoisonous",slotSize*6,slotSize*8,slotSize*(6+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"minecart",new SimpleIcon(L"minecart",slotSize*7,slotSize*8,slotSize*(7+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"boat",new SimpleIcon(L"boat",slotSize*8,slotSize*8,slotSize*(8+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"speckledMelon",new SimpleIcon(L"speckledMelon",slotSize*9,slotSize*8,slotSize*(9+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"fermentedSpiderEye",new SimpleIcon(L"fermentedSpiderEye",slotSize*10,slotSize*8,slotSize*(10+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"spiderEye",new SimpleIcon(L"spiderEye",slotSize*11,slotSize*8,slotSize*(11+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"potion",new SimpleIcon(L"potion",slotSize*12,slotSize*8,slotSize*(12+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"glassBottle",new SimpleIcon(L"glassBottle",slotSize*12,slotSize*8,slotSize*(12+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"potion_contents",new SimpleIcon(L"potion_contents",slotSize*13,slotSize*8,slotSize*(13+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_blue",new SimpleIcon(L"dyePowder_blue",slotSize*14,slotSize*8,slotSize*(14+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_lightBlue",new SimpleIcon(L"dyePowder_lightBlue",slotSize*15,slotSize*8,slotSize*(15+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"helmetCloth_overlay",new SimpleIcon(L"helmetCloth_overlay",slotSize*0,slotSize*9,slotSize*(0+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"comparator",new SimpleIcon(L"comparator",slotSize*5,slotSize*9,slotSize*(5+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"carrotGolden",new SimpleIcon(L"carrotGolden",slotSize*6,slotSize*9,slotSize*(6+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"minecartChest",new SimpleIcon(L"minecartChest",slotSize*7,slotSize*9,slotSize*(7+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"pumpkinPie",new SimpleIcon(L"pumpkinPie",slotSize*8,slotSize*9,slotSize*(8+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"monsterPlacer",new SimpleIcon(L"monsterPlacer",slotSize*9,slotSize*9,slotSize*(9+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"potion_splash",new SimpleIcon(L"potion_splash",slotSize*10,slotSize*9,slotSize*(10+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"eyeOfEnder",new SimpleIcon(L"eyeOfEnder",slotSize*11,slotSize*9,slotSize*(11+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"cauldron",new SimpleIcon(L"cauldron",slotSize*12,slotSize*9,slotSize*(12+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"blazePowder",new SimpleIcon(L"blazePowder",slotSize*13,slotSize*9,slotSize*(13+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_purple",new SimpleIcon(L"dyePowder_purple",slotSize*14,slotSize*9,slotSize*(14+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_magenta",new SimpleIcon(L"dyePowder_magenta",slotSize*15,slotSize*9,slotSize*(15+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"chestplateCloth_overlay",new SimpleIcon(L"chestplateCloth_overlay",slotSize*0,slotSize*10,slotSize*(0+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"netherbrick",new SimpleIcon(L"netherbrick",slotSize*5,slotSize*10,slotSize*(5+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"minecartFurnace",new SimpleIcon(L"minecartFurnace",slotSize*7,slotSize*10,slotSize*(7+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"monsterPlacer_overlay",new SimpleIcon(L"monsterPlacer_overlay",slotSize*9,slotSize*10,slotSize*(9+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"ruby",new SimpleIcon(L"ruby",slotSize*10,slotSize*10,slotSize*(10+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"expBottle",new SimpleIcon(L"expBottle",slotSize*11,slotSize*10,slotSize*(11+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"brewingStand",new SimpleIcon(L"brewingStand",slotSize*12,slotSize*10,slotSize*(12+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"magmaCream",new SimpleIcon(L"magmaCream",slotSize*13,slotSize*10,slotSize*(13+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_cyan",new SimpleIcon(L"dyePowder_cyan",slotSize*14,slotSize*10,slotSize*(14+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_orange",new SimpleIcon(L"dyePowder_orange",slotSize*15,slotSize*10,slotSize*(15+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"leggingsCloth_overlay",new SimpleIcon(L"leggingsCloth_overlay",slotSize*0,slotSize*11,slotSize*(0+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"minecartHopper",new SimpleIcon(L"minecartHopper",slotSize*7,slotSize*11,slotSize*(7+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"hopper",new SimpleIcon(L"hopper",slotSize*8,slotSize*11,slotSize*(8+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"netherStar",new SimpleIcon(L"netherStar",slotSize*9,slotSize*11,slotSize*(9+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"emerald",new SimpleIcon(L"emerald",slotSize*10,slotSize*11,slotSize*(10+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"writingBook",new SimpleIcon(L"writingBook",slotSize*11,slotSize*11,slotSize*(11+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"writtenBook",new SimpleIcon(L"writtenBook",slotSize*12,slotSize*11,slotSize*(12+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"flowerPot",new SimpleIcon(L"flowerPot",slotSize*13,slotSize*11,slotSize*(13+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_silver",new SimpleIcon(L"dyePowder_silver",slotSize*14,slotSize*11,slotSize*(14+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"dyePowder_white",new SimpleIcon(L"dyePowder_white",slotSize*15,slotSize*11,slotSize*(15+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"bootsCloth_overlay",new SimpleIcon(L"bootsCloth_overlay",slotSize*0,slotSize*12,slotSize*(0+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"minecartTnt",new SimpleIcon(L"minecartTnt",slotSize*7,slotSize*12,slotSize*(7+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"fireworks",new SimpleIcon(L"fireworks",slotSize*9,slotSize*12,slotSize*(9+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"fireworksCharge",new SimpleIcon(L"fireworksCharge",slotSize*10,slotSize*12,slotSize*(10+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"fireworksCharge_overlay",new SimpleIcon(L"fireworksCharge_overlay",slotSize*11,slotSize*12,slotSize*(11+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"netherquartz",new SimpleIcon(L"netherquartz",slotSize*12,slotSize*12,slotSize*(12+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"emptyMap",new SimpleIcon(L"emptyMap",slotSize*13,slotSize*12,slotSize*(13+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"frame",new SimpleIcon(L"frame",slotSize*14,slotSize*12,slotSize*(14+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"enchantedBook",new SimpleIcon(L"enchantedBook",slotSize*15,slotSize*12,slotSize*(15+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"skull_skeleton",new SimpleIcon(L"skull_skeleton",slotSize*0,slotSize*14,slotSize*(0+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"skull_wither",new SimpleIcon(L"skull_wither",slotSize*1,slotSize*14,slotSize*(1+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"skull_zombie",new SimpleIcon(L"skull_zombie",slotSize*2,slotSize*14,slotSize*(2+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"skull_char",new SimpleIcon(L"skull_char",slotSize*3,slotSize*14,slotSize*(3+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"skull_creeper",new SimpleIcon(L"skull_creeper",slotSize*4,slotSize*14,slotSize*(4+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"dragonFireball",new SimpleIcon(L"dragonFireball",slotSize*15,slotSize*14,slotSize*(15+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_13",new SimpleIcon(L"record_13",slotSize*0,slotSize*15,slotSize*(0+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_cat",new SimpleIcon(L"record_cat",slotSize*1,slotSize*15,slotSize*(1+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_blocks",new SimpleIcon(L"record_blocks",slotSize*2,slotSize*15,slotSize*(2+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_chirp",new SimpleIcon(L"record_chirp",slotSize*3,slotSize*15,slotSize*(3+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_far",new SimpleIcon(L"record_far",slotSize*4,slotSize*15,slotSize*(4+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_mall",new SimpleIcon(L"record_mall",slotSize*5,slotSize*15,slotSize*(5+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_mellohi",new SimpleIcon(L"record_mellohi",slotSize*6,slotSize*15,slotSize*(6+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_stal",new SimpleIcon(L"record_stal",slotSize*7,slotSize*15,slotSize*(7+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_strad",new SimpleIcon(L"record_strad",slotSize*8,slotSize*15,slotSize*(8+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_ward",new SimpleIcon(L"record_ward",slotSize*9,slotSize*15,slotSize*(9+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_11",new SimpleIcon(L"record_11",slotSize*10,slotSize*15,slotSize*(10+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"record_where are we now",new SimpleIcon(L"record_where are we now",slotSize*11,slotSize*15,slotSize*(11+1),slotSize*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"bowl",new SimpleIcon(L"bowl",slotW*7,slotH*4,slotW*(7+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"mushroomStew",new SimpleIcon(L"mushroomStew",slotW*8,slotH*4,slotW*(8+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"yellowDust",new SimpleIcon(L"yellowDust",slotW*9,slotH*4,slotW*(9+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"bucket",new SimpleIcon(L"bucket",slotW*10,slotH*4,slotW*(10+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"bucketWater",new SimpleIcon(L"bucketWater",slotW*11,slotH*4,slotW*(11+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"bucketLava",new SimpleIcon(L"bucketLava",slotW*12,slotH*4,slotW*(12+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"milk",new SimpleIcon(L"milk",slotW*13,slotH*4,slotW*(13+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_black",new SimpleIcon(L"dyePowder_black",slotW*14,slotH*4,slotW*(14+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_gray",new SimpleIcon(L"dyePowder_gray",slotW*15,slotH*4,slotW*(15+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"shovelWood",new SimpleIcon(L"shovelWood",slotW*0,slotH*5,slotW*(0+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"shovelStone",new SimpleIcon(L"shovelStone",slotW*1,slotH*5,slotW*(1+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"shovelIron",new SimpleIcon(L"shovelIron",slotW*2,slotH*5,slotW*(2+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"shovelDiamond",new SimpleIcon(L"shovelDiamond",slotW*3,slotH*5,slotW*(3+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"shovelGold",new SimpleIcon(L"shovelGold",slotW*4,slotH*5,slotW*(4+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"fishingRod_empty",new SimpleIcon(L"fishingRod_empty",slotW*5,slotH*5,slotW*(5+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"diode",new SimpleIcon(L"diode",slotW*6,slotH*5,slotW*(6+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"porkchopRaw",new SimpleIcon(L"porkchopRaw",slotW*7,slotH*5,slotW*(7+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"porkchopCooked",new SimpleIcon(L"porkchopCooked",slotW*8,slotH*5,slotW*(8+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"fishRaw",new SimpleIcon(L"fishRaw",slotW*9,slotH*5,slotW*(9+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"fishCooked",new SimpleIcon(L"fishCooked",slotW*10,slotH*5,slotW*(10+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"rottenFlesh",new SimpleIcon(L"rottenFlesh",slotW*11,slotH*5,slotW*(11+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"cookie",new SimpleIcon(L"cookie",slotW*12,slotH*5,slotW*(12+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"shears",new SimpleIcon(L"shears",slotW*13,slotH*5,slotW*(13+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_red",new SimpleIcon(L"dyePowder_red",slotW*14,slotH*5,slotW*(14+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_pink",new SimpleIcon(L"dyePowder_pink",slotW*15,slotH*5,slotW*(15+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"pickaxeWood",new SimpleIcon(L"pickaxeWood",slotW*0,slotH*6,slotW*(0+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"pickaxeStone",new SimpleIcon(L"pickaxeStone",slotW*1,slotH*6,slotW*(1+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"pickaxeIron",new SimpleIcon(L"pickaxeIron",slotW*2,slotH*6,slotW*(2+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"pickaxeDiamond",new SimpleIcon(L"pickaxeDiamond",slotW*3,slotH*6,slotW*(3+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"pickaxeGold",new SimpleIcon(L"pickaxeGold",slotW*4,slotH*6,slotW*(4+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"bow_pull_0",new SimpleIcon(L"bow_pull_0",slotW*5,slotH*6,slotW*(5+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"carrotOnAStick",new SimpleIcon(L"carrotOnAStick",slotW*6,slotH*6,slotW*(6+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"leather",new SimpleIcon(L"leather",slotW*7,slotH*6,slotW*(7+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"saddle",new SimpleIcon(L"saddle",slotW*8,slotH*6,slotW*(8+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"beefRaw",new SimpleIcon(L"beefRaw",slotW*9,slotH*6,slotW*(9+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"beefCooked",new SimpleIcon(L"beefCooked",slotW*10,slotH*6,slotW*(10+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"enderPearl",new SimpleIcon(L"enderPearl",slotW*11,slotH*6,slotW*(11+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"blazeRod",new SimpleIcon(L"blazeRod",slotW*12,slotH*6,slotW*(12+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"melon",new SimpleIcon(L"melon",slotW*13,slotH*6,slotW*(13+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_green",new SimpleIcon(L"dyePowder_green",slotW*14,slotH*6,slotW*(14+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_lime",new SimpleIcon(L"dyePowder_lime",slotW*15,slotH*6,slotW*(15+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"hatchetWood",new SimpleIcon(L"hatchetWood",slotW*0,slotH*7,slotW*(0+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"hatchetStone",new SimpleIcon(L"hatchetStone",slotW*1,slotH*7,slotW*(1+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"hatchetIron",new SimpleIcon(L"hatchetIron",slotW*2,slotH*7,slotW*(2+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"hatchetDiamond",new SimpleIcon(L"hatchetDiamond",slotW*3,slotH*7,slotW*(3+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"hatchetGold",new SimpleIcon(L"hatchetGold",slotW*4,slotH*7,slotW*(4+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"bow_pull_1",new SimpleIcon(L"bow_pull_1",slotW*5,slotH*7,slotW*(5+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"potatoBaked",new SimpleIcon(L"potatoBaked",slotW*6,slotH*7,slotW*(6+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"potato",new SimpleIcon(L"potato",slotW*7,slotH*7,slotW*(7+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"carrots",new SimpleIcon(L"carrots",slotW*8,slotH*7,slotW*(8+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"chickenRaw",new SimpleIcon(L"chickenRaw",slotW*9,slotH*7,slotW*(9+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"chickenCooked",new SimpleIcon(L"chickenCooked",slotW*10,slotH*7,slotW*(10+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"ghastTear",new SimpleIcon(L"ghastTear",slotW*11,slotH*7,slotW*(11+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"goldNugget",new SimpleIcon(L"goldNugget",slotW*12,slotH*7,slotW*(12+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"netherStalkSeeds",new SimpleIcon(L"netherStalkSeeds",slotW*13,slotH*7,slotW*(13+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_brown",new SimpleIcon(L"dyePowder_brown",slotW*14,slotH*7,slotW*(14+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_yellow",new SimpleIcon(L"dyePowder_yellow",slotW*15,slotH*7,slotW*(15+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"hoeWood",new SimpleIcon(L"hoeWood",slotW*0,slotH*8,slotW*(0+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"hoeStone",new SimpleIcon(L"hoeStone",slotW*1,slotH*8,slotW*(1+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"hoeIron",new SimpleIcon(L"hoeIron",slotW*2,slotH*8,slotW*(2+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"hoeDiamond",new SimpleIcon(L"hoeDiamond",slotW*3,slotH*8,slotW*(3+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"hoeGold",new SimpleIcon(L"hoeGold",slotW*4,slotH*8,slotW*(4+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"bow_pull_2",new SimpleIcon(L"bow_pull_2",slotW*5,slotH*8,slotW*(5+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"potatoPoisonous",new SimpleIcon(L"potatoPoisonous",slotW*6,slotH*8,slotW*(6+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"minecart",new SimpleIcon(L"minecart",slotW*7,slotH*8,slotW*(7+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"boat",new SimpleIcon(L"boat",slotW*8,slotH*8,slotW*(8+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"speckledMelon",new SimpleIcon(L"speckledMelon",slotW*9,slotH*8,slotW*(9+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"fermentedSpiderEye",new SimpleIcon(L"fermentedSpiderEye",slotW*10,slotH*8,slotW*(10+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"spiderEye",new SimpleIcon(L"spiderEye",slotW*11,slotH*8,slotW*(11+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"potion",new SimpleIcon(L"potion",slotW*12,slotH*8,slotW*(12+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"glassBottle",new SimpleIcon(L"glassBottle",slotW*12,slotH*8,slotW*(12+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"potion_contents",new SimpleIcon(L"potion_contents",slotW*13,slotH*8,slotW*(13+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_blue",new SimpleIcon(L"dyePowder_blue",slotW*14,slotH*8,slotW*(14+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_lightBlue",new SimpleIcon(L"dyePowder_lightBlue",slotW*15,slotH*8,slotW*(15+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"helmetCloth_overlay",new SimpleIcon(L"helmetCloth_overlay",slotW*0,slotH*9,slotW*(0+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"comparator",new SimpleIcon(L"comparator",slotW*5,slotH*9,slotW*(5+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"carrotGolden",new SimpleIcon(L"carrotGolden",slotW*6,slotH*9,slotW*(6+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"minecartChest",new SimpleIcon(L"minecartChest",slotW*7,slotH*9,slotW*(7+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"pumpkinPie",new SimpleIcon(L"pumpkinPie",slotW*8,slotH*9,slotW*(8+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"monsterPlacer",new SimpleIcon(L"monsterPlacer",slotW*9,slotH*9,slotW*(9+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"potion_splash",new SimpleIcon(L"potion_splash",slotW*10,slotH*9,slotW*(10+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"eyeOfEnder",new SimpleIcon(L"eyeOfEnder",slotW*11,slotH*9,slotW*(11+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"cauldron",new SimpleIcon(L"cauldron",slotW*12,slotH*9,slotW*(12+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"blazePowder",new SimpleIcon(L"blazePowder",slotW*13,slotH*9,slotW*(13+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_purple",new SimpleIcon(L"dyePowder_purple",slotW*14,slotH*9,slotW*(14+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_magenta",new SimpleIcon(L"dyePowder_magenta",slotW*15,slotH*9,slotW*(15+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"chestplateCloth_overlay",new SimpleIcon(L"chestplateCloth_overlay",slotW*0,slotH*10,slotW*(0+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"netherbrick",new SimpleIcon(L"netherbrick",slotW*5,slotH*10,slotW*(5+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"minecartFurnace",new SimpleIcon(L"minecartFurnace",slotW*7,slotH*10,slotW*(7+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"monsterPlacer_overlay",new SimpleIcon(L"monsterPlacer_overlay",slotW*9,slotH*10,slotW*(9+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"ruby",new SimpleIcon(L"ruby",slotW*10,slotH*10,slotW*(10+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"expBottle",new SimpleIcon(L"expBottle",slotW*11,slotH*10,slotW*(11+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"brewingStand",new SimpleIcon(L"brewingStand",slotW*12,slotH*10,slotW*(12+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"magmaCream",new SimpleIcon(L"magmaCream",slotW*13,slotH*10,slotW*(13+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_cyan",new SimpleIcon(L"dyePowder_cyan",slotW*14,slotH*10,slotW*(14+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_orange",new SimpleIcon(L"dyePowder_orange",slotW*15,slotH*10,slotW*(15+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"leggingsCloth_overlay",new SimpleIcon(L"leggingsCloth_overlay",slotW*0,slotH*11,slotW*(0+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"minecartHopper",new SimpleIcon(L"minecartHopper",slotW*7,slotH*11,slotW*(7+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"hopper",new SimpleIcon(L"hopper",slotW*8,slotH*11,slotW*(8+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"netherStar",new SimpleIcon(L"netherStar",slotW*9,slotH*11,slotW*(9+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"emerald",new SimpleIcon(L"emerald",slotW*10,slotH*11,slotW*(10+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"writingBook",new SimpleIcon(L"writingBook",slotW*11,slotH*11,slotW*(11+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"writtenBook",new SimpleIcon(L"writtenBook",slotW*12,slotH*11,slotW*(12+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"flowerPot",new SimpleIcon(L"flowerPot",slotW*13,slotH*11,slotW*(13+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_silver",new SimpleIcon(L"dyePowder_silver",slotW*14,slotH*11,slotW*(14+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"dyePowder_white",new SimpleIcon(L"dyePowder_white",slotW*15,slotH*11,slotW*(15+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"bootsCloth_overlay",new SimpleIcon(L"bootsCloth_overlay",slotW*0,slotH*12,slotW*(0+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"minecartTnt",new SimpleIcon(L"minecartTnt",slotW*7,slotH*12,slotW*(7+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"fireworks",new SimpleIcon(L"fireworks",slotW*9,slotH*12,slotW*(9+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"fireworksCharge",new SimpleIcon(L"fireworksCharge",slotW*10,slotH*12,slotW*(10+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"fireworksCharge_overlay",new SimpleIcon(L"fireworksCharge_overlay",slotW*11,slotH*12,slotW*(11+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"netherquartz",new SimpleIcon(L"netherquartz",slotW*12,slotH*12,slotW*(12+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"emptyMap",new SimpleIcon(L"emptyMap",slotW*13,slotH*12,slotW*(13+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"frame",new SimpleIcon(L"frame",slotW*14,slotH*12,slotW*(14+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"enchantedBook",new SimpleIcon(L"enchantedBook",slotW*15,slotH*12,slotW*(15+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"skull_skeleton",new SimpleIcon(L"skull_skeleton",slotW*0,slotH*14,slotW*(0+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"skull_wither",new SimpleIcon(L"skull_wither",slotW*1,slotH*14,slotW*(1+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"skull_zombie",new SimpleIcon(L"skull_zombie",slotW*2,slotH*14,slotW*(2+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"skull_char",new SimpleIcon(L"skull_char",slotW*3,slotH*14,slotW*(3+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"skull_creeper",new SimpleIcon(L"skull_creeper",slotW*4,slotH*14,slotW*(4+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"dragonFireball",new SimpleIcon(L"dragonFireball",slotW*15,slotH*14,slotW*(15+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_13",new SimpleIcon(L"record_13",slotW*0,slotH*15,slotW*(0+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_cat",new SimpleIcon(L"record_cat",slotW*1,slotH*15,slotW*(1+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_blocks",new SimpleIcon(L"record_blocks",slotW*2,slotH*15,slotW*(2+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_chirp",new SimpleIcon(L"record_chirp",slotW*3,slotH*15,slotW*(3+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_far",new SimpleIcon(L"record_far",slotW*4,slotH*15,slotW*(4+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_mall",new SimpleIcon(L"record_mall",slotW*5,slotH*15,slotW*(5+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_mellohi",new SimpleIcon(L"record_mellohi",slotW*6,slotH*15,slotW*(6+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_stal",new SimpleIcon(L"record_stal",slotW*7,slotH*15,slotW*(7+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_strad",new SimpleIcon(L"record_strad",slotW*8,slotH*15,slotW*(8+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_ward",new SimpleIcon(L"record_ward",slotW*9,slotH*15,slotW*(9+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_11",new SimpleIcon(L"record_11",slotW*10,slotH*15,slotW*(10+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"record_where are we now",new SimpleIcon(L"record_where are we now",slotW*11,slotH*15,slotW*(11+1),slotH*(15+1)))); + + // Aether Items - Row 16 + texturesByName.insert(stringIconMap::value_type(L"helmetZanite",new SimpleIcon(L"helmetZanite",slotW*0,slotH*16,slotW*(0+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"helmetGravitite",new SimpleIcon(L"helmetGravitite",slotW*1,slotH*16,slotW*(1+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"zanite",new SimpleIcon(L"zanite",slotW*2,slotH*16,slotW*(2+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"ambrosiumShard",new SimpleIcon(L"ambrosiumShard",slotW*3,slotH*16,slotW*(3+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"aechorPetal",new SimpleIcon(L"aechorPetal",slotW*4,slotH*16,slotW*(4+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"skyrootBucket",new SimpleIcon(L"skyrootBucket",slotW*5,slotH*16,slotW*(5+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"skyrootBucketWater",new SimpleIcon(L"skyrootBucketWater",slotW*6,slotH*16,slotW*(6+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"skyrootBucketMilk",new SimpleIcon(L"skyrootBucketMilk",slotW*7,slotH*16,slotW*(7+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"skyrootBucketPoison",new SimpleIcon(L"skyrootBucketPoison",slotW*8,slotH*16,slotW*(8+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloudParachute",new SimpleIcon(L"cloudParachute",slotW*9,slotH*16,slotW*(9+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloudStaff",new SimpleIcon(L"cloudStaff",slotW*10,slotH*16,slotW*(10+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"dartEnchanted",new SimpleIcon(L"dartEnchanted",slotW*11,slotH*16,slotW*(11+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"dartGolden",new SimpleIcon(L"dartGolden",slotW*12,slotH*16,slotW*(12+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"dartPoison",new SimpleIcon(L"dartPoison",slotW*13,slotH*16,slotW*(13+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"goldenAmber",new SimpleIcon(L"goldenAmber",slotW*14,slotH*16,slotW*(14+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"gummieSwet",new SimpleIcon(L"gummieSwet",slotW*15,slotH*16,slotW*(15+1),slotH*(16+1)))); + + // Aether Items - Row 17 + texturesByName.insert(stringIconMap::value_type(L"chestplateZanite",new SimpleIcon(L"chestplateZanite",slotW*0,slotH*17,slotW*(0+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"chestplateGravitite",new SimpleIcon(L"chestplateGravitite",slotW*1,slotH*17,slotW*(1+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"flamingGemstone",new SimpleIcon(L"flamingGemstone",slotW*2,slotH*17,slotW*(2+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"skyrootStick",new SimpleIcon(L"skyrootStick",slotW*3,slotH*17,slotW*(3+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"repulsionShield",new SimpleIcon(L"repulsionShield",slotW*4,slotH*17,slotW*(4+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"regenerationStone",new SimpleIcon(L"regenerationStone",slotW*5,slotH*17,slotW*(5+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"pigSlayer",new SimpleIcon(L"pigSlayer",slotW*6,slotH*17,slotW*(6+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"natureStaff",new SimpleIcon(L"natureStaff",slotW*7,slotH*17,slotW*(7+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"moaEgg",new SimpleIcon(L"moaEgg",slotW*8,slotH*17,slotW*(8+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"lifeShard",new SimpleIcon(L"lifeShard",slotW*9,slotH*17,slotW*(9+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"lance",new SimpleIcon(L"lance",slotW*10,slotH*17,slotW*(10+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"dartShooterEnchanted",new SimpleIcon(L"dartShooterEnchanted",slotW*11,slotH*17,slotW*(11+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"dartShooter",new SimpleIcon(L"dartShooter",slotW*12,slotH*17,slotW*(12+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"dartShooterPoison",new SimpleIcon(L"dartShooterPoison",slotW*13,slotH*17,slotW*(13+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"goldenFeather",new SimpleIcon(L"goldenFeather",slotW*14,slotH*17,slotW*(14+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"aetherKey",new SimpleIcon(L"aetherKey",slotW*15,slotH*17,slotW*(15+1),slotH*(17+1)))); + + // Aether Items - Row 18 + texturesByName.insert(stringIconMap::value_type(L"leggingsZanite",new SimpleIcon(L"leggingsZanite",slotW*0,slotH*18,slotW*(0+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"leggingsGravitite",new SimpleIcon(L"leggingsGravitite",slotW*1,slotH*18,slotW*(1+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"gravititePlate",new SimpleIcon(L"gravititePlate",slotW*2,slotH*18,slotW*(2+1),slotH*(18+1)))); + + // Aether Items - Row 19 + texturesByName.insert(stringIconMap::value_type(L"bootsZanite",new SimpleIcon(L"bootsZanite",slotW*0,slotH*19,slotW*(0+1),slotH*(19+1)))); + texturesByName.insert(stringIconMap::value_type(L"bootsGravitite",new SimpleIcon(L"bootsGravitite",slotW*1,slotH*19,slotW*(1+1),slotH*(19+1)))); + + // Aether Items - Row 20 (Swords) + texturesByName.insert(stringIconMap::value_type(L"swordZanite",new SimpleIcon(L"swordZanite",slotW*0,slotH*20,slotW*(0+1),slotH*(20+1)))); + texturesByName.insert(stringIconMap::value_type(L"swordGravitite",new SimpleIcon(L"swordGravitite",slotW*1,slotH*20,slotW*(1+1),slotH*(20+1)))); + texturesByName.insert(stringIconMap::value_type(L"swordSkyroot",new SimpleIcon(L"swordSkyroot",slotW*2,slotH*20,slotW*(2+1),slotH*(20+1)))); + texturesByName.insert(stringIconMap::value_type(L"swordHolystone",new SimpleIcon(L"swordHolystone",slotW*3,slotH*20,slotW*(3+1),slotH*(20+1)))); + texturesByName.insert(stringIconMap::value_type(L"vampireBlade",new SimpleIcon(L"vampireBlade",slotW*4,slotH*20,slotW*(4+1),slotH*(20+1)))); + texturesByName.insert(stringIconMap::value_type(L"phoenixSword",new SimpleIcon(L"phoenixSword",slotW*5,slotH*20,slotW*(5+1),slotH*(20+1)))); + texturesByName.insert(stringIconMap::value_type(L"lightningKnife",new SimpleIcon(L"lightningKnife",slotW*6,slotH*20,slotW*(6+1),slotH*(20+1)))); + + // Aether Items - Row 21 (Shovels) + texturesByName.insert(stringIconMap::value_type(L"shovelZanite",new SimpleIcon(L"shovelZanite",slotW*0,slotH*21,slotW*(0+1),slotH*(21+1)))); + texturesByName.insert(stringIconMap::value_type(L"shovelGravitite",new SimpleIcon(L"shovelGravitite",slotW*1,slotH*21,slotW*(1+1),slotH*(21+1)))); + texturesByName.insert(stringIconMap::value_type(L"shovelSkyroot",new SimpleIcon(L"shovelSkyroot",slotW*2,slotH*21,slotW*(2+1),slotH*(21+1)))); + texturesByName.insert(stringIconMap::value_type(L"shovelHolystone",new SimpleIcon(L"shovelHolystone",slotW*3,slotH*21,slotW*(3+1),slotH*(21+1)))); + texturesByName.insert(stringIconMap::value_type(L"phoenixShovel",new SimpleIcon(L"phoenixShovel",slotW*5,slotH*21,slotW*(5+1),slotH*(21+1)))); + + // Aether Items - Row 22 (Pickaxes) + texturesByName.insert(stringIconMap::value_type(L"pickaxeZanite",new SimpleIcon(L"pickaxeZanite",slotW*0,slotH*22,slotW*(0+1),slotH*(22+1)))); + texturesByName.insert(stringIconMap::value_type(L"pickaxeGravitite",new SimpleIcon(L"pickaxeGravitite",slotW*1,slotH*22,slotW*(1+1),slotH*(22+1)))); + texturesByName.insert(stringIconMap::value_type(L"pickaxeSkyroot",new SimpleIcon(L"pickaxeSkyroot",slotW*2,slotH*22,slotW*(2+1),slotH*(22+1)))); + texturesByName.insert(stringIconMap::value_type(L"pickaxeHolystone",new SimpleIcon(L"pickaxeHolystone",slotW*3,slotH*22,slotW*(3+1),slotH*(22+1)))); + texturesByName.insert(stringIconMap::value_type(L"phoenixPickaxe",new SimpleIcon(L"phoenixPickaxe",slotW*5,slotH*22,slotW*(5+1),slotH*(22+1)))); + + // Aether Items - Row 23 (Axes) + texturesByName.insert(stringIconMap::value_type(L"hatchetZanite",new SimpleIcon(L"hatchetZanite",slotW*0,slotH*23,slotW*(0+1),slotH*(23+1)))); + texturesByName.insert(stringIconMap::value_type(L"hatchetGravitite",new SimpleIcon(L"hatchetGravitite",slotW*1,slotH*23,slotW*(1+1),slotH*(23+1)))); + texturesByName.insert(stringIconMap::value_type(L"hatchetSkyroot",new SimpleIcon(L"hatchetSkyroot",slotW*2,slotH*23,slotW*(2+1),slotH*(23+1)))); + texturesByName.insert(stringIconMap::value_type(L"hatchetHolystone",new SimpleIcon(L"hatchetHolystone",slotW*3,slotH*23,slotW*(3+1),slotH*(23+1)))); + texturesByName.insert(stringIconMap::value_type(L"phoenixAxe",new SimpleIcon(L"phoenixAxe",slotW*5,slotH*23,slotW*(5+1),slotH*(23+1)))); // Special cases ClockTexture *dataClock = new ClockTexture(); @@ -590,264 +667,312 @@ void PreStitchedTextureMap::loadUVs() } else { - texturesByName.insert(stringIconMap::value_type(L"grass_top",new SimpleIcon(L"grass_top",slotSize*0,slotSize*0,slotSize*(0+1),slotSize*(0+1)))); + slotH = 1.0f/19.0f; // terrain.png is 256x304 = 16x19 grid + texturesByName.insert(stringIconMap::value_type(L"grass_top",new SimpleIcon(L"grass_top",slotW*0,slotH*0,slotW*(0+1),slotH*(0+1)))); texturesByName[L"grass_top"]->setFlags(Icon::IS_GRASS_TOP); // 4J added for faster determination of texture type in tesselation - texturesByName.insert(stringIconMap::value_type(L"stone",new SimpleIcon(L"stone",slotSize*1,slotSize*0,slotSize*(1+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"dirt",new SimpleIcon(L"dirt",slotSize*2,slotSize*0,slotSize*(2+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"grass_side",new SimpleIcon(L"grass_side",slotSize*3,slotSize*0,slotSize*(3+1),slotSize*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"stone",new SimpleIcon(L"stone",slotW*1,slotH*0,slotW*(1+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"dirt",new SimpleIcon(L"dirt",slotW*2,slotH*0,slotW*(2+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"grass_side",new SimpleIcon(L"grass_side",slotW*3,slotH*0,slotW*(3+1),slotH*(0+1)))); texturesByName[L"grass_side"]->setFlags(Icon::IS_GRASS_SIDE); // 4J added for faster determination of texture type in tesselation - texturesByName.insert(stringIconMap::value_type(L"wood",new SimpleIcon(L"wood",slotSize*4,slotSize*0,slotSize*(4+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"stoneslab_side",new SimpleIcon(L"stoneslab_side",slotSize*5,slotSize*0,slotSize*(5+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"stoneslab_top",new SimpleIcon(L"stoneslab_top",slotSize*6,slotSize*0,slotSize*(6+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"brick",new SimpleIcon(L"brick",slotSize*7,slotSize*0,slotSize*(7+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"tnt_side",new SimpleIcon(L"tnt_side",slotSize*8,slotSize*0,slotSize*(8+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"tnt_top",new SimpleIcon(L"tnt_top",slotSize*9,slotSize*0,slotSize*(9+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"tnt_bottom",new SimpleIcon(L"tnt_bottom",slotSize*10,slotSize*0,slotSize*(10+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"web",new SimpleIcon(L"web",slotSize*11,slotSize*0,slotSize*(11+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"rose",new SimpleIcon(L"rose",slotSize*12,slotSize*0,slotSize*(12+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"flower",new SimpleIcon(L"flower",slotSize*13,slotSize*0,slotSize*(13+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"portal",new SimpleIcon(L"portal",slotSize*14,slotSize*0,slotSize*(14+1),slotSize*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"wood",new SimpleIcon(L"wood",slotW*4,slotH*0,slotW*(4+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"stoneslab_side",new SimpleIcon(L"stoneslab_side",slotW*5,slotH*0,slotW*(5+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"stoneslab_top",new SimpleIcon(L"stoneslab_top",slotW*6,slotH*0,slotW*(6+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"brick",new SimpleIcon(L"brick",slotW*7,slotH*0,slotW*(7+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"tnt_side",new SimpleIcon(L"tnt_side",slotW*8,slotH*0,slotW*(8+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"tnt_top",new SimpleIcon(L"tnt_top",slotW*9,slotH*0,slotW*(9+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"tnt_bottom",new SimpleIcon(L"tnt_bottom",slotW*10,slotH*0,slotW*(10+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"web",new SimpleIcon(L"web",slotW*11,slotH*0,slotW*(11+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"rose",new SimpleIcon(L"rose",slotW*12,slotH*0,slotW*(12+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"flower",new SimpleIcon(L"flower",slotW*13,slotH*0,slotW*(13+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"portal",new SimpleIcon(L"portal",slotW*14,slotH*0,slotW*(14+1),slotH*(0+1)))); texturesToAnimate.push_back(pair(L"portal",L"portal")); - texturesByName.insert(stringIconMap::value_type(L"sapling",new SimpleIcon(L"sapling",slotSize*15,slotSize*0,slotSize*(15+1),slotSize*(0+1)))); - texturesByName.insert(stringIconMap::value_type(L"stonebrick",new SimpleIcon(L"stonebrick",slotSize*0,slotSize*1,slotSize*(0+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"bedrock",new SimpleIcon(L"bedrock",slotSize*1,slotSize*1,slotSize*(1+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"sand",new SimpleIcon(L"sand",slotSize*2,slotSize*1,slotSize*(2+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"gravel",new SimpleIcon(L"gravel",slotSize*3,slotSize*1,slotSize*(3+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"tree_side",new SimpleIcon(L"tree_side",slotSize*4,slotSize*1,slotSize*(4+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"tree_top",new SimpleIcon(L"tree_top",slotSize*5,slotSize*1,slotSize*(5+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"blockIron",new SimpleIcon(L"blockIron",slotSize*6,slotSize*1,slotSize*(6+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"blockGold",new SimpleIcon(L"blockGold",slotSize*7,slotSize*1,slotSize*(7+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"blockDiamond",new SimpleIcon(L"blockDiamond",slotSize*8,slotSize*1,slotSize*(8+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"blockEmerald",new SimpleIcon(L"blockEmerald",slotSize*9,slotSize*1,slotSize*(9+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"blockRedstone",new SimpleIcon(L"blockRedstone",slotSize*10,slotSize*1,slotSize*(10+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"dropper_front",new SimpleIcon(L"dropper_front",slotSize*11,slotSize*1,slotSize*(11+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"mushroom_red",new SimpleIcon(L"mushroom_red",slotSize*12,slotSize*1,slotSize*(12+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"mushroom_brown",new SimpleIcon(L"mushroom_brown",slotSize*13,slotSize*1,slotSize*(13+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"sapling_jungle",new SimpleIcon(L"sapling_jungle",slotSize*14,slotSize*1,slotSize*(14+1),slotSize*(1+1)))); - texturesByName.insert(stringIconMap::value_type(L"fire_0",new SimpleIcon(L"fire_0",slotSize*15,slotSize*1,slotSize*(15+1),slotSize*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"sapling",new SimpleIcon(L"sapling",slotW*15,slotH*0,slotW*(15+1),slotH*(0+1)))); + texturesByName.insert(stringIconMap::value_type(L"stonebrick",new SimpleIcon(L"stonebrick",slotW*0,slotH*1,slotW*(0+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"bedrock",new SimpleIcon(L"bedrock",slotW*1,slotH*1,slotW*(1+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"sand",new SimpleIcon(L"sand",slotW*2,slotH*1,slotW*(2+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"gravel",new SimpleIcon(L"gravel",slotW*3,slotH*1,slotW*(3+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"tree_side",new SimpleIcon(L"tree_side",slotW*4,slotH*1,slotW*(4+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"tree_top",new SimpleIcon(L"tree_top",slotW*5,slotH*1,slotW*(5+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"blockIron",new SimpleIcon(L"blockIron",slotW*6,slotH*1,slotW*(6+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"blockGold",new SimpleIcon(L"blockGold",slotW*7,slotH*1,slotW*(7+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"blockDiamond",new SimpleIcon(L"blockDiamond",slotW*8,slotH*1,slotW*(8+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"blockEmerald",new SimpleIcon(L"blockEmerald",slotW*9,slotH*1,slotW*(9+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"blockRedstone",new SimpleIcon(L"blockRedstone",slotW*10,slotH*1,slotW*(10+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"dropper_front",new SimpleIcon(L"dropper_front",slotW*11,slotH*1,slotW*(11+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"mushroom_red",new SimpleIcon(L"mushroom_red",slotW*12,slotH*1,slotW*(12+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"mushroom_brown",new SimpleIcon(L"mushroom_brown",slotW*13,slotH*1,slotW*(13+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"sapling_jungle",new SimpleIcon(L"sapling_jungle",slotW*14,slotH*1,slotW*(14+1),slotH*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"fire_0",new SimpleIcon(L"fire_0",slotW*15,slotH*1,slotW*(15+1),slotH*(1+1)))); texturesToAnimate.push_back(pair(L"fire_0",L"fire_0")); - texturesByName.insert(stringIconMap::value_type(L"oreGold",new SimpleIcon(L"oreGold",slotSize*0,slotSize*2,slotSize*(0+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"oreIron",new SimpleIcon(L"oreIron",slotSize*1,slotSize*2,slotSize*(1+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"oreCoal",new SimpleIcon(L"oreCoal",slotSize*2,slotSize*2,slotSize*(2+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"bookshelf",new SimpleIcon(L"bookshelf",slotSize*3,slotSize*2,slotSize*(3+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"stoneMoss",new SimpleIcon(L"stoneMoss",slotSize*4,slotSize*2,slotSize*(4+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"obsidian",new SimpleIcon(L"obsidian",slotSize*5,slotSize*2,slotSize*(5+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"grass_side_overlay",new SimpleIcon(L"grass_side_overlay",slotSize*6,slotSize*2,slotSize*(6+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"tallgrass",new SimpleIcon(L"tallgrass",slotSize*7,slotSize*2,slotSize*(7+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"dispenser_front_vertical",new SimpleIcon(L"dispenser_front_vertical",slotSize*8,slotSize*2,slotSize*(8+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"beacon",new SimpleIcon(L"beacon",slotSize*9,slotSize*2,slotSize*(9+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"dropper_front_vertical",new SimpleIcon(L"dropper_front_vertical",slotSize*10,slotSize*2,slotSize*(10+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"workbench_top",new SimpleIcon(L"workbench_top",slotSize*11,slotSize*2,slotSize*(11+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"furnace_front",new SimpleIcon(L"furnace_front",slotSize*12,slotSize*2,slotSize*(12+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"furnace_side",new SimpleIcon(L"furnace_side",slotSize*13,slotSize*2,slotSize*(13+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"dispenser_front",new SimpleIcon(L"dispenser_front",slotSize*14,slotSize*2,slotSize*(14+1),slotSize*(2+1)))); - texturesByName.insert(stringIconMap::value_type(L"fire_1",new SimpleIcon(L"fire_1",slotSize*15,slotSize*1,slotSize*(15+1),slotSize*(1+1)))); + texturesByName.insert(stringIconMap::value_type(L"oreGold",new SimpleIcon(L"oreGold",slotW*0,slotH*2,slotW*(0+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"oreIron",new SimpleIcon(L"oreIron",slotW*1,slotH*2,slotW*(1+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"oreCoal",new SimpleIcon(L"oreCoal",slotW*2,slotH*2,slotW*(2+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"bookshelf",new SimpleIcon(L"bookshelf",slotW*3,slotH*2,slotW*(3+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"stoneMoss",new SimpleIcon(L"stoneMoss",slotW*4,slotH*2,slotW*(4+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"obsidian",new SimpleIcon(L"obsidian",slotW*5,slotH*2,slotW*(5+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"grass_side_overlay",new SimpleIcon(L"grass_side_overlay",slotW*6,slotH*2,slotW*(6+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"tallgrass",new SimpleIcon(L"tallgrass",slotW*7,slotH*2,slotW*(7+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"dispenser_front_vertical",new SimpleIcon(L"dispenser_front_vertical",slotW*8,slotH*2,slotW*(8+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"beacon",new SimpleIcon(L"beacon",slotW*9,slotH*2,slotW*(9+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"dropper_front_vertical",new SimpleIcon(L"dropper_front_vertical",slotW*10,slotH*2,slotW*(10+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"workbench_top",new SimpleIcon(L"workbench_top",slotW*11,slotH*2,slotW*(11+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"furnace_front",new SimpleIcon(L"furnace_front",slotW*12,slotH*2,slotW*(12+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"furnace_side",new SimpleIcon(L"furnace_side",slotW*13,slotH*2,slotW*(13+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"dispenser_front",new SimpleIcon(L"dispenser_front",slotW*14,slotH*2,slotW*(14+1),slotH*(2+1)))); + texturesByName.insert(stringIconMap::value_type(L"fire_1",new SimpleIcon(L"fire_1",slotW*15,slotH*1,slotW*(15+1),slotH*(1+1)))); texturesToAnimate.push_back(pair(L"fire_1",L"fire_1")); - texturesByName.insert(stringIconMap::value_type(L"sponge",new SimpleIcon(L"sponge",slotSize*0,slotSize*3,slotSize*(0+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"glass",new SimpleIcon(L"glass",slotSize*1,slotSize*3,slotSize*(1+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"oreDiamond",new SimpleIcon(L"oreDiamond",slotSize*2,slotSize*3,slotSize*(2+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"oreRedstone",new SimpleIcon(L"oreRedstone",slotSize*3,slotSize*3,slotSize*(3+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"leaves",new SimpleIcon(L"leaves",slotSize*4,slotSize*3,slotSize*(4+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"leaves_opaque",new SimpleIcon(L"leaves_opaque",slotSize*5,slotSize*3,slotSize*(5+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"stonebricksmooth",new SimpleIcon(L"stonebricksmooth",slotSize*6,slotSize*3,slotSize*(6+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"deadbush",new SimpleIcon(L"deadbush",slotSize*7,slotSize*3,slotSize*(7+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"fern",new SimpleIcon(L"fern",slotSize*8,slotSize*3,slotSize*(8+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"daylightDetector_top",new SimpleIcon(L"daylightDetector_top",slotSize*9,slotSize*3,slotSize*(9+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"daylightDetector_side",new SimpleIcon(L"daylightDetector_side",slotSize*10,slotSize*3,slotSize*(10+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"workbench_side",new SimpleIcon(L"workbench_side",slotSize*11,slotSize*3,slotSize*(11+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"workbench_front",new SimpleIcon(L"workbench_front",slotSize*12,slotSize*3,slotSize*(12+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"furnace_front_lit",new SimpleIcon(L"furnace_front_lit",slotSize*13,slotSize*3,slotSize*(13+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"furnace_top",new SimpleIcon(L"furnace_top",slotSize*14,slotSize*3,slotSize*(14+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"sapling_spruce",new SimpleIcon(L"sapling_spruce",slotSize*15,slotSize*3,slotSize*(15+1),slotSize*(3+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_0",new SimpleIcon(L"cloth_0",slotSize*0,slotSize*4,slotSize*(0+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"mobSpawner",new SimpleIcon(L"mobSpawner",slotSize*1,slotSize*4,slotSize*(1+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"snow",new SimpleIcon(L"snow",slotSize*2,slotSize*4,slotSize*(2+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"ice",new SimpleIcon(L"ice",slotSize*3,slotSize*4,slotSize*(3+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"snow_side",new SimpleIcon(L"snow_side",slotSize*4,slotSize*4,slotSize*(4+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"cactus_top",new SimpleIcon(L"cactus_top",slotSize*5,slotSize*4,slotSize*(5+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"cactus_side",new SimpleIcon(L"cactus_side",slotSize*6,slotSize*4,slotSize*(6+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"cactus_bottom",new SimpleIcon(L"cactus_bottom",slotSize*7,slotSize*4,slotSize*(7+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"clay",new SimpleIcon(L"clay",slotSize*8,slotSize*4,slotSize*(8+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"reeds",new SimpleIcon(L"reeds",slotSize*9,slotSize*4,slotSize*(9+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"musicBlock",new SimpleIcon(L"musicBlock",slotSize*10,slotSize*4,slotSize*(10+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"jukebox_top",new SimpleIcon(L"jukebox_top",slotSize*11,slotSize*4,slotSize*(11+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"waterlily",new SimpleIcon(L"waterlily",slotSize*12,slotSize*4,slotSize*(12+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"mycel_side",new SimpleIcon(L"mycel_side",slotSize*13,slotSize*4,slotSize*(13+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"mycel_top",new SimpleIcon(L"mycel_top",slotSize*14,slotSize*4,slotSize*(14+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"sapling_birch",new SimpleIcon(L"sapling_birch",slotSize*15,slotSize*4,slotSize*(15+1),slotSize*(4+1)))); - texturesByName.insert(stringIconMap::value_type(L"torch",new SimpleIcon(L"torch",slotSize*0,slotSize*5,slotSize*(0+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"doorWood_upper",new SimpleIcon(L"doorWood_upper",slotSize*1,slotSize*5,slotSize*(1+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"doorIron_upper",new SimpleIcon(L"doorIron_upper",slotSize*2,slotSize*5,slotSize*(2+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"ladder",new SimpleIcon(L"ladder",slotSize*3,slotSize*5,slotSize*(3+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"trapdoor",new SimpleIcon(L"trapdoor",slotSize*4,slotSize*5,slotSize*(4+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"fenceIron",new SimpleIcon(L"fenceIron",slotSize*5,slotSize*5,slotSize*(5+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"farmland_wet",new SimpleIcon(L"farmland_wet",slotSize*6,slotSize*5,slotSize*(6+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"farmland_dry",new SimpleIcon(L"farmland_dry",slotSize*7,slotSize*5,slotSize*(7+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"crops_0",new SimpleIcon(L"crops_0",slotSize*8,slotSize*5,slotSize*(8+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"crops_1",new SimpleIcon(L"crops_1",slotSize*9,slotSize*5,slotSize*(9+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"crops_2",new SimpleIcon(L"crops_2",slotSize*10,slotSize*5,slotSize*(10+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"crops_3",new SimpleIcon(L"crops_3",slotSize*11,slotSize*5,slotSize*(11+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"crops_4",new SimpleIcon(L"crops_4",slotSize*12,slotSize*5,slotSize*(12+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"crops_5",new SimpleIcon(L"crops_5",slotSize*13,slotSize*5,slotSize*(13+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"crops_6",new SimpleIcon(L"crops_6",slotSize*14,slotSize*5,slotSize*(14+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"crops_7",new SimpleIcon(L"crops_7",slotSize*15,slotSize*5,slotSize*(15+1),slotSize*(5+1)))); - texturesByName.insert(stringIconMap::value_type(L"lever",new SimpleIcon(L"lever",slotSize*0,slotSize*6,slotSize*(0+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"doorWood_lower",new SimpleIcon(L"doorWood_lower",slotSize*1,slotSize*6,slotSize*(1+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"doorIron_lower",new SimpleIcon(L"doorIron_lower",slotSize*2,slotSize*6,slotSize*(2+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"redtorch_lit",new SimpleIcon(L"redtorch_lit",slotSize*3,slotSize*6,slotSize*(3+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"stonebricksmooth_mossy",new SimpleIcon(L"stonebricksmooth_mossy",slotSize*4,slotSize*6,slotSize*(4+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"stonebricksmooth_cracked",new SimpleIcon(L"stonebricksmooth_cracked",slotSize*5,slotSize*6,slotSize*(5+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"pumpkin_top",new SimpleIcon(L"pumpkin_top",slotSize*6,slotSize*6,slotSize*(6+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"hellrock",new SimpleIcon(L"hellrock",slotSize*7,slotSize*6,slotSize*(7+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"hellsand",new SimpleIcon(L"hellsand",slotSize*8,slotSize*6,slotSize*(8+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"lightgem",new SimpleIcon(L"lightgem",slotSize*9,slotSize*6,slotSize*(9+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"piston_top_sticky",new SimpleIcon(L"piston_top_sticky",slotSize*10,slotSize*6,slotSize*(10+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"piston_top",new SimpleIcon(L"piston_top",slotSize*11,slotSize*6,slotSize*(11+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"piston_side",new SimpleIcon(L"piston_side",slotSize*12,slotSize*6,slotSize*(12+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"piston_bottom",new SimpleIcon(L"piston_bottom",slotSize*13,slotSize*6,slotSize*(13+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"piston_inner_top",new SimpleIcon(L"piston_inner_top",slotSize*14,slotSize*6,slotSize*(14+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"stem_straight",new SimpleIcon(L"stem_straight",slotSize*15,slotSize*6,slotSize*(15+1),slotSize*(6+1)))); - texturesByName.insert(stringIconMap::value_type(L"rail_turn",new SimpleIcon(L"rail_turn",slotSize*0,slotSize*7,slotSize*(0+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_15",new SimpleIcon(L"cloth_15",slotSize*1,slotSize*7,slotSize*(1+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_7",new SimpleIcon(L"cloth_7",slotSize*2,slotSize*7,slotSize*(2+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"redtorch",new SimpleIcon(L"redtorch",slotSize*3,slotSize*7,slotSize*(3+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"tree_spruce",new SimpleIcon(L"tree_spruce",slotSize*4,slotSize*7,slotSize*(4+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"tree_birch",new SimpleIcon(L"tree_birch",slotSize*5,slotSize*7,slotSize*(5+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"pumpkin_side",new SimpleIcon(L"pumpkin_side",slotSize*6,slotSize*7,slotSize*(6+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"pumpkin_face",new SimpleIcon(L"pumpkin_face",slotSize*7,slotSize*7,slotSize*(7+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"pumpkin_jack",new SimpleIcon(L"pumpkin_jack",slotSize*8,slotSize*7,slotSize*(8+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"cake_top",new SimpleIcon(L"cake_top",slotSize*9,slotSize*7,slotSize*(9+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"cake_side",new SimpleIcon(L"cake_side",slotSize*10,slotSize*7,slotSize*(10+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"cake_inner",new SimpleIcon(L"cake_inner",slotSize*11,slotSize*7,slotSize*(11+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"cake_bottom",new SimpleIcon(L"cake_bottom",slotSize*12,slotSize*7,slotSize*(12+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"mushroom_skin_red",new SimpleIcon(L"mushroom_skin_red",slotSize*13,slotSize*7,slotSize*(13+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"mushroom_skin_brown",new SimpleIcon(L"mushroom_skin_brown",slotSize*14,slotSize*7,slotSize*(14+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"stem_bent",new SimpleIcon(L"stem_bent",slotSize*15,slotSize*7,slotSize*(15+1),slotSize*(7+1)))); - texturesByName.insert(stringIconMap::value_type(L"rail",new SimpleIcon(L"rail",slotSize*0,slotSize*8,slotSize*(0+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_14",new SimpleIcon(L"cloth_14",slotSize*1,slotSize*8,slotSize*(1+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_6",new SimpleIcon(L"cloth_6",slotSize*2,slotSize*8,slotSize*(2+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"repeater",new SimpleIcon(L"repeater",slotSize*3,slotSize*8,slotSize*(3+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"leaves_spruce",new SimpleIcon(L"leaves_spruce",slotSize*4,slotSize*8,slotSize*(4+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"leaves_spruce_opaque",new SimpleIcon(L"leaves_spruce_opaque",slotSize*5,slotSize*8,slotSize*(5+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"bed_feet_top",new SimpleIcon(L"bed_feet_top",slotSize*6,slotSize*8,slotSize*(6+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"bed_head_top",new SimpleIcon(L"bed_head_top",slotSize*7,slotSize*8,slotSize*(7+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"melon_side",new SimpleIcon(L"melon_side",slotSize*8,slotSize*8,slotSize*(8+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"melon_top",new SimpleIcon(L"melon_top",slotSize*9,slotSize*8,slotSize*(9+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"cauldron_top",new SimpleIcon(L"cauldron_top",slotSize*10,slotSize*8,slotSize*(10+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"cauldron_inner",new SimpleIcon(L"cauldron_inner",slotSize*11,slotSize*8,slotSize*(11+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"mushroom_skin_stem",new SimpleIcon(L"mushroom_skin_stem",slotSize*13,slotSize*8,slotSize*(13+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"mushroom_inside",new SimpleIcon(L"mushroom_inside",slotSize*14,slotSize*8,slotSize*(14+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"vine",new SimpleIcon(L"vine",slotSize*15,slotSize*8,slotSize*(15+1),slotSize*(8+1)))); - texturesByName.insert(stringIconMap::value_type(L"blockLapis",new SimpleIcon(L"blockLapis",slotSize*0,slotSize*9,slotSize*(0+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_13",new SimpleIcon(L"cloth_13",slotSize*1,slotSize*9,slotSize*(1+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_5",new SimpleIcon(L"cloth_5",slotSize*2,slotSize*9,slotSize*(2+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"repeater_lit",new SimpleIcon(L"repeater_lit",slotSize*3,slotSize*9,slotSize*(3+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"thinglass_top",new SimpleIcon(L"thinglass_top",slotSize*4,slotSize*9,slotSize*(4+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"bed_feet_end",new SimpleIcon(L"bed_feet_end",slotSize*5,slotSize*9,slotSize*(5+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"bed_feet_side",new SimpleIcon(L"bed_feet_side",slotSize*6,slotSize*9,slotSize*(6+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"bed_head_side",new SimpleIcon(L"bed_head_side",slotSize*7,slotSize*9,slotSize*(7+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"bed_head_end",new SimpleIcon(L"bed_head_end",slotSize*8,slotSize*9,slotSize*(8+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"tree_jungle",new SimpleIcon(L"tree_jungle",slotSize*9,slotSize*9,slotSize*(9+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"cauldron_side",new SimpleIcon(L"cauldron_side",slotSize*10,slotSize*9,slotSize*(10+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"cauldron_bottom",new SimpleIcon(L"cauldron_bottom",slotSize*11,slotSize*9,slotSize*(11+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"brewingStand_base",new SimpleIcon(L"brewingStand_base",slotSize*12,slotSize*9,slotSize*(12+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"brewingStand",new SimpleIcon(L"brewingStand",slotSize*13,slotSize*9,slotSize*(13+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"endframe_top",new SimpleIcon(L"endframe_top",slotSize*14,slotSize*9,slotSize*(14+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"endframe_side",new SimpleIcon(L"endframe_side",slotSize*15,slotSize*9,slotSize*(15+1),slotSize*(9+1)))); - texturesByName.insert(stringIconMap::value_type(L"oreLapis",new SimpleIcon(L"oreLapis",slotSize*0,slotSize*10,slotSize*(0+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_12",new SimpleIcon(L"cloth_12",slotSize*1,slotSize*10,slotSize*(1+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_4",new SimpleIcon(L"cloth_4",slotSize*2,slotSize*10,slotSize*(2+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"goldenRail",new SimpleIcon(L"goldenRail",slotSize*3,slotSize*10,slotSize*(3+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"redstoneDust_cross",new SimpleIcon(L"redstoneDust_cross",slotSize*4,slotSize*10,slotSize*(4+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"redstoneDust_line",new SimpleIcon(L"redstoneDust_line",slotSize*5,slotSize*10,slotSize*(5+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"enchantment_top",new SimpleIcon(L"enchantment_top",slotSize*6,slotSize*10,slotSize*(6+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"dragonEgg",new SimpleIcon(L"dragonEgg",slotSize*7,slotSize*10,slotSize*(7+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"cocoa_2",new SimpleIcon(L"cocoa_2",slotSize*8,slotSize*10,slotSize*(8+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"cocoa_1",new SimpleIcon(L"cocoa_1",slotSize*9,slotSize*10,slotSize*(9+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"cocoa_0",new SimpleIcon(L"cocoa_0",slotSize*10,slotSize*10,slotSize*(10+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"oreEmerald",new SimpleIcon(L"oreEmerald",slotSize*11,slotSize*10,slotSize*(11+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"tripWireSource",new SimpleIcon(L"tripWireSource",slotSize*12,slotSize*10,slotSize*(12+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"tripWire",new SimpleIcon(L"tripWire",slotSize*13,slotSize*10,slotSize*(13+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"endframe_eye",new SimpleIcon(L"endframe_eye",slotSize*14,slotSize*10,slotSize*(14+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"whiteStone",new SimpleIcon(L"whiteStone",slotSize*15,slotSize*10,slotSize*(15+1),slotSize*(10+1)))); - texturesByName.insert(stringIconMap::value_type(L"sandstone_top",new SimpleIcon(L"sandstone_top",slotSize*0,slotSize*11,slotSize*(0+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_11",new SimpleIcon(L"cloth_11",slotSize*1,slotSize*11,slotSize*(1+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_3",new SimpleIcon(L"cloth_3",slotSize*2,slotSize*11,slotSize*(2+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"goldenRail_powered",new SimpleIcon(L"goldenRail_powered",slotSize*3,slotSize*11,slotSize*(3+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"redstoneDust_cross_overlay",new SimpleIcon(L"redstoneDust_cross_overlay",slotSize*4,slotSize*11,slotSize*(4+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"redstoneDust_line_overlay",new SimpleIcon(L"redstoneDust_line_overlay",slotSize*5,slotSize*11,slotSize*(5+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"enchantment_side",new SimpleIcon(L"enchantment_side",slotSize*6,slotSize*11,slotSize*(6+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"enchantment_bottom",new SimpleIcon(L"enchantment_bottom",slotSize*7,slotSize*11,slotSize*(7+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"commandBlock",new SimpleIcon(L"commandBlock",slotSize*8,slotSize*11,slotSize*(8+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"itemframe_back",new SimpleIcon(L"itemframe_back",slotSize*9,slotSize*11,slotSize*(9+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"flowerPot",new SimpleIcon(L"flowerPot",slotSize*10,slotSize*11,slotSize*(10+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"comparator",new SimpleIcon(L"comparator",slotSize*11,slotSize*11,slotSize*(11+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"comparator_lit",new SimpleIcon(L"comparator_lit",slotSize*12,slotSize*11,slotSize*(12+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"activatorRail",new SimpleIcon(L"activatorRail",slotSize*13,slotSize*11,slotSize*(13+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"activatorRail_powered",new SimpleIcon(L"activatorRail_powered",slotSize*14,slotSize*11,slotSize*(14+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"netherquartz",new SimpleIcon(L"netherquartz",slotSize*15,slotSize*11,slotSize*(15+1),slotSize*(11+1)))); - texturesByName.insert(stringIconMap::value_type(L"sandstone_side",new SimpleIcon(L"sandstone_side",slotSize*0,slotSize*12,slotSize*(0+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_10",new SimpleIcon(L"cloth_10",slotSize*1,slotSize*12,slotSize*(1+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_2",new SimpleIcon(L"cloth_2",slotSize*2,slotSize*12,slotSize*(2+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"detectorRail",new SimpleIcon(L"detectorRail",slotSize*3,slotSize*12,slotSize*(3+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"leaves_jungle",new SimpleIcon(L"leaves_jungle",slotSize*4,slotSize*12,slotSize*(4+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"leaves_jungle_opaque",new SimpleIcon(L"leaves_jungle_opaque",slotSize*5,slotSize*12,slotSize*(5+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"wood_spruce",new SimpleIcon(L"wood_spruce",slotSize*6,slotSize*12,slotSize*(6+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"wood_jungle",new SimpleIcon(L"wood_jungle",slotSize*7,slotSize*12,slotSize*(7+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"carrots_0",new SimpleIcon(L"carrots_0",slotSize*8,slotSize*12,slotSize*(8+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"carrots_1",new SimpleIcon(L"carrots_1",slotSize*9,slotSize*12,slotSize*(9+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"carrots_2",new SimpleIcon(L"carrots_2",slotSize*10,slotSize*12,slotSize*(10+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"carrots_3",new SimpleIcon(L"carrots_3",slotSize*11,slotSize*12,slotSize*(11+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"potatoes_0",new SimpleIcon(L"potatoes_0",slotSize*8,slotSize*12,slotSize*(8+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"potatoes_1",new SimpleIcon(L"potatoes_1",slotSize*9,slotSize*12,slotSize*(9+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"potatoes_2",new SimpleIcon(L"potatoes_2",slotSize*10,slotSize*12,slotSize*(10+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"potatoes_3",new SimpleIcon(L"potatoes_3",slotSize*12,slotSize*12,slotSize*(12+1),slotSize*(12+1)))); - texturesByName.insert(stringIconMap::value_type(L"water",new SimpleIcon(L"water",slotSize*13,slotSize*12,slotSize*(13+1),slotSize*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"sponge",new SimpleIcon(L"sponge",slotW*0,slotH*3,slotW*(0+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"glass",new SimpleIcon(L"glass",slotW*1,slotH*3,slotW*(1+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"oreDiamond",new SimpleIcon(L"oreDiamond",slotW*2,slotH*3,slotW*(2+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"oreRedstone",new SimpleIcon(L"oreRedstone",slotW*3,slotH*3,slotW*(3+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"leaves",new SimpleIcon(L"leaves",slotW*4,slotH*3,slotW*(4+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"leaves_opaque",new SimpleIcon(L"leaves_opaque",slotW*5,slotH*3,slotW*(5+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"stonebricksmooth",new SimpleIcon(L"stonebricksmooth",slotW*6,slotH*3,slotW*(6+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"deadbush",new SimpleIcon(L"deadbush",slotW*7,slotH*3,slotW*(7+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"fern",new SimpleIcon(L"fern",slotW*8,slotH*3,slotW*(8+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"daylightDetector_top",new SimpleIcon(L"daylightDetector_top",slotW*9,slotH*3,slotW*(9+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"daylightDetector_side",new SimpleIcon(L"daylightDetector_side",slotW*10,slotH*3,slotW*(10+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"workbench_side",new SimpleIcon(L"workbench_side",slotW*11,slotH*3,slotW*(11+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"workbench_front",new SimpleIcon(L"workbench_front",slotW*12,slotH*3,slotW*(12+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"furnace_front_lit",new SimpleIcon(L"furnace_front_lit",slotW*13,slotH*3,slotW*(13+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"furnace_top",new SimpleIcon(L"furnace_top",slotW*14,slotH*3,slotW*(14+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"sapling_spruce",new SimpleIcon(L"sapling_spruce",slotW*15,slotH*3,slotW*(15+1),slotH*(3+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_0",new SimpleIcon(L"cloth_0",slotW*0,slotH*4,slotW*(0+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"mobSpawner",new SimpleIcon(L"mobSpawner",slotW*1,slotH*4,slotW*(1+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"snow",new SimpleIcon(L"snow",slotW*2,slotH*4,slotW*(2+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"ice",new SimpleIcon(L"ice",slotW*3,slotH*4,slotW*(3+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"snow_side",new SimpleIcon(L"snow_side",slotW*4,slotH*4,slotW*(4+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"cactus_top",new SimpleIcon(L"cactus_top",slotW*5,slotH*4,slotW*(5+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"cactus_side",new SimpleIcon(L"cactus_side",slotW*6,slotH*4,slotW*(6+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"cactus_bottom",new SimpleIcon(L"cactus_bottom",slotW*7,slotH*4,slotW*(7+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"clay",new SimpleIcon(L"clay",slotW*8,slotH*4,slotW*(8+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"reeds",new SimpleIcon(L"reeds",slotW*9,slotH*4,slotW*(9+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"musicBlock",new SimpleIcon(L"musicBlock",slotW*10,slotH*4,slotW*(10+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"jukebox_top",new SimpleIcon(L"jukebox_top",slotW*11,slotH*4,slotW*(11+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"waterlily",new SimpleIcon(L"waterlily",slotW*12,slotH*4,slotW*(12+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"mycel_side",new SimpleIcon(L"mycel_side",slotW*13,slotH*4,slotW*(13+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"mycel_top",new SimpleIcon(L"mycel_top",slotW*14,slotH*4,slotW*(14+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"sapling_birch",new SimpleIcon(L"sapling_birch",slotW*15,slotH*4,slotW*(15+1),slotH*(4+1)))); + texturesByName.insert(stringIconMap::value_type(L"torch",new SimpleIcon(L"torch",slotW*0,slotH*5,slotW*(0+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"doorWood_upper",new SimpleIcon(L"doorWood_upper",slotW*1,slotH*5,slotW*(1+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"doorIron_upper",new SimpleIcon(L"doorIron_upper",slotW*2,slotH*5,slotW*(2+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"ladder",new SimpleIcon(L"ladder",slotW*3,slotH*5,slotW*(3+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"trapdoor",new SimpleIcon(L"trapdoor",slotW*4,slotH*5,slotW*(4+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"fenceIron",new SimpleIcon(L"fenceIron",slotW*5,slotH*5,slotW*(5+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"farmland_wet",new SimpleIcon(L"farmland_wet",slotW*6,slotH*5,slotW*(6+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"farmland_dry",new SimpleIcon(L"farmland_dry",slotW*7,slotH*5,slotW*(7+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"crops_0",new SimpleIcon(L"crops_0",slotW*8,slotH*5,slotW*(8+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"crops_1",new SimpleIcon(L"crops_1",slotW*9,slotH*5,slotW*(9+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"crops_2",new SimpleIcon(L"crops_2",slotW*10,slotH*5,slotW*(10+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"crops_3",new SimpleIcon(L"crops_3",slotW*11,slotH*5,slotW*(11+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"crops_4",new SimpleIcon(L"crops_4",slotW*12,slotH*5,slotW*(12+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"crops_5",new SimpleIcon(L"crops_5",slotW*13,slotH*5,slotW*(13+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"crops_6",new SimpleIcon(L"crops_6",slotW*14,slotH*5,slotW*(14+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"crops_7",new SimpleIcon(L"crops_7",slotW*15,slotH*5,slotW*(15+1),slotH*(5+1)))); + texturesByName.insert(stringIconMap::value_type(L"lever",new SimpleIcon(L"lever",slotW*0,slotH*6,slotW*(0+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"doorWood_lower",new SimpleIcon(L"doorWood_lower",slotW*1,slotH*6,slotW*(1+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"doorIron_lower",new SimpleIcon(L"doorIron_lower",slotW*2,slotH*6,slotW*(2+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"redtorch_lit",new SimpleIcon(L"redtorch_lit",slotW*3,slotH*6,slotW*(3+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"stonebricksmooth_mossy",new SimpleIcon(L"stonebricksmooth_mossy",slotW*4,slotH*6,slotW*(4+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"stonebricksmooth_cracked",new SimpleIcon(L"stonebricksmooth_cracked",slotW*5,slotH*6,slotW*(5+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"pumpkin_top",new SimpleIcon(L"pumpkin_top",slotW*6,slotH*6,slotW*(6+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"hellrock",new SimpleIcon(L"hellrock",slotW*7,slotH*6,slotW*(7+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"hellsand",new SimpleIcon(L"hellsand",slotW*8,slotH*6,slotW*(8+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"lightgem",new SimpleIcon(L"lightgem",slotW*9,slotH*6,slotW*(9+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"piston_top_sticky",new SimpleIcon(L"piston_top_sticky",slotW*10,slotH*6,slotW*(10+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"piston_top",new SimpleIcon(L"piston_top",slotW*11,slotH*6,slotW*(11+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"piston_side",new SimpleIcon(L"piston_side",slotW*12,slotH*6,slotW*(12+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"piston_bottom",new SimpleIcon(L"piston_bottom",slotW*13,slotH*6,slotW*(13+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"piston_inner_top",new SimpleIcon(L"piston_inner_top",slotW*14,slotH*6,slotW*(14+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"stem_straight",new SimpleIcon(L"stem_straight",slotW*15,slotH*6,slotW*(15+1),slotH*(6+1)))); + texturesByName.insert(stringIconMap::value_type(L"rail_turn",new SimpleIcon(L"rail_turn",slotW*0,slotH*7,slotW*(0+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_15",new SimpleIcon(L"cloth_15",slotW*1,slotH*7,slotW*(1+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_7",new SimpleIcon(L"cloth_7",slotW*2,slotH*7,slotW*(2+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"redtorch",new SimpleIcon(L"redtorch",slotW*3,slotH*7,slotW*(3+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"tree_spruce",new SimpleIcon(L"tree_spruce",slotW*4,slotH*7,slotW*(4+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"tree_birch",new SimpleIcon(L"tree_birch",slotW*5,slotH*7,slotW*(5+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"pumpkin_side",new SimpleIcon(L"pumpkin_side",slotW*6,slotH*7,slotW*(6+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"pumpkin_face",new SimpleIcon(L"pumpkin_face",slotW*7,slotH*7,slotW*(7+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"pumpkin_jack",new SimpleIcon(L"pumpkin_jack",slotW*8,slotH*7,slotW*(8+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"cake_top",new SimpleIcon(L"cake_top",slotW*9,slotH*7,slotW*(9+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"cake_side",new SimpleIcon(L"cake_side",slotW*10,slotH*7,slotW*(10+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"cake_inner",new SimpleIcon(L"cake_inner",slotW*11,slotH*7,slotW*(11+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"cake_bottom",new SimpleIcon(L"cake_bottom",slotW*12,slotH*7,slotW*(12+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"mushroom_skin_red",new SimpleIcon(L"mushroom_skin_red",slotW*13,slotH*7,slotW*(13+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"mushroom_skin_brown",new SimpleIcon(L"mushroom_skin_brown",slotW*14,slotH*7,slotW*(14+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"stem_bent",new SimpleIcon(L"stem_bent",slotW*15,slotH*7,slotW*(15+1),slotH*(7+1)))); + texturesByName.insert(stringIconMap::value_type(L"rail",new SimpleIcon(L"rail",slotW*0,slotH*8,slotW*(0+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_14",new SimpleIcon(L"cloth_14",slotW*1,slotH*8,slotW*(1+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_6",new SimpleIcon(L"cloth_6",slotW*2,slotH*8,slotW*(2+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"repeater",new SimpleIcon(L"repeater",slotW*3,slotH*8,slotW*(3+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"leaves_spruce",new SimpleIcon(L"leaves_spruce",slotW*4,slotH*8,slotW*(4+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"leaves_spruce_opaque",new SimpleIcon(L"leaves_spruce_opaque",slotW*5,slotH*8,slotW*(5+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"bed_feet_top",new SimpleIcon(L"bed_feet_top",slotW*6,slotH*8,slotW*(6+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"bed_head_top",new SimpleIcon(L"bed_head_top",slotW*7,slotH*8,slotW*(7+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"melon_side",new SimpleIcon(L"melon_side",slotW*8,slotH*8,slotW*(8+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"melon_top",new SimpleIcon(L"melon_top",slotW*9,slotH*8,slotW*(9+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"cauldron_top",new SimpleIcon(L"cauldron_top",slotW*10,slotH*8,slotW*(10+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"cauldron_inner",new SimpleIcon(L"cauldron_inner",slotW*11,slotH*8,slotW*(11+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"mushroom_skin_stem",new SimpleIcon(L"mushroom_skin_stem",slotW*13,slotH*8,slotW*(13+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"mushroom_inside",new SimpleIcon(L"mushroom_inside",slotW*14,slotH*8,slotW*(14+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"vine",new SimpleIcon(L"vine",slotW*15,slotH*8,slotW*(15+1),slotH*(8+1)))); + texturesByName.insert(stringIconMap::value_type(L"blockLapis",new SimpleIcon(L"blockLapis",slotW*0,slotH*9,slotW*(0+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_13",new SimpleIcon(L"cloth_13",slotW*1,slotH*9,slotW*(1+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_5",new SimpleIcon(L"cloth_5",slotW*2,slotH*9,slotW*(2+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"repeater_lit",new SimpleIcon(L"repeater_lit",slotW*3,slotH*9,slotW*(3+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"thinglass_top",new SimpleIcon(L"thinglass_top",slotW*4,slotH*9,slotW*(4+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"bed_feet_end",new SimpleIcon(L"bed_feet_end",slotW*5,slotH*9,slotW*(5+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"bed_feet_side",new SimpleIcon(L"bed_feet_side",slotW*6,slotH*9,slotW*(6+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"bed_head_side",new SimpleIcon(L"bed_head_side",slotW*7,slotH*9,slotW*(7+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"bed_head_end",new SimpleIcon(L"bed_head_end",slotW*8,slotH*9,slotW*(8+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"tree_jungle",new SimpleIcon(L"tree_jungle",slotW*9,slotH*9,slotW*(9+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"cauldron_side",new SimpleIcon(L"cauldron_side",slotW*10,slotH*9,slotW*(10+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"cauldron_bottom",new SimpleIcon(L"cauldron_bottom",slotW*11,slotH*9,slotW*(11+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"brewingStand_base",new SimpleIcon(L"brewingStand_base",slotW*12,slotH*9,slotW*(12+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"brewingStand",new SimpleIcon(L"brewingStand",slotW*13,slotH*9,slotW*(13+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"endframe_top",new SimpleIcon(L"endframe_top",slotW*14,slotH*9,slotW*(14+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"endframe_side",new SimpleIcon(L"endframe_side",slotW*15,slotH*9,slotW*(15+1),slotH*(9+1)))); + texturesByName.insert(stringIconMap::value_type(L"oreLapis",new SimpleIcon(L"oreLapis",slotW*0,slotH*10,slotW*(0+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_12",new SimpleIcon(L"cloth_12",slotW*1,slotH*10,slotW*(1+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_4",new SimpleIcon(L"cloth_4",slotW*2,slotH*10,slotW*(2+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"goldenRail",new SimpleIcon(L"goldenRail",slotW*3,slotH*10,slotW*(3+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"redstoneDust_cross",new SimpleIcon(L"redstoneDust_cross",slotW*4,slotH*10,slotW*(4+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"redstoneDust_line",new SimpleIcon(L"redstoneDust_line",slotW*5,slotH*10,slotW*(5+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"enchantment_top",new SimpleIcon(L"enchantment_top",slotW*6,slotH*10,slotW*(6+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"dragonEgg",new SimpleIcon(L"dragonEgg",slotW*7,slotH*10,slotW*(7+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"cocoa_2",new SimpleIcon(L"cocoa_2",slotW*8,slotH*10,slotW*(8+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"cocoa_1",new SimpleIcon(L"cocoa_1",slotW*9,slotH*10,slotW*(9+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"cocoa_0",new SimpleIcon(L"cocoa_0",slotW*10,slotH*10,slotW*(10+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"oreEmerald",new SimpleIcon(L"oreEmerald",slotW*11,slotH*10,slotW*(11+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"tripWireSource",new SimpleIcon(L"tripWireSource",slotW*12,slotH*10,slotW*(12+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"tripWire",new SimpleIcon(L"tripWire",slotW*13,slotH*10,slotW*(13+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"endframe_eye",new SimpleIcon(L"endframe_eye",slotW*14,slotH*10,slotW*(14+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"whiteStone",new SimpleIcon(L"whiteStone",slotW*15,slotH*10,slotW*(15+1),slotH*(10+1)))); + texturesByName.insert(stringIconMap::value_type(L"sandstone_top",new SimpleIcon(L"sandstone_top",slotW*0,slotH*11,slotW*(0+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_11",new SimpleIcon(L"cloth_11",slotW*1,slotH*11,slotW*(1+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_3",new SimpleIcon(L"cloth_3",slotW*2,slotH*11,slotW*(2+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"goldenRail_powered",new SimpleIcon(L"goldenRail_powered",slotW*3,slotH*11,slotW*(3+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"redstoneDust_cross_overlay",new SimpleIcon(L"redstoneDust_cross_overlay",slotW*4,slotH*11,slotW*(4+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"redstoneDust_line_overlay",new SimpleIcon(L"redstoneDust_line_overlay",slotW*5,slotH*11,slotW*(5+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"enchantment_side",new SimpleIcon(L"enchantment_side",slotW*6,slotH*11,slotW*(6+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"enchantment_bottom",new SimpleIcon(L"enchantment_bottom",slotW*7,slotH*11,slotW*(7+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"commandBlock",new SimpleIcon(L"commandBlock",slotW*8,slotH*11,slotW*(8+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"itemframe_back",new SimpleIcon(L"itemframe_back",slotW*9,slotH*11,slotW*(9+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"flowerPot",new SimpleIcon(L"flowerPot",slotW*10,slotH*11,slotW*(10+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"comparator",new SimpleIcon(L"comparator",slotW*11,slotH*11,slotW*(11+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"comparator_lit",new SimpleIcon(L"comparator_lit",slotW*12,slotH*11,slotW*(12+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"activatorRail",new SimpleIcon(L"activatorRail",slotW*13,slotH*11,slotW*(13+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"activatorRail_powered",new SimpleIcon(L"activatorRail_powered",slotW*14,slotH*11,slotW*(14+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"netherquartz",new SimpleIcon(L"netherquartz",slotW*15,slotH*11,slotW*(15+1),slotH*(11+1)))); + texturesByName.insert(stringIconMap::value_type(L"sandstone_side",new SimpleIcon(L"sandstone_side",slotW*0,slotH*12,slotW*(0+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_10",new SimpleIcon(L"cloth_10",slotW*1,slotH*12,slotW*(1+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_2",new SimpleIcon(L"cloth_2",slotW*2,slotH*12,slotW*(2+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"detectorRail",new SimpleIcon(L"detectorRail",slotW*3,slotH*12,slotW*(3+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"leaves_jungle",new SimpleIcon(L"leaves_jungle",slotW*4,slotH*12,slotW*(4+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"leaves_jungle_opaque",new SimpleIcon(L"leaves_jungle_opaque",slotW*5,slotH*12,slotW*(5+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"wood_spruce",new SimpleIcon(L"wood_spruce",slotW*6,slotH*12,slotW*(6+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"wood_jungle",new SimpleIcon(L"wood_jungle",slotW*7,slotH*12,slotW*(7+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"carrots_0",new SimpleIcon(L"carrots_0",slotW*8,slotH*12,slotW*(8+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"carrots_1",new SimpleIcon(L"carrots_1",slotW*9,slotH*12,slotW*(9+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"carrots_2",new SimpleIcon(L"carrots_2",slotW*10,slotH*12,slotW*(10+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"carrots_3",new SimpleIcon(L"carrots_3",slotW*11,slotH*12,slotW*(11+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"potatoes_0",new SimpleIcon(L"potatoes_0",slotW*8,slotH*12,slotW*(8+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"potatoes_1",new SimpleIcon(L"potatoes_1",slotW*9,slotH*12,slotW*(9+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"potatoes_2",new SimpleIcon(L"potatoes_2",slotW*10,slotH*12,slotW*(10+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"potatoes_3",new SimpleIcon(L"potatoes_3",slotW*12,slotH*12,slotW*(12+1),slotH*(12+1)))); + texturesByName.insert(stringIconMap::value_type(L"water",new SimpleIcon(L"water",slotW*13,slotH*12,slotW*(13+1),slotH*(12+1)))); texturesToAnimate.push_back(pair(L"water",L"water")); - texturesByName.insert(stringIconMap::value_type(L"water_flow",new SimpleIcon(L"water_flow",slotSize*14,slotSize*12,slotSize*(14+2),slotSize*(12+2)))); + texturesByName.insert(stringIconMap::value_type(L"water_flow",new SimpleIcon(L"water_flow",slotW*14,slotH*12,slotW*(14+2),slotH*(12+2)))); texturesToAnimate.push_back(pair(L"water_flow",L"water_flow")); - texturesByName.insert(stringIconMap::value_type(L"sandstone_bottom",new SimpleIcon(L"sandstone_bottom",slotSize*0,slotSize*13,slotSize*(0+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_9",new SimpleIcon(L"cloth_9",slotSize*1,slotSize*13,slotSize*(1+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_1",new SimpleIcon(L"cloth_1",slotSize*2,slotSize*13,slotSize*(2+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"redstoneLight",new SimpleIcon(L"redstoneLight",slotSize*3,slotSize*13,slotSize*(3+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"redstoneLight_lit",new SimpleIcon(L"redstoneLight_lit",slotSize*4,slotSize*13,slotSize*(4+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"stonebricksmooth_carved",new SimpleIcon(L"stonebricksmooth_carved",slotSize*5,slotSize*13,slotSize*(5+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"wood_birch",new SimpleIcon(L"wood_birch",slotSize*6,slotSize*13,slotSize*(6+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"anvil_base",new SimpleIcon(L"anvil_base",slotSize*7,slotSize*13,slotSize*(7+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"anvil_top_damaged_1",new SimpleIcon(L"anvil_top_damaged_1",slotSize*8,slotSize*13,slotSize*(8+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"quartzblock_chiseled_top",new SimpleIcon(L"quartzblock_chiseled_top",slotSize*9,slotSize*13,slotSize*(9+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"quartzblock_lines_top",new SimpleIcon(L"quartzblock_lines_top",slotSize*10,slotSize*13,slotSize*(10+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"quartzblock_top",new SimpleIcon(L"quartzblock_top",slotSize*11,slotSize*13,slotSize*(11+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"hopper",new SimpleIcon(L"hopper",slotSize*12,slotSize*13,slotSize*(12+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"detectorRail_on",new SimpleIcon(L"detectorRail_on",slotSize*13,slotSize*13,slotSize*(13+1),slotSize*(13+1)))); - texturesByName.insert(stringIconMap::value_type(L"netherBrick",new SimpleIcon(L"netherBrick",slotSize*0,slotSize*14,slotSize*(0+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"cloth_8",new SimpleIcon(L"cloth_8",slotSize*1,slotSize*14,slotSize*(1+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"netherStalk_0",new SimpleIcon(L"netherStalk_0",slotSize*2,slotSize*14,slotSize*(2+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"netherStalk_1",new SimpleIcon(L"netherStalk_1",slotSize*3,slotSize*14,slotSize*(3+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"netherStalk_2",new SimpleIcon(L"netherStalk_2",slotSize*4,slotSize*14,slotSize*(4+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"sandstone_carved",new SimpleIcon(L"sandstone_carved",slotSize*5,slotSize*14,slotSize*(5+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"sandstone_smooth",new SimpleIcon(L"sandstone_smooth",slotSize*6,slotSize*14,slotSize*(6+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"anvil_top",new SimpleIcon(L"anvil_top",slotSize*7,slotSize*14,slotSize*(7+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"anvil_top_damaged_2",new SimpleIcon(L"anvil_top_damaged_2",slotSize*8,slotSize*14,slotSize*(8+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"quartzblock_chiseled",new SimpleIcon(L"quartzblock_chiseled",slotSize*9,slotSize*14,slotSize*(9+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"quartzblock_lines",new SimpleIcon(L"quartzblock_lines",slotSize*10,slotSize*14,slotSize*(10+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"quartzblock_side",new SimpleIcon(L"quartzblock_side",slotSize*11,slotSize*14,slotSize*(11+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"hopper_inside",new SimpleIcon(L"hopper_inside",slotSize*12,slotSize*14,slotSize*(12+1),slotSize*(14+1)))); - texturesByName.insert(stringIconMap::value_type(L"lava",new SimpleIcon(L"lava",slotSize*13,slotSize*14,slotSize*(13+1),slotSize*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"sandstone_bottom",new SimpleIcon(L"sandstone_bottom",slotW*0,slotH*13,slotW*(0+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_9",new SimpleIcon(L"cloth_9",slotW*1,slotH*13,slotW*(1+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_1",new SimpleIcon(L"cloth_1",slotW*2,slotH*13,slotW*(2+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"redstoneLight",new SimpleIcon(L"redstoneLight",slotW*3,slotH*13,slotW*(3+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"redstoneLight_lit",new SimpleIcon(L"redstoneLight_lit",slotW*4,slotH*13,slotW*(4+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"stonebricksmooth_carved",new SimpleIcon(L"stonebricksmooth_carved",slotW*5,slotH*13,slotW*(5+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"wood_birch",new SimpleIcon(L"wood_birch",slotW*6,slotH*13,slotW*(6+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"anvil_base",new SimpleIcon(L"anvil_base",slotW*7,slotH*13,slotW*(7+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"anvil_top_damaged_1",new SimpleIcon(L"anvil_top_damaged_1",slotW*8,slotH*13,slotW*(8+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"quartzblock_chiseled_top",new SimpleIcon(L"quartzblock_chiseled_top",slotW*9,slotH*13,slotW*(9+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"quartzblock_lines_top",new SimpleIcon(L"quartzblock_lines_top",slotW*10,slotH*13,slotW*(10+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"quartzblock_top",new SimpleIcon(L"quartzblock_top",slotW*11,slotH*13,slotW*(11+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"hopper",new SimpleIcon(L"hopper",slotW*12,slotH*13,slotW*(12+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"detectorRail_on",new SimpleIcon(L"detectorRail_on",slotW*13,slotH*13,slotW*(13+1),slotH*(13+1)))); + texturesByName.insert(stringIconMap::value_type(L"netherBrick",new SimpleIcon(L"netherBrick",slotW*0,slotH*14,slotW*(0+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"cloth_8",new SimpleIcon(L"cloth_8",slotW*1,slotH*14,slotW*(1+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"netherStalk_0",new SimpleIcon(L"netherStalk_0",slotW*2,slotH*14,slotW*(2+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"netherStalk_1",new SimpleIcon(L"netherStalk_1",slotW*3,slotH*14,slotW*(3+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"netherStalk_2",new SimpleIcon(L"netherStalk_2",slotW*4,slotH*14,slotW*(4+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"sandstone_carved",new SimpleIcon(L"sandstone_carved",slotW*5,slotH*14,slotW*(5+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"sandstone_smooth",new SimpleIcon(L"sandstone_smooth",slotW*6,slotH*14,slotW*(6+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"anvil_top",new SimpleIcon(L"anvil_top",slotW*7,slotH*14,slotW*(7+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"anvil_top_damaged_2",new SimpleIcon(L"anvil_top_damaged_2",slotW*8,slotH*14,slotW*(8+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"quartzblock_chiseled",new SimpleIcon(L"quartzblock_chiseled",slotW*9,slotH*14,slotW*(9+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"quartzblock_lines",new SimpleIcon(L"quartzblock_lines",slotW*10,slotH*14,slotW*(10+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"quartzblock_side",new SimpleIcon(L"quartzblock_side",slotW*11,slotH*14,slotW*(11+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"hopper_inside",new SimpleIcon(L"hopper_inside",slotW*12,slotH*14,slotW*(12+1),slotH*(14+1)))); + texturesByName.insert(stringIconMap::value_type(L"lava",new SimpleIcon(L"lava",slotW*13,slotH*14,slotW*(13+1),slotH*(14+1)))); texturesToAnimate.push_back(pair(L"lava",L"lava")); - texturesByName.insert(stringIconMap::value_type(L"lava_flow",new SimpleIcon(L"lava_flow",slotSize*14,slotSize*14,slotSize*(14+2),slotSize*(14+2)))); + texturesByName.insert(stringIconMap::value_type(L"lava_flow",new SimpleIcon(L"lava_flow",slotW*14,slotH*14,slotW*(14+2),slotH*(14+2)))); texturesToAnimate.push_back(pair(L"lava_flow",L"lava_flow")); - texturesByName.insert(stringIconMap::value_type(L"destroy_0",new SimpleIcon(L"destroy_0",slotSize*0,slotSize*15,slotSize*(0+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"destroy_1",new SimpleIcon(L"destroy_1",slotSize*1,slotSize*15,slotSize*(1+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"destroy_2",new SimpleIcon(L"destroy_2",slotSize*2,slotSize*15,slotSize*(2+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"destroy_3",new SimpleIcon(L"destroy_3",slotSize*3,slotSize*15,slotSize*(3+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"destroy_4",new SimpleIcon(L"destroy_4",slotSize*4,slotSize*15,slotSize*(4+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"destroy_5",new SimpleIcon(L"destroy_5",slotSize*5,slotSize*15,slotSize*(5+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"destroy_6",new SimpleIcon(L"destroy_6",slotSize*6,slotSize*15,slotSize*(6+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"destroy_7",new SimpleIcon(L"destroy_7",slotSize*7,slotSize*15,slotSize*(7+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"destroy_8",new SimpleIcon(L"destroy_8",slotSize*8,slotSize*15,slotSize*(8+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"destroy_9",new SimpleIcon(L"destroy_9",slotSize*9,slotSize*15,slotSize*(9+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"quartzblock_bottom",new SimpleIcon(L"quartzblock_bottom",slotSize*11,slotSize*15,slotSize*(11+1),slotSize*(15+1)))); - texturesByName.insert(stringIconMap::value_type(L"hopper_top",new SimpleIcon(L"hopper_top",slotSize*12,slotSize*15,slotSize*(12+1),slotSize*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"destroy_0",new SimpleIcon(L"destroy_0",slotW*0,slotH*15,slotW*(0+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"destroy_1",new SimpleIcon(L"destroy_1",slotW*1,slotH*15,slotW*(1+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"destroy_2",new SimpleIcon(L"destroy_2",slotW*2,slotH*15,slotW*(2+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"destroy_3",new SimpleIcon(L"destroy_3",slotW*3,slotH*15,slotW*(3+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"destroy_4",new SimpleIcon(L"destroy_4",slotW*4,slotH*15,slotW*(4+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"destroy_5",new SimpleIcon(L"destroy_5",slotW*5,slotH*15,slotW*(5+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"destroy_6",new SimpleIcon(L"destroy_6",slotW*6,slotH*15,slotW*(6+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"destroy_7",new SimpleIcon(L"destroy_7",slotW*7,slotH*15,slotW*(7+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"destroy_8",new SimpleIcon(L"destroy_8",slotW*8,slotH*15,slotW*(8+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"destroy_9",new SimpleIcon(L"destroy_9",slotW*9,slotH*15,slotW*(9+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"quartzblock_bottom",new SimpleIcon(L"quartzblock_bottom",slotW*11,slotH*15,slotW*(11+1),slotH*(15+1)))); + texturesByName.insert(stringIconMap::value_type(L"hopper_top",new SimpleIcon(L"hopper_top",slotW*12,slotH*15,slotW*(12+1),slotH*(15+1)))); + + // ---- Aether Block Textures (rows 16-18) ---- + // Row 16 + texturesByName.insert(stringIconMap::value_type(L"Aercloud",new SimpleIcon(L"Aercloud",slotW*0,slotH*16,slotW*(0+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"Aerogel",new SimpleIcon(L"Aerogel",slotW*1,slotH*16,slotW*(1+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"AetherDirt",new SimpleIcon(L"AetherDirt",slotW*2,slotH*16,slotW*(2+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"AetherGrassSide",new SimpleIcon(L"AetherGrassSide",slotW*3,slotH*16,slotW*(3+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"AetherGrassTop",new SimpleIcon(L"AetherGrassTop",slotW*4,slotH*16,slotW*(4+1),slotH*(16+1)))); + texturesByName[L"AetherGrassTop"]->setFlags(Icon::IS_GRASS_TOP); + texturesByName.insert(stringIconMap::value_type(L"AmbrosiumOre",new SimpleIcon(L"AmbrosiumOre",slotW*5,slotH*16,slotW*(5+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"AmbrosiumTorch",new SimpleIcon(L"AmbrosiumTorch",slotW*6,slotH*16,slotW*(6+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"AngelicStone",new SimpleIcon(L"AngelicStone",slotW*7,slotH*16,slotW*(7+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"CarvedStone",new SimpleIcon(L"CarvedStone",slotW*8,slotH*16,slotW*(8+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"EnchanterSide",new SimpleIcon(L"EnchanterSide",slotW*9,slotH*16,slotW*(9+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"EnchanterTop",new SimpleIcon(L"EnchanterTop",slotW*10,slotH*16,slotW*(10+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"FreezerSide",new SimpleIcon(L"FreezerSide",slotW*11,slotH*16,slotW*(11+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"FreezerTop",new SimpleIcon(L"FreezerTop",slotW*12,slotH*16,slotW*(12+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"GoldenOak",new SimpleIcon(L"GoldenOak",slotW*13,slotH*16,slotW*(13+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"GoldenOakLeaves",new SimpleIcon(L"GoldenOakLeaves",slotW*14,slotH*16,slotW*(14+1),slotH*(16+1)))); + texturesByName.insert(stringIconMap::value_type(L"GoldenOakSapling",new SimpleIcon(L"GoldenOakSapling",slotW*15,slotH*16,slotW*(15+1),slotH*(16+1)))); + // Row 17 + texturesByName.insert(stringIconMap::value_type(L"GravititeOre",new SimpleIcon(L"GravititeOre",slotW*0,slotH*17,slotW*(0+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"HellfireStone",new SimpleIcon(L"HellfireStone",slotW*1,slotH*17,slotW*(1+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"Holystone",new SimpleIcon(L"Holystone",slotW*2,slotH*17,slotW*(2+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"Icestone",new SimpleIcon(L"Icestone",slotW*3,slotH*17,slotW*(3+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"IncubatorSide",new SimpleIcon(L"IncubatorSide",slotW*4,slotH*17,slotW*(4+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"IncubatorTop",new SimpleIcon(L"IncubatorTop",slotW*5,slotH*17,slotW*(5+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"LibraryLoreSide",new SimpleIcon(L"LibraryLoreSide",slotW*6,slotH*17,slotW*(6+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"LibraryLoreTop",new SimpleIcon(L"LibraryLoreTop",slotW*7,slotH*17,slotW*(7+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"LightAngelicStone",new SimpleIcon(L"LightAngelicStone",slotW*8,slotH*17,slotW*(8+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"LightCarvedStone",new SimpleIcon(L"LightCarvedStone",slotW*9,slotH*17,slotW*(9+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"LightHellfireStone",new SimpleIcon(L"LightHellfireStone",slotW*10,slotH*17,slotW*(10+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"MossyHolystone",new SimpleIcon(L"MossyHolystone",slotW*13,slotH*17,slotW*(13+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"PillarCarved",new SimpleIcon(L"PillarCarved",slotW*14,slotH*17,slotW*(14+1),slotH*(17+1)))); + texturesByName.insert(stringIconMap::value_type(L"PillarSide",new SimpleIcon(L"PillarSide",slotW*15,slotH*17,slotW*(15+1),slotH*(17+1)))); + // Row 18 + texturesByName.insert(stringIconMap::value_type(L"PillarTop",new SimpleIcon(L"PillarTop",slotW*0,slotH*18,slotW*(0+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"Plank",new SimpleIcon(L"Plank",slotW*1,slotH*18,slotW*(1+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"PurpleFlower",new SimpleIcon(L"PurpleFlower",slotW*2,slotH*18,slotW*(2+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"Quicksoil",new SimpleIcon(L"Quicksoil",slotW*3,slotH*18,slotW*(3+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"QuicksoilGlass",new SimpleIcon(L"QuicksoilGlass",slotW*4,slotH*18,slotW*(4+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"SkyrootLeaves",new SimpleIcon(L"SkyrootLeaves",slotW*5,slotH*18,slotW*(5+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"SkyrootLogSide",new SimpleIcon(L"SkyrootLogSide",slotW*6,slotH*18,slotW*(6+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"SkyrootLogTop",new SimpleIcon(L"SkyrootLogTop",slotW*7,slotH*18,slotW*(7+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"SkyrootSapling",new SimpleIcon(L"SkyrootSapling",slotW*8,slotH*18,slotW*(8+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"WhiteFlower",new SimpleIcon(L"WhiteFlower",slotW*9,slotH*18,slotW*(9+1),slotH*(18+1)))); + texturesByName.insert(stringIconMap::value_type(L"ZaniteOre",new SimpleIcon(L"ZaniteOre",slotW*10,slotH*18,slotW*(10+1),slotH*(18+1)))); } } diff --git a/Minecraft.Client/ServerLevel.cpp b/Minecraft.Client/ServerLevel.cpp index de8c66cd..f4d50464 100644 --- a/Minecraft.Client/ServerLevel.cpp +++ b/Minecraft.Client/ServerLevel.cpp @@ -39,24 +39,25 @@ WeighedTreasureArray ServerLevel::RANDOM_BONUS_ITEMS; C4JThread* ServerLevel::m_updateThread = NULL; C4JThread::EventArray* ServerLevel::m_updateTrigger; -CRITICAL_SECTION ServerLevel::m_updateCS[3]; +CRITICAL_SECTION ServerLevel::m_updateCS[4]; -Level *ServerLevel::m_level[3]; -int ServerLevel::m_updateChunkX[3][LEVEL_CHUNKS_TO_UPDATE_MAX]; -int ServerLevel::m_updateChunkZ[3][LEVEL_CHUNKS_TO_UPDATE_MAX]; -int ServerLevel::m_updateChunkCount[3]; -int ServerLevel::m_updateTileX[3][MAX_UPDATES]; -int ServerLevel::m_updateTileY[3][MAX_UPDATES]; -int ServerLevel::m_updateTileZ[3][MAX_UPDATES]; -int ServerLevel::m_updateTileCount[3]; -int ServerLevel::m_randValue[3]; +Level *ServerLevel::m_level[4]; +int ServerLevel::m_updateChunkX[4][LEVEL_CHUNKS_TO_UPDATE_MAX]; +int ServerLevel::m_updateChunkZ[4][LEVEL_CHUNKS_TO_UPDATE_MAX]; +int ServerLevel::m_updateChunkCount[4]; +int ServerLevel::m_updateTileX[4][MAX_UPDATES]; +int ServerLevel::m_updateTileY[4][MAX_UPDATES]; +int ServerLevel::m_updateTileZ[4][MAX_UPDATES]; +int ServerLevel::m_updateTileCount[4]; +int ServerLevel::m_randValue[4]; void ServerLevel::staticCtor() { - m_updateTrigger = new C4JThread::EventArray(3); + m_updateTrigger = new C4JThread::EventArray(4); InitializeCriticalSection(&m_updateCS[0]); InitializeCriticalSection(&m_updateCS[1]); InitializeCriticalSection(&m_updateCS[2]); + InitializeCriticalSection(&m_updateCS[3]); m_updateThread = new C4JThread(runUpdate, NULL, "Tile update"); m_updateThread->SetProcessor(CPU_CORE_TILE_UPDATE); @@ -232,10 +233,17 @@ void ServerLevel::tick() __int64 time = levelData->getTime() + 1; // 4J Stu - Putting this back in, but I have reduced the number of chunks that save when not forced + // Stagger saves across dimensions: Overworld(0)=0, Nether(-1)=1, End(1)=2, Aether(2)=3 + { + int saveSlot = 0; + if (dimension->id == 0) saveSlot = 0; + else if (dimension->id == -1) saveSlot = 1; + else if (dimension->id == 1) saveSlot = 2; + else if (dimension->id == 2) saveSlot = 3; #ifdef _LARGE_WORLDS - if (time % (saveInterval) == (dimension->id + 1)) + if (time % 4 == saveSlot) #else - if (time % (saveInterval) == (dimension->id * dimension->id * (saveInterval/2))) + if (time % (saveInterval) == (saveSlot * (saveInterval / 4))) #endif { //app.DebugPrintf("Incremental save\n"); @@ -243,6 +251,7 @@ void ServerLevel::tick() save(false, NULL); PIXEndNamedEvent(); } + } // 4J : WESTY : Changed so that time update goes through stats tracking update code. //levelData->setTime(time); @@ -384,6 +393,10 @@ void ServerLevel::tickTiles() { iLev = 2; } + else if( dimension->id == 2 ) + { + iLev = 3; + } chunksToPoll.clear(); unsigned int tickCount = 0; @@ -1386,7 +1399,7 @@ int ServerLevel::runUpdate(void* lpParam) // 4J Stu - Grass and Lava ticks currently take up the majority of all tile updates, so I am limiting them int grassTicks = 0; int lavaTicks = 0; - for( unsigned int iLev = 0; iLev < 3; ++iLev ) + for( unsigned int iLev = 0; iLev < 4; ++iLev ) { EnterCriticalSection(&m_updateCS[iLev]); for( int i = 0; i < m_updateChunkCount[iLev]; i++ ) diff --git a/Minecraft.Client/ServerLevel.h b/Minecraft.Client/ServerLevel.h index 644c15c0..69983f12 100644 --- a/Minecraft.Client/ServerLevel.h +++ b/Minecraft.Client/ServerLevel.h @@ -151,19 +151,19 @@ public: // 4J added static const int MAX_UPDATES = 256; - // Each of these need to be duplicated for each level in the current game. As we currently only have 2 (over/nether), making this constant - static Level *m_level[3]; - static int m_updateChunkX[3][LEVEL_CHUNKS_TO_UPDATE_MAX]; - static int m_updateChunkZ[3][LEVEL_CHUNKS_TO_UPDATE_MAX]; - static int m_updateChunkCount[3]; - static int m_updateTileX[3][MAX_UPDATES]; - static int m_updateTileY[3][MAX_UPDATES]; - static int m_updateTileZ[3][MAX_UPDATES]; - static int m_updateTileCount[3]; - static int m_randValue[3]; + // Each of these need to be duplicated for each level in the current game (over/nether/end/aether) + static Level *m_level[4]; + static int m_updateChunkX[4][LEVEL_CHUNKS_TO_UPDATE_MAX]; + static int m_updateChunkZ[4][LEVEL_CHUNKS_TO_UPDATE_MAX]; + static int m_updateChunkCount[4]; + static int m_updateTileX[4][MAX_UPDATES]; + static int m_updateTileY[4][MAX_UPDATES]; + static int m_updateTileZ[4][MAX_UPDATES]; + static int m_updateTileCount[4]; + static int m_randValue[4]; static C4JThread::EventArray* m_updateTrigger; - static CRITICAL_SECTION m_updateCS[3]; + static CRITICAL_SECTION m_updateCS[4]; static C4JThread* m_updateThread; static int runUpdate(void* lpParam); diff --git a/Minecraft.Client/ServerPlayer.cpp b/Minecraft.Client/ServerPlayer.cpp index d670e7a4..398a3df7 100644 --- a/Minecraft.Client/ServerPlayer.cpp +++ b/Minecraft.Client/ServerPlayer.cpp @@ -538,6 +538,37 @@ void ServerPlayer::doTickB(bool ignorePortal) isInsidePortal = false; } } + else if (isInsideAetherPortal) + { + // Aether portal handling — toggles between Overworld (0) and Aether (2) + if (containerMenu != inventoryMenu) + { + closeContainer(); + } + if (riding != NULL) + { + this->ride(riding); + } + else + { + portalTime += 1 / 80.0f; + if (portalTime >= 1) + { + portalTime = 1; + changingDimensionDelay = 10; + + int targetDimension = 0; + if (dimension == 2) targetDimension = 0; + else targetDimension = 2; + + server->getPlayers()->toggleDimension( dynamic_pointer_cast( shared_from_this() ), targetDimension ); + lastSentExp = -1; + lastSentHealth = -1; + lastSentFood = -1; + } + } + isInsideAetherPortal = false; + } else { if (portalTime > 0) portalTime -= 1 / 20.0f; diff --git a/Minecraft.Client/StringTable.cpp b/Minecraft.Client/StringTable.cpp index b0c46a7b..f753649a 100644 --- a/Minecraft.Client/StringTable.cpp +++ b/Minecraft.Client/StringTable.cpp @@ -166,6 +166,13 @@ LPCWSTR StringTable::getString(int id) return L""; } +void StringTable::registerString(int id, const wstring &value) +{ + if (id >= (int)m_stringsVec.size()) + m_stringsVec.resize(id + 1, L""); + m_stringsVec[id] = value; +} + diff --git a/Minecraft.Client/StringTable.h b/Minecraft.Client/StringTable.h index 9e27d65c..79bdb553 100644 --- a/Minecraft.Client/StringTable.h +++ b/Minecraft.Client/StringTable.h @@ -66,6 +66,7 @@ public: LPCWSTR getString(const wstring &id); LPCWSTR getString(int id); + void registerString(int id, const wstring &value); //static LPCWSTR m_wchLocaleCode[LOCALE_COUNT]; diff --git a/Minecraft.Client/Texture.cpp b/Minecraft.Client/Texture.cpp index e287c177..e3ad5aff 100644 --- a/Minecraft.Client/Texture.cpp +++ b/Minecraft.Client/Texture.cpp @@ -133,7 +133,7 @@ void Texture::_init(const wstring &name, int mode, int width, int height, int de for(unsigned int level = 1; level < m_iMipLevels; ++level) { int ww = width >> level; - int hh = height >> height; + int hh = height >> level; byteArray tempBytes = byteArray(ww * hh * depth * 4); for (int index = 0; index < tempBytes.length; index++) diff --git a/Minecraft.Client/User.cpp b/Minecraft.Client/User.cpp index a359bfd3..d057caf7 100644 --- a/Minecraft.Client/User.cpp +++ b/Minecraft.Client/User.cpp @@ -36,6 +36,42 @@ void User::staticCtor() allowedTiles.push_back(Tile::bookshelf); allowedTiles.push_back(Tile::tnt); allowedTiles.push_back(Tile::obsidian); + + // Aether Blocks + allowedTiles.push_back(Tile::aetherGrass); + allowedTiles.push_back(Tile::aetherDirt); + allowedTiles.push_back(Tile::holystone); + allowedTiles.push_back(Tile::mossyHolystone); + allowedTiles.push_back(Tile::ambrosiumOre); + allowedTiles.push_back(Tile::zaniteOre); + allowedTiles.push_back(Tile::gravititeOre); + allowedTiles.push_back(Tile::skyrootLog); + allowedTiles.push_back(Tile::skyrootPlanks); + allowedTiles.push_back(Tile::skyrootLeaves); + allowedTiles.push_back(Tile::goldenOakLog); + allowedTiles.push_back(Tile::goldenOakLeaves); + allowedTiles.push_back(Tile::quicksoil); + allowedTiles.push_back(Tile::quicksoilGlass); + allowedTiles.push_back(Tile::aercloud); + allowedTiles.push_back(Tile::aerogel); + allowedTiles.push_back(Tile::icestone); + allowedTiles.push_back(Tile::ambrosiumTorch); + allowedTiles.push_back(Tile::skyrootSapling); + allowedTiles.push_back(Tile::goldenOakSapling); + allowedTiles.push_back(Tile::purpleFlower); + allowedTiles.push_back(Tile::whiteFlower); + allowedTiles.push_back(Tile::angelicStone); + allowedTiles.push_back(Tile::lightAngelicStone); + allowedTiles.push_back(Tile::carvedStone); + allowedTiles.push_back(Tile::lightCarvedStone); + allowedTiles.push_back(Tile::hellfireStone); + allowedTiles.push_back(Tile::lightHellfireStone); + allowedTiles.push_back(Tile::pillarTop); + allowedTiles.push_back(Tile::pillarCarved); + allowedTiles.push_back(Tile::enchanter); + allowedTiles.push_back(Tile::freezer); + allowedTiles.push_back(Tile::incubator); + allowedTiles.push_back(Tile::libraryLore); } User::User(const wstring& name, const wstring& sessionId) diff --git a/Minecraft.Client/Windows64/GameHDD/20260301212957/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260301212957/saveData.ms new file mode 100644 index 00000000..4d40d7ce Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260301212957/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260301222949/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260301222949/saveData.ms new file mode 100644 index 00000000..de624fa3 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260301222949/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302223346/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302223346/saveData.ms new file mode 100644 index 00000000..08cda335 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302223346/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302225520/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302225520/saveData.ms new file mode 100644 index 00000000..04b9bcdf Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302225520/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302231543/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302231543/saveData.ms new file mode 100644 index 00000000..99863e85 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302231543/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260303001440/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260303001440/saveData.ms new file mode 100644 index 00000000..3323859f Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260303001440/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260303003136/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260303003136/saveData.ms new file mode 100644 index 00000000..68c78473 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260303003136/saveData.ms differ diff --git a/Minecraft.Client/Windows64Media/strings.h b/Minecraft.Client/Windows64Media/strings.h index c701ded0..7a91324a 100644 --- a/Minecraft.Client/Windows64Media/strings.h +++ b/Minecraft.Client/Windows64Media/strings.h @@ -1923,4 +1923,104 @@ #define IDS_YOU_DIED 1921 #define IDS_YOU_HAVE 1922 #define IDS_ZOMBIE 1923 -#define IDS_DLC_MENU_WORLDS 1924 +#define IDS_PROGRESS_ENTERING_AETHER 1924 +#define IDS_PROGRESS_LEAVING_AETHER 1925 + +// Aether Tile Strings +#define IDS_TILE_AETHER_GRASS 1926 +#define IDS_TILE_AETHER_DIRT 1927 +#define IDS_TILE_HOLYSTONE 1928 +#define IDS_TILE_MOSSY_HOLYSTONE 1929 +#define IDS_TILE_AMBROSIUM_ORE 1930 +#define IDS_TILE_ZANITE_ORE 1931 +#define IDS_TILE_GRAVITITE_ORE 1932 +#define IDS_TILE_SKYROOT_LOG 1933 +#define IDS_TILE_SKYROOT_PLANKS 1934 +#define IDS_TILE_SKYROOT_LEAVES 1935 +#define IDS_TILE_GOLDEN_OAK_LOG 1936 +#define IDS_TILE_GOLDEN_OAK_LEAVES 1937 +#define IDS_TILE_QUICKSOIL 1938 +#define IDS_TILE_QUICKSOIL_GLASS 1939 +#define IDS_TILE_AERCLOUD 1940 +#define IDS_TILE_AEROGEL 1941 +#define IDS_TILE_ICESTONE 1942 +#define IDS_TILE_AMBROSIUM_TORCH 1943 +#define IDS_TILE_SKYROOT_SAPLING 1944 +#define IDS_TILE_GOLDEN_OAK_SAPLING 1945 +#define IDS_TILE_PURPLE_FLOWER 1946 +#define IDS_TILE_WHITE_FLOWER 1947 +#define IDS_TILE_ANGELIC_STONE 1948 +#define IDS_TILE_LIGHT_ANGELIC_STONE 1949 +#define IDS_TILE_CARVED_STONE 1950 +#define IDS_TILE_LIGHT_CARVED_STONE 1951 +#define IDS_TILE_HELLFIRE_STONE 1952 +#define IDS_TILE_LIGHT_HELLFIRE_STONE 1953 +#define IDS_TILE_PILLAR 1954 +#define IDS_TILE_PILLAR_CARVED 1955 +#define IDS_TILE_ENCHANTER 1956 +#define IDS_TILE_FREEZER 1957 +#define IDS_TILE_INCUBATOR 1958 +#define IDS_TILE_LIBRARY_LORE 1959 +#define IDS_TILE_GOLD_AERCLOUD 1960 +#define IDS_TILE_BLUE_AERCLOUD 1961 + +// Aether Item Strings +#define IDS_ITEM_AMBROSIUM_SHARD 1962 +#define IDS_ITEM_ZANITE_GEMSTONE 1963 +#define IDS_ITEM_FLAMING_GEMSTONE 1964 +#define IDS_ITEM_SKYROOT_STICK 1965 +#define IDS_ITEM_AECHOR_PETAL 1966 +#define IDS_ITEM_GOLDEN_AMBER 1967 +#define IDS_ITEM_GUMMIE_SWET 1968 +#define IDS_ITEM_LIFE_SHARD 1969 +#define IDS_ITEM_REGENERATION_STONE 1970 +#define IDS_ITEM_MOA_EGG 1971 +#define IDS_ITEM_GOLDEN_FEATHER 1972 +#define IDS_ITEM_AETHER_KEY 1973 +#define IDS_ITEM_SKYROOT_BUCKET 1974 +#define IDS_ITEM_SKYROOT_BUCKET_WATER 1975 +#define IDS_ITEM_SKYROOT_BUCKET_MILK 1976 +#define IDS_ITEM_SKYROOT_BUCKET_POISON 1977 +#define IDS_ITEM_DART_GOLDEN 1978 +#define IDS_ITEM_DART_ENCHANTED 1979 +#define IDS_ITEM_DART_POISON 1980 +#define IDS_ITEM_DART_SHOOTER 1981 +#define IDS_ITEM_DART_SHOOTER_ENCHANTED 1982 +#define IDS_ITEM_DART_SHOOTER_POISON 1983 +#define IDS_ITEM_CLOUD_PARACHUTE 1984 +#define IDS_ITEM_CLOUD_STAFF 1985 +#define IDS_ITEM_NATURE_STAFF 1986 +#define IDS_ITEM_REPULSION_SHIELD 1987 +#define IDS_ITEM_LANCE 1988 +#define IDS_ITEM_PIG_SLAYER 1989 +#define IDS_ITEM_VAMPIRE_BLADE 1990 +#define IDS_ITEM_LIGHTNING_KNIFE 1991 +#define IDS_ITEM_SWORD_SKYROOT 1992 +#define IDS_ITEM_SHOVEL_SKYROOT 1993 +#define IDS_ITEM_PICKAXE_SKYROOT 1994 +#define IDS_ITEM_HATCHET_SKYROOT 1995 +#define IDS_ITEM_SWORD_HOLYSTONE 1996 +#define IDS_ITEM_SHOVEL_HOLYSTONE 1997 +#define IDS_ITEM_PICKAXE_HOLYSTONE 1998 +#define IDS_ITEM_HATCHET_HOLYSTONE 1999 +#define IDS_ITEM_SWORD_ZANITE 2000 +#define IDS_ITEM_SHOVEL_ZANITE 2001 +#define IDS_ITEM_PICKAXE_ZANITE 2002 +#define IDS_ITEM_HATCHET_ZANITE 2003 +#define IDS_ITEM_SWORD_GRAVITITE 2004 +#define IDS_ITEM_SHOVEL_GRAVITITE 2005 +#define IDS_ITEM_PICKAXE_GRAVITITE 2006 +#define IDS_ITEM_HATCHET_GRAVITITE 2007 +#define IDS_ITEM_PHOENIX_SWORD 2008 +#define IDS_ITEM_PHOENIX_SHOVEL 2009 +#define IDS_ITEM_PHOENIX_PICKAXE 2010 +#define IDS_ITEM_PHOENIX_AXE 2011 +#define IDS_ITEM_HELMET_ZANITE 2012 +#define IDS_ITEM_CHESTPLATE_ZANITE 2013 +#define IDS_ITEM_LEGGINGS_ZANITE 2014 +#define IDS_ITEM_BOOTS_ZANITE 2015 +#define IDS_ITEM_HELMET_GRAVITITE 2016 +#define IDS_ITEM_CHESTPLATE_GRAVITITE 2017 +#define IDS_ITEM_LEGGINGS_GRAVITITE 2018 +#define IDS_ITEM_BOOTS_GRAVITITE 2019 +#define IDS_ITEM_GRAVITITE_PLATE 2020 diff --git a/Minecraft.Client/Xbox/MinecraftWindows.rc b/Minecraft.Client/Xbox/MinecraftWindows.rc new file mode 100644 index 00000000..69ce5334 Binary files /dev/null and b/Minecraft.Client/Xbox/MinecraftWindows.rc differ diff --git a/Minecraft.World/AercloudTile.cpp b/Minecraft.World/AercloudTile.cpp new file mode 100644 index 00000000..66e4a223 --- /dev/null +++ b/Minecraft.World/AercloudTile.cpp @@ -0,0 +1,45 @@ +#include "stdafx.h" +#include "AercloudTile.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.phys.h" +#include "net.minecraft.world.h" + +AercloudTile::AercloudTile(int id) : HalfTransparentTile(id, L"Aercloud", Material::cloth, false) +{ +} + +AABB *AercloudTile::getAABB(Level *level, int x, int y, int z) +{ + // Entities sink about 75% into the cloud (4/16 remaining) + float r = 12 / 16.0f; + return AABB::newTemp(x, y, z, x + 1, y + 1 - r, z + 1); +} + +void AercloudTile::fallOn(Level *level, int x, int y, int z, shared_ptr entity, float fallDistance) +{ + // Slow the entity's fall instead of bouncing + entity->fallDistance = 0; + if (entity->yd < 0) + { + entity->yd *= 0.1; + } +} + +void AercloudTile::entityInside(Level *level, int x, int y, int z, shared_ptr entity) +{ + // Slow horizontal movement like soul sand + entity->xd *= 0.4; + entity->zd *= 0.4; + + // Slow falling speed for a floaty, airy feel + if (entity->yd < 0) + { + entity->yd *= 0.5; + entity->fallDistance = 0; + } +} + +bool AercloudTile::isSolidRender(bool isServerLevel) +{ + return false; +} diff --git a/Minecraft.World/AercloudTile.h b/Minecraft.World/AercloudTile.h new file mode 100644 index 00000000..b05f3506 --- /dev/null +++ b/Minecraft.World/AercloudTile.h @@ -0,0 +1,15 @@ +#pragma once +#include "HalfTransparentTile.h" + +class AercloudTile : public HalfTransparentTile +{ + friend class Tile; +protected: + AercloudTile(int id); + +public: + virtual AABB *getAABB(Level *level, int x, int y, int z); + virtual void fallOn(Level *level, int x, int y, int z, shared_ptr entity, float fallDistance); + virtual void entityInside(Level *level, int x, int y, int z, shared_ptr entity); + virtual bool isSolidRender(bool isServerLevel = false); +}; diff --git a/Minecraft.World/AetherBiome.cpp b/Minecraft.World/AetherBiome.cpp new file mode 100644 index 00000000..366b9e04 --- /dev/null +++ b/Minecraft.World/AetherBiome.cpp @@ -0,0 +1,50 @@ +#include "stdafx.h" +#include "AetherBiome.h" +#include "AetherBiomeDecorator.h" +#include "net.minecraft.world.entity.monster.h" +#include "net.minecraft.world.level.tile.h" +#include "net.minecraft.world.level.levelgen.feature.h" + +AetherBiome::AetherBiome(int id) : Biome(id) +{ + // Clear all mob spawning lists + enemies.clear(); + friendlies.clear(); + friendlies_chicken.clear(); + friendlies_wolf.clear(); + waterFriendlies.clear(); + + // Aether surface blocks + topMaterial = (byte) Tile::aetherGrass_Id; + material = (byte) Tile::aetherDirt_Id; + + // Use custom decorator + delete decorator; + decorator = new AetherBiomeDecorator(this); +} + +Feature *AetherBiome::getTreeFeature(Random *random) +{ + // 10% chance for golden oak, 90% for skyroot + if (random->nextInt(10) == 0) + { + return new GoldenOakTreeFeature(false); + } + return new SkyrootTreeFeature(false); +} + +Feature *AetherBiome::getGrassFeature(Random *random) +{ + // Regular tall grass (type 1) — will be colored by biome grass color + return new TallGrassFeature(Tile::tallgrass_Id, 1); +} + +int AetherBiome::getGrassColor() +{ + return 0x8ab69a; +} + +int AetherBiome::getFolageColor() +{ + return 0x8ab69a; +} diff --git a/Minecraft.World/AetherBiome.h b/Minecraft.World/AetherBiome.h new file mode 100644 index 00000000..105f67fd --- /dev/null +++ b/Minecraft.World/AetherBiome.h @@ -0,0 +1,13 @@ +#pragma once +#include "Biome.h" + +class AetherBiome : public Biome +{ +public: + AetherBiome(int id); + + virtual Feature *getTreeFeature(Random *random); + virtual Feature *getGrassFeature(Random *random); + virtual int getGrassColor(); + virtual int getFolageColor(); +}; diff --git a/Minecraft.World/AetherBiomeDecorator.cpp b/Minecraft.World/AetherBiomeDecorator.cpp new file mode 100644 index 00000000..55f8b7cd --- /dev/null +++ b/Minecraft.World/AetherBiomeDecorator.cpp @@ -0,0 +1,105 @@ +#include "stdafx.h" +#include "AetherBiomeDecorator.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.level.tile.h" +#include "net.minecraft.world.level.levelgen.feature.h" +#include "net.minecraft.world.level.biome.h" +#include "QuicksoilShelfFeature.h" + +AetherBiomeDecorator::AetherBiomeDecorator(Biome *biome) : BiomeDecorator(biome) +{ + // Aether ores replace holystone instead of stone + ambrosiumOreFeature = new OreFeature(Tile::ambrosiumOre_Id, 16, Tile::holystone_Id); + zaniteOreFeature = new OreFeature(Tile::zaniteOre_Id, 8, Tile::holystone_Id); + gravititeOreFeature = new OreFeature(Tile::gravititeOre_Id, 4, Tile::holystone_Id); + + // Quicksoil shelves on island undersides + quicksoilShelfFeature = new QuicksoilShelfFeature(); + + // Aether decoration counts + treeCount = 2; + grassCount = 5; + flowerCount = 2; + + // Disable overworld-specific features + sandCount = 0; + clayCount = 0; + gravelCount = 0; + deadBushCount = 0; + mushroomCount = 0; + reedsCount = 0; + cactusCount = 0; + waterlilyCount = 0; + hugeMushrooms = 0; + liquids = false; +} + +void AetherBiomeDecorator::decorate() +{ + PIXBeginNamedEvent(0, "Decorate Aether ores"); + decorateAetherOres(); + PIXEndNamedEvent(); + + PIXBeginNamedEvent(0, "Decorate Aether forests"); + int forests = treeCount; + if (random->nextInt(10) == 0) forests += 1; + + for (int i = 0; i < forests; i++) + { + int x = xo + random->nextInt(16) + 8; + int z = zo + random->nextInt(16) + 8; + Feature *tree = biome->getTreeFeature(random); + tree->init(1, 1, 1); + tree->place(level, random, x, level->getHeightmap(x, z), z); + delete tree; + } + PIXEndNamedEvent(); + + PIXBeginNamedEvent(0, "Decorate Aether flowers/grass"); + for (int i = 0; i < flowerCount; i++) + { + int x = xo + random->nextInt(16) + 8; + int y = random->nextInt(Level::genDepth); + int z = zo + random->nextInt(16) + 8; + yellowFlowerFeature->place(level, random, x, y, z); + } + + for (int i = 0; i < grassCount; i++) + { + int x = xo + random->nextInt(16) + 8; + int y = random->nextInt(Level::genDepth); + int z = zo + random->nextInt(16) + 8; + MemSect(50); + Feature *grassFeature = biome->getGrassFeature(random); + MemSect(0); + grassFeature->place(level, random, x, y, z); + delete grassFeature; + } + PIXEndNamedEvent(); + + PIXBeginNamedEvent(0, "Decorate Aether quicksoil shelves"); + // Place quicksoil shelves on the undersides of islands + for (int i = 0; i < 3; i++) + { + int x = xo + random->nextInt(16) + 8; + int z = zo + random->nextInt(16) + 8; + int y = level->getHeightmap(x, z); + if (y > 0) + { + quicksoilShelfFeature->place(level, random, x, y, z); + } + } + PIXEndNamedEvent(); +} + +void AetherBiomeDecorator::decorateAetherOres() +{ + level->setInstaTick(true); + // Ambrosium: common, full height range + decorateDepthSpan(20, ambrosiumOreFeature, 0, Level::genDepth); + // Zanite: moderate, lower half + decorateDepthSpan(10, zaniteOreFeature, 0, Level::genDepth / 2); + // Gravitite: rare, bottom quarter + decorateDepthSpan(4, gravititeOreFeature, 0, Level::genDepth / 4); + level->setInstaTick(false); +} diff --git a/Minecraft.World/AetherBiomeDecorator.h b/Minecraft.World/AetherBiomeDecorator.h new file mode 100644 index 00000000..008849c7 --- /dev/null +++ b/Minecraft.World/AetherBiomeDecorator.h @@ -0,0 +1,20 @@ +#pragma once +#include "BiomeDecorator.h" + +class AetherBiomeDecorator : public BiomeDecorator +{ +public: + AetherBiomeDecorator(Biome *biome); + +protected: + // Aether ore features (replace holystone instead of stone) + Feature *ambrosiumOreFeature; + Feature *zaniteOreFeature; + Feature *gravititeOreFeature; + + // Quicksoil shelf feature for island undersides + Feature *quicksoilShelfFeature; + + virtual void decorate(); + void decorateAetherOres(); +}; diff --git a/Minecraft.World/AetherBushTile.cpp b/Minecraft.World/AetherBushTile.cpp new file mode 100644 index 00000000..c49b8ad1 --- /dev/null +++ b/Minecraft.World/AetherBushTile.cpp @@ -0,0 +1,16 @@ +#include "stdafx.h" +#include "AetherBushTile.h" +#include "net.minecraft.world.level.h" + +AetherBushTile::AetherBushTile(int id) : Bush(id) +{ +} + +AetherBushTile::AetherBushTile(int id, Material *material) : Bush(id, material) +{ +} + +bool AetherBushTile::mayPlaceOn(int tile) +{ + return tile == Tile::aetherGrass_Id || tile == Tile::aetherDirt_Id; +} diff --git a/Minecraft.World/AetherBushTile.h b/Minecraft.World/AetherBushTile.h new file mode 100644 index 00000000..022adfb8 --- /dev/null +++ b/Minecraft.World/AetherBushTile.h @@ -0,0 +1,12 @@ +#pragma once +#include "Bush.h" + +class AetherBushTile : public Bush +{ + friend class Tile; +protected: + AetherBushTile(int id); + AetherBushTile(int id, Material *material); + + virtual bool mayPlaceOn(int tile); +}; diff --git a/Minecraft.World/AetherDimension.cpp b/Minecraft.World/AetherDimension.cpp new file mode 100644 index 00000000..826dd5f5 --- /dev/null +++ b/Minecraft.World/AetherDimension.cpp @@ -0,0 +1,92 @@ +#include "stdafx.h" +#include "AetherDimension.h" +#include "FixedBiomeSource.h" +#include "LevelData.h" +#include "net.minecraft.world.level.levelgen.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.level.tile.h" +#include "net.minecraft.world.level.biome.h" +#include "AetherLevelSource.h" +#include "..\Minecraft.Client\Minecraft.h" +#include "..\Minecraft.Client\Common\Colours\ColourTable.h" + +void AetherDimension::init() +{ + // Use the Aether biome for the sky dimension + biomeSource = new FixedBiomeSource(Biome::aether, 0.5f, 0.0f); + id = 2; + hasCeiling = false; +} + +ChunkSource *AetherDimension::createRandomLevelSource() const +{ + // Floating island terrain generation for the Aether + return new AetherLevelSource(level, level->getSeed()); +} + +float AetherDimension::getTimeOfDay(__int64 time, float a) const +{ + // Permanent daytime — 0.0 gives maximum brightness (skyDarken = 0) + return 0.0f; +} + +float *AetherDimension::getSunriseColor(float td, float a) +{ + // No sunrise/sunset cycle in the Aether + return NULL; +} + +Vec3 *AetherDimension::getFogColor(float td, float a) const +{ + // Bright sky-blue fog color for the Aether + float r = 0.62f; + float g = 0.80f; + float b = 1.0f; + return Vec3::newTemp(r, g, b); +} + +bool AetherDimension::hasGround() +{ + // The Aether has ground (sky islands with void below, but ground exists) + return true; +} + +bool AetherDimension::mayRespawn() const +{ + // Cannot respawn in the Aether — sent back to Overworld on death + return false; +} + +bool AetherDimension::isNaturalDimension() +{ + // Not a natural dimension (no day/night cycle mob spawning rules) + return false; +} + +float AetherDimension::getCloudHeight() +{ + // Clouds are higher in the Aether + return (float)Level::genDepth + 32; +} + +bool AetherDimension::isValidSpawn(int x, int z) const +{ + int topTile = level->getTopTile(x, z); + if (topTile == 0) return false; + return Tile::tiles[topTile]->material->blocksMotion(); +} + +Pos *AetherDimension::getSpawnPos() +{ + return new Pos(0, 64, 0); +} + +bool AetherDimension::isFoggyAt(int x, int z) +{ + return false; +} + +int AetherDimension::getSpawnYPosition() +{ + return 64; +} diff --git a/Minecraft.World/AetherDimension.h b/Minecraft.World/AetherDimension.h new file mode 100644 index 00000000..132e2b76 --- /dev/null +++ b/Minecraft.World/AetherDimension.h @@ -0,0 +1,20 @@ +#pragma once +#include "Dimension.h" + +class AetherDimension : public Dimension +{ +public: + virtual void init(); + virtual ChunkSource *createRandomLevelSource() const; + virtual float getTimeOfDay(__int64 time, float a) const; + virtual float *getSunriseColor(float td, float a); + virtual Vec3 *getFogColor(float td, float a) const; + virtual bool hasGround(); + virtual bool mayRespawn() const; + virtual bool isNaturalDimension(); + virtual float getCloudHeight(); + virtual bool isValidSpawn(int x, int z) const; + virtual Pos *getSpawnPos(); + virtual int getSpawnYPosition(); + virtual bool isFoggyAt(int x, int z); +}; diff --git a/Minecraft.World/AetherGrassTile.cpp b/Minecraft.World/AetherGrassTile.cpp new file mode 100644 index 00000000..1bb2befb --- /dev/null +++ b/Minecraft.World/AetherGrassTile.cpp @@ -0,0 +1,88 @@ +#include "stdafx.h" +#include "AetherGrassTile.h" +#include "AetherNaturalTile.h" +#include "net.minecraft.world.item.h" +#include "net.minecraft.world.item.enchantment.h" +#include "net.minecraft.world.entity.player.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.h" +#include "Facing.h" +#include "IconRegister.h" + +AetherGrassTile::AetherGrassTile(int id) : Tile(id, Material::grass) +{ + iconTop = NULL; + iconSide = NULL; + setTicking(true); +} + +Icon *AetherGrassTile::getTexture(int face, int data) +{ + if (face == Facing::UP) return iconTop; + if (face == Facing::DOWN) return Tile::aetherDirt->getTexture(face); + return iconSide; +} + +Icon *AetherGrassTile::getTexture(LevelSource *level, int x, int y, int z, int face) +{ + if (face == Facing::UP) return iconTop; + if (face == Facing::DOWN) return Tile::aetherDirt->getTexture(face); + return iconSide; +} + +void AetherGrassTile::registerIcons(IconRegister *iconRegister) +{ + iconSide = iconRegister->registerIcon(L"AetherGrassSide"); + iconTop = iconRegister->registerIcon(L"AetherGrassTop"); +} + +void AetherGrassTile::tick(Level *level, int x, int y, int z, Random *random) +{ + if (level->isClientSide) return; + + // Spread to adjacent aether dirt + if (level->getRawBrightness(x, y + 1, z) >= Level::MAX_BRIGHTNESS - 6) + { + for (int i = 0; i < 4; i++) + { + int xt = x + random->nextInt(3) - 1; + int yt = y + random->nextInt(5) - 3; + int zt = z + random->nextInt(3) - 1; + int above = level->getTile(xt, yt + 1, zt); + if (level->getTile(xt, yt, zt) == Tile::aetherDirt_Id && level->getRawBrightness(xt, yt + 1, zt) >= MIN_BRIGHTNESS && Tile::lightBlock[above] <= 2) + { + level->setTile(xt, yt, zt, Tile::aetherGrass_Id); + } + } + } +} + +int AetherGrassTile::getResource(int data, Random *random, int playerBonusLevel) +{ + return Tile::aetherDirt_Id; +} + +bool AetherGrassTile::shouldTileTick(Level *level, int x, int y, int z) +{ + return (level->getRawBrightness(x, y + 1, z) >= Level::MAX_BRIGHTNESS - 6); +} + +void AetherGrassTile::setPlacedBy(Level *level, int x, int y, int z, shared_ptr by) +{ + // Mark as player-placed so skyroot tools won't double-drop + int data = level->getData(x, y, z); + level->setData(x, y, z, data | AetherNaturalTile::PLAYER_PLACED_BIT); +} + +void AetherGrassTile::playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data) +{ + int cleanData = data & ~AetherNaturalTile::PLAYER_PLACED_BIT; + bool isPlayerPlaced = (data & AetherNaturalTile::PLAYER_PLACED_BIT) != 0; + + Tile::playerDestroy(level, player, x, y, z, cleanData); + + if (!isPlayerPlaced && AetherNaturalTile::isSkyrootTool(player)) + { + AetherNaturalTile::spawnSkyrootBonusDrops(this, level, player, x, y, z, cleanData); + } +} diff --git a/Minecraft.World/AetherGrassTile.h b/Minecraft.World/AetherGrassTile.h new file mode 100644 index 00000000..a6d8e77c --- /dev/null +++ b/Minecraft.World/AetherGrassTile.h @@ -0,0 +1,33 @@ +#pragma once +#include "Tile.h" +#include "AetherNaturalTile.h" + +class Level; +class ChunkRebuildData; + +class AetherGrassTile : public Tile +{ + friend class Tile; + friend class ChunkRebuildData; +private: + Icon *iconTop; + Icon *iconSide; + +public: + static const int MIN_BRIGHTNESS = 4; + +protected: + AetherGrassTile(int id); + +public: + virtual Icon *getTexture(int face, int data); + virtual Icon *getTexture(LevelSource *level, int x, int y, int z, int face); + void registerIcons(IconRegister *iconRegister); + virtual void tick(Level *level, int x, int y, int z, Random *random); + virtual int getResource(int data, Random *random, int playerBonusLevel); + + virtual void setPlacedBy(Level *level, int x, int y, int z, shared_ptr by); + virtual void playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data); + + virtual bool shouldTileTick(Level *level, int x, int y, int z); +}; diff --git a/Minecraft.World/AetherLeafTile.cpp b/Minecraft.World/AetherLeafTile.cpp new file mode 100644 index 00000000..8ceb57ee --- /dev/null +++ b/Minecraft.World/AetherLeafTile.cpp @@ -0,0 +1,26 @@ +#include "stdafx.h" +#include "AetherLeafTile.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.h" + +AetherLeafTile::AetherLeafTile(int id) : TransparentTile(id, Material::leaves, true, isSolidRender()) +{ + setTicking(false); +} + +int AetherLeafTile::getResource(int data, Random *random, int playerBonusLevel) +{ + // Skyroot leaves drop skyroot saplings, golden oak leaves drop golden oak saplings + if (id == Tile::goldenOakLeaves_Id) return Tile::goldenOakSapling_Id; + return Tile::skyrootSapling_Id; +} + +int AetherLeafTile::getResourceCount(Random *random) +{ + return random->nextInt(20) == 0 ? 1 : 0; +} + +bool AetherLeafTile::isSeasonalLeaf() const +{ + return false; +} diff --git a/Minecraft.World/AetherLeafTile.h b/Minecraft.World/AetherLeafTile.h new file mode 100644 index 00000000..e72687d1 --- /dev/null +++ b/Minecraft.World/AetherLeafTile.h @@ -0,0 +1,16 @@ +#pragma once +#include "TransparentTile.h" + +class Random; + +class AetherLeafTile : public TransparentTile +{ + friend class Tile; +protected: + AetherLeafTile(int id); + +public: + virtual int getResource(int data, Random *random, int playerBonusLevel); + virtual int getResourceCount(Random *random); + virtual bool isSeasonalLeaf() const; +}; diff --git a/Minecraft.World/AetherLevelSource.cpp b/Minecraft.World/AetherLevelSource.cpp new file mode 100644 index 00000000..bd8aa1a7 --- /dev/null +++ b/Minecraft.World/AetherLevelSource.cpp @@ -0,0 +1,399 @@ +#include "stdafx.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.level.biome.h" +#include "net.minecraft.world.level.levelgen.h" +#include "net.minecraft.world.level.levelgen.feature.h" +#include "net.minecraft.world.level.levelgen.synth.h" +#include "net.minecraft.world.level.tile.h" +#include "net.minecraft.world.level.storage.h" +#include "AetherLevelSource.h" + +AetherLevelSource::AetherLevelSource(Level *level, __int64 seed) +{ + m_XZSize = level->getLevelData()->getXZSize(); + + this->level = level; + + random = new Random(seed); + pprandom = new Random(seed); + + lperlinNoise1 = new PerlinNoise(random, 16); + lperlinNoise2 = new PerlinNoise(random, 16); + perlinNoise1 = new PerlinNoise(random, 8); + scaleNoise = new PerlinNoise(random, 10); + depthNoise = new PerlinNoise(random, 16); + // Island mask noise — creates scattered island clusters across the world + islandNoise = new PerlinNoise(random, 4); + // Carving noise — cuts irregular shapes into islands + carvingNoise = new PerlinNoise(random, 6); +} + +AetherLevelSource::~AetherLevelSource() +{ + delete random; + delete pprandom; + delete lperlinNoise1; + delete lperlinNoise2; + delete perlinNoise1; + delete scaleNoise; + delete depthNoise; + delete islandNoise; + delete carvingNoise; +} + +void AetherLevelSource::prepareHeights(int xOffs, int zOffs, byteArray blocks, BiomeArray biomes) +{ + doubleArray buffer; + + int xChunks = 16 / CHUNK_WIDTH; + + int xSize = xChunks + 1; + int ySize = Level::genDepth / CHUNK_HEIGHT + 1; + int zSize = xChunks + 1; + buffer = getHeights(buffer, xOffs * xChunks, 0, zOffs * xChunks, xSize, ySize, zSize); + + for (int xc = 0; xc < xChunks; xc++) + { + for (int zc = 0; zc < xChunks; zc++) + { + for (int yc = 0; yc < Level::genDepth / CHUNK_HEIGHT; yc++) + { + double yStep = 1 / (double) CHUNK_HEIGHT; + double s0 = buffer[((xc + 0) * zSize + (zc + 0)) * ySize + (yc + 0)]; + double s1 = buffer[((xc + 0) * zSize + (zc + 1)) * ySize + (yc + 0)]; + double s2 = buffer[((xc + 1) * zSize + (zc + 0)) * ySize + (yc + 0)]; + double s3 = buffer[((xc + 1) * zSize + (zc + 1)) * ySize + (yc + 0)]; + + double s0a = (buffer[((xc + 0) * zSize + (zc + 0)) * ySize + (yc + 1)] - s0) * yStep; + double s1a = (buffer[((xc + 0) * zSize + (zc + 1)) * ySize + (yc + 1)] - s1) * yStep; + double s2a = (buffer[((xc + 1) * zSize + (zc + 0)) * ySize + (yc + 1)] - s2) * yStep; + double s3a = (buffer[((xc + 1) * zSize + (zc + 1)) * ySize + (yc + 1)] - s3) * yStep; + + for (int y = 0; y < CHUNK_HEIGHT; y++) + { + double xStep = 1 / (double) CHUNK_WIDTH; + + double _s0 = s0; + double _s1 = s1; + double _s0a = (s2 - s0) * xStep; + double _s1a = (s3 - s1) * xStep; + + for (int x = 0; x < CHUNK_WIDTH; x++) + { + int offs = (x + xc * CHUNK_WIDTH) << Level::genDepthBitsPlusFour | (0 + zc * CHUNK_WIDTH) << Level::genDepthBits | (yc * CHUNK_HEIGHT + y); + int step = 1 << Level::genDepthBits; + double zStep = 1 / (double) CHUNK_WIDTH; + + double val = _s0; + double vala = (_s1 - _s0) * zStep; + for (int z = 0; z < CHUNK_WIDTH; z++) + { + int tileId = 0; + if (val > 0) + { + tileId = Tile::holystone_Id; + } + + blocks[offs] = (byte) tileId; + offs += step; + val += vala; + } + _s0 += _s0a; + _s1 += _s1a; + } + + s0 += s0a; + s1 += s1a; + s2 += s2a; + s3 += s3a; + } + } + } + } + delete [] buffer.data; +} + +void AetherLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, BiomeArray biomes) +{ + for (int x = 0; x < 16; x++) + { + for (int z = 0; z < 16; z++) + { + int run = -1; + int runDepth = 3; + + byte top = (byte) Tile::aetherGrass_Id; + byte mid = (byte) Tile::aetherDirt_Id; + byte base = (byte) Tile::holystone_Id; + + for (int y = Level::genDepthMinusOne; y >= 0; y--) + { + int offs = (z * 16 + x) * Level::genDepth + y; + + int old = blocks[offs]; + + if (old == 0) + { + run = -1; + } + else if (old == Tile::holystone_Id) + { + if (run == -1) + { + if (runDepth <= 0) + { + top = 0; + mid = base; + } + + run = runDepth; + // Top-most block: aether grass + blocks[offs] = top; + } + else if (run > 0) + { + run--; + // Underneath the top: aether dirt + blocks[offs] = mid; + } + // When run reaches 0, the block stays as holystone + } + } + } + } +} + +LevelChunk *AetherLevelSource::create(int x, int z) +{ + return getChunk(x, z); +} + +LevelChunk *AetherLevelSource::getChunk(int xOffs, int zOffs) +{ + random->setSeed(xOffs * 341873128712l + zOffs * 132897987541l); + + BiomeArray biomes; + unsigned int blocksSize = Level::genDepth * 16 * 16; + byte *tileData = (byte *)XPhysicalAlloc(blocksSize, MAXULONG_PTR, 4096, PAGE_READWRITE); + XMemSet128(tileData, 0, blocksSize); + byteArray blocks = byteArray(tileData, blocksSize); + + level->getBiomeSource()->getBiomeBlock(biomes, xOffs * 16, zOffs * 16, 16, 16, true); + + prepareHeights(xOffs, zOffs, blocks, biomes); + buildSurfaces(xOffs, zOffs, blocks, biomes); + + LevelChunk *levelChunk = new LevelChunk(level, blocks, xOffs, zOffs); + XPhysicalFree(tileData); + + // 4J - recalcHeightmap moved to lightChunk() so it runs after the chunk is in the cache. + // Without this, lightGaps() fails because the chunk isn't findable via hasChunk yet. + + delete biomes.data; + + return levelChunk; +} + +doubleArray AetherLevelSource::getHeights(doubleArray buffer, int x, int y, int z, int xSize, int ySize, int zSize) +{ + if (buffer.data == NULL) + { + buffer = doubleArray(xSize * ySize * zSize); + } + + double s = 1 * 684.412; + double hs = 1 * 684.412; + + doubleArray pnr, ar, br, sr, dr; + + sr = scaleNoise->getRegion(sr, x, z, xSize, zSize, 1.121, 1.121, 0.5); + dr = depthNoise->getRegion(dr, x, z, xSize, zSize, 200.0, 200.0, 0.5); + + s *= 2; + + pnr = perlinNoise1->getRegion(pnr, x, y, z, xSize, ySize, zSize, s / 80.0, hs / 160.0, s / 80.0); + ar = lperlinNoise1->getRegion(ar, x, y, z, xSize, ySize, zSize, s, hs, s); + br = lperlinNoise2->getRegion(br, x, y, z, xSize, ySize, zSize, s, hs, s); + + // Island noise — creates scattered island clusters + doubleArray inr; + inr = islandNoise->getRegion(inr, x, z, xSize, zSize, 0.35, 0.35, 0.5); + + // Carving noise — cuts irregular shapes and hollows into islands + doubleArray cnr; + cnr = carvingNoise->getRegion(cnr, x, y, z, xSize, ySize, zSize, s / 30.0, hs / 30.0, s / 30.0); + + // World bounds for edge fade (in noise column units) + float worldHalf = (float)m_XZSize; + + int p = 0; + int pp = 0; + + for (int xx = 0; xx < xSize; xx++) + { + for (int zz = 0; zz < zSize; zz++) + { + double scale = ((sr[pp] + 256.0) / 512); + if (scale > 1) scale = 1; + + double depth = (dr[pp] / 8000.0); + if (depth < 0) depth = -depth * 0.3; + depth = depth * 3.0 - 2.0; + + // Island formation — higher threshold creates distinct scattered islands + float islandVal = (float)inr[pp]; + float doffs = islandVal * 100.0f - 60.0f; + + // Edge fade scaled to actual world size + float xd = (float)(xx + x); + float zd = (float)(zz + z); + float edgeDist = sqrt(xd * xd + zd * zd); + float fadeStart = worldHalf * 0.85f; + float edgeFade; + if (edgeDist < fadeStart) + edgeFade = 80.0f; + else + edgeFade = 80.0f - ((edgeDist - fadeStart) / (worldHalf - fadeStart)) * 180.0f; + if (edgeFade < -100) edgeFade = -100; + + // Islands only appear where both noise and edge conditions allow + if (edgeFade < doffs) doffs = edgeFade; + + if (doffs < -100) doffs = -100; + if (doffs > 80) doffs = 80; + + // Use depth noise to shift terrain center — creates shelf-like elevation steps + if (depth > 2) depth = 2; + if (depth < -2) depth = -2; + double depthShift = depth * 1.5; + + if (scale < 0) scale = 0; + scale = (scale) + 0.5; + + pp++; + + double yCenter = ySize / 2.0 + depthShift; + + for (int yy = 0; yy < ySize; yy++) + { + double val = 0; + double yOffs = (yy - yCenter) * 8 / scale; + + if (yOffs < 0) yOffs *= -1; + + double bb = ar[p] / 512; + double cc = br[p] / 512; + + double v = (pnr[p] / 10 + 1) / 2; + if (v < 0) val = bb; + else if (v > 1) val = cc; + else val = bb + (cc - bb) * v; + val -= 8; + val += doffs; + + // Carving — cut irregular shapes and hollows into solid areas + double carve = cnr[p] / 384.0; + if (val > 0 && carve < -6.0) + { + val += (carve + 6.0) * 2.0; + } + + // Slide down at the top of the world + int r = 2; + if (yy > ySize / 2 - r) + { + double slide = (yy - (ySize / 2 - r)) / (64.0f); + if (slide < 0) slide = 0; + if (slide > 1) slide = 1; + val = val * (1 - slide) + -3000 * slide; + } + // Slide down at the bottom of the world + r = 8; + if (yy < r) + { + double slide = (r - yy) / (r - 1.0f); + val = val * (1 - slide) + -30 * slide; + } + + buffer[p] = val; + p++; + } + } + } + + delete [] pnr.data; + delete [] ar.data; + delete [] br.data; + delete [] sr.data; + delete [] dr.data; + delete [] inr.data; + delete [] cnr.data; + + return buffer; +} + +bool AetherLevelSource::hasChunk(int x, int y) +{ + return true; +} + +// 4J - recalcHeightmap split out from getChunk so that it runs after the chunk is added to the cache. +// This is required for skylight to be calculated correctly — lightGaps() needs the chunk to pass hasChunk(). +void AetherLevelSource::lightChunk(LevelChunk *lc) +{ + lc->recalcHeightmap(); +} + +void AetherLevelSource::postProcess(ChunkSource *parent, int xt, int zt) +{ + HeavyTile::instaFall = true; + int xo = xt * 16; + int zo = zt * 16; + + pprandom->setSeed(level->getSeed()); + __int64 xScale = pprandom->nextLong() / 2 * 2 + 1; + __int64 zScale = pprandom->nextLong() / 2 * 2 + 1; + pprandom->setSeed(((xt * xScale) + (zt * zScale)) ^ level->getSeed()); + + Biome *biome = level->getBiome(xo + 16, zo + 16); + biome->decorate(level, pprandom, xo, zo); + + HeavyTile::instaFall = false; + + app.processSchematics(parent->getChunk(xt, zt)); +} + +bool AetherLevelSource::save(bool force, ProgressListener *progressListener) +{ + return true; +} + +bool AetherLevelSource::tick() +{ + return false; +} + +bool AetherLevelSource::shouldSave() +{ + return true; +} + +wstring AetherLevelSource::gatherStats() +{ + return L"AetherLevelSource"; +} + +vector *AetherLevelSource::getMobsAt(MobCategory *mobCategory, int x, int y, int z) +{ + Biome *biome = level->getBiome(x, z); + if (biome == NULL) + { + return NULL; + } + return biome->getMobs(mobCategory); +} + +TilePos *AetherLevelSource::findNearestMapFeature(Level *level, const wstring& featureName, int x, int y, int z) +{ + return NULL; +} diff --git a/Minecraft.World/AetherLevelSource.h b/Minecraft.World/AetherLevelSource.h new file mode 100644 index 00000000..cb2f90c0 --- /dev/null +++ b/Minecraft.World/AetherLevelSource.h @@ -0,0 +1,56 @@ +#pragma once + +#include "ChunkSource.h" +class PerlinNoise; + +class AetherLevelSource : public ChunkSource +{ +public: + static const int CHUNK_HEIGHT = 4; + static const int CHUNK_WIDTH = 8; +private: + Random *random; + Random *pprandom; + +private: + PerlinNoise *lperlinNoise1; + PerlinNoise *lperlinNoise2; + PerlinNoise *perlinNoise1; +public: + PerlinNoise *scaleNoise; + PerlinNoise *depthNoise; +private: + // Additional noise to create scattered island clusters + PerlinNoise *islandNoise; + // Carving noise for irregular island shapes + PerlinNoise *carvingNoise; + + Level *level; + +public: + AetherLevelSource(Level *level, __int64 seed); + ~AetherLevelSource(); + + void prepareHeights(int xOffs, int zOffs, byteArray blocks, BiomeArray biomes); + void buildSurfaces(int xOffs, int zOffs, byteArray blocks, BiomeArray biomes); + +public: + virtual LevelChunk *create(int x, int z); + virtual LevelChunk *getChunk(int xOffs, int zOffs); + +private: + doubleArray getHeights(doubleArray buffer, int x, int y, int z, int xSize, int ySize, int zSize); + +public: + virtual bool hasChunk(int x, int y); + virtual void lightChunk(LevelChunk *lc); + virtual void postProcess(ChunkSource *parent, int xt, int zt); + virtual bool save(bool force, ProgressListener *progressListener); + virtual bool tick(); + virtual bool shouldSave(); + virtual wstring gatherStats(); + +public: + virtual vector *getMobsAt(MobCategory *mobCategory, int x, int y, int z); + virtual TilePos *findNearestMapFeature(Level *level, const wstring& featureName, int x, int y, int z); +}; diff --git a/Minecraft.World/AetherMultiFaceTile.cpp b/Minecraft.World/AetherMultiFaceTile.cpp new file mode 100644 index 00000000..8ec2c24d --- /dev/null +++ b/Minecraft.World/AetherMultiFaceTile.cpp @@ -0,0 +1,25 @@ +#include "stdafx.h" +#include "AetherMultiFaceTile.h" +#include "net.minecraft.world.level.h" +#include "Facing.h" +#include "IconRegister.h" + +AetherMultiFaceTile::AetherMultiFaceTile(int id, const wstring &topTex, const wstring &sideTex) : Tile(id, Material::stone) +{ + iconTop = NULL; + iconSide = NULL; + texTop = topTex; + texSide = sideTex; +} + +Icon *AetherMultiFaceTile::getTexture(int face, int data) +{ + if (face == Facing::UP || face == Facing::DOWN) return iconTop; + return iconSide; +} + +void AetherMultiFaceTile::registerIcons(IconRegister *iconRegister) +{ + iconTop = iconRegister->registerIcon(texTop); + iconSide = iconRegister->registerIcon(texSide); +} diff --git a/Minecraft.World/AetherMultiFaceTile.h b/Minecraft.World/AetherMultiFaceTile.h new file mode 100644 index 00000000..a4f0ff75 --- /dev/null +++ b/Minecraft.World/AetherMultiFaceTile.h @@ -0,0 +1,19 @@ +#pragma once +#include "Tile.h" + +class AetherMultiFaceTile : public Tile +{ + friend class Tile; +private: + Icon *iconTop; + Icon *iconSide; + wstring texTop; + wstring texSide; + +protected: + AetherMultiFaceTile(int id, const wstring &topTex, const wstring &sideTex); + +public: + virtual Icon *getTexture(int face, int data); + void registerIcons(IconRegister *iconRegister); +}; diff --git a/Minecraft.World/AetherNaturalTile.cpp b/Minecraft.World/AetherNaturalTile.cpp new file mode 100644 index 00000000..11bc4d49 --- /dev/null +++ b/Minecraft.World/AetherNaturalTile.cpp @@ -0,0 +1,55 @@ +#include "stdafx.h" +#include "AetherNaturalTile.h" +#include "net.minecraft.world.item.h" +#include "net.minecraft.world.item.enchantment.h" +#include "net.minecraft.world.entity.player.h" +#include "net.minecraft.world.level.h" + +AetherNaturalTile::AetherNaturalTile(int id, Material *material) : Tile(id, material) +{ +} + +bool AetherNaturalTile::isSkyrootTool(shared_ptr player) +{ + shared_ptr held = player->inventory->getSelected(); + if (held == NULL) return false; + + int itemId = held->id; + return itemId == Item::sword_skyroot_Id || + itemId == Item::shovel_skyroot_Id || + itemId == Item::pickAxe_skyroot_Id || + itemId == Item::hatchet_skyroot_Id; +} + +void AetherNaturalTile::spawnSkyrootBonusDrops(Tile *tile, Level *level, shared_ptr player, int x, int y, int z, int data) +{ + // Don't double silk touch drops + if (EnchantmentHelper::hasSilkTouch(player->inventory)) + return; + + int playerBonusLevel = EnchantmentHelper::getDiggingLootBonus(player->inventory); + tile->spawnResources(level, x, y, z, data, playerBonusLevel); +} + +void AetherNaturalTile::setPlacedBy(Level *level, int x, int y, int z, shared_ptr by) +{ + // Mark as player-placed so skyroot tools won't double-drop + int data = level->getData(x, y, z); + level->setData(x, y, z, data | PLAYER_PLACED_BIT); +} + +void AetherNaturalTile::playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data) +{ + // Strip the player-placed bit before passing to base class + int cleanData = data & ~PLAYER_PLACED_BIT; + bool isPlayerPlaced = (data & PLAYER_PLACED_BIT) != 0; + + // Normal drop logic + Tile::playerDestroy(level, player, x, y, z, cleanData); + + // Skyroot double-drop bonus on natural blocks only + if (!isPlayerPlaced && isSkyrootTool(player)) + { + spawnSkyrootBonusDrops(this, level, player, x, y, z, cleanData); + } +} diff --git a/Minecraft.World/AetherNaturalTile.h b/Minecraft.World/AetherNaturalTile.h new file mode 100644 index 00000000..f3b2522c --- /dev/null +++ b/Minecraft.World/AetherNaturalTile.h @@ -0,0 +1,32 @@ +#pragma once +#include "Tile.h" + +class Player; + +// Simple tile for natural Aether terrain blocks (aether dirt, holystone, mossy holystone) +// Handles the player-placed bit and skyroot double-drop mechanic. +class AetherNaturalTile : public Tile +{ + friend class Tile; +public: + // Bit used to mark a block as player-placed (prevents skyroot double drops) + // For non-log Aether blocks, bit 3 is free (no data usage) + static const int PLAYER_PLACED_BIT = 0x8; + + // For log blocks, bit 0 is free (bits 2-3 used for rotation) + static const int PLAYER_PLACED_BIT_LOG = 0x1; + + // Returns true if the player is currently holding a skyroot tool + static bool isSkyrootTool(shared_ptr player); + + // Spawns an extra set of drops for the skyroot double-drop bonus. + // Call this after the normal playerDestroy has already run. + static void spawnSkyrootBonusDrops(Tile *tile, Level *level, shared_ptr player, int x, int y, int z, int data); + +protected: + AetherNaturalTile(int id, Material *material); + +public: + virtual void setPlacedBy(Level *level, int x, int y, int z, shared_ptr by); + virtual void playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data); +}; diff --git a/Minecraft.World/AetherOreTile.cpp b/Minecraft.World/AetherOreTile.cpp new file mode 100644 index 00000000..15291735 --- /dev/null +++ b/Minecraft.World/AetherOreTile.cpp @@ -0,0 +1,64 @@ +#include "stdafx.h" +#include "AetherOreTile.h" +#include "AetherNaturalTile.h" +#include "net.minecraft.world.item.h" +#include "net.minecraft.world.item.enchantment.h" +#include "net.minecraft.world.entity.player.h" +#include "net.minecraft.world.level.h" + +AetherOreTile::AetherOreTile(int id) : Tile(id, Material::stone) +{ +} + +int AetherOreTile::getResource(int data, Random *random, int playerBonusLevel) +{ + // Ambrosium ore drops ambrosium shard (item), zanite ore drops zanite gemstone (item) + // Gravitite ore drops itself (needs smelting) + if (id == Tile::ambrosiumOre_Id) return Item::ambrosiumShard_Id; + if (id == Tile::zaniteOre_Id) return Item::zaniteGemstone_Id; + return id; // gravitite drops itself +} + +int AetherOreTile::getResourceCount(Random *random) +{ + return 1; +} + +void AetherOreTile::spawnResources(Level *level, int x, int y, int z, int data, float odds, int playerBonusLevel) +{ + Tile::spawnResources(level, x, y, z, data, odds, playerBonusLevel); + + if (getResource(data, level->random, playerBonusLevel) != id) + { + int xpCount = 0; + if (id == Tile::ambrosiumOre_Id) + { + xpCount = Mth::nextInt(level->random, 0, 2); + } + else if (id == Tile::zaniteOre_Id) + { + xpCount = Mth::nextInt(level->random, 2, 5); + } + popExperience(level, x, y, z, xpCount); + } +} + +void AetherOreTile::setPlacedBy(Level *level, int x, int y, int z, shared_ptr by) +{ + // Mark as player-placed so skyroot tools won't double-drop + int data = level->getData(x, y, z); + level->setData(x, y, z, data | AetherNaturalTile::PLAYER_PLACED_BIT); +} + +void AetherOreTile::playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data) +{ + int cleanData = data & ~AetherNaturalTile::PLAYER_PLACED_BIT; + bool isPlayerPlaced = (data & AetherNaturalTile::PLAYER_PLACED_BIT) != 0; + + Tile::playerDestroy(level, player, x, y, z, cleanData); + + if (!isPlayerPlaced && AetherNaturalTile::isSkyrootTool(player)) + { + AetherNaturalTile::spawnSkyrootBonusDrops(this, level, player, x, y, z, cleanData); + } +} diff --git a/Minecraft.World/AetherOreTile.h b/Minecraft.World/AetherOreTile.h new file mode 100644 index 00000000..ac59b919 --- /dev/null +++ b/Minecraft.World/AetherOreTile.h @@ -0,0 +1,16 @@ +#pragma once +#include "Tile.h" + +class Random; +class Player; + +class AetherOreTile : public Tile +{ +public: + AetherOreTile(int id); + virtual int getResource(int data, Random *random, int playerBonusLevel); + virtual int getResourceCount(Random *random); + virtual void spawnResources(Level *level, int x, int y, int z, int data, float odds, int playerBonusLevel); + virtual void setPlacedBy(Level *level, int x, int y, int z, shared_ptr by); + virtual void playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data); +}; diff --git a/Minecraft.World/AetherPortalTile.cpp b/Minecraft.World/AetherPortalTile.cpp new file mode 100644 index 00000000..5f573125 --- /dev/null +++ b/Minecraft.World/AetherPortalTile.cpp @@ -0,0 +1,200 @@ +#include "stdafx.h" +#include "net.minecraft.world.entity.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.level.dimension.h" +#include "net.minecraft.world.item.h" +#include "AetherPortalTile.h" + +AetherPortalTile::AetherPortalTile(int id) : HalfTransparentTile(id, L"water", Material::portal, false) +{ + setTicking(true); +} + +void AetherPortalTile::tick(Level *level, int x, int y, int z, Random *random) +{ + HalfTransparentTile::tick(level, x, y, z, random); +} + +AABB *AetherPortalTile::getAABB(Level *level, int x, int y, int z) +{ + return NULL; +} + +void AetherPortalTile::updateShape(LevelSource *level, int x, int y, int z, int forceData, shared_ptr forceEntity) +{ + if (level->getTile(x - 1, y, z) == id || level->getTile(x + 1, y, z) == id) + { + float xr = 8 / 16.0f; + float yr = 2 / 16.0f; + this->setShape(0.5f - xr, 0, 0.5f - yr, 0.5f + xr, 1, 0.5f + yr); + } + else + { + float xr = 2 / 16.0f; + float yr = 8 / 16.0f; + this->setShape(0.5f - xr, 0, 0.5f - yr, 0.5f + xr, 1, 0.5f + yr); + } +} + +bool AetherPortalTile::isSolidRender(bool isServerLevel) +{ + return false; +} + +bool AetherPortalTile::isCubeShaped() +{ + return false; +} + +bool AetherPortalTile::trySpawnPortal(Level *level, int x, int y, int z, bool actuallySpawn) +{ + // The Aether portal uses a glowstone frame (like the Nether portal uses obsidian) + int xd = 0, zd = 0; + if (level->getTile(x - 1, y, z) == Tile::lightGem_Id || level->getTile(x + 1, y, z) == Tile::lightGem_Id) xd = 1; + if (level->getTile(x, y, z - 1) == Tile::lightGem_Id || level->getTile(x, y, z + 1) == Tile::lightGem_Id) zd = 1; + if (xd == zd) return false; + + if (level->getTile(x - xd, y, z - zd) == 0) { x -= xd; z -= zd; } + + for (int xx = -1; xx <= 2; xx++) + { + for (int yy = -1; yy <= 3; yy++) + { + bool edge = (xx == -1) || (xx == 2) || (yy == -1) || (yy == 3); + if ((xx == -1 || xx == 2) && (yy == -1 || yy == 3)) continue; + int t = level->getTile(x + xd * xx, y + yy, z + zd * xx); + if (edge) + { + if (t != Tile::lightGem_Id) return false; + } + else + { + // Interior must be empty or water (since water bucket activates the portal) + if (t != 0 && t != Tile::water_Id && t != Tile::calmWater_Id) return false; + } + } + } + + if (!actuallySpawn) return true; + + level->noNeighborUpdate = true; + for (int xx = 0; xx < 2; xx++) + { + for (int yy = 0; yy < 3; yy++) + { + level->setTile(x + xd * xx, y + yy, z + zd * xx, Tile::aetherPortalTile_Id); + } + } + level->noNeighborUpdate = false; + + return true; +} + +void AetherPortalTile::neighborChanged(Level *level, int x, int y, int z, int type) +{ + // Determine portal orientation from adjacent portal blocks + int xd = 0; + int zd = 1; + if (level->getTile(x - 1, y, z) == id || level->getTile(x + 1, y, z) == id) + { + xd = 1; + zd = 0; + } + + // Scan down to find the bottom of the portal column + int yBottom = y; + while (level->getTile(x, yBottom - 1, z) == id) + yBottom--; + + // Bottom must be glowstone + if (level->getTile(x, yBottom - 1, z) != Tile::lightGem_Id) + { + level->setTile(x, y, z, 0); + return; + } + + // Portal column must be exactly 3 tall with glowstone on top + int height = 1; + while (height < 4 && level->getTile(x, yBottom + height, z) == id) + height++; + + if (height != 3 || level->getTile(x, yBottom + height, z) != Tile::lightGem_Id) + { + level->setTile(x, y, z, 0); + return; + } + + // Don't allow cross-shaped portals + bool we = level->getTile(x - 1, y, z) == id || level->getTile(x + 1, y, z) == id; + bool ns = level->getTile(x, y, z - 1) == id || level->getTile(x, y, z + 1) == id; + if (we && ns) + { + level->setTile(x, y, z, 0); + return; + } + + // One neighbor must be glowstone frame, the other must be portal + if (!( + (level->getTile(x + xd, y, z + zd) == Tile::lightGem_Id && level->getTile(x - xd, y, z - zd) == id) || + (level->getTile(x - xd, y, z - zd) == Tile::lightGem_Id && level->getTile(x + xd, y, z + zd) == id) + )) + { + level->setTile(x, y, z, 0); + return; + } +} + +bool AetherPortalTile::shouldRenderFace(LevelSource *level, int x, int y, int z, int face) +{ + if (level->getTile(x, y, z) == id) return false; + + bool w = level->getTile(x - 1, y, z) == id && level->getTile(x - 2, y, z) != id; + bool e = level->getTile(x + 1, y, z) == id && level->getTile(x + 2, y, z) != id; + + bool n = level->getTile(x, y, z - 1) == id && level->getTile(x, y, z - 2) != id; + bool s = level->getTile(x, y, z + 1) == id && level->getTile(x, y, z + 2) != id; + + bool we = w || e; + bool ns = n || s; + + if (we && face == 4) return true; + if (we && face == 5) return true; + if (ns && face == 2) return true; + if (ns && face == 3) return true; + + return false; +} + +int AetherPortalTile::getResourceCount(Random *random) +{ + return 0; +} + +int AetherPortalTile::getRenderLayer() +{ + return 1; +} + +void AetherPortalTile::entityInside(Level *level, int x, int y, int z, shared_ptr entity) +{ + // Trigger portal teleportation — use the Aether portal flag + if (entity->riding == NULL && entity->rider.lock() == NULL) + { + entity->handleInsideAetherPortal(); + } +} + +void AetherPortalTile::animateTick(Level *level, int xt, int yt, int zt, Random *random) +{ + // No particles for the Aether portal +} + +int AetherPortalTile::cloneTileId(Level *level, int x, int y, int z) +{ + return 0; +} + +bool AetherPortalTile::mayPick() +{ + return false; +} diff --git a/Minecraft.World/AetherPortalTile.h b/Minecraft.World/AetherPortalTile.h new file mode 100644 index 00000000..0d8913ca --- /dev/null +++ b/Minecraft.World/AetherPortalTile.h @@ -0,0 +1,25 @@ +#pragma once +#include "HalfTransparentTile.h" +#include "Definitions.h" + +class Random; + +class AetherPortalTile : public HalfTransparentTile +{ +public: + AetherPortalTile(int id); + virtual void tick(Level *level, int x, int y, int z, Random *random); + virtual AABB *getAABB(Level *level, int x, int y, int z); + virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr forceEntity = shared_ptr()); + virtual bool isSolidRender(bool isServerLevel = false); + virtual bool isCubeShaped(); + virtual bool trySpawnPortal(Level *level, int x, int y, int z, bool actuallySpawn); + virtual void neighborChanged(Level *level, int x, int y, int z, int type); + virtual bool shouldRenderFace(LevelSource *level, int x, int y, int z, int face); + virtual int getResourceCount(Random *random); + virtual int getRenderLayer(); + virtual void entityInside(Level *level, int x, int y, int z, shared_ptr entity); + virtual void animateTick(Level *level, int xt, int yt, int zt, Random *random); + virtual int cloneTileId(Level *level, int x, int y, int z); + virtual bool mayPick(); +}; diff --git a/Minecraft.World/AetherSaplingTile.cpp b/Minecraft.World/AetherSaplingTile.cpp new file mode 100644 index 00000000..a3ec1d2e --- /dev/null +++ b/Minecraft.World/AetherSaplingTile.cpp @@ -0,0 +1,64 @@ +#include "stdafx.h" +#include "AetherSaplingTile.h" +#include "SkyrootTreeFeature.h" +#include "GoldenOakTreeFeature.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.level.tile.h" +#include "net.minecraft.world.h" + +AetherSaplingTile::AetherSaplingTile(int id) : AetherBushTile(id) +{ +} + +void AetherSaplingTile::tick(Level *level, int x, int y, int z, Random *random) +{ + if (level->isClientSide) return; + + Bush::tick(level, x, y, z, random); + + if (level->getRawBrightness(x, y + 1, z) >= Level::MAX_BRIGHTNESS - 6) + { + if (random->nextInt(7) == 0) + { + int data = level->getData(x, y, z); + if ((data & AGE_BIT) == 0) + { + level->setData(x, y, z, data | AGE_BIT); + } + else + { + growTree(level, x, y, z, random); + } + } + } +} + +void AetherSaplingTile::growTree(Level *level, int x, int y, int z, Random *random) +{ + Feature *f = NULL; + + if (this->id == Tile::skyrootSapling_Id) + { + f = new SkyrootTreeFeature(true); + } + else if (this->id == Tile::goldenOakSapling_Id) + { + f = new GoldenOakTreeFeature(true); + } + else + { + return; + } + + // Remove sapling before attempting to place tree + level->setTileNoUpdate(x, y, z, 0); + + if (!f->place(level, random, x, y, z)) + { + // Restore sapling if tree placement failed + int data = level->getData(x, y, z); + level->setTileAndDataNoUpdate(x, y, z, this->id, data); + } + + delete f; +} diff --git a/Minecraft.World/AetherSaplingTile.h b/Minecraft.World/AetherSaplingTile.h new file mode 100644 index 00000000..40703a97 --- /dev/null +++ b/Minecraft.World/AetherSaplingTile.h @@ -0,0 +1,17 @@ +#pragma once +#include "AetherBushTile.h" + +class AetherSaplingTile : public AetherBushTile +{ + friend class Tile; +public: + static const int AGE_BIT = 8; + +protected: + AetherSaplingTile(int id); + +public: + virtual void tick(Level *level, int x, int y, int z, Random *random); + + void growTree(Level *level, int x, int y, int z, Random *random); +}; diff --git a/Minecraft.World/ArmorItem.cpp b/Minecraft.World/ArmorItem.cpp index 0b2c24e4..03f5691d 100644 --- a/Minecraft.World/ArmorItem.cpp +++ b/Minecraft.World/ArmorItem.cpp @@ -24,11 +24,15 @@ const int _ArmorMaterial::chainArray[] = {2, 5, 4, 1}; const int _ArmorMaterial::ironArray[] = {2, 6, 5, 2}; const int _ArmorMaterial::goldArray[] = {2, 5, 3, 1}; const int _ArmorMaterial::diamondArray[] = {3, 8, 6, 3}; +const int _ArmorMaterial::zaniteArray[] = {2, 6, 5, 2}; +const int _ArmorMaterial::gravititeArray[] = {3, 8, 6, 3}; const _ArmorMaterial *_ArmorMaterial::CLOTH = new _ArmorMaterial(5, _ArmorMaterial::clothArray, 15); const _ArmorMaterial *_ArmorMaterial::CHAIN = new _ArmorMaterial(15, _ArmorMaterial::chainArray, 12); const _ArmorMaterial *_ArmorMaterial::IRON = new _ArmorMaterial(15, _ArmorMaterial::ironArray, 9); const _ArmorMaterial *_ArmorMaterial::GOLD = new _ArmorMaterial(7, _ArmorMaterial::goldArray, 25); const _ArmorMaterial *_ArmorMaterial::DIAMOND = new _ArmorMaterial(33, _ArmorMaterial::diamondArray, 10); +const _ArmorMaterial *_ArmorMaterial::ZANITE = new _ArmorMaterial(15, _ArmorMaterial::zaniteArray, 9); +const _ArmorMaterial *_ArmorMaterial::GRAVITITE = new _ArmorMaterial(33, _ArmorMaterial::gravititeArray, 10); _ArmorMaterial::ArmorMaterial(int durabilityMultiplier, const int slotProtections[], int enchantmentValue) { diff --git a/Minecraft.World/ArmorItem.h b/Minecraft.World/ArmorItem.h index c711e2f9..a1fb9149 100644 --- a/Minecraft.World/ArmorItem.h +++ b/Minecraft.World/ArmorItem.h @@ -27,12 +27,16 @@ public: static const int ironArray[]; static const int goldArray[]; static const int diamondArray[]; + static const int zaniteArray[]; + static const int gravititeArray[]; public: static const ArmorMaterial *CLOTH; static const ArmorMaterial *CHAIN; static const ArmorMaterial *IRON; static const ArmorMaterial *GOLD; static const ArmorMaterial *DIAMOND; + static const ArmorMaterial *ZANITE; + static const ArmorMaterial *GRAVITITE; private: int durabilityMultiplier; diff --git a/Minecraft.World/ArmorRecipes.cpp b/Minecraft.World/ArmorRecipes.cpp index 8d3483b1..8c591bb3 100644 --- a/Minecraft.World/ArmorRecipes.cpp +++ b/Minecraft.World/ArmorRecipes.cpp @@ -48,30 +48,45 @@ void ArmorRecipes::_init() ADD_OBJECT(map[0],Item::ironIngot); ADD_OBJECT(map[0],Item::diamond); ADD_OBJECT(map[0],Item::goldIngot); + // Aether + ADD_OBJECT(map[0],Item::zaniteGemstone); + ADD_OBJECT(map[0],Item::gravititePlate); ADD_OBJECT(map[1],Item::helmet_cloth); // ADD_OBJECT(map[1],Item::helmet_chain); ADD_OBJECT(map[1],Item::helmet_iron); ADD_OBJECT(map[1],Item::helmet_diamond); ADD_OBJECT(map[1],Item::helmet_gold); + // Aether + ADD_OBJECT(map[1],Item::helmet_zanite); + ADD_OBJECT(map[1],Item::helmet_gravitite); ADD_OBJECT(map[2],Item::chestplate_cloth); // ADD_OBJECT(map[2],Item::chestplate_chain); ADD_OBJECT(map[2],Item::chestplate_iron); ADD_OBJECT(map[2],Item::chestplate_diamond); ADD_OBJECT(map[2],Item::chestplate_gold); + // Aether + ADD_OBJECT(map[2],Item::chestplate_zanite); + ADD_OBJECT(map[2],Item::chestplate_gravitite); ADD_OBJECT(map[3],Item::leggings_cloth); // ADD_OBJECT(map[3],Item::leggings_chain); ADD_OBJECT(map[3],Item::leggings_iron); ADD_OBJECT(map[3],Item::leggings_diamond); ADD_OBJECT(map[3],Item::leggings_gold); + // Aether + ADD_OBJECT(map[3],Item::leggings_zanite); + ADD_OBJECT(map[3],Item::leggings_gravitite); ADD_OBJECT(map[4],Item::boots_cloth); // ADD_OBJECT(map[4],Item::boots_chain); ADD_OBJECT(map[4],Item::boots_iron); ADD_OBJECT(map[4],Item::boots_diamond); ADD_OBJECT(map[4],Item::boots_gold); + // Aether + ADD_OBJECT(map[4],Item::boots_zanite); + ADD_OBJECT(map[4],Item::boots_gravitite); } // 4J-PB added for quick equip in the inventory @@ -83,7 +98,9 @@ ArmorRecipes::_eArmorType ArmorRecipes::GetArmorType(int iId) case Item::helmet_chain_Id: case Item::helmet_iron_Id: case Item::helmet_diamond_Id: - case Item::helmet_gold_Id: + case Item::helmet_gold_Id: + case Item::helmet_zanite_Id: + case Item::helmet_gravitite_Id: return eArmorType_Helmet; break; @@ -92,6 +109,8 @@ ArmorRecipes::_eArmorType ArmorRecipes::GetArmorType(int iId) case Item::chestplate_iron_Id: case Item::chestplate_diamond_Id: case Item::chestplate_gold_Id: + case Item::chestplate_zanite_Id: + case Item::chestplate_gravitite_Id: return eArmorType_Chestplate; break; @@ -100,6 +119,8 @@ ArmorRecipes::_eArmorType ArmorRecipes::GetArmorType(int iId) case Item::leggings_iron_Id: case Item::leggings_diamond_Id: case Item::leggings_gold_Id: + case Item::leggings_zanite_Id: + case Item::leggings_gravitite_Id: return eArmorType_Leggings; break; @@ -108,6 +129,8 @@ ArmorRecipes::_eArmorType ArmorRecipes::GetArmorType(int iId) case Item::boots_iron_Id: case Item::boots_diamond_Id: case Item::boots_gold_Id: + case Item::boots_zanite_Id: + case Item::boots_gravitite_Id: return eArmorType_Boots; break; } diff --git a/Minecraft.World/Biome.cpp b/Minecraft.World/Biome.cpp index d2f4cd1c..4c7c15e4 100644 --- a/Minecraft.World/Biome.cpp +++ b/Minecraft.World/Biome.cpp @@ -41,6 +41,7 @@ Biome *Biome::smallerExtremeHills = NULL; Biome *Biome::jungle = NULL; Biome *Biome::jungleHills = NULL; +Biome *Biome::aether = NULL; void Biome::staticCtor() @@ -78,6 +79,8 @@ void Biome::staticCtor() Biome::jungle = (new JungleBiome(21))->setColor(0x537b09)->setName(L"Jungle")->setLeafColor(0x537b09)->setTemperatureAndDownfall(1.2f, 0.9f)->setDepthAndScale(0.2f, 0.4f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_Jungle, eMinecraftColour_Foliage_Jungle, eMinecraftColour_Water_Jungle,eMinecraftColour_Sky_Jungle); Biome::jungleHills = (new JungleBiome(22))->setColor(0x2c4205)->setName(L"JungleHills")->setLeafColor(0x537b09)->setTemperatureAndDownfall(1.2f, 0.9f)->setDepthAndScale(1.8f, 0.5f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_JungleHills, eMinecraftColour_Foliage_JungleHills, eMinecraftColour_Water_JungleHills,eMinecraftColour_Sky_JungleHills); + + Biome::aether = (new AetherBiome(23))->setColor(0x7EC8E3)->setName(L"Aether")->setNoRain()->setTemperatureAndDownfall(0.5f, 0.0f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_Aether, eMinecraftColour_Foliage_Aether, eMinecraftColour_Water_Aether, eMinecraftColour_Sky_Aether); } Biome::Biome(int id) : id(id) diff --git a/Minecraft.World/Biome.h b/Minecraft.World/Biome.h index 1026bae6..8fabfc60 100644 --- a/Minecraft.World/Biome.h +++ b/Minecraft.World/Biome.h @@ -46,8 +46,9 @@ public: static Biome *smallerExtremeHills; static Biome *jungle; static Biome *jungleHills; + static Biome *aether; - static const int BIOME_COUNT = 23; // 4J Stu added + static const int BIOME_COUNT = 24; // 4J Stu added public: wstring m_name; diff --git a/Minecraft.World/BlueAercloudTile.cpp b/Minecraft.World/BlueAercloudTile.cpp new file mode 100644 index 00000000..3593b05c --- /dev/null +++ b/Minecraft.World/BlueAercloudTile.cpp @@ -0,0 +1,48 @@ +#include "stdafx.h" +#include "BlueAercloudTile.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.entity.h" +#include "net.minecraft.world.h" + +BlueAercloudTile::BlueAercloudTile(int id) : AercloudTile(id) +{ +} + +int BlueAercloudTile::getColor() const +{ + return 0xA3D1FF; // Blue +} + +int BlueAercloudTile::getColor(int auxData) +{ + return 0xA3D1FF; +} + +int BlueAercloudTile::getColor(LevelSource *level, int x, int y, int z) +{ + return 0xA3D1FF; +} + +int BlueAercloudTile::getColor(LevelSource *level, int x, int y, int z, int data) +{ + return 0xA3D1FF; +} + +void BlueAercloudTile::entityInside(Level *level, int x, int y, int z, shared_ptr entity) +{ + // Slow horizontal movement like regular aercloud + entity->xd *= 0.4; + entity->zd *= 0.4; + + entity->fallDistance = 0; + entity->yd = 1.25; + + // Spawn water splash particles at the entity's feet + float bbWidth = entity->bbWidth; + for (int i = 0; i < 8; i++) + { + float xo = (level->random->nextFloat() * 2 - 1) * bbWidth; + float zo = (level->random->nextFloat() * 2 - 1) * bbWidth; + level->addParticle(eParticleType_splash, entity->x + xo, entity->y, entity->z + zo, 0, 0.25, 0); + } +} diff --git a/Minecraft.World/BlueAercloudTile.h b/Minecraft.World/BlueAercloudTile.h new file mode 100644 index 00000000..39ea6ebc --- /dev/null +++ b/Minecraft.World/BlueAercloudTile.h @@ -0,0 +1,17 @@ +#pragma once +#include "AercloudTile.h" + +class BlueAercloudTile : public AercloudTile +{ + friend class Tile; +protected: + BlueAercloudTile(int id); + +public: + virtual int getColor() const; + virtual int getColor(int auxData); + virtual int getColor(LevelSource *level, int x, int y, int z); + virtual int getColor(LevelSource *level, int x, int y, int z, int data); + + virtual void entityInside(Level *level, int x, int y, int z, shared_ptr entity); +}; diff --git a/Minecraft.World/BucketItem.cpp b/Minecraft.World/BucketItem.cpp index d3570cd7..6e7be8e9 100644 --- a/Minecraft.World/BucketItem.cpp +++ b/Minecraft.World/BucketItem.cpp @@ -251,6 +251,14 @@ bool BucketItem::emptyBucket(Level *level, double x, double y, double z, int xt, } else { + // Check if water bucket is being placed inside a glowstone frame — Aether portal + if (content == Tile::water_Id && level->getTile(xt, yt - 1, zt) == Tile::lightGem_Id) + { + if (Tile::aetherPortalTile->trySpawnPortal(level, xt, yt, zt, true)) + { + return true; + } + } level->setTileAndData(xt, yt, zt, content, 0); } diff --git a/Minecraft.World/Bush.cpp b/Minecraft.World/Bush.cpp index e6cd7c85..44f328a6 100644 --- a/Minecraft.World/Bush.cpp +++ b/Minecraft.World/Bush.cpp @@ -33,7 +33,8 @@ bool Bush::mayPlace(Level *level, int x, int y, int z) bool Bush::mayPlaceOn(int tile) { - return tile == Tile::grass_Id || tile == Tile::dirt_Id || tile == Tile::farmland_Id; + return tile == Tile::grass_Id || tile == Tile::dirt_Id || tile == Tile::farmland_Id + || tile == Tile::aetherGrass_Id || tile == Tile::aetherDirt_Id; } void Bush::neighborChanged(Level *level, int x, int y, int z, int type) diff --git a/Minecraft.World/Dimension.cpp b/Minecraft.World/Dimension.cpp index 35e66698..3b9b8bf9 100644 --- a/Minecraft.World/Dimension.cpp +++ b/Minecraft.World/Dimension.cpp @@ -9,6 +9,7 @@ #include "HellDimension.h" #include "NormalDimension.h" #include "TheEndDimension.h" +#include "AetherDimension.h" #include "net.minecraft.world.level.tile.h" #include "..\Minecraft.Client\Minecraft.h" #include "..\Minecraft.Client\Common\Colours\ColourTable.h" @@ -184,6 +185,7 @@ Dimension *Dimension::getNew(int id) if (id == -1) return new HellDimension(); if (id == 0) return new NormalDimension(); if (id == 1) return new TheEndDimension(); + if (id == 2) return new AetherDimension(); return NULL; } diff --git a/Minecraft.World/DyePowderItem.cpp b/Minecraft.World/DyePowderItem.cpp index a05b8354..8d7abae0 100644 --- a/Minecraft.World/DyePowderItem.cpp +++ b/Minecraft.World/DyePowderItem.cpp @@ -141,6 +141,18 @@ bool DyePowderItem::useOn(shared_ptr itemInstance, shared_ptrisClientSide) + { + ((AetherSaplingTile *) Tile::tiles[tile])->growTree(level, x, y, z, level->random); + itemInstance->count--; + } + } + return true; + } else if (tile == Tile::mushroom1_Id || tile == Tile::mushroom2_Id) { if(!bTestUseOnOnly) diff --git a/Minecraft.World/Entity.cpp b/Minecraft.World/Entity.cpp index 4c9d5cf6..a9d1bb7f 100644 --- a/Minecraft.World/Entity.cpp +++ b/Minecraft.World/Entity.cpp @@ -1665,6 +1665,10 @@ void Entity::handleInsidePortal() { } +void Entity::handleInsideAetherPortal() +{ +} + void Entity::lerpMotion(double xd, double yd, double zd) { this->xd = xd; diff --git a/Minecraft.World/Entity.h b/Minecraft.World/Entity.h index bde83e30..b4fe6a3d 100644 --- a/Minecraft.World/Entity.h +++ b/Minecraft.World/Entity.h @@ -301,6 +301,7 @@ public: virtual float getPickRadius(); virtual Vec3 *getLookAngle(); virtual void handleInsidePortal(); + virtual void handleInsideAetherPortal(); virtual void lerpMotion(double xd, double yd, double zd); virtual void handleEntityEvent(byte eventId); virtual void animateHurt(); diff --git a/Minecraft.World/FurnaceRecipes.cpp b/Minecraft.World/FurnaceRecipes.cpp index 49ded1f5..22bd0e0d 100644 --- a/Minecraft.World/FurnaceRecipes.cpp +++ b/Minecraft.World/FurnaceRecipes.cpp @@ -40,6 +40,9 @@ FurnaceRecipes::FurnaceRecipes() addFurnaceRecipy(Tile::lapisOre_Id, new ItemInstance(Item::dye_powder, 1, DyePowderItem::BLUE), .2f); addFurnaceRecipy(Tile::netherQuartz_Id, new ItemInstance(Item::netherQuartz), .2f); + // Aether + addFurnaceRecipy(Tile::gravititeOre_Id, new ItemInstance(Item::gravititePlate), 1); + } diff --git a/Minecraft.World/GoldAercloudTile.cpp b/Minecraft.World/GoldAercloudTile.cpp new file mode 100644 index 00000000..eb4c755d --- /dev/null +++ b/Minecraft.World/GoldAercloudTile.cpp @@ -0,0 +1,26 @@ +#include "stdafx.h" +#include "GoldAercloudTile.h" + +GoldAercloudTile::GoldAercloudTile(int id) : AercloudTile(id) +{ +} + +int GoldAercloudTile::getColor() const +{ + return 0xFFEF91; // Gold +} + +int GoldAercloudTile::getColor(int auxData) +{ + return 0xFFEF91; +} + +int GoldAercloudTile::getColor(LevelSource *level, int x, int y, int z) +{ + return 0xFFEF91; +} + +int GoldAercloudTile::getColor(LevelSource *level, int x, int y, int z, int data) +{ + return 0xFFEF91; +} diff --git a/Minecraft.World/GoldAercloudTile.h b/Minecraft.World/GoldAercloudTile.h new file mode 100644 index 00000000..65e58315 --- /dev/null +++ b/Minecraft.World/GoldAercloudTile.h @@ -0,0 +1,15 @@ +#pragma once +#include "AercloudTile.h" + +class GoldAercloudTile : public AercloudTile +{ + friend class Tile; +protected: + GoldAercloudTile(int id); + +public: + virtual int getColor() const; + virtual int getColor(int auxData); + virtual int getColor(LevelSource *level, int x, int y, int z); + virtual int getColor(LevelSource *level, int x, int y, int z, int data); +}; diff --git a/Minecraft.World/GoldenOakLogTile.cpp b/Minecraft.World/GoldenOakLogTile.cpp new file mode 100644 index 00000000..b8a2ab82 --- /dev/null +++ b/Minecraft.World/GoldenOakLogTile.cpp @@ -0,0 +1,34 @@ +#include "stdafx.h" +#include "GoldenOakLogTile.h" +#include "AetherNaturalTile.h" +#include "net.minecraft.world.item.h" +#include "net.minecraft.world.entity.player.h" +#include "net.minecraft.world.level.h" +#include "Mth.h" + +GoldenOakLogTile::GoldenOakLogTile(int id, const wstring &sideTexture, const wstring &topTexture) + : SkyrootLogTile(id, sideTexture, topTexture) +{ +} + +int GoldenOakLogTile::getResource(int data, Random *random, int playerBonusLevel) +{ + // Golden oak logs drop skyroot logs instead of themselves + return Tile::skyrootLog_Id; +} + +void GoldenOakLogTile::playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data) +{ + // Handle skyroot log drops (1, or 2 with skyroot hatchet) + SkyrootLogTile::playerDestroy(level, player, x, y, z, data); + + // Additionally drop 1-2 golden amber + if (!level->isClientSide) + { + int count = 1 + Mth::nextInt(level->random, 0, 1); + for (int i = 0; i < count; i++) + { + popResource(level, x, y, z, shared_ptr(new ItemInstance(Item::goldenAmber_Id, 1, 0))); + } + } +} diff --git a/Minecraft.World/GoldenOakLogTile.h b/Minecraft.World/GoldenOakLogTile.h new file mode 100644 index 00000000..44e2512e --- /dev/null +++ b/Minecraft.World/GoldenOakLogTile.h @@ -0,0 +1,16 @@ +#pragma once +#include "SkyrootLogTile.h" + +class Player; + +class GoldenOakLogTile : public SkyrootLogTile +{ + friend class Tile; + +protected: + GoldenOakLogTile(int id, const wstring &sideTexture, const wstring &topTexture); + +public: + virtual int getResource(int data, Random *random, int playerBonusLevel); + virtual void playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data); +}; diff --git a/Minecraft.World/GoldenOakTreeFeature.cpp b/Minecraft.World/GoldenOakTreeFeature.cpp new file mode 100644 index 00000000..d5b79ffb --- /dev/null +++ b/Minecraft.World/GoldenOakTreeFeature.cpp @@ -0,0 +1,113 @@ +#include "stdafx.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.level.tile.h" +#include "GoldenOakTreeFeature.h" + +GoldenOakTreeFeature::GoldenOakTreeFeature(bool doUpdate) : Feature(doUpdate) +{ +} + +bool GoldenOakTreeFeature::place(Level *level, Random *random, int x, int y, int z) +{ + // Spruce-style conical tree with golden oak logs and leaves + int treeHeight = random->nextInt(4) + 6; + int trunkHeight = 1 + random->nextInt(2); + int topHeight = treeHeight - trunkHeight; + int leafRadius = 2 + random->nextInt(2); + + bool free = true; + if (y < 1 || y + treeHeight + 1 > Level::maxBuildHeight) return false; + + // 4J Stu Added to stop tree features generating areas previously placed by game rule generation + if (app.getLevelGenerationOptions() != NULL) + { + LevelGenerationOptions *levelGenOptions = app.getLevelGenerationOptions(); + bool intersects = levelGenOptions->checkIntersects(x - leafRadius, y - 1, z - leafRadius, x + leafRadius, y + treeHeight, z + leafRadius); + if (intersects) + { + return false; + } + } + + // Make sure there is enough space + for (int yy = y; yy <= y + 1 + treeHeight && free; yy++) + { + int r = 1; + if ((yy - y) < trunkHeight) + { + r = 0; + } + else + { + r = leafRadius; + } + for (int xx = x - r; xx <= x + r && free; xx++) + { + for (int zz = z - r; zz <= z + r && free; zz++) + { + if (yy >= 0 && yy < Level::maxBuildHeight) + { + int tt = level->getTile(xx, yy, zz); + if (tt != 0 && tt != Tile::goldenOakLeaves_Id && tt != Tile::skyrootLeaves_Id) free = false; + } + else + { + free = false; + } + } + } + } + + if (!free) return false; + + // Must stand on aether ground + int belowTile = level->getTile(x, y - 1, z); + if ((belowTile != Tile::aetherGrass_Id && belowTile != Tile::aetherDirt_Id) || y >= Level::maxBuildHeight - treeHeight - 1) return false; + + placeBlock(level, x, y - 1, z, Tile::aetherDirt_Id); + + // Place leaf canopy (tapered cone like spruce) + int currentRadius = random->nextInt(2); + int maxRadius = 1; + int minRadius = 0; + for (int heightPos = 0; heightPos <= topHeight; heightPos++) + { + const int yy = y + treeHeight - heightPos; + + for (int xx = x - currentRadius; xx <= x + currentRadius; xx++) + { + int xo = xx - (x); + for (int zz = z - currentRadius; zz <= z + currentRadius; zz++) + { + int zo = zz - (z); + if (abs(xo) == currentRadius && abs(zo) == currentRadius && currentRadius > 0) continue; + if (!Tile::solid[level->getTile(xx, yy, zz)]) placeBlock(level, xx, yy, zz, Tile::goldenOakLeaves_Id, 0); + } + } + + if (currentRadius >= maxRadius) + { + currentRadius = minRadius; + minRadius = 1; + maxRadius += 1; + if (maxRadius > leafRadius) + { + maxRadius = leafRadius; + } + } + else + { + currentRadius = currentRadius + 1; + } + } + + // Place trunk + int topOffset = random->nextInt(3); + for (int hh = 0; hh < treeHeight - topOffset; hh++) + { + int t = level->getTile(x, y + hh, z); + if (t == 0 || t == Tile::goldenOakLeaves_Id || t == Tile::skyrootLeaves_Id) placeBlock(level, x, y + hh, z, Tile::goldenOakLog_Id, 0); + } + + return true; +} diff --git a/Minecraft.World/GoldenOakTreeFeature.h b/Minecraft.World/GoldenOakTreeFeature.h new file mode 100644 index 00000000..9cc5f5b4 --- /dev/null +++ b/Minecraft.World/GoldenOakTreeFeature.h @@ -0,0 +1,10 @@ +#pragma once +#include "Feature.h" + +class GoldenOakTreeFeature : public Feature +{ +public: + GoldenOakTreeFeature(bool doUpdate); + + virtual bool place(Level *level, Random *random, int x, int y, int z); +}; diff --git a/Minecraft.World/HalfTransparentTile.cpp b/Minecraft.World/HalfTransparentTile.cpp index 6fa63d71..5bc165e5 100644 --- a/Minecraft.World/HalfTransparentTile.cpp +++ b/Minecraft.World/HalfTransparentTile.cpp @@ -26,6 +26,16 @@ bool HalfTransparentTile::blocksLight() return false; } +bool HalfTransparentTile::isCubeShaped() +{ + return false; +} + +int HalfTransparentTile::getRenderLayer() +{ + return 1; +} + void HalfTransparentTile::registerIcons(IconRegister *iconRegister) { icon = iconRegister->registerIcon(texture); diff --git a/Minecraft.World/HalfTransparentTile.h b/Minecraft.World/HalfTransparentTile.h index e3d34c3f..7cefe913 100644 --- a/Minecraft.World/HalfTransparentTile.h +++ b/Minecraft.World/HalfTransparentTile.h @@ -6,6 +6,7 @@ class ChunkRebuildData; class HalfTransparentTile : public Tile { friend class ChunkRebuildData; + friend class Tile; private: bool allowSame; wstring texture; @@ -15,5 +16,7 @@ public: virtual bool isSolidRender(bool isServerLevel = false); virtual bool shouldRenderFace(LevelSource *level, int x, int y, int z, int face); virtual bool blocksLight(); + virtual bool isCubeShaped(); + virtual int getRenderLayer(); void registerIcons(IconRegister *iconRegister); }; diff --git a/Minecraft.World/Item.cpp b/Minecraft.World/Item.cpp index 5d723ec5..bc29261d 100644 --- a/Minecraft.World/Item.cpp +++ b/Minecraft.World/Item.cpp @@ -25,6 +25,13 @@ const _Tier *_Tier::IRON = new _Tier(2, 250, 6, 2, 14); // const _Tier *_Tier::DIAMOND = new _Tier(3, 1561, 8, 3, 10); // const _Tier *_Tier::GOLD = new _Tier(0, 32, 12, 0, 22); +// Aether tiers (Skyroot=Wood, Holystone=Stone, Zanite=Iron, Gravitite=Diamond, Phoenix=Diamond) +const _Tier *_Tier::SKYROOT = new _Tier(0, 59, 2, 0, 15); +const _Tier *_Tier::HOLYSTONE = new _Tier(1, 131, 4, 1, 5); +const _Tier *_Tier::ZANITE = new _Tier(2, 250, 6, 2, 14); +const _Tier *_Tier::GRAVITITE = new _Tier(3, 1561, 8, 3, 10); +const _Tier *_Tier::PHOENIX = new _Tier(3, 1561, 8, 3, 10); + Random *Item::random = new Random(); ItemArray Item::items = ItemArray( ITEM_NUM_COUNT ); @@ -233,6 +240,67 @@ Item *Item::pumpkinPie = NULL; EnchantedBookItem *Item::enchantedBook = NULL; Item *Item::netherQuartz = NULL; +// Aether items +Item *Item::ambrosiumShard = NULL; +Item *Item::zaniteGemstone = NULL; +Item *Item::flamingGemstone = NULL; +Item *Item::skyrootStick = NULL; +Item *Item::aechorPetal = NULL; +Item *Item::goldenAmber = NULL; +Item *Item::gummieSwet = NULL; +Item *Item::lifeShard = NULL; +Item *Item::regenerationStone = NULL; +Item *Item::moaEgg = NULL; +Item *Item::goldenFeather = NULL; +Item *Item::aetherKey = NULL; +Item *Item::skyrootBucket = NULL; +Item *Item::skyrootBucketWater = NULL; +Item *Item::skyrootBucketMilk = NULL; +Item *Item::skyrootBucketPoison = NULL; +Item *Item::dartGolden = NULL; +Item *Item::dartEnchanted = NULL; +Item *Item::dartPoison = NULL; +Item *Item::dartShooter = NULL; +Item *Item::dartShooterEnchanted = NULL; +Item *Item::dartShooterPoison = NULL; +Item *Item::cloudParachute = NULL; +Item *Item::cloudStaff = NULL; +Item *Item::natureStaff = NULL; +Item *Item::repulsionShield = NULL; +Item *Item::aetherLance = NULL; +Item *Item::pigSlayer = NULL; +Item *Item::vampireBlade = NULL; +Item *Item::lightningKnife = NULL; +Item *Item::sword_skyroot = NULL; +Item *Item::shovel_skyroot = NULL; +Item *Item::pickAxe_skyroot = NULL; +Item *Item::hatchet_skyroot = NULL; +Item *Item::sword_holystone = NULL; +Item *Item::shovel_holystone = NULL; +Item *Item::pickAxe_holystone = NULL; +Item *Item::hatchet_holystone = NULL; +Item *Item::sword_zanite = NULL; +Item *Item::shovel_zanite = NULL; +Item *Item::pickAxe_zanite = NULL; +Item *Item::hatchet_zanite = NULL; +Item *Item::sword_gravitite = NULL; +Item *Item::shovel_gravitite = NULL; +Item *Item::pickAxe_gravitite = NULL; +Item *Item::hatchet_gravitite = NULL; +Item *Item::phoenixSword = NULL; +Item *Item::phoenixShovel = NULL; +Item *Item::phoenixPickaxe = NULL; +Item *Item::phoenixAxe = NULL; +ArmorItem *Item::helmet_zanite = NULL; +ArmorItem *Item::chestplate_zanite = NULL; +ArmorItem *Item::leggings_zanite = NULL; +ArmorItem *Item::boots_zanite = NULL; +ArmorItem *Item::helmet_gravitite = NULL; +ArmorItem *Item::chestplate_gravitite = NULL; +ArmorItem *Item::leggings_gravitite = NULL; +ArmorItem *Item::boots_gravitite = NULL; +Item *Item::gravititePlate = NULL; + void Item::staticCtor() { @@ -319,7 +387,7 @@ void Item::staticCtor() Item::apple = ( new FoodItem(4, 4, FoodConstants::FOOD_SATURATION_LOW, false) ) ->setTextureName(L"apple")->setDescriptionId(IDS_ITEM_APPLE)->setUseDescriptionId(IDS_DESC_APPLE); Item::coal = ( new CoalItem(7) ) ->setTextureName(L"coal")->setDescriptionId(IDS_ITEM_COAL)->setUseDescriptionId(IDS_DESC_COAL); Item::diamond = ( new Item(8) ) ->setBaseItemTypeAndMaterial(eBaseItemType_treasure, eMaterial_diamond)->setTextureName(L"diamond")->setDescriptionId(IDS_ITEM_DIAMOND)->setUseDescriptionId(IDS_DESC_DIAMONDS); - Item::stick = ( new Item(24) ) ->setTextureName(L"stick")->handEquipped()->setDescriptionId(IDS_ITEM_STICK)->setUseDescriptionId(IDS_DESC_STICK); + Item::stick = ( new Item(24) ) ->setBaseItemTypeAndMaterial(eBaseItemType_stick, eMaterial_wood)->setTextureName(L"stick")->handEquipped()->setDescriptionId(IDS_ITEM_STICK)->setUseDescriptionId(IDS_DESC_STICK); Item::mushroomStew = ( new BowlFoodItem(26, 6) ) ->setTextureName(L"mushroomStew")->setDescriptionId(IDS_ITEM_MUSHROOM_STEW)->setUseDescriptionId(IDS_DESC_MUSHROOMSTEW); Item::string = ( new TilePlanterItem(31, Tile::tripWire) ) ->setTextureName(L"string")->setDescriptionId(IDS_ITEM_STRING)->setUseDescriptionId(IDS_DESC_STRING); @@ -465,6 +533,91 @@ void Item::staticCtor() EnchantedBookItem::enchantedBook = (EnchantedBookItem *)(new EnchantedBookItem(147)) ->setMaxStackSize(1)->setTextureName(L"enchantedBook")->setDescriptionId(IDS_ITEM_ENCHANTED_BOOK)->setUseDescriptionId(IDS_DESC_ENCHANTED_BOOK); Item::netherQuartz = (new Item(150))->setTextureName(L"netherquartz")->setDescriptionId(IDS_ITEM_NETHER_QUARTZ)->setUseDescriptionId(IDS_DESC_NETHER_QUARTZ); + + // ========== Aether Items ========== + + // -- Materials -- + Item::ambrosiumShard = ( new Item(151) )->setTextureName(L"ambrosiumShard")->setDescriptionId(IDS_ITEM_AMBROSIUM_SHARD); + Item::zaniteGemstone = ( new Item(152) )->setBaseItemTypeAndMaterial(eBaseItemType_treasure, eMaterial_zanite)->setTextureName(L"zanite")->setDescriptionId(IDS_ITEM_ZANITE_GEMSTONE); + Item::flamingGemstone = ( new Item(153) )->setTextureName(L"flamingGemstone")->setDescriptionId(IDS_ITEM_FLAMING_GEMSTONE); + Item::skyrootStick = ( new Item(154) )->setBaseItemTypeAndMaterial(eBaseItemType_stick, eMaterial_skyroot)->setTextureName(L"skyrootStick")->handEquipped()->setDescriptionId(IDS_ITEM_SKYROOT_STICK); + Item::aechorPetal = ( new Item(155) )->setTextureName(L"aechorPetal")->setDescriptionId(IDS_ITEM_AECHOR_PETAL); + Item::goldenAmber = ( new Item(156) )->setBaseItemTypeAndMaterial(eBaseItemType_treasure, eMaterial_gravitite)->setTextureName(L"goldenAmber")->setDescriptionId(IDS_ITEM_GOLDEN_AMBER); + Item::gummieSwet = ( new Item(157) )->setTextureName(L"gummieSwet")->setDescriptionId(IDS_ITEM_GUMMIE_SWET); + Item::lifeShard = ( new Item(158) )->setTextureName(L"lifeShard")->setDescriptionId(IDS_ITEM_LIFE_SHARD); + Item::regenerationStone = ( new Item(159) )->setTextureName(L"regenerationStone")->setDescriptionId(IDS_ITEM_REGENERATION_STONE); + Item::moaEgg = ( new Item(160) )->setTextureName(L"moaEgg")->setDescriptionId(IDS_ITEM_MOA_EGG); + Item::goldenFeather = ( new Item(161) )->setTextureName(L"goldenFeather")->setDescriptionId(IDS_ITEM_GOLDEN_FEATHER); + Item::aetherKey = ( new Item(162) )->setTextureName(L"aetherKey")->setDescriptionId(IDS_ITEM_AETHER_KEY); + + // -- Skyroot Buckets -- + Item::skyrootBucket = ( new Item(163) )->setBaseItemTypeAndMaterial(eBaseItemType_utensil, eMaterial_skyroot)->setTextureName(L"skyrootBucket")->setDescriptionId(IDS_ITEM_SKYROOT_BUCKET)->setMaxStackSize(16); + Item::skyrootBucketWater = ( new Item(164) )->setTextureName(L"skyrootBucketWater")->setDescriptionId(IDS_ITEM_SKYROOT_BUCKET_WATER)->setMaxStackSize(1); + Item::skyrootBucketMilk = ( new Item(165) )->setTextureName(L"skyrootBucketMilk")->setDescriptionId(IDS_ITEM_SKYROOT_BUCKET_MILK)->setMaxStackSize(1); + Item::skyrootBucketPoison = ( new Item(166) )->setTextureName(L"skyrootBucketPoison")->setDescriptionId(IDS_ITEM_SKYROOT_BUCKET_POISON)->setMaxStackSize(1); + + // -- Darts & Dart Shooters -- + Item::dartGolden = ( new Item(167) )->setTextureName(L"dartGolden")->setDescriptionId(IDS_ITEM_DART_GOLDEN); + Item::dartEnchanted = ( new Item(168) )->setTextureName(L"dartEnchanted")->setDescriptionId(IDS_ITEM_DART_ENCHANTED); + Item::dartPoison = ( new Item(169) )->setTextureName(L"dartPoison")->setDescriptionId(IDS_ITEM_DART_POISON); + Item::dartShooter = ( new Item(170) )->setTextureName(L"dartShooter")->setDescriptionId(IDS_ITEM_DART_SHOOTER)->setMaxStackSize(1); + Item::dartShooterEnchanted = ( new Item(171) )->setTextureName(L"dartShooterEnchanted")->setDescriptionId(IDS_ITEM_DART_SHOOTER_ENCHANTED)->setMaxStackSize(1); + Item::dartShooterPoison = ( new Item(172) )->setTextureName(L"dartShooterPoison")->setDescriptionId(IDS_ITEM_DART_SHOOTER_POISON)->setMaxStackSize(1); + + // -- Special Items -- + Item::cloudParachute = ( new Item(173) )->setTextureName(L"cloudParachute")->setDescriptionId(IDS_ITEM_CLOUD_PARACHUTE)->setMaxStackSize(1); + Item::cloudStaff = ( new Item(174) )->setTextureName(L"cloudStaff")->handEquipped()->setDescriptionId(IDS_ITEM_CLOUD_STAFF)->setMaxStackSize(1); + Item::natureStaff = ( new Item(175) )->setTextureName(L"natureStaff")->handEquipped()->setDescriptionId(IDS_ITEM_NATURE_STAFF)->setMaxStackSize(1); + Item::repulsionShield = ( new Item(176) )->setTextureName(L"repulsionShield")->setDescriptionId(IDS_ITEM_REPULSION_SHIELD)->setMaxStackSize(1); + Item::aetherLance = ( new WeaponItem(177, _Tier::IRON) )->setBaseItemTypeAndMaterial(eBaseItemType_sword, eMaterial_zanite)->setTextureName(L"lance")->handEquipped()->setDescriptionId(IDS_ITEM_LANCE); + Item::pigSlayer = ( new WeaponItem(178, _Tier::IRON) )->setBaseItemTypeAndMaterial(eBaseItemType_sword, eMaterial_zanite)->setTextureName(L"pigSlayer")->setDescriptionId(IDS_ITEM_PIG_SLAYER); + Item::vampireBlade = ( new WeaponItem(179, _Tier::DIAMOND) )->setBaseItemTypeAndMaterial(eBaseItemType_sword, eMaterial_gravitite)->setTextureName(L"vampireBlade")->setDescriptionId(IDS_ITEM_VAMPIRE_BLADE); + Item::lightningKnife = ( new Item(180) )->setTextureName(L"lightningKnife")->setDescriptionId(IDS_ITEM_LIGHTNING_KNIFE)->setMaxStackSize(16); + + // -- Skyroot Tools (Wood equivalent) -- + Item::sword_skyroot = ( new WeaponItem(181, _Tier::SKYROOT) ) ->setBaseItemTypeAndMaterial(eBaseItemType_sword, eMaterial_skyroot) ->setTextureName(L"swordSkyroot")->setDescriptionId(IDS_ITEM_SWORD_SKYROOT); + Item::shovel_skyroot = ( new ShovelItem(182, _Tier::SKYROOT) ) ->setBaseItemTypeAndMaterial(eBaseItemType_shovel, eMaterial_skyroot) ->setTextureName(L"shovelSkyroot")->setDescriptionId(IDS_ITEM_SHOVEL_SKYROOT); + Item::pickAxe_skyroot = ( new PickaxeItem(183, _Tier::SKYROOT) ) ->setBaseItemTypeAndMaterial(eBaseItemType_pickaxe, eMaterial_skyroot) ->setTextureName(L"pickaxeSkyroot")->setDescriptionId(IDS_ITEM_PICKAXE_SKYROOT); + Item::hatchet_skyroot = ( new HatchetItem(184, _Tier::SKYROOT) ) ->setBaseItemTypeAndMaterial(eBaseItemType_hatchet, eMaterial_skyroot) ->setTextureName(L"hatchetSkyroot")->setDescriptionId(IDS_ITEM_HATCHET_SKYROOT); + + // -- Holystone Tools (Stone equivalent) -- + Item::sword_holystone = ( new WeaponItem(185, _Tier::HOLYSTONE) ) ->setBaseItemTypeAndMaterial(eBaseItemType_sword, eMaterial_holystone)->setTextureName(L"swordHolystone")->setDescriptionId(IDS_ITEM_SWORD_HOLYSTONE); + Item::shovel_holystone = ( new ShovelItem(186, _Tier::HOLYSTONE) ) ->setBaseItemTypeAndMaterial(eBaseItemType_shovel, eMaterial_holystone)->setTextureName(L"shovelHolystone")->setDescriptionId(IDS_ITEM_SHOVEL_HOLYSTONE); + Item::pickAxe_holystone = ( new PickaxeItem(187, _Tier::HOLYSTONE) )->setBaseItemTypeAndMaterial(eBaseItemType_pickaxe, eMaterial_holystone)->setTextureName(L"pickaxeHolystone")->setDescriptionId(IDS_ITEM_PICKAXE_HOLYSTONE); + Item::hatchet_holystone = ( new HatchetItem(188, _Tier::HOLYSTONE) )->setBaseItemTypeAndMaterial(eBaseItemType_hatchet, eMaterial_holystone)->setTextureName(L"hatchetHolystone")->setDescriptionId(IDS_ITEM_HATCHET_HOLYSTONE); + + // -- Zanite Tools (Iron equivalent) -- + Item::sword_zanite = ( new WeaponItem(189, _Tier::ZANITE) ) ->setBaseItemTypeAndMaterial(eBaseItemType_sword, eMaterial_zanite) ->setTextureName(L"swordZanite")->setDescriptionId(IDS_ITEM_SWORD_ZANITE); + Item::shovel_zanite = ( new ShovelItem(190, _Tier::ZANITE) ) ->setBaseItemTypeAndMaterial(eBaseItemType_shovel, eMaterial_zanite) ->setTextureName(L"shovelZanite")->setDescriptionId(IDS_ITEM_SHOVEL_ZANITE); + Item::pickAxe_zanite = ( new PickaxeItem(191, _Tier::ZANITE) ) ->setBaseItemTypeAndMaterial(eBaseItemType_pickaxe, eMaterial_zanite) ->setTextureName(L"pickaxeZanite")->setDescriptionId(IDS_ITEM_PICKAXE_ZANITE); + Item::hatchet_zanite = ( new HatchetItem(192, _Tier::ZANITE) ) ->setBaseItemTypeAndMaterial(eBaseItemType_hatchet, eMaterial_zanite) ->setTextureName(L"hatchetZanite")->setDescriptionId(IDS_ITEM_HATCHET_ZANITE); + + // -- Gravitite Tools (Diamond equivalent) -- + Item::sword_gravitite = ( new WeaponItem(193, _Tier::GRAVITITE) ) ->setBaseItemTypeAndMaterial(eBaseItemType_sword, eMaterial_gravitite)->setTextureName(L"swordGravitite")->setDescriptionId(IDS_ITEM_SWORD_GRAVITITE); + Item::shovel_gravitite = ( new ShovelItem(194, _Tier::GRAVITITE) ) ->setBaseItemTypeAndMaterial(eBaseItemType_shovel, eMaterial_gravitite)->setTextureName(L"shovelGravitite")->setDescriptionId(IDS_ITEM_SHOVEL_GRAVITITE); + Item::pickAxe_gravitite = ( new PickaxeItem(195, _Tier::GRAVITITE) )->setBaseItemTypeAndMaterial(eBaseItemType_pickaxe, eMaterial_gravitite)->setTextureName(L"pickaxeGravitite")->setDescriptionId(IDS_ITEM_PICKAXE_GRAVITITE); + Item::hatchet_gravitite = ( new HatchetItem(196, _Tier::GRAVITITE) )->setBaseItemTypeAndMaterial(eBaseItemType_hatchet, eMaterial_gravitite)->setTextureName(L"hatchetGravitite")->setDescriptionId(IDS_ITEM_HATCHET_GRAVITITE); + + // -- Phoenix Tools (Diamond equivalent) -- + Item::phoenixSword = ( new WeaponItem(197, _Tier::PHOENIX) ) ->setBaseItemTypeAndMaterial(eBaseItemType_sword, eMaterial_phoenix) ->setTextureName(L"phoenixSword")->setDescriptionId(IDS_ITEM_PHOENIX_SWORD); + Item::phoenixShovel = ( new ShovelItem(198, _Tier::PHOENIX) ) ->setBaseItemTypeAndMaterial(eBaseItemType_shovel, eMaterial_phoenix) ->setTextureName(L"phoenixShovel")->setDescriptionId(IDS_ITEM_PHOENIX_SHOVEL); + Item::phoenixPickaxe = ( new PickaxeItem(199, _Tier::PHOENIX) ) ->setBaseItemTypeAndMaterial(eBaseItemType_pickaxe, eMaterial_phoenix) ->setTextureName(L"phoenixPickaxe")->setDescriptionId(IDS_ITEM_PHOENIX_PICKAXE); + Item::phoenixAxe = ( new HatchetItem(200, _Tier::PHOENIX) ) ->setBaseItemTypeAndMaterial(eBaseItemType_hatchet, eMaterial_phoenix) ->setTextureName(L"phoenixAxe")->setDescriptionId(IDS_ITEM_PHOENIX_AXE); + + // -- Zanite Armor (Iron equivalent) -- + Item::helmet_zanite = (ArmorItem *) ( ( new ArmorItem(201, ArmorItem::ArmorMaterial::ZANITE, 5, ArmorItem::SLOT_HEAD) ) ->setBaseItemTypeAndMaterial(eBaseItemType_helmet, eMaterial_zanite) ->setTextureName(L"helmetZanite")->setDescriptionId(IDS_ITEM_HELMET_ZANITE) ); + Item::chestplate_zanite = (ArmorItem *) ( ( new ArmorItem(202, ArmorItem::ArmorMaterial::ZANITE, 5, ArmorItem::SLOT_TORSO) ) ->setBaseItemTypeAndMaterial(eBaseItemType_chestplate, eMaterial_zanite) ->setTextureName(L"chestplateZanite")->setDescriptionId(IDS_ITEM_CHESTPLATE_ZANITE) ); + Item::leggings_zanite = (ArmorItem *) ( ( new ArmorItem(203, ArmorItem::ArmorMaterial::ZANITE, 5, ArmorItem::SLOT_LEGS) ) ->setBaseItemTypeAndMaterial(eBaseItemType_leggings, eMaterial_zanite) ->setTextureName(L"leggingsZanite")->setDescriptionId(IDS_ITEM_LEGGINGS_ZANITE) ); + Item::boots_zanite = (ArmorItem *) ( ( new ArmorItem(204, ArmorItem::ArmorMaterial::ZANITE, 5, ArmorItem::SLOT_FEET) ) ->setBaseItemTypeAndMaterial(eBaseItemType_boots, eMaterial_zanite) ->setTextureName(L"bootsZanite")->setDescriptionId(IDS_ITEM_BOOTS_ZANITE) ); + + // -- Gravitite Armor (Diamond equivalent) -- + Item::helmet_gravitite = (ArmorItem *) ( ( new ArmorItem(205, ArmorItem::ArmorMaterial::GRAVITITE, 6, ArmorItem::SLOT_HEAD) ) ->setBaseItemTypeAndMaterial(eBaseItemType_helmet, eMaterial_gravitite)->setTextureName(L"helmetGravitite")->setDescriptionId(IDS_ITEM_HELMET_GRAVITITE) ); + Item::chestplate_gravitite = (ArmorItem *) ( ( new ArmorItem(206, ArmorItem::ArmorMaterial::GRAVITITE, 6, ArmorItem::SLOT_TORSO) ) ->setBaseItemTypeAndMaterial(eBaseItemType_chestplate, eMaterial_gravitite)->setTextureName(L"chestplateGravitite")->setDescriptionId(IDS_ITEM_CHESTPLATE_GRAVITITE) ); + Item::leggings_gravitite = (ArmorItem *) ( ( new ArmorItem(207, ArmorItem::ArmorMaterial::GRAVITITE, 6, ArmorItem::SLOT_LEGS) ) ->setBaseItemTypeAndMaterial(eBaseItemType_leggings, eMaterial_gravitite)->setTextureName(L"leggingsGravitite")->setDescriptionId(IDS_ITEM_LEGGINGS_GRAVITITE) ); + Item::boots_gravitite = (ArmorItem *) ( ( new ArmorItem(208, ArmorItem::ArmorMaterial::GRAVITITE, 6, ArmorItem::SLOT_FEET) ) ->setBaseItemTypeAndMaterial(eBaseItemType_boots, eMaterial_gravitite)->setTextureName(L"bootsGravitite")->setDescriptionId(IDS_ITEM_BOOTS_GRAVITITE) ); + + // -- Gravitite crafting material -- + Item::gravititePlate = ( new Item(209) )->setBaseItemTypeAndMaterial(eBaseItemType_treasure, eMaterial_gravitite)->setTextureName(L"gravititePlate")->setDescriptionId(IDS_ITEM_GRAVITITE_PLATE); } diff --git a/Minecraft.World/Item.h b/Minecraft.World/Item.h index 727fc661..26ae5522 100644 --- a/Minecraft.World/Item.h +++ b/Minecraft.World/Item.h @@ -79,7 +79,14 @@ public: eMaterial_emerald, eMaterial_quartz, eMaterial_apple, - eMaterial_carrot + eMaterial_carrot, + + // Aether materials + eMaterial_skyroot, + eMaterial_holystone, + eMaterial_zanite, + eMaterial_gravitite, + eMaterial_phoenix } eMaterial; @@ -123,6 +130,7 @@ public: eBaseItemType_rod, eBaseItemType_giltFruit, eBaseItemType_carpet, + eBaseItemType_stick, eBaseItemType_MAXTYPES, } eBaseItemType; @@ -142,6 +150,13 @@ public: static const Tier *DIAMOND; // static const Tier *GOLD; + // Aether tiers + static const Tier *SKYROOT; + static const Tier *HOLYSTONE; + static const Tier *ZANITE; + static const Tier *GRAVITITE; + static const Tier *PHOENIX; + private: const int level; const int uses; @@ -385,6 +400,89 @@ public: static EnchantedBookItem *enchantedBook; + // Aether items - materials + static Item *ambrosiumShard; + static Item *zaniteGemstone; + static Item *flamingGemstone; + static Item *skyrootStick; + static Item *aechorPetal; + static Item *goldenAmber; + static Item *gummieSwet; + static Item *lifeShard; + static Item *regenerationStone; + static Item *moaEgg; + static Item *goldenFeather; + static Item *aetherKey; + + // Aether items - buckets + static Item *skyrootBucket; + static Item *skyrootBucketWater; + static Item *skyrootBucketMilk; + static Item *skyrootBucketPoison; + + // Aether items - darts + static Item *dartGolden; + static Item *dartEnchanted; + static Item *dartPoison; + static Item *dartShooter; + static Item *dartShooterEnchanted; + static Item *dartShooterPoison; + + // Aether items - special weapons/tools + static Item *cloudParachute; + static Item *cloudStaff; + static Item *natureStaff; + static Item *repulsionShield; + static Item *aetherLance; + static Item *pigSlayer; + static Item *vampireBlade; + static Item *lightningKnife; + + // Aether tools - Skyroot (Wood equivalent) + static Item *sword_skyroot; + static Item *shovel_skyroot; + static Item *pickAxe_skyroot; + static Item *hatchet_skyroot; + + // Aether tools - Holystone (Stone equivalent) + static Item *sword_holystone; + static Item *shovel_holystone; + static Item *pickAxe_holystone; + static Item *hatchet_holystone; + + // Aether tools - Zanite (Iron equivalent) + static Item *sword_zanite; + static Item *shovel_zanite; + static Item *pickAxe_zanite; + static Item *hatchet_zanite; + + // Aether tools - Gravitite (Diamond equivalent) + static Item *sword_gravitite; + static Item *shovel_gravitite; + static Item *pickAxe_gravitite; + static Item *hatchet_gravitite; + + // Aether tools - Phoenix (Diamond equivalent) + static Item *phoenixSword; + static Item *phoenixShovel; + static Item *phoenixPickaxe; + static Item *phoenixAxe; + + // Aether armor - Zanite (Iron equivalent) + static ArmorItem *helmet_zanite; + static ArmorItem *chestplate_zanite; + static ArmorItem *leggings_zanite; + static ArmorItem *boots_zanite; + + // Aether armor - Gravitite (Diamond equivalent) + static ArmorItem *helmet_gravitite; + static ArmorItem *chestplate_gravitite; + static ArmorItem *leggings_gravitite; + static ArmorItem *boots_gravitite; + + // Aether crafting materials + static Item *gravititePlate; + static const int shovel_iron_Id = 256; static const int pickAxe_iron_Id = 257; @@ -576,6 +674,67 @@ public: static const int enchantedBook_Id = 403; static const int netherQuartz_Id = 406; + // Aether item IDs + static const int ambrosiumShard_Id = 407; + static const int zaniteGemstone_Id = 408; + static const int flamingGemstone_Id = 409; + static const int skyrootStick_Id = 410; + static const int aechorPetal_Id = 411; + static const int goldenAmber_Id = 412; + static const int gummieSwet_Id = 413; + static const int lifeShard_Id = 414; + static const int regenerationStone_Id = 415; + static const int moaEgg_Id = 416; + static const int goldenFeather_Id = 417; + static const int aetherKey_Id = 418; + static const int skyrootBucket_Id = 419; + static const int skyrootBucketWater_Id = 420; + static const int skyrootBucketMilk_Id = 421; + static const int skyrootBucketPoison_Id = 422; + static const int dartGolden_Id = 423; + static const int dartEnchanted_Id = 424; + static const int dartPoison_Id = 425; + static const int dartShooter_Id = 426; + static const int dartShooterEnchanted_Id= 427; + static const int dartShooterPoison_Id = 428; + static const int cloudParachute_Id = 429; + static const int cloudStaff_Id = 430; + static const int natureStaff_Id = 431; + static const int repulsionShield_Id = 432; + static const int aetherLance_Id = 433; + static const int pigSlayer_Id = 434; + static const int vampireBlade_Id = 435; + static const int lightningKnife_Id = 436; + static const int sword_skyroot_Id = 437; + static const int shovel_skyroot_Id = 438; + static const int pickAxe_skyroot_Id = 439; + static const int hatchet_skyroot_Id = 440; + static const int sword_holystone_Id = 441; + static const int shovel_holystone_Id = 442; + static const int pickAxe_holystone_Id = 443; + static const int hatchet_holystone_Id = 444; + static const int sword_zanite_Id = 445; + static const int shovel_zanite_Id = 446; + static const int pickAxe_zanite_Id = 447; + static const int hatchet_zanite_Id = 448; + static const int sword_gravitite_Id = 449; + static const int shovel_gravitite_Id = 450; + static const int pickAxe_gravitite_Id = 451; + static const int hatchet_gravitite_Id = 452; + static const int phoenixSword_Id = 453; + static const int phoenixShovel_Id = 454; + static const int phoenixPickaxe_Id = 455; + static const int phoenixAxe_Id = 456; + static const int helmet_zanite_Id = 457; + static const int chestplate_zanite_Id = 458; + static const int leggings_zanite_Id = 459; + static const int boots_zanite_Id = 460; + static const int helmet_gravitite_Id = 461; + static const int chestplate_gravitite_Id= 462; + static const int leggings_gravitite_Id = 463; + static const int boots_gravitite_Id = 464; + static const int gravititePlate_Id = 465; + public: const int id; diff --git a/Minecraft.World/LevelStorage.cpp b/Minecraft.World/LevelStorage.cpp index 7602e144..db789303 100644 --- a/Minecraft.World/LevelStorage.cpp +++ b/Minecraft.World/LevelStorage.cpp @@ -3,4 +3,5 @@ #include "LevelStorage.h" const wstring LevelStorage::NETHER_FOLDER = L"DIM-1"; -const wstring LevelStorage::ENDER_FOLDER = L"DIM1/"; \ No newline at end of file +const wstring LevelStorage::ENDER_FOLDER = L"DIM1/"; +const wstring LevelStorage::AETHER_FOLDER = L"DIM2/"; \ No newline at end of file diff --git a/Minecraft.World/LevelStorage.h b/Minecraft.World/LevelStorage.h index 25d2aba2..5888b07b 100644 --- a/Minecraft.World/LevelStorage.h +++ b/Minecraft.World/LevelStorage.h @@ -17,6 +17,7 @@ class LevelStorage public: static const wstring NETHER_FOLDER; static const wstring ENDER_FOLDER; + static const wstring AETHER_FOLDER; virtual LevelData *prepareLevel() = 0; virtual void checkSession() = 0; diff --git a/Minecraft.World/McRegionChunkStorage.cpp b/Minecraft.World/McRegionChunkStorage.cpp index a11cb1c1..1da68047 100644 --- a/Minecraft.World/McRegionChunkStorage.cpp +++ b/Minecraft.World/McRegionChunkStorage.cpp @@ -26,6 +26,10 @@ McRegionChunkStorage::McRegionChunkStorage(ConsoleSaveFile *saveFile, const wstr m_saveFile->createFile(ConsoleSavePath(L"DIM1/r.0.-1.mcr")); m_saveFile->createFile(ConsoleSavePath(L"DIM1/r.0.0.mcr")); m_saveFile->createFile(ConsoleSavePath(L"DIM1/r.-1.0.mcr")); + m_saveFile->createFile(ConsoleSavePath(L"DIM2/r.-1.-1.mcr")); // aether + m_saveFile->createFile(ConsoleSavePath(L"DIM2/r.0.-1.mcr")); // aether + m_saveFile->createFile(ConsoleSavePath(L"DIM2/r.0.0.mcr")); // aether + m_saveFile->createFile(ConsoleSavePath(L"DIM2/r.-1.0.mcr")); // aether m_saveFile->createFile(ConsoleSavePath(L"r.-1.-1.mcr")); m_saveFile->createFile(ConsoleSavePath(L"r.0.-1.mcr")); m_saveFile->createFile(ConsoleSavePath(L"r.0.0.mcr")); diff --git a/Minecraft.World/McRegionLevelStorage.cpp b/Minecraft.World/McRegionLevelStorage.cpp index 687ee048..55222866 100644 --- a/Minecraft.World/McRegionLevelStorage.cpp +++ b/Minecraft.World/McRegionLevelStorage.cpp @@ -86,6 +86,11 @@ ChunkStorage *McRegionLevelStorage::createChunkStorage(Dimension *dimension) return new McRegionChunkStorage(m_saveFile, LevelStorage::ENDER_FOLDER); } + if (dynamic_cast(dimension) != NULL) + { + return new McRegionChunkStorage(m_saveFile, LevelStorage::AETHER_FOLDER); + } + return new McRegionChunkStorage(m_saveFile, L""); } diff --git a/Minecraft.World/Minecraft.World.vcxproj b/Minecraft.World/Minecraft.World.vcxproj index 5dd3bc6b..804e0c6a 100644 --- a/Minecraft.World/Minecraft.World.vcxproj +++ b/Minecraft.World/Minecraft.World.vcxproj @@ -2181,8 +2181,12 @@ + + + + @@ -2509,6 +2513,7 @@ + @@ -2531,6 +2536,20 @@ + + + + + + + + + + + + + + @@ -2613,6 +2632,8 @@ + + @@ -3147,8 +3168,12 @@ + + + + @@ -3514,6 +3539,7 @@ + @@ -3540,6 +3566,20 @@ + + + + + + + + + + + + + + @@ -3674,6 +3714,8 @@ + + diff --git a/Minecraft.World/Minecraft.World.vcxproj.filters b/Minecraft.World/Minecraft.World.vcxproj.filters index eb5e4a8c..8defdcfe 100644 --- a/Minecraft.World/Minecraft.World.vcxproj.filters +++ b/Minecraft.World/Minecraft.World.vcxproj.filters @@ -418,6 +418,12 @@ net\minecraft\world\level\levelgen\feature + + net\minecraft\world\level\levelgen\feature + + + net\minecraft\world\level\levelgen\feature + net\minecraft\world\level\levelgen\feature @@ -457,6 +463,9 @@ net\minecraft\world\level\levelgen\feature + + net\minecraft\world\level\levelgen\feature + net\minecraft\world\level\levelgen\feature @@ -685,6 +694,48 @@ net\minecraft\world\level\tile + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + net\minecraft\world\level\tile @@ -1951,12 +2002,21 @@ net\minecraft\world\level\biome + + net\minecraft\world\level\biome + + + net\minecraft\world\level\biome + net\minecraft\world\level\biome net\minecraft\network\packet + + net\minecraft\world\level\dimension + net\minecraft\world\level\dimension @@ -2071,6 +2131,9 @@ net\minecraft\world\level\levelgen + + net\minecraft\world\level\levelgen + net\minecraft\world\level\newbiome\layer @@ -2895,6 +2958,12 @@ net\minecraft\world\level\levelgen\feature + + net\minecraft\world\level\levelgen\feature + + + net\minecraft\world\level\levelgen\feature + net\minecraft\world\level\levelgen\feature @@ -2934,6 +3003,9 @@ net\minecraft\world\level\levelgen\feature + + net\minecraft\world\level\levelgen\feature + net\minecraft\world\level\levelgen\feature @@ -3129,6 +3201,48 @@ net\minecraft\world\level\tile + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + + + net\minecraft\world\level\tile + net\minecraft\world\level\tile @@ -4209,12 +4323,21 @@ net\minecraft\world\level\biome + + net\minecraft\world\level\biome + + + net\minecraft\world\level\biome + net\minecraft\world\level\biome net\minecraft\network\packet + + net\minecraft\world\level\dimension + net\minecraft\world\level\dimension @@ -4317,6 +4440,9 @@ net\minecraft\world\level\levelgen + + net\minecraft\world\level\levelgen + net\minecraft\world\level\newbiome\layer diff --git a/Minecraft.World/PickaxeItem.cpp b/Minecraft.World/PickaxeItem.cpp index 5876b9bb..e84bd1ce 100644 --- a/Minecraft.World/PickaxeItem.cpp +++ b/Minecraft.World/PickaxeItem.cpp @@ -30,6 +30,9 @@ void PickaxeItem::staticCtor() diggables->data[19] = Tile::rail; diggables->data[20] = Tile::detectorRail; diggables->data[21] = Tile::goldenRail; + diggables->data[22] = Tile::ambrosiumOre; + diggables->data[23] = Tile::zaniteOre; + diggables->data[24] = Tile::gravititeOre; } PickaxeItem::PickaxeItem(int id, const Tier *tier) : DiggerItem(id, 2, tier, diggables) @@ -45,6 +48,8 @@ bool PickaxeItem::canDestroySpecial(Tile *tile) if (tile == Tile::ironBlock || tile == Tile::ironOre) return tier->getLevel() >= 1; if (tile == Tile::lapisBlock || tile == Tile::lapisOre) return tier->getLevel() >= 1; if (tile == Tile::redStoneOre || tile == Tile::redStoneOre_lit) return tier->getLevel() >= 2; + if (tile == Tile::zaniteOre) return tier->getLevel() >= 1; + if (tile == Tile::gravititeOre) return tier->getLevel() >= 2; if (tile->material == Material::stone) return true; if (tile->material == Material::metal) return true; if (tile->material == Material::heavyMetal) return true; diff --git a/Minecraft.World/PickaxeItem.h b/Minecraft.World/PickaxeItem.h index 52dac510..13ff89b1 100644 --- a/Minecraft.World/PickaxeItem.h +++ b/Minecraft.World/PickaxeItem.h @@ -2,7 +2,7 @@ #include "DiggerItem.h" -#define PICKAXE_DIGGABLES 22 +#define PICKAXE_DIGGABLES 25 class PickaxeItem : public DiggerItem { diff --git a/Minecraft.World/Player.cpp b/Minecraft.World/Player.cpp index 05d97743..9452a835 100644 --- a/Minecraft.World/Player.cpp +++ b/Minecraft.World/Player.cpp @@ -82,6 +82,8 @@ void Player::_init() isInsidePortal = false; + isInsideAetherPortal = false; + inAetherPortalOverlay = false; portalTime = oPortalTime = 0.0f; @@ -2328,6 +2330,17 @@ void Player::handleInsidePortal() isInsidePortal = true; } +void Player::handleInsideAetherPortal() +{ + if (changingDimensionDelay > 0) + { + changingDimensionDelay = 10; + return; + } + + isInsideAetherPortal = true; +} + void Player::increaseXp(int i) { // Update xp calculations from 1.3 diff --git a/Minecraft.World/Player.h b/Minecraft.World/Player.h index c323bf05..e7c8c093 100644 --- a/Minecraft.World/Player.h +++ b/Minecraft.World/Player.h @@ -113,6 +113,10 @@ public: protected: bool isInsidePortal; + bool isInsideAetherPortal; + +public: + bool inAetherPortalOverlay; public: float portalTime, oPortalTime; @@ -340,6 +344,7 @@ public: virtual Icon *getItemInHandIcon(shared_ptr item, int layer); virtual shared_ptr getArmor(int pos); virtual void handleInsidePortal(); + virtual void handleInsideAetherPortal(); void increaseXp(int i); virtual void withdrawExperienceLevels(int amount); diff --git a/Minecraft.World/PortalForcer.cpp b/Minecraft.World/PortalForcer.cpp index 7c9b7a86..6045a344 100644 --- a/Minecraft.World/PortalForcer.cpp +++ b/Minecraft.World/PortalForcer.cpp @@ -11,7 +11,7 @@ PortalForcer::PortalForcer() } -void PortalForcer::force(Level *level, shared_ptr e) +void PortalForcer::force(Level *level, shared_ptr e, int lastDimension) { if (level->dimension->id == 1) { @@ -44,18 +44,22 @@ void PortalForcer::force(Level *level, shared_ptr e) return; } - if (findPortal(level, e)) + if (findPortal(level, e, lastDimension)) { return; } - createPortal(level, e); - findPortal(level, e); + createPortal(level, e, lastDimension); + findPortal(level, e, lastDimension); } -bool PortalForcer::findPortal(Level *level, shared_ptr e) +bool PortalForcer::findPortal(Level *level, shared_ptr e, int lastDimension) { + // Determine which portal tile to search for based on dimension + bool isAether = (level->dimension->id == 2 || lastDimension == 2); + int portalTileId = isAether ? Tile::aetherPortalTile_Id : Tile::portalTile_Id; + // 4J Stu - Decrease the range at which we search for a portal in the nether given our smaller nether int r = 16;//* 8; if(level->dimension->id == -1) @@ -87,9 +91,9 @@ bool PortalForcer::findPortal(Level *level, shared_ptr e) double zd = (z + 0.5) - e->z; for (int y = level->getHeight() - 1; y >= 0; y--) { - if (level->getTile(x, y, z) == Tile::portalTile_Id) + if (level->getTile(x, y, z) == portalTileId) { - while (level->getTile(x, y - 1, z) == Tile::portalTile_Id) + while (level->getTile(x, y - 1, z) == portalTileId) { y--; } @@ -118,11 +122,11 @@ bool PortalForcer::findPortal(Level *level, shared_ptr e) double yt = y + 0.5; double zt = z + 0.5; - if (level->getTile(x - 1, y, z) == Tile::portalTile_Id) xt -= 0.5; - if (level->getTile(x + 1, y, z) == Tile::portalTile_Id) xt += 0.5; + if (level->getTile(x - 1, y, z) == portalTileId) xt -= 0.5; + if (level->getTile(x + 1, y, z) == portalTileId) xt += 0.5; - if (level->getTile(x, y, z - 1) == Tile::portalTile_Id) zt -= 0.5; - if (level->getTile(x, y, z + 1) == Tile::portalTile_Id) zt += 0.5; + if (level->getTile(x, y, z - 1) == portalTileId) zt -= 0.5; + if (level->getTile(x, y, z + 1) == portalTileId) zt += 0.5; e->moveTo(xt, yt, zt, e->yRot, 0); e->xd = e->yd = e->zd = 0; @@ -133,8 +137,13 @@ bool PortalForcer::findPortal(Level *level, shared_ptr e) } -bool PortalForcer::createPortal(Level *level, shared_ptr e) +bool PortalForcer::createPortal(Level *level, shared_ptr e, int lastDimension) { + // Determine which portal/frame tiles to use based on dimension + bool isAether = (level->dimension->id == 2 || lastDimension == 2); + int frameTileId = isAether ? Tile::lightGem_Id : Tile::obsidian_Id; + int portalTileId = isAether ? Tile::aetherPortalTile_Id : Tile::portalTile_Id; + // 4J Stu - Increase the range at which we try and create a portal to stop creating them floating in mid air over lava int r = 16 * 3; double closest = -1; @@ -341,7 +350,7 @@ bool PortalForcer::createPortal(Level *level, shared_ptr e) bool border = h < 0; - level->setTile(xt, yt, zt, border ? Tile::obsidian_Id : 0); + level->setTile(xt, yt, zt, border ? frameTileId : 0); } } } @@ -359,7 +368,7 @@ bool PortalForcer::createPortal(Level *level, shared_ptr e) int zt = z + (s - 1) * za; bool border = s == 0 || s == 3 || h == -1 || h == 3; - level->setTile(xt, yt, zt, border ? Tile::obsidian_Id : Tile::portalTile_Id); + level->setTile(xt, yt, zt, border ? frameTileId : portalTileId); } } level->noNeighborUpdate = false; @@ -377,5 +386,15 @@ bool PortalForcer::createPortal(Level *level, shared_ptr e) } } + // For Aether portals with no solid ground: extend glowstone platform on both sides + if (isAether && closest < 0) + { + for (int ext = 1; ext <= 2; ext++) + { + level->setTile(x + (-1 - ext) * xa, y - 1, z + (-1 - ext) * za, Tile::lightGem_Id); + level->setTile(x + (2 + ext) * xa, y - 1, z + (2 + ext) * za, Tile::lightGem_Id); + } + } + return true; } diff --git a/Minecraft.World/PortalForcer.h b/Minecraft.World/PortalForcer.h index feb2f129..5028e089 100644 --- a/Minecraft.World/PortalForcer.h +++ b/Minecraft.World/PortalForcer.h @@ -11,11 +11,11 @@ public: // 4J Stu Added - Java has no ctor, but we need to initialise random PortalForcer(); - void force(Level *level, shared_ptr e); + void force(Level *level, shared_ptr e, int lastDimension = -1); public: - bool findPortal(Level *level, shared_ptr e); + bool findPortal(Level *level, shared_ptr e, int lastDimension = -1); public: - bool createPortal(Level *level, shared_ptr e); + bool createPortal(Level *level, shared_ptr e, int lastDimension = -1); }; \ No newline at end of file diff --git a/Minecraft.World/QuicksoilShelfFeature.cpp b/Minecraft.World/QuicksoilShelfFeature.cpp new file mode 100644 index 00000000..f6d9513c --- /dev/null +++ b/Minecraft.World/QuicksoilShelfFeature.cpp @@ -0,0 +1,66 @@ +#include "stdafx.h" +#include "QuicksoilShelfFeature.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.level.tile.h" + +QuicksoilShelfFeature::QuicksoilShelfFeature() : Feature(false) +{ +} + +bool QuicksoilShelfFeature::place(Level *level, Random *random, int x, int y, int z) +{ + // Find the bottom of the island at this XZ column + // Start from the given Y and scan downward to find the lowest solid block + int bottomY = -1; + for (int yy = y; yy >= 1; yy--) + { + int tile = level->getTile(x, yy, z); + if (tile != 0) + { + // Check if the block below is air — this is the island bottom + if (level->getTile(x, yy - 1, z) == 0) + { + bottomY = yy; + break; + } + } + } + + if (bottomY < 1) return false; + + // Generate a shelf of quicksoil on the underside of the island + // Place quicksoil in a roughly circular blob hanging from the bottom + int radius = 2 + random->nextInt(3); // radius 2-4 + int depth = 1 + random->nextInt(2); // depth 1-2 + + for (int dx = -radius; dx <= radius; dx++) + { + for (int dz = -radius; dz <= radius; dz++) + { + // Circular shape with some randomness + float dist = sqrt((float)(dx * dx + dz * dz)); + if (dist > radius + 0.5f) continue; + + // More likely to place at center, less at edges + if (dist > radius - 1 && random->nextInt(3) != 0) continue; + + int px = x + dx; + int pz = z + dz; + + for (int dy = 0; dy < depth; dy++) + { + int py = bottomY - dy; + if (py < 1) continue; + + int existing = level->getTile(px, py, pz); + // Only replace air blocks or existing holystone/aetherDirt at the underside + if (existing == 0 || existing == Tile::holystone_Id || existing == Tile::aetherDirt_Id) + { + level->setTileNoUpdate(px, py, pz, Tile::quicksoil_Id); + } + } + } + } + + return true; +} diff --git a/Minecraft.World/QuicksoilShelfFeature.h b/Minecraft.World/QuicksoilShelfFeature.h new file mode 100644 index 00000000..62737a6f --- /dev/null +++ b/Minecraft.World/QuicksoilShelfFeature.h @@ -0,0 +1,10 @@ +#pragma once +#include "Feature.h" + +class QuicksoilShelfFeature : public Feature +{ +public: + QuicksoilShelfFeature(); + + virtual bool place(Level *level, Random *random, int x, int y, int z); +}; diff --git a/Minecraft.World/QuicksoilTile.cpp b/Minecraft.World/QuicksoilTile.cpp new file mode 100644 index 00000000..662ef52d --- /dev/null +++ b/Minecraft.World/QuicksoilTile.cpp @@ -0,0 +1,55 @@ +#include "stdafx.h" +#include "QuicksoilTile.h" +#include "AetherNaturalTile.h" +#include "net.minecraft.world.entity.h" +#include "net.minecraft.world.entity.player.h" +#include "net.minecraft.world.level.h" +#include "Mth.h" + +const float QuicksoilTile::BOOST_PER_TICK = 1.02f; +const float QuicksoilTile::MAX_SPEED = 0.43f; + +QuicksoilTile::QuicksoilTile(int id) : Tile(id, Material::sand) +{ +} + +void QuicksoilTile::stepOn(Level *level, int x, int y, int z, shared_ptr entity) +{ + if (!entity->onGround) return; + + double speed = Mth::sqrt(entity->xd * entity->xd + entity->zd * entity->zd); + + // Only boost if the entity is actually moving + if (speed < 0.001) return; + + // Apply exponential boost + double newSpeed = speed * BOOST_PER_TICK; + + // Cap at maximum speed (2x normal walking speed) + if (newSpeed > MAX_SPEED) + newSpeed = MAX_SPEED; + + // Scale the velocity components to preserve direction + double scale = newSpeed / speed; + entity->xd *= scale; + entity->zd *= scale; +} + +void QuicksoilTile::setPlacedBy(Level *level, int x, int y, int z, shared_ptr entity) +{ + int data = level->getData(x, y, z); + level->setData(x, y, z, data | AetherNaturalTile::PLAYER_PLACED_BIT); +} + +void QuicksoilTile::playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data) +{ + int cleanData = data & ~AetherNaturalTile::PLAYER_PLACED_BIT; + bool isNatural = (data & AetherNaturalTile::PLAYER_PLACED_BIT) == 0; + + Tile::playerDestroy(level, player, x, y, z, cleanData); + + if (isNatural && AetherNaturalTile::isSkyrootTool(player)) + { + AetherNaturalTile::spawnSkyrootBonusDrops(this, level, player, x, y, z, cleanData); + } +} diff --git a/Minecraft.World/QuicksoilTile.h b/Minecraft.World/QuicksoilTile.h new file mode 100644 index 00000000..e29a6679 --- /dev/null +++ b/Minecraft.World/QuicksoilTile.h @@ -0,0 +1,23 @@ +#pragma once +#include "Tile.h" + +class Player; + +class QuicksoilTile : public Tile +{ + friend class Tile; + +public: + // Speed boost multiplier applied each tick while on quicksoil (exponential ramp-up) + static const float BOOST_PER_TICK; + // Maximum horizontal speed magnitude (2x normal walking speed of ~0.215 on standard ground) + static const float MAX_SPEED; + +protected: + QuicksoilTile(int id); + +public: + virtual void stepOn(Level *level, int x, int y, int z, shared_ptr entity); + virtual void setPlacedBy(Level *level, int x, int y, int z, shared_ptr entity); + virtual void playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data); +}; diff --git a/Minecraft.World/Recipes.cpp b/Minecraft.World/Recipes.cpp index 93be1dfb..6bf89fb0 100644 --- a/Minecraft.World/Recipes.cpp +++ b/Minecraft.World/Recipes.cpp @@ -890,6 +890,55 @@ Recipes::Recipes() L'M'); + // ========== Aether Recipes ========== + + // Skyroot planks from skyroot log + addShapedRecipy(new ItemInstance(Tile::skyrootPlanks, 4), // + L"sctg", + L"#", // + L'#', Tile::skyrootLog, + L'S'); + + // Skyroot sticks from skyroot planks + addShapedRecipy(new ItemInstance(Item::skyrootStick, 4), // + L"ssctg", + L"#", // + L"#", // + L'#', Tile::skyrootPlanks, + L'S'); + + // Ambrosium torch (ambrosium shard + skyroot stick) + addShapedRecipy(new ItemInstance(Tile::ambrosiumTorch, 4), // + L"sscicig", + L"X", // + L"#", // + L'X', Item::ambrosiumShard, + L'#', Item::skyrootStick, + L'T'); + + // Skyroot planks can craft: crafting table, chest, oak door + addShapedRecipy(new ItemInstance(Tile::workBench), // + L"ssctg", + L"##", // + L"##", // + L'#', Tile::skyrootPlanks, + L'S'); + + addShapedRecipy(new ItemInstance((Tile*)Tile::chest), // + L"sssctg", + L"###", // + L"# #", // + L"###", // + L'#', Tile::skyrootPlanks, + L'S'); + + addShapedRecipy(new ItemInstance(Item::door_wood, 1), // + L"sssctg", + L"##", // + L"##", // + L"##", // + L'#', Tile::skyrootPlanks, + L'S'); // Sort so the largest recipes get checked first! diff --git a/Minecraft.World/ShovelItem.cpp b/Minecraft.World/ShovelItem.cpp index 79981bd1..e0e62b76 100644 --- a/Minecraft.World/ShovelItem.cpp +++ b/Minecraft.World/ShovelItem.cpp @@ -19,6 +19,10 @@ void ShovelItem::staticCtor() // 4J - brought forward from 1.2.3 diggables->data[8] = Tile::hellSand; diggables->data[9] = Tile::mycel; + // Aether + diggables->data[10] = Tile::aetherGrass; + diggables->data[11] = Tile::aetherDirt; + diggables->data[12] = Tile::quicksoil; } ShovelItem::ShovelItem(int id, const Tier *tier) : DiggerItem(id, 1, tier, diggables) diff --git a/Minecraft.World/ShovelItem.h b/Minecraft.World/ShovelItem.h index c9c42240..70f37559 100644 --- a/Minecraft.World/ShovelItem.h +++ b/Minecraft.World/ShovelItem.h @@ -1,7 +1,7 @@ #pragma once #include "DiggerItem.h" -#define SHOVEL_DIGGABLES 10 +#define SHOVEL_DIGGABLES 13 class ShovelItem : public DiggerItem { private: diff --git a/Minecraft.World/SkyrootLogTile.cpp b/Minecraft.World/SkyrootLogTile.cpp new file mode 100644 index 00000000..d09b1df8 --- /dev/null +++ b/Minecraft.World/SkyrootLogTile.cpp @@ -0,0 +1,71 @@ +#include "stdafx.h" +#include "SkyrootLogTile.h" +#include "AetherNaturalTile.h" +#include "net.minecraft.world.item.h" +#include "net.minecraft.world.item.enchantment.h" +#include "net.minecraft.world.entity.player.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.h" +#include "PistonBaseTile.h" +#include "Facing.h" +#include "IconRegister.h" + +SkyrootLogTile::SkyrootLogTile(int id, const wstring &sideTexture, const wstring &topTexture) : Tile(id, Material::wood) +{ + iconSide = NULL; + iconTop = NULL; + sideTextureName = sideTexture; + topTextureName = topTexture; +} + +int SkyrootLogTile::getRenderShape() +{ + return Tile::SHAPE_TREE; +} + +Icon *SkyrootLogTile::getTexture(int face, int data) +{ + int dir = data & MASK_FACING; + if (dir == FACING_Y && (face == Facing::UP || face == Facing::DOWN)) return iconTop; + else if (dir == FACING_X && (face == Facing::EAST || face == Facing::WEST)) return iconTop; + else if (dir == FACING_Z && (face == Facing::NORTH || face == Facing::SOUTH)) return iconTop; + return iconSide; +} + +void SkyrootLogTile::setPlacedBy(Level *level, int x, int y, int z, shared_ptr by) +{ + int dir = PistonBaseTile::getNewFacing(level, x, y, z, dynamic_pointer_cast(by)); + int facing = 0; + switch (dir) + { + case Facing::NORTH: case Facing::SOUTH: facing = FACING_Z; break; + case Facing::EAST: case Facing::WEST: facing = FACING_X; break; + case Facing::UP: case Facing::DOWN: facing = FACING_Y; break; + } + // Also mark as player-placed for skyroot double-drop prevention + level->setData(x, y, z, facing | PLAYER_PLACED_BIT); +} + +void SkyrootLogTile::playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data) +{ + int cleanData = data & ~PLAYER_PLACED_BIT; + bool isPlayerPlaced = (data & PLAYER_PLACED_BIT) != 0; + + Tile::playerDestroy(level, player, x, y, z, cleanData); + + if (!isPlayerPlaced && AetherNaturalTile::isSkyrootTool(player)) + { + AetherNaturalTile::spawnSkyrootBonusDrops(this, level, player, x, y, z, cleanData); + } +} + +void SkyrootLogTile::registerIcons(IconRegister *iconRegister) +{ + iconSide = iconRegister->registerIcon(sideTextureName.c_str()); + iconTop = iconRegister->registerIcon(topTextureName.c_str()); +} + +int SkyrootLogTile::getSpawnResourcesAuxValue(int data) +{ + return 0; +} diff --git a/Minecraft.World/SkyrootLogTile.h b/Minecraft.World/SkyrootLogTile.h new file mode 100644 index 00000000..827c36ce --- /dev/null +++ b/Minecraft.World/SkyrootLogTile.h @@ -0,0 +1,36 @@ +#pragma once +#include "Tile.h" + +class Player; + +class SkyrootLogTile : public Tile +{ + friend class Tile; +private: + Icon *iconSide; + Icon *iconTop; + wstring sideTextureName; + wstring topTextureName; + +public: + static const int MASK_FACING = 0xC; + static const int FACING_Y = 0 << 2; + static const int FACING_X = 1 << 2; + static const int FACING_Z = 2 << 2; + + // Player-placed bit for logs uses bit 0 (bits 2-3 are used for rotation) + static const int PLAYER_PLACED_BIT = 0x1; + +protected: + SkyrootLogTile(int id, const wstring &sideTexture = L"SkyrootLogSide", const wstring &topTexture = L"SkyrootLogTop"); + +public: + virtual int getRenderShape(); + virtual Icon *getTexture(int face, int data); + virtual void setPlacedBy(Level *level, int x, int y, int z, shared_ptr by); + virtual void playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data); + void registerIcons(IconRegister *iconRegister); + +protected: + int getSpawnResourcesAuxValue(int data); +}; diff --git a/Minecraft.World/SkyrootTreeFeature.cpp b/Minecraft.World/SkyrootTreeFeature.cpp new file mode 100644 index 00000000..f97be026 --- /dev/null +++ b/Minecraft.World/SkyrootTreeFeature.cpp @@ -0,0 +1,96 @@ +#include "stdafx.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.level.tile.h" +#include "SkyrootTreeFeature.h" + +SkyrootTreeFeature::SkyrootTreeFeature(bool doUpdate) : Feature(doUpdate), baseHeight(4) +{ +} + +SkyrootTreeFeature::SkyrootTreeFeature(bool doUpdate, int baseHeight) : Feature(doUpdate), baseHeight(baseHeight) +{ +} + +bool SkyrootTreeFeature::place(Level *level, Random *random, int x, int y, int z) +{ + int treeHeight = random->nextInt(3) + baseHeight; + + bool free = true; + if (y < 1 || y + treeHeight + 1 > Level::maxBuildHeight) return false; + + // 4J Stu Added to stop tree features generating areas previously placed by game rule generation + if (app.getLevelGenerationOptions() != NULL) + { + PIXBeginNamedEvent(0, "SkyrootTreeFeature checking intersects"); + LevelGenerationOptions *levelGenOptions = app.getLevelGenerationOptions(); + bool intersects = levelGenOptions->checkIntersects(x - 2, y - 1, z - 2, x + 2, y + treeHeight, z + 2); + PIXEndNamedEvent(); + if (intersects) + { + return false; + } + } + + for (int yy = y; yy <= y + 1 + treeHeight; yy++) + { + int r = 1; + if (yy == y) r = 0; + if (yy >= y + 1 + treeHeight - 2) r = 2; + for (int xx = x - r; xx <= x + r && free; xx++) + { + for (int zz = z - r; zz <= z + r && free; zz++) + { + if (yy >= 0 && yy < Level::maxBuildHeight) + { + int tt = level->getTile(xx, yy, zz); + if (tt != 0 && tt != Tile::skyrootLeaves_Id && tt != Tile::aetherGrass_Id && tt != Tile::aetherDirt_Id && tt != Tile::skyrootLog_Id) free = false; + } + else + { + free = false; + } + } + } + } + + if (!free) return false; + + int belowTile = level->getTile(x, y - 1, z); + if ((belowTile != Tile::aetherGrass_Id && belowTile != Tile::aetherDirt_Id) || y >= Level::maxBuildHeight - treeHeight - 1) return false; + + placeBlock(level, x, y - 1, z, Tile::aetherDirt_Id, 0); + + PIXBeginNamedEvent(0, "Placing SkyrootTreeFeature leaves"); + int grassHeight = 3; + int extraWidth = 0; + // Generate leaves from the top down + for (int yy = y + treeHeight; yy >= y - grassHeight + treeHeight; yy--) + { + int yo = yy - (y + treeHeight); + int offs = extraWidth + 1 - yo / 2; + for (int xx = x - offs; xx <= x + offs; xx++) + { + int xo = xx - (x); + for (int zz = z - offs; zz <= z + offs; zz++) + { + int zo = zz - (z); + if (abs(xo) == offs && abs(zo) == offs && (random->nextInt(2) == 0 || yo == 0)) continue; + if (!Tile::solid[level->getTile(xx, yy, zz)]) placeBlock(level, xx, yy, zz, Tile::skyrootLeaves_Id, 0); + } + } + } + PIXEndNamedEvent(); + + PIXBeginNamedEvent(0, "Placing SkyrootTreeFeature trunks"); + for (int hh = 0; hh < treeHeight; hh++) + { + int t = level->getTile(x, y + hh, z); + if (t == 0 || t == Tile::skyrootLeaves_Id) + { + placeBlock(level, x, y + hh, z, Tile::skyrootLog_Id, 0); + } + } + PIXEndNamedEvent(); + + return true; +} diff --git a/Minecraft.World/SkyrootTreeFeature.h b/Minecraft.World/SkyrootTreeFeature.h new file mode 100644 index 00000000..30b1618e --- /dev/null +++ b/Minecraft.World/SkyrootTreeFeature.h @@ -0,0 +1,14 @@ +#pragma once +#include "Feature.h" + +class SkyrootTreeFeature : public Feature +{ +private: + const int baseHeight; + +public: + SkyrootTreeFeature(bool doUpdate); + SkyrootTreeFeature(bool doUpdate, int baseHeight); + + virtual bool place(Level *level, Random *random, int x, int y, int z); +}; diff --git a/Minecraft.World/Tile.cpp b/Minecraft.World/Tile.cpp index e0ef8dd9..52d48517 100644 --- a/Minecraft.World/Tile.cpp +++ b/Minecraft.World/Tile.cpp @@ -201,6 +201,46 @@ Tile *Tile::stairs_quartz = NULL; Tile *Tile::woolCarpet = NULL; +AetherPortalTile *Tile::aetherPortalTile = NULL; + +// Aether Tiles +Tile *Tile::aetherGrass = NULL; +Tile *Tile::aetherDirt = NULL; +Tile *Tile::holystone = NULL; +Tile *Tile::mossyHolystone = NULL; +Tile *Tile::ambrosiumOre = NULL; +Tile *Tile::zaniteOre = NULL; +Tile *Tile::gravititeOre = NULL; +Tile *Tile::skyrootLog = NULL; +Tile *Tile::skyrootPlanks = NULL; +Tile *Tile::skyrootLeaves = NULL; +Tile *Tile::goldenOakLog = NULL; +Tile *Tile::goldenOakLeaves = NULL; +Tile *Tile::quicksoil = NULL; +Tile *Tile::quicksoilGlass = NULL; +Tile *Tile::aercloud = NULL; +Tile *Tile::goldAercloud = NULL; +Tile *Tile::blueAercloud = NULL; +Tile *Tile::aerogel = NULL; +Tile *Tile::icestone = NULL; +Tile *Tile::ambrosiumTorch = NULL; +Tile *Tile::skyrootSapling = NULL; +Tile *Tile::goldenOakSapling = NULL; +Tile *Tile::purpleFlower = NULL; +Tile *Tile::whiteFlower = NULL; +Tile *Tile::angelicStone = NULL; +Tile *Tile::lightAngelicStone = NULL; +Tile *Tile::carvedStone = NULL; +Tile *Tile::lightCarvedStone = NULL; +Tile *Tile::hellfireStone = NULL; +Tile *Tile::lightHellfireStone = NULL; +Tile *Tile::pillarTop = NULL; +Tile *Tile::pillarCarved = NULL; +Tile *Tile::enchanter = NULL; +Tile *Tile::freezer = NULL; +Tile *Tile::incubator = NULL; +Tile *Tile::libraryLore = NULL; + DWORD Tile::tlsIdxShape = TlsAlloc(); Tile::ThreadStorage::ThreadStorage() @@ -425,6 +465,67 @@ void Tile::staticCtor() Tile::woolCarpet = (new WoolCarpetTile(171)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_carpet, Item::eMaterial_cloth)->setDestroyTime(0.1f)->setSoundType(SOUND_CLOTH)->setTextureName(L"woolCarpet")->setLightBlock(0)->setDescriptionId(IDS_TILE_CARPET)->setUseDescriptionId(IDS_DESC_CARPET); + // Aether Portal + Tile::aetherPortalTile = (AetherPortalTile *) ((new AetherPortalTile(137))->setDestroyTime(-1)->setSoundType(Tile::SOUND_GLASS)->setLightEmission(0.75f))->setTextureName(L"water"); + + // ---- Aether Blocks ---- + + // Natural terrain + Tile::aetherGrass = (new AetherGrassTile(160)) ->setDestroyTime(0.45f)->setSoundType(SOUND_GRASS)->setTextureName(L"AetherGrassTop")->sendTileData()->setDescriptionId(IDS_TILE_AETHER_GRASS); + Tile::aetherDirt = (new AetherNaturalTile(161, Material::dirt)) ->setDestroyTime(0.375f)->setSoundType(SOUND_GRAVEL)->setTextureName(L"AetherDirt")->sendTileData()->setDescriptionId(IDS_TILE_AETHER_DIRT); + Tile::holystone = (new AetherNaturalTile(162, Material::stone)) ->setDestroyTime(1.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setTextureName(L"Holystone")->sendTileData()->setDescriptionId(IDS_TILE_HOLYSTONE); + Tile::mossyHolystone = (new AetherNaturalTile(163, Material::stone)) ->setDestroyTime(1.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setTextureName(L"MossyHolystone")->sendTileData()->setDescriptionId(IDS_TILE_MOSSY_HOLYSTONE); + Tile::quicksoil = (new QuicksoilTile(173)) ->setDestroyTime(0.5f)->setSoundType(SOUND_SAND)->setTextureName(L"Quicksoil")->sendTileData()->setDescriptionId(IDS_TILE_QUICKSOIL); + Tile::quicksoil->friction = 0.989f; + Tile::quicksoilGlass = (new HalfTransparentTile(174, L"QuicksoilGlass", Material::glass, false))->setDestroyTime(0.3f)->setSoundType(SOUND_GLASS)->setTextureName(L"QuicksoilGlass")->setDescriptionId(IDS_TILE_QUICKSOIL_GLASS); + Tile::quicksoilGlass->friction = 0.989f; + Tile::icestone = (new Tile(177, Material::stone)) ->setDestroyTime(3.0f)->setExplodeable(5)->setSoundType(SOUND_STONE)->setTextureName(L"Icestone")->setDescriptionId(IDS_TILE_ICESTONE); + + // Ores + Tile::ambrosiumOre = (new AetherOreTile(164)) ->setDestroyTime(3.0f)->setExplodeable(5)->setSoundType(SOUND_STONE)->setTextureName(L"AmbrosiumOre")->sendTileData()->setDescriptionId(IDS_TILE_AMBROSIUM_ORE); + Tile::zaniteOre = (new AetherOreTile(165)) ->setDestroyTime(3.0f)->setExplodeable(5)->setSoundType(SOUND_STONE)->setTextureName(L"ZaniteOre")->sendTileData()->setDescriptionId(IDS_TILE_ZANITE_ORE); + Tile::gravititeOre = (new AetherOreTile(166)) ->setDestroyTime(3.0f)->setExplodeable(5)->setSoundType(SOUND_STONE)->setTextureName(L"GravititeOre")->sendTileData()->setDescriptionId(IDS_TILE_GRAVITITE_ORE); + + // Wood & leaves + Tile::skyrootLog = (new SkyrootLogTile(167)) ->setDestroyTime(1.5f)->setSoundType(SOUND_WOOD)->setTextureName(L"SkyrootLogSide")->sendTileData()->setDescriptionId(IDS_TILE_SKYROOT_LOG); + Tile::skyrootPlanks = (new Tile(168, Material::wood)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_structwoodstuff, Item::eMaterial_skyroot)->setDestroyTime(1.5f)->setExplodeable(5)->setSoundType(SOUND_WOOD)->setTextureName(L"Plank")->setDescriptionId(IDS_TILE_SKYROOT_PLANKS); + Tile::skyrootLeaves = (new AetherLeafTile(169)) ->setDestroyTime(0.2f)->setLightBlock(1)->setSoundType(SOUND_GRASS)->setTextureName(L"SkyrootLeaves")->setDescriptionId(IDS_TILE_SKYROOT_LEAVES); + Tile::goldenOakLog = (new GoldenOakLogTile(170, L"GoldenOak", L"SkyrootLogTop"))->setDestroyTime(1.5f)->setSoundType(SOUND_WOOD)->setTextureName(L"GoldenOak")->sendTileData()->setDescriptionId(IDS_TILE_GOLDEN_OAK_LOG); + Tile::goldenOakLeaves = (new AetherLeafTile(172)) ->setDestroyTime(0.2f)->setLightBlock(1)->setSoundType(SOUND_GRASS)->setTextureName(L"GoldenOakLeaves")->setDescriptionId(IDS_TILE_GOLDEN_OAK_LEAVES); + + // Special blocks + Tile::aercloud = (new AercloudTile(175)) ->setDestroyTime(0.2f)->setSoundType(SOUND_CLOTH)->setTextureName(L"Aercloud")->setDescriptionId(IDS_TILE_AERCLOUD); + Tile::goldAercloud = (new GoldAercloudTile(195)) ->setDestroyTime(0.2f)->setSoundType(SOUND_CLOTH)->setTextureName(L"Aercloud")->setDescriptionId(IDS_TILE_GOLD_AERCLOUD); + Tile::blueAercloud = (new BlueAercloudTile(196)) ->setDestroyTime(0.2f)->setSoundType(SOUND_CLOTH)->setTextureName(L"Aercloud")->setDescriptionId(IDS_TILE_BLUE_AERCLOUD); + Tile::aerogel = (new Tile(176, Material::stone)) ->setDestroyTime(1.0f)->setExplodeable(2000)->setSoundType(SOUND_STONE)->setTextureName(L"Aerogel")->setDescriptionId(IDS_TILE_AEROGEL); + + // Torch + Tile::ambrosiumTorch = (new TorchTile(178)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_torch, Item::eMaterial_wood)->setDestroyTime(0.0f)->setLightEmission(15 / 16.0f)->setSoundType(SOUND_WOOD)->setTextureName(L"AmbrosiumTorch")->sendTileData()->setDescriptionId(IDS_TILE_AMBROSIUM_TORCH)->disableMipmap(); + + // Saplings & flowers (cross-shaped bushes) + Tile::skyrootSapling = (new AetherSaplingTile(179)) ->setDestroyTime(0.0f)->setSoundType(SOUND_GRASS)->setTextureName(L"SkyrootSapling")->setDescriptionId(IDS_TILE_SKYROOT_SAPLING)->disableMipmap(); + Tile::goldenOakSapling = (new AetherSaplingTile(180)) ->setDestroyTime(0.0f)->setSoundType(SOUND_GRASS)->setTextureName(L"GoldenOakSapling")->setDescriptionId(IDS_TILE_GOLDEN_OAK_SAPLING)->disableMipmap(); + Tile::purpleFlower = (new AetherBushTile(181)) ->setDestroyTime(0.0f)->setSoundType(SOUND_GRASS)->setTextureName(L"PurpleFlower")->setDescriptionId(IDS_TILE_PURPLE_FLOWER)->disableMipmap(); + Tile::whiteFlower = (new AetherBushTile(182)) ->setDestroyTime(0.0f)->setSoundType(SOUND_GRASS)->setTextureName(L"WhiteFlower")->setDescriptionId(IDS_TILE_WHITE_FLOWER)->disableMipmap(); + + // Dungeon stones + Tile::angelicStone = (new Tile(183, Material::stone)) ->setDestroyTime(0.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setTextureName(L"AngelicStone")->setDescriptionId(IDS_TILE_ANGELIC_STONE); + Tile::lightAngelicStone = (new Tile(184, Material::stone)) ->setDestroyTime(0.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setLightEmission(0.75f)->setTextureName(L"LightAngelicStone")->setDescriptionId(IDS_TILE_LIGHT_ANGELIC_STONE); + Tile::carvedStone = (new Tile(185, Material::stone)) ->setDestroyTime(0.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setTextureName(L"CarvedStone")->setDescriptionId(IDS_TILE_CARVED_STONE); + Tile::lightCarvedStone = (new Tile(186, Material::stone)) ->setDestroyTime(0.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setLightEmission(0.75f)->setTextureName(L"LightCarvedStone")->setDescriptionId(IDS_TILE_LIGHT_CARVED_STONE); + Tile::hellfireStone = (new Tile(187, Material::stone)) ->setDestroyTime(0.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setTextureName(L"HellfireStone")->setDescriptionId(IDS_TILE_HELLFIRE_STONE); + Tile::lightHellfireStone = (new Tile(188, Material::stone)) ->setDestroyTime(0.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setLightEmission(0.75f)->setTextureName(L"LightHellfireStone")->setDescriptionId(IDS_TILE_LIGHT_HELLFIRE_STONE); + + // Pillar blocks + Tile::pillarTop = (new AetherMultiFaceTile(189, L"PillarTop", L"PillarSide"))->setDestroyTime(0.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setTextureName(L"PillarSide")->setDescriptionId(IDS_TILE_PILLAR); + Tile::pillarCarved = (new Tile(194, Material::stone)) ->setDestroyTime(0.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setTextureName(L"PillarCarved")->setDescriptionId(IDS_TILE_PILLAR_CARVED); + + // Functional blocks (side + top textures) + Tile::enchanter = (new AetherMultiFaceTile(190, L"EnchanterTop", L"EnchanterSide"))->setDestroyTime(2.0f)->setSoundType(SOUND_STONE)->setTextureName(L"EnchanterSide")->setDescriptionId(IDS_TILE_ENCHANTER); + Tile::freezer = (new AetherMultiFaceTile(191, L"FreezerTop", L"FreezerSide"))->setDestroyTime(2.0f)->setSoundType(SOUND_STONE)->setTextureName(L"FreezerSide")->setDescriptionId(IDS_TILE_FREEZER); + Tile::incubator = (new AetherMultiFaceTile(192, L"IncubatorTop", L"IncubatorSide"))->setDestroyTime(2.0f)->setSoundType(SOUND_STONE)->setTextureName(L"IncubatorSide")->setDescriptionId(IDS_TILE_INCUBATOR); + Tile::libraryLore = (new AetherMultiFaceTile(193, L"LibraryLoreTop", L"LibraryLoreSide"))->setDestroyTime(2.0f)->setSoundType(SOUND_STONE)->setTextureName(L"LibraryLoreSide")->setDescriptionId(IDS_TILE_LIBRARY_LORE); + // Special cases for certain items since they can have different icons Item::items[Tile::cloth_Id] = ( new ClothTileItem(Tile::cloth_Id- 256) )->setTextureName(L"cloth")->setDescriptionId(IDS_TILE_CLOTH)->setUseDescriptionId(IDS_DESC_WOOL); Item::items[Tile::woolCarpet_Id] = ( new ClothTileItem(Tile::woolCarpet_Id - 256))->setTextureName(L"woolCarpet")->setDescriptionId(IDS_TILE_CARPET)->setUseDescriptionId(IDS_DESC_CARPET); @@ -1629,4 +1730,42 @@ const int Tile::netherQuartz_Id; const int Tile::quartzBlock_Id; const int Tile::stairs_quartz_Id; const int Tile::woolCarpet_Id; + +// Aether tile ODR defs +const int Tile::aetherGrass_Id; +const int Tile::aetherDirt_Id; +const int Tile::holystone_Id; +const int Tile::mossyHolystone_Id; +const int Tile::ambrosiumOre_Id; +const int Tile::zaniteOre_Id; +const int Tile::gravititeOre_Id; +const int Tile::skyrootLog_Id; +const int Tile::skyrootPlanks_Id; +const int Tile::skyrootLeaves_Id; +const int Tile::goldenOakLog_Id; +const int Tile::goldenOakLeaves_Id; +const int Tile::quicksoil_Id; +const int Tile::quicksoilGlass_Id; +const int Tile::aercloud_Id; +const int Tile::goldAercloud_Id; +const int Tile::blueAercloud_Id; +const int Tile::aerogel_Id; +const int Tile::icestone_Id; +const int Tile::ambrosiumTorch_Id; +const int Tile::skyrootSapling_Id; +const int Tile::goldenOakSapling_Id; +const int Tile::purpleFlower_Id; +const int Tile::whiteFlower_Id; +const int Tile::angelicStone_Id; +const int Tile::lightAngelicStone_Id; +const int Tile::carvedStone_Id; +const int Tile::lightCarvedStone_Id; +const int Tile::hellfireStone_Id; +const int Tile::lightHellfireStone_Id; +const int Tile::pillarTop_Id; +const int Tile::pillarCarved_Id; +const int Tile::enchanter_Id; +const int Tile::freezer_Id; +const int Tile::incubator_Id; +const int Tile::libraryLore_Id; #endif diff --git a/Minecraft.World/Tile.h b/Minecraft.World/Tile.h index fa2f5786..ab41a35b 100644 --- a/Minecraft.World/Tile.h +++ b/Minecraft.World/Tile.h @@ -11,6 +11,7 @@ class TallGrass; class DeadBushTile; class FireTile; class PortalTile; +class AetherPortalTile; class MycelTile; class PistonExtensionTile; class PistonMovingPiece; @@ -314,6 +315,45 @@ public: static const int woolCarpet_Id = 171; + static const int aetherPortalTile_Id = 137; + + // Aether Blocks (IDs 160-199) + static const int aetherGrass_Id = 160; + static const int aetherDirt_Id = 161; + static const int holystone_Id = 162; + static const int mossyHolystone_Id = 163; + static const int ambrosiumOre_Id = 164; + static const int zaniteOre_Id = 165; + static const int gravititeOre_Id = 166; + static const int skyrootLog_Id = 167; + static const int skyrootPlanks_Id = 168; + static const int skyrootLeaves_Id = 169; + static const int goldenOakLog_Id = 170; + static const int goldenOakLeaves_Id = 172; + static const int quicksoil_Id = 173; + static const int quicksoilGlass_Id = 174; + static const int aercloud_Id = 175; + static const int goldAercloud_Id = 195; + static const int blueAercloud_Id = 196; + static const int aerogel_Id = 176; + static const int icestone_Id = 177; + static const int ambrosiumTorch_Id = 178; + static const int skyrootSapling_Id = 179; + static const int goldenOakSapling_Id = 180; + static const int purpleFlower_Id = 181; + static const int whiteFlower_Id = 182; + static const int angelicStone_Id = 183; + static const int lightAngelicStone_Id = 184; + static const int carvedStone_Id = 185; + static const int lightCarvedStone_Id = 186; + static const int hellfireStone_Id = 187; + static const int lightHellfireStone_Id = 188; + static const int pillarTop_Id = 189; + static const int enchanter_Id = 190; + static const int freezer_Id = 191; + static const int incubator_Id = 192; + static const int libraryLore_Id = 193; + static const int pillarCarved_Id = 194; static Tile *rock; static GrassTile *grass; @@ -471,6 +511,46 @@ public: static Tile *woolCarpet; + static AetherPortalTile *aetherPortalTile; + + // Aether Tile Pointers + static Tile *aetherGrass; + static Tile *aetherDirt; + static Tile *holystone; + static Tile *mossyHolystone; + static Tile *ambrosiumOre; + static Tile *zaniteOre; + static Tile *gravititeOre; + static Tile *skyrootLog; + static Tile *skyrootPlanks; + static Tile *skyrootLeaves; + static Tile *goldenOakLog; + static Tile *goldenOakLeaves; + static Tile *quicksoil; + static Tile *quicksoilGlass; + static Tile *aercloud; + static Tile *goldAercloud; + static Tile *blueAercloud; + static Tile *aerogel; + static Tile *icestone; + static Tile *ambrosiumTorch; + static Tile *skyrootSapling; + static Tile *goldenOakSapling; + static Tile *purpleFlower; + static Tile *whiteFlower; + static Tile *angelicStone; + static Tile *lightAngelicStone; + static Tile *carvedStone; + static Tile *lightCarvedStone; + static Tile *hellfireStone; + static Tile *lightHellfireStone; + static Tile *pillarTop; + static Tile *pillarCarved; + static Tile *enchanter; + static Tile *freezer; + static Tile *incubator; + static Tile *libraryLore; + static void staticCtor(); int id; diff --git a/Minecraft.World/ToolRecipies.cpp b/Minecraft.World/ToolRecipies.cpp index 8524924b..46a8d4c8 100644 --- a/Minecraft.World/ToolRecipies.cpp +++ b/Minecraft.World/ToolRecipies.cpp @@ -40,8 +40,13 @@ wstring ToolRecipies::shapes[][4] = */ //#define ADD_OBJECT(a,b) a.push_back(new Object(b)) +Item *ToolRecipies::handles[MAX_TOOL_HANDLES] = { NULL, NULL }; + void ToolRecipies::_init() { + handles[0] = Item::stick; + handles[1] = Item::skyrootStick; + map = new vector [MAX_TOOL_RECIPES]; ADD_OBJECT(map[0],Tile::wood); @@ -49,30 +54,55 @@ void ToolRecipies::_init() ADD_OBJECT(map[0],Item::ironIngot); ADD_OBJECT(map[0],Item::diamond); ADD_OBJECT(map[0],Item::goldIngot); + // Aether + ADD_OBJECT(map[0],Tile::skyrootPlanks); + ADD_OBJECT(map[0],Tile::holystone); + ADD_OBJECT(map[0],Item::zaniteGemstone); + ADD_OBJECT(map[0],Item::gravititePlate); ADD_OBJECT(map[1],Item::pickAxe_wood); ADD_OBJECT(map[1],Item::pickAxe_stone); ADD_OBJECT(map[1],Item::pickAxe_iron); ADD_OBJECT(map[1],Item::pickAxe_diamond); ADD_OBJECT(map[1],Item::pickAxe_gold); + // Aether + ADD_OBJECT(map[1],Item::pickAxe_skyroot); + ADD_OBJECT(map[1],Item::pickAxe_holystone); + ADD_OBJECT(map[1],Item::pickAxe_zanite); + ADD_OBJECT(map[1],Item::pickAxe_gravitite); ADD_OBJECT(map[2],Item::shovel_wood); ADD_OBJECT(map[2],Item::shovel_stone); ADD_OBJECT(map[2],Item::shovel_iron); ADD_OBJECT(map[2],Item::shovel_diamond); ADD_OBJECT(map[2],Item::shovel_gold); + // Aether + ADD_OBJECT(map[2],Item::shovel_skyroot); + ADD_OBJECT(map[2],Item::shovel_holystone); + ADD_OBJECT(map[2],Item::shovel_zanite); + ADD_OBJECT(map[2],Item::shovel_gravitite); ADD_OBJECT(map[3],Item::hatchet_wood); ADD_OBJECT(map[3],Item::hatchet_stone); ADD_OBJECT(map[3],Item::hatchet_iron); ADD_OBJECT(map[3],Item::hatchet_diamond); ADD_OBJECT(map[3],Item::hatchet_gold); + // Aether + ADD_OBJECT(map[3],Item::hatchet_skyroot); + ADD_OBJECT(map[3],Item::hatchet_holystone); + ADD_OBJECT(map[3],Item::hatchet_zanite); + ADD_OBJECT(map[3],Item::hatchet_gravitite); ADD_OBJECT(map[4],Item::hoe_wood); ADD_OBJECT(map[4],Item::hoe_stone); ADD_OBJECT(map[4],Item::hoe_iron); ADD_OBJECT(map[4],Item::hoe_diamond); ADD_OBJECT(map[4],Item::hoe_gold); + // Aether (no hoes) + map[4].push_back(NULL); + map[4].push_back(NULL); + map[4].push_back(NULL); + map[4].push_back(NULL); } void ToolRecipies::addRecipes(Recipes *r) @@ -80,41 +110,46 @@ void ToolRecipies::addRecipes(Recipes *r) wchar_t wchTypes[7]; wchTypes[6]=0; - for (unsigned int m = 0; m < map[0].size(); m++) + for (int h = 0; h < MAX_TOOL_HANDLES; h++) { - Object *pObjMaterial = map[0].at(m); - - for (int t=0; titem; + Object *pObjMaterial = map[0].at(m); - wchTypes[0]=L'w'; - wchTypes[1]=L'c'; - wchTypes[2]=L'i'; - wchTypes[3]=L'c'; - wchTypes[5]=L'g'; - if(pObjMaterial->GetType()==eType_TILE) + for (int t=0; taddShapedRecipy(new ItemInstance(target), - wchTypes, - shapes[t], + Object *pObjTarget = map[t+1].at(m); + if (pObjTarget == NULL) continue; + Item *target = pObjTarget->item; - L'#', Item::stick, - L'X', pObjMaterial->tile, - L'T'); - } - else - { - // must be Item - wchTypes[4]=L'i'; - r->addShapedRecipy(new ItemInstance(target), - wchTypes, - shapes[t], + wchTypes[0]=L'w'; + wchTypes[1]=L'c'; + wchTypes[2]=L'i'; + wchTypes[3]=L'c'; + wchTypes[5]=L'g'; + if(pObjMaterial->GetType()==eType_TILE) + { + wchTypes[4]=L't'; + r->addShapedRecipy(new ItemInstance(target), + wchTypes, + shapes[t], - L'#', Item::stick, - L'X', pObjMaterial->item, - L'T'); + L'#', handles[h], + L'X', pObjMaterial->tile, + L'T'); + } + else + { + // must be Item + wchTypes[4]=L'i'; + r->addShapedRecipy(new ItemInstance(target), + wchTypes, + shapes[t], + + L'#', handles[h], + L'X', pObjMaterial->item, + L'T'); + } } } } diff --git a/Minecraft.World/ToolRecipies.h b/Minecraft.World/ToolRecipies.h index 7c433b4c..e5f58821 100644 --- a/Minecraft.World/ToolRecipies.h +++ b/Minecraft.World/ToolRecipies.h @@ -5,6 +5,7 @@ #pragma once #define MAX_TOOL_RECIPES 5 +#define MAX_TOOL_HANDLES 2 class Recipes; @@ -18,6 +19,7 @@ public: private: static wstring shapes[][4]; vector *map; + static Item *handles[MAX_TOOL_HANDLES]; public: void addRecipes(Recipes *r); diff --git a/Minecraft.World/WeaponRecipies.cpp b/Minecraft.World/WeaponRecipies.cpp index e90ebea6..8f01ac31 100644 --- a/Minecraft.World/WeaponRecipies.cpp +++ b/Minecraft.World/WeaponRecipies.cpp @@ -21,8 +21,13 @@ wstring WeaponRecipies::shapes[][4] = }; */ +Item *WeaponRecipies::handles[MAX_WEAPON_HANDLES] = { NULL, NULL }; + void WeaponRecipies::_init() { + handles[0] = Item::stick; + handles[1] = Item::skyrootStick; + map = new vector [MAX_WEAPON_RECIPES]; ADD_OBJECT(map[0],Tile::wood); @@ -30,12 +35,22 @@ void WeaponRecipies::_init() ADD_OBJECT(map[0],Item::ironIngot); ADD_OBJECT(map[0],Item::diamond); ADD_OBJECT(map[0],Item::goldIngot); + // Aether + ADD_OBJECT(map[0],Tile::skyrootPlanks); + ADD_OBJECT(map[0],Tile::holystone); + ADD_OBJECT(map[0],Item::zaniteGemstone); + ADD_OBJECT(map[0],Item::gravititePlate); ADD_OBJECT(map[1],Item::sword_wood); ADD_OBJECT(map[1],Item::sword_stone); ADD_OBJECT(map[1],Item::sword_iron); ADD_OBJECT(map[1],Item::sword_diamond); ADD_OBJECT(map[1],Item::sword_gold); + // Aether + ADD_OBJECT(map[1],Item::sword_skyroot); + ADD_OBJECT(map[1],Item::sword_holystone); + ADD_OBJECT(map[1],Item::sword_zanite); + ADD_OBJECT(map[1],Item::sword_gravitite); } void WeaponRecipies::addRecipes(Recipes *r) @@ -43,41 +58,44 @@ void WeaponRecipies::addRecipes(Recipes *r) wchar_t wchTypes[7]; wchTypes[6]=0; - for (unsigned int m = 0; m < map[0].size(); m++) + for (int h = 0; h < MAX_WEAPON_HANDLES; h++) { - Object *pObjMaterial = map[0].at(m); - - for (int t=0; titem; + Object *pObjMaterial = map[0].at(m); - wchTypes[0]=L'w'; - wchTypes[1]=L'c'; - wchTypes[2]=L'i'; - wchTypes[3]=L'c'; - wchTypes[5]=L'g'; - if(pObjMaterial->GetType()==eType_TILE) + for (int t=0; taddShapedRecipy(new ItemInstance(target), - wchTypes, - shapes[t], + Item *target = map[t+1].at(m)->item; - L'#', Item::stick, - L'X', pObjMaterial->tile, - L'T'); - } - else - { - // must be Item - wchTypes[4]=L'i'; - r->addShapedRecipy(new ItemInstance(target), - wchTypes, - shapes[t], + wchTypes[0]=L'w'; + wchTypes[1]=L'c'; + wchTypes[2]=L'i'; + wchTypes[3]=L'c'; + wchTypes[5]=L'g'; + if(pObjMaterial->GetType()==eType_TILE) + { + wchTypes[4]=L't'; + r->addShapedRecipy(new ItemInstance(target), + wchTypes, + shapes[t], - L'#', Item::stick, - L'X', pObjMaterial->item, - L'T'); + L'#', handles[h], + L'X', pObjMaterial->tile, + L'T'); + } + else + { + // must be Item + wchTypes[4]=L'i'; + r->addShapedRecipy(new ItemInstance(target), + wchTypes, + shapes[t], + + L'#', handles[h], + L'X', pObjMaterial->item, + L'T'); + } } } } diff --git a/Minecraft.World/WeaponRecipies.h b/Minecraft.World/WeaponRecipies.h index 105fba45..9cc678fe 100644 --- a/Minecraft.World/WeaponRecipies.h +++ b/Minecraft.World/WeaponRecipies.h @@ -6,6 +6,7 @@ #pragma once #define MAX_WEAPON_RECIPES 2 +#define MAX_WEAPON_HANDLES 2 class WeaponRecipies { public: @@ -16,6 +17,7 @@ public: private: static wstring shapes[][4]; vector *map; + static Item *handles[MAX_WEAPON_HANDLES]; public: void addRecipes(Recipes *r); diff --git a/Minecraft.World/net.minecraft.world.level.biome.h b/Minecraft.World/net.minecraft.world.level.biome.h index dc082d70..48baf436 100644 --- a/Minecraft.World/net.minecraft.world.level.biome.h +++ b/Minecraft.World/net.minecraft.world.level.biome.h @@ -9,6 +9,8 @@ #include "MushroomIslandBiome.h" #include "TheEndBiome.h" #include "TheEndBiomeDecorator.h" +#include "AetherBiome.h" +#include "AetherBiomeDecorator.h" #include "WaterlilyFeature.h" #include "SwampBiome.h" #include "TaigaBiome.h" diff --git a/Minecraft.World/net.minecraft.world.level.dimension.h b/Minecraft.World/net.minecraft.world.level.dimension.h index 0c9f41c2..90d50a56 100644 --- a/Minecraft.World/net.minecraft.world.level.dimension.h +++ b/Minecraft.World/net.minecraft.world.level.dimension.h @@ -3,4 +3,5 @@ #include "Dimension.h" #include "HellDimension.h" #include "NormalDimension.h" -#include "TheEndDimension.h" \ No newline at end of file +#include "TheEndDimension.h" +#include "AetherDimension.h" \ No newline at end of file diff --git a/Minecraft.World/net.minecraft.world.level.levelgen.feature.h b/Minecraft.World/net.minecraft.world.level.levelgen.feature.h index 81ac8637..05bd0249 100644 --- a/Minecraft.World/net.minecraft.world.level.levelgen.feature.h +++ b/Minecraft.World/net.minecraft.world.level.levelgen.feature.h @@ -16,6 +16,7 @@ #include "LightGemFeature.h" #include "MonsterRoomFeature.h" #include "OreFeature.h" +#include "QuicksoilShelfFeature.h" #include "PineFeature.h" #include "PumpkinFeature.h" #include "ReedsFeature.h" @@ -33,5 +34,8 @@ #include "DesertWellFeature.h" #include "MegaTreeFeature.h" + +#include "SkyrootTreeFeature.h" +#include "GoldenOakTreeFeature.h" #include "VinesFeature.h" #include "GroundBushFeature.h" \ No newline at end of file diff --git a/Minecraft.World/net.minecraft.world.level.levelgen.h b/Minecraft.World/net.minecraft.world.level.levelgen.h index ea17a33c..fc9ff700 100644 --- a/Minecraft.World/net.minecraft.world.level.levelgen.h +++ b/Minecraft.World/net.minecraft.world.level.levelgen.h @@ -11,5 +11,6 @@ #include "FlatLevelSource.h" #include "TownFeature.h" #include "TheEndLevelRandomLevelSource.h" +#include "AetherLevelSource.h" #include "CustomLevelSource.h" \ No newline at end of file diff --git a/Minecraft.World/net.minecraft.world.level.tile.h b/Minecraft.World/net.minecraft.world.level.tile.h index f039b000..0b264ba6 100644 --- a/Minecraft.World/net.minecraft.world.level.tile.h +++ b/Minecraft.World/net.minecraft.world.level.tile.h @@ -110,5 +110,21 @@ #include "HalfSlabTile.h" #include "WoodSlabTile.h" #include "WoolCarpetTile.h" +#include "AetherPortalTile.h" + +// Aether Tiles +#include "AetherNaturalTile.h" +#include "AetherGrassTile.h" +#include "SkyrootLogTile.h" +#include "GoldenOakLogTile.h" +#include "AetherLeafTile.h" +#include "AetherBushTile.h" +#include "AetherSaplingTile.h" +#include "AetherOreTile.h" +#include "AercloudTile.h" +#include "GoldAercloudTile.h" +#include "BlueAercloudTile.h" +#include "QuicksoilTile.h" +#include "AetherMultiFaceTile.h"