From 558173cfd0dd9cdc4e964237dfa91eb1604e760f Mon Sep 17 00:00:00 2001 From: Tranqlmao <110073921+Tranqlmao@users.noreply.github.com> Date: Tue, 7 Jul 2026 12:54:31 -0400 Subject: [PATCH] TU43 Release 2 + Added Magma Block, Nether Wart Block, Bone Block, End Stone Block + All Beetroot Items + Polar Bear (excluding audio) + / now opens chat for commands --- Minecraft.Client/ChatScreen.cpp | 9 + Minecraft.Client/ChatScreen.h | 1 + Minecraft.Client/Common/App_enums.h | 4 +- Minecraft.Client/Common/Audio/SoundNames.cpp | 9 +- .../Common/Colours/ColourTable.cpp | 2 + .../Common/UI/IUIScene_CreativeMenu.cpp | 6 + Minecraft.Client/Common/UI/UIController.cpp | 4 - .../Common/res/1_2_2/mob/bear/polarbear.png | Bin 0 -> 4098 bytes .../Common/res/TitleUpdate/res/colours.xml | 2 + Minecraft.Client/EntityRenderDispatcher.cpp | 3 + Minecraft.Client/PolarBearModel.cpp | 78 +++++++ Minecraft.Client/PolarBearModel.h | 9 + Minecraft.Client/PolarBearRenderer.cpp | 18 ++ Minecraft.Client/PolarBearRenderer.h | 14 ++ Minecraft.Client/Textures.cpp | 1 + Minecraft.Client/Textures.h | 2 +- .../Windows64/Windows64_Minecraft.cpp | 6 + .../Windows64Media/loc/stringsGeneric.xml | 9 + Minecraft.Client/cmake/sources/Common.cmake | 4 + Minecraft.Client/stubs.cpp | 1 + Minecraft.Client/stubs.h | 1 + Minecraft.World/BoneBlockTile.cpp | 22 ++ Minecraft.World/BoneBlockTile.h | 10 + Minecraft.World/Class.h | 1 + Minecraft.World/EntityIO.cpp | 4 + Minecraft.World/HoeItem.cpp | 9 +- Minecraft.World/HoeItem.h | 1 + Minecraft.World/LivingEntity.cpp | 9 + Minecraft.World/MagmaTile.cpp | 8 + Minecraft.World/MagmaTile.h | 8 + Minecraft.World/PolarBear.cpp | 209 ++++++++++++++++++ Minecraft.World/PolarBear.h | 59 +++++ Minecraft.World/SoundTypes.h | 9 +- Minecraft.World/Tile.cpp | 16 ++ Minecraft.World/Tile.h | 17 +- Minecraft.World/cmake/sources/Common.cmake | 6 + .../net.minecraft.world.entity.animal.h | 3 +- .../net.minecraft.world.level.tile.h | 2 + 38 files changed, 561 insertions(+), 15 deletions(-) create mode 100644 Minecraft.Client/Common/res/1_2_2/mob/bear/polarbear.png create mode 100644 Minecraft.Client/PolarBearModel.cpp create mode 100644 Minecraft.Client/PolarBearModel.h create mode 100644 Minecraft.Client/PolarBearRenderer.cpp create mode 100644 Minecraft.Client/PolarBearRenderer.h create mode 100644 Minecraft.World/BoneBlockTile.cpp create mode 100644 Minecraft.World/BoneBlockTile.h create mode 100644 Minecraft.World/MagmaTile.cpp create mode 100644 Minecraft.World/MagmaTile.h create mode 100644 Minecraft.World/PolarBear.cpp create mode 100644 Minecraft.World/PolarBear.h diff --git a/Minecraft.Client/ChatScreen.cpp b/Minecraft.Client/ChatScreen.cpp index 32f824ea..b27f89bb 100644 --- a/Minecraft.Client/ChatScreen.cpp +++ b/Minecraft.Client/ChatScreen.cpp @@ -33,6 +33,15 @@ ChatScreen::ChatScreen() ChatScreen::s_chatIndex = 0; } +ChatScreen::ChatScreen(const wstring &initialMessage) +{ + frame = 0; + message = initialMessage; + cursorIndex = static_cast(message.length()); + s_historyIndex = -1; + ChatScreen::s_chatIndex = 0; +} + void ChatScreen::init() { Keyboard::enableRepeatEvents(true); diff --git a/Minecraft.Client/ChatScreen.h b/Minecraft.Client/ChatScreen.h index 70d65e8c..4c70f38c 100644 --- a/Minecraft.Client/ChatScreen.h +++ b/Minecraft.Client/ChatScreen.h @@ -22,6 +22,7 @@ private: public: ChatScreen(); + ChatScreen(const wstring &initialMessage); virtual void init(); virtual void removed(); virtual void tick(); diff --git a/Minecraft.Client/Common/App_enums.h b/Minecraft.Client/Common/App_enums.h index f546a289..50ff0da0 100644 --- a/Minecraft.Client/Common/App_enums.h +++ b/Minecraft.Client/Common/App_enums.h @@ -469,7 +469,6 @@ enum eMinecraftColour eMinecraftColour_Mob_Guardian_Colour2, eMinecraftColour_Mob_ElderGuardian_Colour1, eMinecraftColour_Mob_ElderGuardian_Colour2, - eMinecraftColour_Armour_Default_Leather_Colour, eMinecraftColour_Under_Water_Clear_Colour, @@ -568,6 +567,9 @@ enum eMinecraftColour //eHTMLColor_e_dark = 0x3f3f15, //r:3f , g: 3f, b: 15, i: 1e //eHTMLColor_f_dark = 0x3f3f3f, //r:3f , g: 3f, b: 3f, i: 1f + eMinecraftColour_Mob_PolarBear_Colour1, + eMinecraftColour_Mob_PolarBear_Colour2, + eMinecraftColour_COUNT, }; diff --git a/Minecraft.Client/Common/Audio/SoundNames.cpp b/Minecraft.Client/Common/Audio/SoundNames.cpp index 7c0dd382..afc3343c 100644 --- a/Minecraft.Client/Common/Audio/SoundNames.cpp +++ b/Minecraft.Client/Common/Audio/SoundNames.cpp @@ -287,7 +287,14 @@ const WCHAR *ConsoleSoundEngine::wchSoundNames[eSoundType_MAX]= L"mob.guardian.curse", L"mob.guardian.elder_death", L"mob.guardian.elder_hit", - L"mob.guardian.elder_idle" + L"mob.guardian.elder_idle", + + L"mob.polarbear.babyidle", + L"mob.polarbear.idle", + L"mob.polarbear.hurt", + L"mob.polarbear.death", + L"mob.polarbear.step", + L"mob.polarbear.warning" }; diff --git a/Minecraft.Client/Common/Colours/ColourTable.cpp b/Minecraft.Client/Common/Colours/ColourTable.cpp index 6e6b4755..7cbd849a 100644 --- a/Minecraft.Client/Common/Colours/ColourTable.cpp +++ b/Minecraft.Client/Common/Colours/ColourTable.cpp @@ -344,6 +344,8 @@ const wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] = L"Color_EnchantTextFocus", L"Color_EnchantTextDisabled", L"Color_RenamedItemTitle", + L"Mob_PolarBear_Colour1", + L"Mob_PolarBear_Colour2", }; void ColourTable::staticCtor() diff --git a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp index 0933db4a..d3e41d58 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp @@ -167,7 +167,12 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Tile::dirt_Id, DirtTile::PODZOL) ITEM(Tile::grass_path_Id) ITEM(Tile::nether_brick_Id) + ITEM(Tile::red_nether_brick_Id) ITEM(Tile::end_stone_Id) + ITEM(Tile::end_bricks_Id) + ITEM(Tile::magma_Id) + ITEM(Tile::nether_wart_block_Id) + ITEM(Tile::bone_block_Id) ITEM_AUX(Tile::quartz_block_Id,QuartzBlockTile::TYPE_CHISELED) ITEM_AUX(Tile::quartz_block_Id,QuartzBlockTile::TYPE_LINES_Y) ITEM(Tile::trapdoor_Id) @@ -499,6 +504,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Item::spawn_egg_Id, 100 | ((EntityHorse::TYPE_MULE + 1) << 12)); // Mule ITEM_AUX(Item::spawn_egg_Id, 120); // Villager ITEM_AUX(Item::spawn_egg_Id, 101); // Rabbit Brown + ITEM_AUX(Item::spawn_egg_Id, 107); // Polar Bear ITEM(Item::record_13_Id) ITEM(Item::record_cat_Id) ITEM(Item::record_blocks_Id) diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp index db4bd631..8121bb90 100644 --- a/Minecraft.Client/Common/UI/UIController.cpp +++ b/Minecraft.Client/Common/UI/UIController.cpp @@ -668,15 +668,11 @@ void UIController::loadSkins() } if(m_iggyLibraries[eLibrary_Platform] == IGGY_INVALID_LIBRARY) { -<<<<<<< Updated upstream - m_iggyLibraries[eLibrary_Platform] = loadSkin(L"skinHDWin.swf", L"platformskin.swf"); -======= m_iggyLibraries[eLibrary_Platform] = loadSkin(L"Graphics\\ControlType\\HD\\windowsHD.swf", L"platformskinHD.swf"); if(m_iggyLibraries[eLibrary_Platform] == IGGY_INVALID_LIBRARY) { m_iggyLibraries[eLibrary_Platform] = loadSkin(L"skinHDWin.swf", L"platformskinHD.swf"); } ->>>>>>> Stashed changes } // Non-HD skin set (720p/480p scenes import these) diff --git a/Minecraft.Client/Common/res/1_2_2/mob/bear/polarbear.png b/Minecraft.Client/Common/res/1_2_2/mob/bear/polarbear.png new file mode 100644 index 0000000000000000000000000000000000000000..a340db834b337f0c297db2c3df25edaa9970b883 GIT binary patch literal 4098 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 ACIA2c literal 0 HcmV?d00001 diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/colours.xml b/Minecraft.Client/Common/res/TitleUpdate/res/colours.xml index 3bc4010f..9aaf82ea 100644 --- a/Minecraft.Client/Common/res/TitleUpdate/res/colours.xml +++ b/Minecraft.Client/Common/res/TitleUpdate/res/colours.xml @@ -291,6 +291,8 @@ if __name__=="__main__": notecolors() + + diff --git a/Minecraft.Client/EntityRenderDispatcher.cpp b/Minecraft.Client/EntityRenderDispatcher.cpp index accda0f7..43db7d3c 100644 --- a/Minecraft.Client/EntityRenderDispatcher.cpp +++ b/Minecraft.Client/EntityRenderDispatcher.cpp @@ -82,6 +82,8 @@ #include "BatRenderer.h" #include "CaveSpiderRenderer.h" #include "RabbitRenderer.h" +#include "PolarBearRenderer.h" +#include "PolarBearModel.h" #include "ArmorStandRenderer.h" #include "EndermiteRenderer.h" @@ -142,6 +144,7 @@ EntityRenderDispatcher::EntityRenderDispatcher() renderers[eTYPE_WITHERBOSS] = new WitherBossRenderer(); renderers[eTYPE_RABBIT] = new RabbitRenderer(); + renderers[eTYPE_POLARBEAR] = new PolarBearRenderer(new PolarBearModel(), 0.7f); renderers[eTYPE_ENTITY] = new DefaultRenderer(); diff --git a/Minecraft.Client/PolarBearModel.cpp b/Minecraft.Client/PolarBearModel.cpp new file mode 100644 index 00000000..bdd8b730 --- /dev/null +++ b/Minecraft.Client/PolarBearModel.cpp @@ -0,0 +1,78 @@ +#include "stdafx.h" +#include "PolarBearModel.h" +#include "ModelPart.h" + +PolarBearModel::PolarBearModel() : QuadrupedModel(10, 0) +{ + texWidth = 128; + texHeight = 64; + + float g = 0; + + head = new ModelPart(this, 0, 0); + head->addBox(-3.5f, -3, -3, 7, 7, 7, g); + head->setPos(0, 10, -16); + head->texOffs(0, 44)->addBox(-2.5f, 1, -6, 5, 3, 3, g); + head->texOffs(26, 0)->addBox(-4.5f, -4, -1, 2, 2, 1, g); + head->texOffs(26, 0)->addBox(2.5f, -4, -1, 2, 2, 1, g); + + body = new ModelPart(this, 0, 19); + body->addBox(-5, -13, -7, 14, 14, 11, g); + body->texOffs(39, 0)->addBox(-4, -25, -7, 12, 12, 10, g); + body->setPos(-2, 9, 12); + + leg0 = new ModelPart(this, 50, 22); + leg0->addBox(-2, 0, -2, 4, 10, 8, g); + leg0->setPos(-4.5f, 14, 6); + + leg1 = new ModelPart(this, 50, 22); + leg1->addBox(-2, 0, -2, 4, 10, 8, g); + leg1->setPos(4.5f, 14, 6); + + leg2 = new ModelPart(this, 50, 40); + leg2->addBox(-2, 0, -2, 4, 10, 6, g); + leg2->setPos(-3.5f, 14, -8); + + leg3 = new ModelPart(this, 50, 40); + leg3->addBox(-2, 0, -2, 4, 10, 6, g); + leg3->setPos(3.5f, 14, -8); + + head->compile(1.0f / 16.0f); + body->compile(1.0f / 16.0f); + leg0->compile(1.0f / 16.0f); + leg1->compile(1.0f / 16.0f); + leg2->compile(1.0f / 16.0f); + leg3->compile(1.0f / 16.0f); +} + +void PolarBearModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +{ + setupAnim(time, r, bob, yRot, xRot, scale, entity); + + if (young) + { + glPushMatrix(); + glScalef(0.6666667f, 0.6666667f, 0.6666667f); + glTranslatef(0, scale * 16.0f, scale * 4.0f); + head->render(scale, usecompiled); + glPopMatrix(); + glPushMatrix(); + glScalef(0.5f, 0.5f, 0.5f); + glTranslatef(0, scale * 24.0f, 0); + body->render(scale, usecompiled); + leg0->render(scale, usecompiled); + leg1->render(scale, usecompiled); + leg2->render(scale, usecompiled); + leg3->render(scale, usecompiled); + glPopMatrix(); + } + else + { + head->render(scale, usecompiled); + body->render(scale, usecompiled); + leg0->render(scale, usecompiled); + leg1->render(scale, usecompiled); + leg2->render(scale, usecompiled); + leg3->render(scale, usecompiled); + } +} diff --git a/Minecraft.Client/PolarBearModel.h b/Minecraft.Client/PolarBearModel.h new file mode 100644 index 00000000..c0b6db97 --- /dev/null +++ b/Minecraft.Client/PolarBearModel.h @@ -0,0 +1,9 @@ +#pragma once +#include "QuadrupedModel.h" + +class PolarBearModel : public QuadrupedModel +{ +public: + PolarBearModel(); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); +}; diff --git a/Minecraft.Client/PolarBearRenderer.cpp b/Minecraft.Client/PolarBearRenderer.cpp new file mode 100644 index 00000000..dec207e1 --- /dev/null +++ b/Minecraft.Client/PolarBearRenderer.cpp @@ -0,0 +1,18 @@ +#include "stdafx.h" +#include "PolarBearRenderer.h" + +ResourceLocation PolarBearRenderer::POLARBEAR_LOCATION = ResourceLocation(TN_MOB_POLARBEAR); + +PolarBearRenderer::PolarBearRenderer(Model *model, float shadow) : MobRenderer(model, shadow) +{ +} + +void PolarBearRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) +{ + MobRenderer::render(_mob, x, y, z, rot, a); +} + +ResourceLocation *PolarBearRenderer::getTextureLocation(shared_ptr mob) +{ + return &POLARBEAR_LOCATION; +} diff --git a/Minecraft.Client/PolarBearRenderer.h b/Minecraft.Client/PolarBearRenderer.h new file mode 100644 index 00000000..ec23307e --- /dev/null +++ b/Minecraft.Client/PolarBearRenderer.h @@ -0,0 +1,14 @@ +#pragma once +#include "MobRenderer.h" + +class PolarBearRenderer : public MobRenderer +{ +private: + static ResourceLocation POLARBEAR_LOCATION; + +public: + PolarBearRenderer(Model *model, float shadow); + + virtual void render(shared_ptr _mob, double x, double y, double z, float rot, float a); + virtual ResourceLocation *getTextureLocation(shared_ptr mob); +}; diff --git a/Minecraft.Client/Textures.cpp b/Minecraft.Client/Textures.cpp index d5205282..06918fde 100644 --- a/Minecraft.Client/Textures.cpp +++ b/Minecraft.Client/Textures.cpp @@ -194,6 +194,7 @@ const wchar_t *Textures::preLoaded[TN_COUNT] = L"mob/guardian", L"mob/guardian_elder", L"mob/guardian_beam", + L"mob/bear/polarbear", #ifdef _LARGE_WORLDS L"misc/additionalmapicons", diff --git a/Minecraft.Client/Textures.h b/Minecraft.Client/Textures.h index 48eec6a4..74e2aea5 100644 --- a/Minecraft.Client/Textures.h +++ b/Minecraft.Client/Textures.h @@ -180,7 +180,7 @@ typedef enum _TEXTURE_NAME TN_MOB_GUARDIAN, TN_MOB_GUARDIAN_ELDER, TN_MOB_GUARDIAN_BEAM, - + TN_MOB_POLARBEAR, #ifdef _LARGE_WORLDS TN_MISC_ADDITIONALMAPICONS, diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index a28a6091..07574f73 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -2191,6 +2191,12 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, pMinecraft->setScreen(new ChatScreen()); SetFocus(g_hWnd); } + if (g_KBMInput.IsKeyPressed(VK_OEM_2) && app.GetGameStarted() && !ui.GetMenuDisplayed(0) && pMinecraft->screen == NULL) + { + g_KBMInput.ClearCharBuffer(); + pMinecraft->setScreen(new ChatScreen(L"/")); + SetFocus(g_hWnd); + } #if 0 // has the game defined profile data been changed (by a profile load) diff --git a/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml b/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml index 22e373f7..13867127 100644 --- a/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml +++ b/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml @@ -9029,6 +9029,10 @@ All Ender Chests in a world are linked. Items placed into an Ender Chest are acc Rabbit + + Polar Bear + + A harmless creature. May drop a rabbit hide or a rabbit's foot when killed. @@ -9485,6 +9489,11 @@ All Ender Chests in a world are linked. Items placed into an Ender Chest are acc Dirt Path Beetroot + End Stone Bricks + Magma Block + Nether Wart Block + Red Nether Bricks + Bone Block Beetroot Beetroot Seeds Beetroot Stew diff --git a/Minecraft.Client/cmake/sources/Common.cmake b/Minecraft.Client/cmake/sources/Common.cmake index 454419f9..98119931 100644 --- a/Minecraft.Client/cmake/sources/Common.cmake +++ b/Minecraft.Client/cmake/sources/Common.cmake @@ -924,6 +924,10 @@ set(_MINECRAFT_CLIENT_COMMON_NET_MINECRAFT_CLIENT_RENDERER_ENTITY "${CMAKE_CURRENT_SOURCE_DIR}/ZombieRenderer.h" "${CMAKE_CURRENT_SOURCE_DIR}/RabbitRenderer.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/RabbitRenderer.h" + "${CMAKE_CURRENT_SOURCE_DIR}/PolarBearModel.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/PolarBearModel.h" + "${CMAKE_CURRENT_SOURCE_DIR}/PolarBearRenderer.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/PolarBearRenderer.h" "${CMAKE_CURRENT_SOURCE_DIR}/ArmorStandRenderer.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/EndermiteRenderer.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/EndermiteRenderer.h" diff --git a/Minecraft.Client/stubs.cpp b/Minecraft.Client/stubs.cpp index 6caaaf2c..ddf2d99d 100644 --- a/Minecraft.Client/stubs.cpp +++ b/Minecraft.Client/stubs.cpp @@ -60,6 +60,7 @@ static const int s_keyToVK[] = { VK_SUBTRACT,// KEY_SUBTRACT = 53 VK_LEFT, // KEY_LEFT = 54 VK_RIGHT, // KEY_RIGHT = 55 + VK_OEM_2, // KEY_SLASH = 56 }; static const int s_keyToVKCount = sizeof(s_keyToVK) / sizeof(s_keyToVK[0]); diff --git a/Minecraft.Client/stubs.h b/Minecraft.Client/stubs.h index 60aa4885..97792a26 100644 --- a/Minecraft.Client/stubs.h +++ b/Minecraft.Client/stubs.h @@ -250,6 +250,7 @@ public: static const int KEY_SUBTRACT = 53; static const int KEY_LEFT = 54; static const int KEY_RIGHT = 55; + static const int KEY_SLASH = 56; #ifdef _WINDOWS64 // Map LWJGL-style key constant to Windows VK code diff --git a/Minecraft.World/BoneBlockTile.cpp b/Minecraft.World/BoneBlockTile.cpp new file mode 100644 index 00000000..c9ca2881 --- /dev/null +++ b/Minecraft.World/BoneBlockTile.cpp @@ -0,0 +1,22 @@ +#include "stdafx.h" +#include "net.minecraft.world.h" +#include "net.minecraft.world.entity.player.h" +#include "IconRegister.h" +#include "BoneBlockTile.h" + +BoneBlockTile::BoneBlockTile(int id) : HayBlockTile(id) +{ + material = Material::stone; +} + +void BoneBlockTile::playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data) +{ + if (player->canDestroy(this)) + Tile::playerDestroy(level, player, x, y, z, data); +} + +void BoneBlockTile::registerIcons(IconRegister *iconRegister) +{ + iconTop = iconRegister->registerIcon(L"bone_block_top"); + icon = iconRegister->registerIcon(L"bone_block_side"); +} diff --git a/Minecraft.World/BoneBlockTile.h b/Minecraft.World/BoneBlockTile.h new file mode 100644 index 00000000..28ccec55 --- /dev/null +++ b/Minecraft.World/BoneBlockTile.h @@ -0,0 +1,10 @@ +#pragma once +#include "HayBlockTile.h" + +class BoneBlockTile : public HayBlockTile +{ +public: + BoneBlockTile(int id); + virtual void registerIcons(IconRegister *iconRegister) override; + virtual void playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data) override; +}; diff --git a/Minecraft.World/Class.h b/Minecraft.World/Class.h index 09107147..83bb538e 100644 --- a/Minecraft.World/Class.h +++ b/Minecraft.World/Class.h @@ -138,6 +138,7 @@ enum eINSTANCEOF eTYPE_PIG = eTYPE_ANIMAL | eTYPE_ANIMALS_SPAWN_LIMIT_CHECK | 0x3, eTYPE_CHICKEN = eTYPE_ANIMAL | 0x4, eTYPE_RABBIT = eTYPE_ANIMAL | eTYPE_ANIMALS_SPAWN_LIMIT_CHECK | 0x5, + eTYPE_POLARBEAR = eTYPE_ANIMAL | eTYPE_ANIMALS_SPAWN_LIMIT_CHECK | 0x6, eTYPE_COW = eTYPE_ANIMAL | eTYPE_ANIMALS_SPAWN_LIMIT_CHECK | BIT_COW, eTYPE_MUSHROOMCOW = eTYPE_COW | 0x1, diff --git a/Minecraft.World/EntityIO.cpp b/Minecraft.World/EntityIO.cpp index f866e8b9..80379f5a 100644 --- a/Minecraft.World/EntityIO.cpp +++ b/Minecraft.World/EntityIO.cpp @@ -118,6 +118,10 @@ void EntityIO::staticCtor() eMinecraftColour_Mob_Rabbit_Colour1, eMinecraftColour_Mob_Rabbit_Colour2, IDS_RABBIT); + setId(PolarBear::create, eTYPE_POLARBEAR, L"PolarBear", 107, + eMinecraftColour_Mob_PolarBear_Colour1, + eMinecraftColour_Mob_PolarBear_Colour2, IDS_POLAR_BEAR); + setId(ArmorStand::create, eTYPE_ARMORSTAND, L"ArmorStand", 102); //change IDS_Endermite later diff --git a/Minecraft.World/HoeItem.cpp b/Minecraft.World/HoeItem.cpp index c6855cf5..5978c10b 100644 --- a/Minecraft.World/HoeItem.cpp +++ b/Minecraft.World/HoeItem.cpp @@ -38,7 +38,14 @@ bool HoeItem::useOn(shared_ptr instance, shared_ptr player return false; } -bool HoeItem::isHandEquipped() +float HoeItem::getDestroySpeed(shared_ptr itemInstance, Tile *tile) +{ + if (tile != nullptr && (tile->id == Tile::nether_wart_block_Id || tile->id == Tile::hayBlock->id)) + return tier->getSpeed(); + return Item::getDestroySpeed(itemInstance, tile); +} + +bool HoeItem::isHandEquipped() { return true; } diff --git a/Minecraft.World/HoeItem.h b/Minecraft.World/HoeItem.h index a4d015ac..bb3dd370 100644 --- a/Minecraft.World/HoeItem.h +++ b/Minecraft.World/HoeItem.h @@ -14,6 +14,7 @@ public: virtual bool useOn(shared_ptr instance, shared_ptr player, Level *level, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly=false); virtual bool isHandEquipped(); + virtual float getDestroySpeed(shared_ptr itemInstance, Tile *tile) override; const Tier *getTier(); }; \ No newline at end of file diff --git a/Minecraft.World/LivingEntity.cpp b/Minecraft.World/LivingEntity.cpp index 5b1e7f9b..ed710c5f 100644 --- a/Minecraft.World/LivingEntity.cpp +++ b/Minecraft.World/LivingEntity.cpp @@ -208,6 +208,15 @@ void LivingEntity::baseTick() hurt(DamageSource::inWall, 1); } + if (!level->isClientSide && isAlive() && onGround && !isSneaking() && tickCount % 10 == 0) + { + int tileBelow = level->getTile(Mth::floor(x), Mth::floor(bb->y0) - 1, Mth::floor(z)); + if (tileBelow == Tile::magma_Id) + { + hurt(DamageSource::inFire, 1); + } + } + if (isFireImmune() || level->isClientSide) clearFire(); shared_ptr thisPlayer = dynamic_pointer_cast(shared_from_this()); bool isInvulnerable = (thisPlayer != nullptr && thisPlayer->abilities.invulnerable); diff --git a/Minecraft.World/MagmaTile.cpp b/Minecraft.World/MagmaTile.cpp new file mode 100644 index 00000000..ccc979cf --- /dev/null +++ b/Minecraft.World/MagmaTile.cpp @@ -0,0 +1,8 @@ +#include "stdafx.h" +#include "net.minecraft.world.level.h" +#include "MagmaTile.h" + +MagmaTile::MagmaTile(int id) : Tile(id, Material::stone) +{ + setLightEmission(0.2f); +} diff --git a/Minecraft.World/MagmaTile.h b/Minecraft.World/MagmaTile.h new file mode 100644 index 00000000..51abbf83 --- /dev/null +++ b/Minecraft.World/MagmaTile.h @@ -0,0 +1,8 @@ +#pragma once +#include "Tile.h" + +class MagmaTile : public Tile +{ +public: + MagmaTile(int id); +}; diff --git a/Minecraft.World/PolarBear.cpp b/Minecraft.World/PolarBear.cpp new file mode 100644 index 00000000..deea853c --- /dev/null +++ b/Minecraft.World/PolarBear.cpp @@ -0,0 +1,209 @@ +#include "stdafx.h" +#include "com.mojang.nbt.h" +#include "net.minecraft.world.level.tile.h" +#include "net.minecraft.world.phys.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.item.h" +#include "net.minecraft.world.entity.h" +#include "net.minecraft.world.entity.animal.h" +#include "net.minecraft.world.entity.ai.attributes.h" +#include "net.minecraft.world.entity.ai.goal.h" +#include "net.minecraft.world.entity.ai.goal.target.h" +#include "net.minecraft.world.entity.ai.navigation.h" +#include "net.minecraft.world.entity.player.h" +#include "net.minecraft.world.damagesource.h" +#include "SharedMonsterAttributes.h" +#include "PolarBear.h" +#include "../Minecraft.Client/Textures.h" +#include "SoundTypes.h" + +PolarBear::PolarBear(Level *level) : Animal(level) +{ + this->defineSynchedData(); + registerAttributes(); + setHealth(getMaxHealth()); + + m_standing = false; + clientSideStandAnimation = clientSideStandAnimationO = 0.0f; + warningSoundTicks = 0; + cubDefenseCooldown = 0; + + setSize(1.3f, 1.4f); + + getNavigation()->setAvoidWater(true); + goalSelector.addGoal(0, new FloatGoal(this)); + goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.25, true)); + goalSelector.addGoal(1, new PanicGoal(this, 2.0)); + goalSelector.addGoal(4, new FollowParentGoal(this, 1.25)); + goalSelector.addGoal(5, new RandomStrollGoal(this, 1.0)); + goalSelector.addGoal(6, new LookAtPlayerGoal(this, typeid(Player), 6)); + goalSelector.addGoal(7, new RandomLookAroundGoal(this)); + + targetSelector.addGoal(1, new HurtByTargetGoal(this, true)); +} + +bool PolarBear::useNewAi() +{ + return true; +} + +void PolarBear::registerAttributes() +{ + Animal::registerAttributes(); + + getAttribute(SharedMonsterAttributes::MAX_HEALTH)->setBaseValue(30); + getAttribute(SharedMonsterAttributes::FOLLOW_RANGE)->setBaseValue(20); + getAttribute(SharedMonsterAttributes::MOVEMENT_SPEED)->setBaseValue(0.25f); + + getAttributes()->registerAttribute(SharedMonsterAttributes::ATTACK_DAMAGE)->setBaseValue(6); +} + +shared_ptr PolarBear::getBreedOffspring(shared_ptr target) +{ + return std::make_shared(level); +} + +bool PolarBear::isFood(shared_ptr itemInstance) +{ + return false; +} + +int PolarBear::getAmbientSound() +{ + return isBaby() ? eSoundType_MOB_POLARBEAR_BABY_AMBIENT : eSoundType_MOB_POLARBEAR_AMBIENT; +} + +int PolarBear::getHurtSound() +{ + return eSoundType_MOB_POLARBEAR_HURT; +} + +int PolarBear::getDeathSound() +{ + return eSoundType_MOB_POLARBEAR_DEATH; +} + +void PolarBear::playStepSound(int xt, int yt, int zt, int t) +{ + playSound(eSoundType_MOB_POLARBEAR_STEP, 0.15f, 1.0f); +} + +void PolarBear::playWarningSound() +{ + if (warningSoundTicks <= 0) + { + playSound(eSoundType_MOB_POLARBEAR_WARNING, 1.0f, getVoicePitch()); + warningSoundTicks = 40; + } +} + +void PolarBear::setTarget(shared_ptr newTarget) +{ + shared_ptr old = getTarget(); + Animal::setTarget(newTarget); + if (newTarget != nullptr && old == nullptr && !isBaby()) + { + playWarningSound(); + } +} + +int PolarBear::getDeathLoot() +{ + return Item::fish_Id; +} + +bool PolarBear::doHurtTarget(shared_ptr target) +{ + if (isBaby()) + { + return false; + } + float dmg = (float)getAttribute(SharedMonsterAttributes::ATTACK_DAMAGE)->getValue(); + return target->hurt(DamageSource::mobAttack(dynamic_pointer_cast(shared_from_this())), dmg); +} + +bool PolarBear::isStanding() +{ + return m_standing; +} + +void PolarBear::setStanding(bool standing) +{ + m_standing = standing; +} + +float PolarBear::getStandingAnimationScale(float a) +{ + return (clientSideStandAnimationO + (clientSideStandAnimation - clientSideStandAnimationO) * a) / 6.0f; +} + +void PolarBear::aiStep() +{ + Animal::aiStep(); + + if (level->isClientSide) + { + clientSideStandAnimationO = clientSideStandAnimation; + if (isStanding()) + { + clientSideStandAnimation = Mth::clamp(clientSideStandAnimation + 1.0f, 0.0f, 6.0f); + } + else + { + clientSideStandAnimation = Mth::clamp(clientSideStandAnimation - 1.0f, 0.0f, 6.0f); + } + } + + if (warningSoundTicks > 0) + { + --warningSoundTicks; + } + + if (!level->isClientSide && !isBaby() && getTarget() == nullptr) + { + if (cubDefenseCooldown > 0) + { + --cubDefenseCooldown; + } + else + { + cubDefenseCooldown = 10; + bool cubNear = false; + vector > *bears = level->getEntitiesOfClass(typeid(PolarBear), bb->grow(8.0, 4.0, 8.0)); + for (auto &it : *bears) + { + shared_ptr other = dynamic_pointer_cast(it); + if (other != nullptr && other.get() != this && other->isBaby()) + { + cubNear = true; + break; + } + } + delete bears; + if (cubNear) + { + shared_ptr p = level->getNearestAttackablePlayer(shared_from_this(), 16.0); + if (p != nullptr) + { + setTarget(dynamic_pointer_cast(p)); + } + } + } + } +} + +MobGroupData *PolarBear::finalizeMobSpawn(MobGroupData *groupData, int extraData) +{ + groupData = Animal::finalizeMobSpawn(groupData); + + if (groupData == nullptr || dynamic_cast(groupData) == nullptr) + { + groupData = new PolarBearGroupData(); + } + else + { + setAge(CUB_AGE); + } + + return groupData; +} diff --git a/Minecraft.World/PolarBear.h b/Minecraft.World/PolarBear.h new file mode 100644 index 00000000..1b83d00c --- /dev/null +++ b/Minecraft.World/PolarBear.h @@ -0,0 +1,59 @@ +#pragma once + +#include "Animal.h" +#include "MobGroupData.h" + +class DamageSource; + +class PolarBear : public Animal +{ +public: + eINSTANCEOF GetType() { return eTYPE_POLARBEAR; } + static Entity *create(Level *level) { return new PolarBear(level); } + +private: + static const int CUB_AGE = -23488; + + float clientSideStandAnimationO; + float clientSideStandAnimation; + int warningSoundTicks; + int cubDefenseCooldown; + +public: + PolarBear(Level *level); + + virtual bool useNewAi(); + +protected: + virtual void registerAttributes(); + +public: + virtual shared_ptr getBreedOffspring(shared_ptr target); + virtual bool isFood(shared_ptr itemInstance); + +protected: + virtual int getAmbientSound(); + virtual int getHurtSound(); + virtual int getDeathSound(); + virtual int getDeathLoot(); + virtual void playStepSound(int xt, int yt, int zt, int t); + +public: + virtual bool doHurtTarget(shared_ptr target); + virtual bool isStanding(); + void setStanding(bool standing); + float getStandingAnimationScale(float a); + + void playWarningSound(); + virtual void setTarget(shared_ptr target); + + virtual void aiStep(); + virtual MobGroupData *finalizeMobSpawn(MobGroupData *groupData, int extraData = 0); + +private: + bool m_standing; +}; + +class PolarBearGroupData : public MobGroupData +{ +}; diff --git a/Minecraft.World/SoundTypes.h b/Minecraft.World/SoundTypes.h index a2d1bf4d..131760c4 100644 --- a/Minecraft.World/SoundTypes.h +++ b/Minecraft.World/SoundTypes.h @@ -275,7 +275,14 @@ enum eSOUND_TYPE eSoundType_MOB_ELDER_GUARDIAN_DEATH, eSoundType_MOB_ELDER_GUARDIAN_HIT, eSoundType_MOB_ELDER_GUARDIAN_IDLE, - + + eSoundType_MOB_POLARBEAR_BABY_AMBIENT, + eSoundType_MOB_POLARBEAR_AMBIENT, + eSoundType_MOB_POLARBEAR_HURT, + eSoundType_MOB_POLARBEAR_DEATH, + eSoundType_MOB_POLARBEAR_STEP, + eSoundType_MOB_POLARBEAR_WARNING, + eSoundType_MAX }; diff --git a/Minecraft.World/Tile.cpp b/Minecraft.World/Tile.cpp index 254a8d3d..a929a380 100644 --- a/Minecraft.World/Tile.cpp +++ b/Minecraft.World/Tile.cpp @@ -269,6 +269,11 @@ Tile* Tile::packedIce = nullptr; FrostedIceTile* Tile::frosted_ice = nullptr; GrassPathTile* Tile::grass_path = nullptr; BeetrootTile* Tile::beetroots = nullptr; +Tile* Tile::end_bricks = nullptr; +MagmaTile* Tile::magma = nullptr; +Tile* Tile::nether_wart_block = nullptr; +Tile* Tile::red_nether_brick = nullptr; +BoneBlockTile* Tile::bone_block = nullptr; Tile* Tile::barrier = nullptr; TallGrass2* Tile::double_plant = nullptr; @@ -584,6 +589,12 @@ void Tile::staticCtor() Tile::grass_path = static_cast((new GrassPathTile(grass_path_Id))->setDestroyTime(0.65f)->setSoundType(SOUND_GRAVEL)->setIconName(L"grass_path_top")->setDescriptionId(IDS_TILE_GRASS_PATH)->setUseDescriptionId(IDS_DESC_DIRT)->sendTileData()); Tile::frosted_ice = static_cast((new FrostedIceTile(frosted_ice_Id))->setDestroyTime(0.5f)->setLightBlock(3)->setSoundType(Tile::SOUND_GLASS)->setIconName(L"ice")->setDescriptionId(IDS_TILE_FROSTED_ICE)->setUseDescriptionId(IDS_DESC_ICE)->setNotCollectStatistics()); + Tile::end_bricks = (new Tile(end_bricks_Id, Material::stone))->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone)->setDestroyTime(3.0f)->setExplodeable(9)->setSoundType(SOUND_STONE)->setIconName(L"end_bricks")->setDescriptionId(IDS_TILE_END_BRICKS)->setUseDescriptionId(IDS_DESC_STONE); + Tile::magma = static_cast((new MagmaTile(magma_Id))->setBaseItemTypeAndMaterial(Item::eBaseItemType_block, Item::eMaterial_stone)->setDestroyTime(0.5f)->setExplodeable(6)->setSoundType(SOUND_STONE)->setIconName(L"magma")->setDescriptionId(IDS_TILE_MAGMA)->setUseDescriptionId(IDS_DESC_STONE)); + Tile::nether_wart_block = (new Tile(nether_wart_block_Id, Material::grass))->setBaseItemTypeAndMaterial(Item::eBaseItemType_block, Item::eMaterial_wheat)->setDestroyTime(0.5f)->setSoundType(SOUND_WOOD)->setIconName(L"nether_wart_block")->setDescriptionId(IDS_TILE_NETHER_WART_BLOCK)->setUseDescriptionId(IDS_DESC_STONE); + Tile::red_nether_brick = (new Tile(red_nether_brick_Id, Material::stone))->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone)->setDestroyTime(2.0f)->setExplodeable(6)->setSoundType(SOUND_STONE)->setIconName(L"red_nether_brick")->setDescriptionId(IDS_TILE_RED_NETHER_BRICK)->setUseDescriptionId(IDS_DESC_STONE); + Tile::bone_block = static_cast((new BoneBlockTile(bone_block_Id))->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone)->setDestroyTime(1.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setIconName(L"bone_block_side")->setDescriptionId(IDS_TILE_BONE_BLOCK)->setUseDescriptionId(IDS_DESC_STONE)->sendTileData()); + Tile::daylight_detector_inverted = static_cast((new DaylightDetectorTile(178, true))->setDestroyTime(0.2f)->setSoundType(SOUND_WOOD)->setIconName(L"daylight_detector")->setDescriptionId(IDS_TILE_DAYLIGHT_DETECTOR)->setUseDescriptionId(IDS_DESC_DAYLIGHT_DETECTOR)); Tile::red_sandstone = (new RedSandStoneTile(red_sandstone_Id))->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_sand)->setSoundType(Tile::SOUND_STONE)->setDestroyTime(0.8f)->sendTileData()->setIconName(L"red_sandstone")->setDescriptionId(IDS_TILE_RED_SANDSTONE)->setUseDescriptionId(IDS_DESC_RED_SANDSTONE)->sendTileData(); Tile::stairs_red_sandstone = (new StairTile(red_sandstone_stairs_Id, Tile::red_sandstone, 0))->setBaseItemTypeAndMaterial(Item::eBaseItemType_stairs, Item::eMaterial_sand)->setIconName(L"stairsRedSandstone")->setDescriptionId(IDS_TILE_STAIRS_RED_SANDSTONE)->sendTileData()->setUseDescriptionId(IDS_DESC_STAIRS); @@ -1914,4 +1925,9 @@ const int Tile::dark_oak_stairs_Id; const int Tile::slime_Id; const int Tile::beetroots_Id; const int Tile::grass_path_Id; +const int Tile::end_bricks_Id; +const int Tile::magma_Id; +const int Tile::nether_wart_block_Id; +const int Tile::red_nether_brick_Id; +const int Tile::bone_block_Id; #endif diff --git a/Minecraft.World/Tile.h b/Minecraft.World/Tile.h index 10677db9..5e57055a 100644 --- a/Minecraft.World/Tile.h +++ b/Minecraft.World/Tile.h @@ -47,6 +47,8 @@ class TallGrass2; class FrostedIceTile; class GrassPathTile; class BeetrootTile; +class MagmaTile; +class BoneBlockTile; class ChunkRebuildData; @@ -443,15 +445,15 @@ public: //purpur_stairs 203 //purpur_double_slab 204 //purpur_slab 205 - //end_bricks 206 + static const int end_bricks_Id = 206; static const int beetroots_Id = 207; static const int grass_path_Id = 208; //end_gateway 209 static const int frosted_ice_Id = 212; - //magma 213 - //nether_wart_block 214 - //red_nether_brick 215 - //bone_block 216 + static const int magma_Id = 213; + static const int nether_wart_block_Id = 214; + static const int red_nether_brick_Id = 215; + static const int bone_block_Id = 216; //structure_void 217 // // @@ -668,6 +670,11 @@ public: static FrostedIceTile* frosted_ice; static GrassPathTile* grass_path; static BeetrootTile* beetroots; + static Tile* end_bricks; + static MagmaTile* magma; + static Tile* nether_wart_block; + static Tile* red_nether_brick; + static BoneBlockTile* bone_block; static Tile* seaLantern; static Tile* prismarine; diff --git a/Minecraft.World/cmake/sources/Common.cmake b/Minecraft.World/cmake/sources/Common.cmake index 7cc02d80..3c240fed 100644 --- a/Minecraft.World/cmake/sources/Common.cmake +++ b/Minecraft.World/cmake/sources/Common.cmake @@ -792,6 +792,8 @@ set(_MINECRAFT_WORLD_COMMON_NET_MINECRAFT_WORLD_ENTITY_ANIMAL "${CMAKE_CURRENT_SOURCE_DIR}/Wolf.h" "${CMAKE_CURRENT_SOURCE_DIR}/Rabbit.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/Rabbit.h" + "${CMAKE_CURRENT_SOURCE_DIR}/PolarBear.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/PolarBear.h" "${CMAKE_CURRENT_SOURCE_DIR}/net.minecraft.world.entity.animal.h" ) source_group("net/minecraft/world/entity/animal" FILES ${_MINECRAFT_WORLD_COMMON_NET_MINECRAFT_WORLD_ENTITY_ANIMAL}) @@ -2049,6 +2051,10 @@ set(_MINECRAFT_WORLD_COMMON_NET_MINECRAFT_WORLD_LEVEL_TILE "${CMAKE_CURRENT_SOURCE_DIR}/GrassPathTile.h" "${CMAKE_CURRENT_SOURCE_DIR}/BeetrootTile.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/BeetrootTile.h" + "${CMAKE_CURRENT_SOURCE_DIR}/MagmaTile.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/MagmaTile.h" + "${CMAKE_CURRENT_SOURCE_DIR}/BoneBlockTile.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/BoneBlockTile.h" "${CMAKE_CURRENT_SOURCE_DIR}/RedSandStoneTile.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/SeaLanternTile.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/PrismarineTile.cpp" diff --git a/Minecraft.World/net.minecraft.world.entity.animal.h b/Minecraft.World/net.minecraft.world.entity.animal.h index fc2c4de4..73f660db 100644 --- a/Minecraft.World/net.minecraft.world.entity.animal.h +++ b/Minecraft.World/net.minecraft.world.entity.animal.h @@ -23,4 +23,5 @@ #include "EntityHorse.h" //TU31 -#include "Rabbit.h" \ No newline at end of file +#include "Rabbit.h" +#include "PolarBear.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 e27a8afc..de065ea7 100644 --- a/Minecraft.World/net.minecraft.world.level.tile.h +++ b/Minecraft.World/net.minecraft.world.level.tile.h @@ -147,5 +147,7 @@ #include "StoneSlabTile2.h" #include "GrassPathTile.h" #include "BeetrootTile.h" +#include "MagmaTile.h" +#include "BoneBlockTile.h"