diff --git a/.gitignore b/.gitignore index 9caff84a1..ef12716d3 100644 --- a/.gitignore +++ b/.gitignore @@ -433,3 +433,6 @@ build/* # Local saves Minecraft.Client/Saves/ + +# Visual Studio Per-User Config +*.user diff --git a/Minecraft.Client/ClientConnection.cpp b/Minecraft.Client/ClientConnection.cpp index 2270433d3..9b9bb86a7 100644 --- a/Minecraft.Client/ClientConnection.cpp +++ b/Minecraft.Client/ClientConnection.cpp @@ -759,6 +759,18 @@ void ClientConnection::handleAddPlayer(shared_ptr packet) return; } } +#ifdef _WINDOWS64 + // Win64 keeps local-player identity separate from network smallId; also guard against creating + // a duplicate remote player for a local slot by checking the username directly. + for (unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) + { + if (minecraft->localplayers[idx] != NULL && minecraft->localplayers[idx]->name == packet->name) + { + app.DebugPrintf("AddPlayerPacket received for local player name %ls\n", packet->name.c_str()); + return; + } + } +#endif /*#ifdef _WINDOWS64 // On Windows64 all XUIDs are INVALID_XUID so the XUID check above never fires. // packet->m_playerIndex is the server-assigned sequential index (set via LoginPacket), @@ -800,22 +812,50 @@ void ClientConnection::handleAddPlayer(shared_ptr packet) #ifdef _WINDOWS64 { + IQNetPlayer* matchedQNetPlayer = NULL; PlayerUID pktXuid = player->getXuid(); const PlayerUID WIN64_XUID_BASE = (PlayerUID)0xe000d45248242f2e; + // Legacy compatibility path for peers still using embedded smallId XUIDs. if (pktXuid >= WIN64_XUID_BASE && pktXuid < WIN64_XUID_BASE + MINECRAFT_NET_MAX_PLAYERS) { BYTE smallId = (BYTE)(pktXuid - WIN64_XUID_BASE); INetworkPlayer* np = g_NetworkManager.GetPlayerBySmallId(smallId); if (np != NULL) { + NetworkPlayerXbox* npx = (NetworkPlayerXbox*)np; + matchedQNetPlayer = npx->GetQNetPlayer(); + } + } + + // Current Win64 path: identify QNet player by name and attach packet XUID. + if (matchedQNetPlayer == NULL) + { + for (BYTE smallId = 0; smallId < MINECRAFT_NET_MAX_PLAYERS; ++smallId) + { + INetworkPlayer* np = g_NetworkManager.GetPlayerBySmallId(smallId); + if (np == NULL) + continue; + NetworkPlayerXbox* npx = (NetworkPlayerXbox*)np; IQNetPlayer* qp = npx->GetQNetPlayer(); - if (qp != NULL && qp->m_gamertag[0] == 0) + if (qp != NULL && _wcsicmp(qp->m_gamertag, packet->name.c_str()) == 0) { - wcsncpy_s(qp->m_gamertag, 32, packet->name.c_str(), _TRUNCATE); + matchedQNetPlayer = qp; + break; } } } + + if (matchedQNetPlayer != NULL) + { + // Store packet-authoritative XUID on this network slot so later lookups by XUID + // (e.g. remove player, display mapping) work for both legacy and uid.dat clients. + matchedQNetPlayer->m_resolvedXuid = pktXuid; + if (matchedQNetPlayer->m_gamertag[0] == 0) + { + wcsncpy_s(matchedQNetPlayer->m_gamertag, 32, packet->name.c_str(), _TRUNCATE); + } + } } #endif @@ -985,6 +1025,8 @@ void ClientConnection::handleRemoveEntity(shared_ptr packe qp->m_smallId = 0; qp->m_isRemote = false; qp->m_isHostPlayer = false; + // Clear resolved id to avoid stale XUID -> player matches after disconnect. + qp->m_resolvedXuid = INVALID_XUID; qp->m_gamertag[0] = 0; qp->SetCustomDataValue(0); } @@ -3956,4 +3998,4 @@ ClientConnection::DeferredEntityLinkPacket::DeferredEntityLinkPacket(shared_ptr< { m_recievedTick = GetTickCount(); m_packet = packet; -} \ No newline at end of file +} diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp index 7197a6e52..b2ca2be33 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp @@ -260,16 +260,13 @@ void SoundEngine::updateMiniAudio() continue; } - float finalVolume = s->info.volume; + float finalVolume = s->info.volume * m_MasterEffectsVolume; if (finalVolume > 1.0f) finalVolume = 1.0f; ma_sound_set_volume(&s->sound, finalVolume); - if (!s->info.bUseSoundsPitchVal) - { - ma_sound_set_pitch(&s->sound, s->info.pitch); - } + ma_sound_set_pitch(&s->sound, s->info.pitch); if (s->info.bIs3D) { @@ -967,14 +964,8 @@ void SoundEngine::playMusicTick() // AP - moved to a separate function so it can be called from the mixer callback on Vita void SoundEngine::playMusicUpdate() { - //return; - static bool firstCall = true; static float fMusicVol = 0.0f; - if( firstCall ) - { - fMusicVol = getMasterMusicVolume(); - firstCall = false; - } + fMusicVol = getMasterMusicVolume(); switch(m_StreamState) { @@ -1242,7 +1233,7 @@ void SoundEngine::playMusicUpdate() ma_sound_set_pitch(&m_musicStream, m_StreamingAudioInfo.pitch); - float finalVolume = m_StreamingAudioInfo.volume * m_MasterMusicVolume; + float finalVolume = m_StreamingAudioInfo.volume * getMasterMusicVolume(); ma_sound_set_volume(&m_musicStream, finalVolume); ma_result startResult = ma_sound_start(&m_musicStream); @@ -1370,14 +1361,11 @@ void SoundEngine::playMusicUpdate() } // volume change required? - if (fMusicVol != getMasterMusicVolume()) + if (m_musicStreamActive) { - if (m_musicStreamActive) - { - float finalVolume = m_StreamingAudioInfo.volume * fMusicVol; + float finalVolume = m_StreamingAudioInfo.volume * fMusicVol; - ma_sound_set_volume(&m_musicStream, finalVolume); - } + ma_sound_set_volume(&m_musicStream, finalVolume); } } } diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 00dedbe15..3aae68d2c 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -2441,10 +2441,10 @@ void CMinecraftApp::ClearGameSettingsChangedFlag(int iPad) /////////////////////////// // -// Remove the debug settings in the content package build +// Remove the debug settings in the release build // //////////////////////////// -#ifndef _DEBUG_MENUS_ENABLED +#ifndef _DEBUG unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlayer) //bOverridePlayer is to force the send for the server to get the read options { return 0; diff --git a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp index 85531e472..80fbd98cf 100644 --- a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp +++ b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp @@ -5,6 +5,7 @@ #include "..\..\Xbox\Network\NetworkPlayerXbox.h" #ifdef _WINDOWS64 #include "..\..\Windows64\Network\WinsockNetLayer.h" +#include "..\..\Windows64\Windows64_Xuid.h" #include "..\..\Minecraft.h" #include "..\..\User.h" #include @@ -234,6 +235,7 @@ void CPlatformNetworkManagerStub::DoWork() qnetPlayer->m_smallId = 0; qnetPlayer->m_isRemote = false; qnetPlayer->m_isHostPlayer = false; + qnetPlayer->m_resolvedXuid = INVALID_XUID; qnetPlayer->m_gamertag[0] = 0; qnetPlayer->SetCustomDataValue(0); WinsockNetLayer::PushFreeSmallId(disconnectedSmallId); @@ -354,7 +356,9 @@ void CPlatformNetworkManagerStub::HostGame(int localUsersMask, bool bOnlineGame, #ifdef _WINDOWS64 IQNet::m_player[0].m_smallId = 0; IQNet::m_player[0].m_isRemote = false; + // world host is pinned to legacy host XUID to keep old player data compatibility. IQNet::m_player[0].m_isHostPlayer = true; + IQNet::m_player[0].m_resolvedXuid = Win64Xuid::GetLegacyEmbeddedHostXuid(); IQNet::s_playerCount = 1; #endif @@ -411,6 +415,8 @@ int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo* searchResult, int l IQNet::m_player[0].m_smallId = 0; IQNet::m_player[0].m_isRemote = true; IQNet::m_player[0].m_isHostPlayer = true; + // Remote host still maps to legacy host XUID in mixed old/new sessions. + IQNet::m_player[0].m_resolvedXuid = Win64Xuid::GetLegacyEmbeddedHostXuid(); wcsncpy_s(IQNet::m_player[0].m_gamertag, 32, searchResult->data.hostName, _TRUNCATE); WinsockNetLayer::StopDiscovery(); @@ -426,6 +432,8 @@ int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo* searchResult, int l IQNet::m_player[localSmallId].m_smallId = localSmallId; IQNet::m_player[localSmallId].m_isRemote = false; IQNet::m_player[localSmallId].m_isHostPlayer = false; + // Local non-host identity is the persistent uid.dat XUID. + IQNet::m_player[localSmallId].m_resolvedXuid = Win64Xuid::ResolvePersistentXuid(); Minecraft* pMinecraft = Minecraft::GetInstance(); wcscpy_s(IQNet::m_player[localSmallId].m_gamertag, 32, pMinecraft->user->name.c_str()); diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp index 5375b784d..95423642a 100644 --- a/Minecraft.Client/Common/UI/UIController.cpp +++ b/Minecraft.Client/Common/UI/UIController.cpp @@ -2342,7 +2342,13 @@ void UIController::PlayUISFX(ESoundEffect eSound) if (time - m_lastUiSfx < 10) { return; } m_lastUiSfx = time; - Minecraft::GetInstance()->soundEngine->playUI(eSound,1.0f,1.0f); + float pitch = 1.0f; + if (eSound == eSFX_Focus) + { + pitch += (m_randomDistribution(m_randomGenerator) - 0.5f) / 10; + } + + Minecraft::GetInstance()->soundEngine->playUI(eSound,1.0f,pitch); } void UIController::DisplayGamertag(unsigned int iPad, bool show) diff --git a/Minecraft.Client/Common/UI/UIController.h b/Minecraft.Client/Common/UI/UIController.h index 373d67b2c..f4b365b51 100644 --- a/Minecraft.Client/Common/UI/UIController.h +++ b/Minecraft.Client/Common/UI/UIController.h @@ -3,6 +3,7 @@ using namespace std; #include "IUIController.h" #include "UIEnums.h" #include "UIGroup.h" +#include class UIAbstractBitmapFont; class UIBitmapFont; @@ -63,6 +64,9 @@ private: UITTFFont *m_mcTTFFont; UIBitmapFont *m_moj7, *m_moj11; + std::mt19937 m_randomGenerator; + std::uniform_real_distribution m_randomDistribution; + public: void setCleanupOnReload(); void updateCurrentFont(); diff --git a/Minecraft.Client/Common/UI/UIScene_HelpAndOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_HelpAndOptionsMenu.cpp index a0d631723..d442553fd 100644 --- a/Minecraft.Client/Common/UI/UIScene_HelpAndOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_HelpAndOptionsMenu.cpp @@ -23,7 +23,7 @@ UIScene_HelpAndOptionsMenu::UIScene_HelpAndOptionsMenu(int iPad, void *initData, // We don't have a reinstall content, so remove the button removeControl( &m_buttons[BUTTON_HAO_REINSTALL], false ); -#ifdef _FINAL_BUILD +#ifndef _DEBUG removeControl( &m_buttons[BUTTON_HAO_DEBUG], false); #else if(!app.DebugSettingsOn()) removeControl( &m_buttons[BUTTON_HAO_DEBUG], false); diff --git a/Minecraft.Client/Extrax64Stubs.cpp b/Minecraft.Client/Extrax64Stubs.cpp index 29865e400..9e693d1a0 100644 --- a/Minecraft.Client/Extrax64Stubs.cpp +++ b/Minecraft.Client/Extrax64Stubs.cpp @@ -21,6 +21,7 @@ #include "Windows64\Social\SocialManager.h" #include "Windows64\Sentient\DynamicConfigurations.h" #include "Windows64\Network\WinsockNetLayer.h" +#include "Windows64\Windows64_Xuid.h" #elif defined __PSVITA__ #include "PSVita\Sentient\SentientManager.h" #include "StatsCounter.h" @@ -200,7 +201,15 @@ DWORD IQNetPlayer::GetCurrentRtt() { return 0; } bool IQNetPlayer::IsHost() { return m_isHostPlayer; } bool IQNetPlayer::IsGuest() { return false; } bool IQNetPlayer::IsLocal() { return !m_isRemote; } -PlayerUID IQNetPlayer::GetXuid() { return (PlayerUID)(0xe000d45248242f2e + m_smallId); } // todo: restore to INVALID_XUID once saves support this +PlayerUID IQNetPlayer::GetXuid() +{ + // Compatibility model: + // - Preferred path: use per-player resolved XUID populated from login/add-player flow. + // - Fallback path: keep legacy base+smallId behavior for peers/saves still on old scheme. + if (m_resolvedXuid != INVALID_XUID) + return m_resolvedXuid; + return (PlayerUID)(0xe000d45248242f2e + m_smallId); +} LPCWSTR IQNetPlayer::GetGamertag() { return m_gamertag; } int IQNetPlayer::GetSessionIndex() { return m_smallId; } bool IQNetPlayer::IsTalking() { return false; } @@ -226,6 +235,7 @@ void Win64_SetupRemoteQNetPlayer(IQNetPlayer * player, BYTE smallId, bool isHost player->m_smallId = smallId; player->m_isRemote = !isLocal; player->m_isHostPlayer = isHost; + player->m_resolvedXuid = INVALID_XUID; swprintf_s(player->m_gamertag, 32, L"Player%d", smallId); if (smallId >= IQNet::s_playerCount) IQNet::s_playerCount = smallId + 1; @@ -285,8 +295,13 @@ IQNetPlayer* IQNet::GetPlayerByXuid(PlayerUID xuid) { for (DWORD i = 0; i < s_playerCount; i++) { - if (Win64_IsActivePlayer(&m_player[i], i) && m_player[i].GetXuid() == xuid) return &m_player[i]; + if (!Win64_IsActivePlayer(&m_player[i], i)) + continue; + + if (m_player[i].GetXuid() == xuid) + return &m_player[i]; } + // Keep existing stub behavior: return host slot instead of NULL on miss. return &m_player[0]; } DWORD IQNet::GetPlayerCount() @@ -301,7 +316,13 @@ DWORD IQNet::GetPlayerCount() QNET_STATE IQNet::GetState() { return _iQNetStubState; } bool IQNet::IsHost() { return s_isHosting; } HRESULT IQNet::JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO * pInviteInfo) { return S_OK; } -void IQNet::HostGame() { _iQNetStubState = QNET_STATE_SESSION_STARTING; s_isHosting = true; } +void IQNet::HostGame() +{ + _iQNetStubState = QNET_STATE_SESSION_STARTING; + s_isHosting = true; + // Host slot keeps legacy XUID so old host player data remains addressable. + m_player[0].m_resolvedXuid = Win64Xuid::GetLegacyEmbeddedHostXuid(); +} void IQNet::ClientJoinGame() { _iQNetStubState = QNET_STATE_SESSION_STARTING; @@ -312,6 +333,7 @@ void IQNet::ClientJoinGame() m_player[i].m_smallId = (BYTE)i; m_player[i].m_isRemote = true; m_player[i].m_isHostPlayer = false; + m_player[i].m_resolvedXuid = INVALID_XUID; m_player[i].m_gamertag[0] = 0; m_player[i].SetCustomDataValue(0); } @@ -326,6 +348,7 @@ void IQNet::EndGame() m_player[i].m_smallId = (BYTE)i; m_player[i].m_isRemote = false; m_player[i].m_isHostPlayer = false; + m_player[i].m_resolvedXuid = INVALID_XUID; m_player[i].m_gamertag[0] = 0; m_player[i].SetCustomDataValue(0); } @@ -575,10 +598,13 @@ void C_4JProfile::GetXUID(int iPad, PlayerUID * pXuid, bool bOnlineXuid) *pXuid = INVALID_XUID; return; } + // LoginPacket reads this value as client identity: + // - host keeps legacy host XUID for world compatibility + // - non-host uses persistent uid.dat-backed XUID if (IQNet::s_isHosting) - *pXuid = 0xe000d45248242f2e; + *pXuid = Win64Xuid::GetLegacyEmbeddedHostXuid(); else - *pXuid = 0xe000d45248242f2e + WinsockNetLayer::GetLocalSmallId(); + *pXuid = Win64Xuid::ResolvePersistentXuid(); #else * pXuid = 0xe000d45248242f2e + iPad; #endif diff --git a/Minecraft.Client/Minecraft.Client.vcxproj.user b/Minecraft.Client/Minecraft.Client.vcxproj.user deleted file mode 100644 index 24ca62f80..000000000 --- a/Minecraft.Client/Minecraft.Client.vcxproj.user +++ /dev/null @@ -1,22 +0,0 @@ - - - - Debug - - - $(SolutionDir)$(Platform)\$(Configuration)\ - WindowsLocalDebugger - - - $(SolutionDir)$(Platform)\$(Configuration)\ - WindowsLocalDebugger - - - $(SolutionDir)$(Platform)\$(Configuration)\ - WindowsLocalDebugger - - - $(SolutionDir)$(Platform)\$(Configuration)\ - WindowsLocalDebugger - - diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index b87745f03..7ae206cf9 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -52,6 +52,7 @@ #include "..\Minecraft.World\net.minecraft.world.level.dimension.h" #include "..\Minecraft.World\net.minecraft.world.item.h" #include "..\Minecraft.World\Minecraft.World.h" +#include "Windows64\Windows64_Xuid.h" #include "ClientConnection.h" #include "..\Minecraft.World\HellRandomLevelSource.h" #include "..\Minecraft.World\net.minecraft.world.entity.animal.h" @@ -1038,6 +1039,19 @@ shared_ptr Minecraft::createExtraLocalPlayer(int idx, co PlayerUID playerXUIDOnline = INVALID_XUID; ProfileManager.GetXUID(idx,&playerXUIDOffline,false); ProfileManager.GetXUID(idx,&playerXUIDOnline,true); +#ifdef _WINDOWS64 + // Compatibility rule for Win64 id migration + // host keeps legacy host XUID, non-host uses persistent uid.dat XUID. + INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(idx); + if(localNetworkPlayer != NULL && localNetworkPlayer->IsHost()) + { + playerXUIDOffline = Win64Xuid::GetLegacyEmbeddedHostXuid(); + } + else + { + playerXUIDOffline = Win64Xuid::ResolvePersistentXuid(); + } +#endif localplayers[idx]->setXuid(playerXUIDOffline); localplayers[idx]->setOnlineXuid(playerXUIDOnline); localplayers[idx]->setIsGuest(ProfileManager.IsGuest(idx)); @@ -4298,6 +4312,19 @@ void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_pt // player doesn't have an online UID, set it from the player name playerXUIDOnline.setForAdhoc(); } +#endif +#ifdef _WINDOWS64 + // On Windows, the implementation has been changed to use a per-client pseudo XUID based on `uid.dat`. + // To maintain player data compatibility with existing worlds, the world host (the first player) will use the previous embedded pseudo XUID. + INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(iPrimaryPlayer); + if(localNetworkPlayer != NULL && localNetworkPlayer->IsHost()) + { + playerXUIDOffline = Win64Xuid::GetLegacyEmbeddedHostXuid(); + } + else + { + playerXUIDOffline = Win64Xuid::ResolvePersistentXuid(); + } #endif player->setXuid(playerXUIDOffline); player->setOnlineXuid(playerXUIDOnline); @@ -4481,6 +4508,18 @@ void Minecraft::respawnPlayer(int iPad, int dimension, int newEntityId) PlayerUID playerXUIDOnline = INVALID_XUID; ProfileManager.GetXUID(iTempPad,&playerXUIDOffline,false); ProfileManager.GetXUID(iTempPad,&playerXUIDOnline,true); +#ifdef _WINDOWS64 + // Same compatibility rule as create/init paths. + INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(iTempPad); + if(localNetworkPlayer != NULL && localNetworkPlayer->IsHost()) + { + playerXUIDOffline = Win64Xuid::GetLegacyEmbeddedHostXuid(); + } + else + { + playerXUIDOffline = Win64Xuid::ResolvePersistentXuid(); + } +#endif player->setXuid(playerXUIDOffline); player->setOnlineXuid(playerXUIDOnline); player->setIsGuest( ProfileManager.IsGuest(iTempPad) ); diff --git a/Minecraft.Client/PendingConnection.cpp b/Minecraft.Client/PendingConnection.cpp index b50669e5f..72b8f3825 100644 --- a/Minecraft.Client/PendingConnection.cpp +++ b/Minecraft.Client/PendingConnection.cpp @@ -161,6 +161,23 @@ void PendingConnection::handleLogin(shared_ptr packet) //if (true)// 4J removed !server->onlineMode) bool sentDisconnect = false; + // Use the same Xuid choice as handleAcceptedLogin (offline first, online fallback). + // + PlayerUID loginXuid = packet->m_offlineXuid; + if (loginXuid == INVALID_XUID) loginXuid = packet->m_onlineXuid; + + bool duplicateXuid = false; + if (loginXuid != INVALID_XUID && server->getPlayers()->getPlayer(loginXuid) != nullptr) + { + duplicateXuid = true; + } + else if (packet->m_onlineXuid != INVALID_XUID && + packet->m_onlineXuid != loginXuid && + server->getPlayers()->getPlayer(packet->m_onlineXuid) != nullptr) + { + duplicateXuid = true; + } + if( sentDisconnect ) { // Do nothing @@ -169,6 +186,12 @@ void PendingConnection::handleLogin(shared_ptr packet) { disconnect(DisconnectPacket::eDisconnect_Banned); } + else if (duplicateXuid) + { + // if same XUID already in use by another player so disconnect this one. + app.DebugPrintf("Rejecting duplicate xuid for name: %ls\n", name.c_str()); + disconnect(DisconnectPacket::eDisconnect_Banned); + } #ifdef _WINDOWS64 else if (g_bRejectDuplicateNames) { diff --git a/Minecraft.Client/PlayerConnection.cpp b/Minecraft.Client/PlayerConnection.cpp index 266cae361..ab8ae20bc 100644 --- a/Minecraft.Client/PlayerConnection.cpp +++ b/Minecraft.Client/PlayerConnection.cpp @@ -1093,6 +1093,10 @@ void PlayerConnection::handleContainerClose(shared_ptr pac #ifndef _CONTENT_PACKAGE void PlayerConnection::handleContainerSetSlot(shared_ptr packet) { + if(player->gameMode->isSurvival()){ // Still allow creative players to change slots manually with packets(?) -- might want this different. + server->warn(L"Player " + player->getName() + L" just tried to set a slot in a container in survival mode"); + return; + } if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_CARRIED ) { player->inventory->setCarried(packet->item); @@ -1589,6 +1593,10 @@ void PlayerConnection::handleCraftItem(shared_ptr packet) Recipy::INGREDIENTS_REQUIRED *pRecipeIngredientsRequired=Recipes::getInstance()->getRecipeIngredientsArray(); shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + size_t recipeCount = Recipes::getInstance()->getRecipies()->size(); + if (iRecipe < 0 || iRecipe >= (int)recipeCount) + return; + if(app.DebugSettingsOn() && (player->GetDebugOptions()&(1L<onCraftedBy(player->level, dynamic_pointer_cast( player->shared_from_this() ), pTempItemInst->count ); @@ -1607,9 +1615,21 @@ void PlayerConnection::handleCraftItem(shared_ptr packet) { - // TODO 4J Stu - Assume at the moment that the client can work this out for us... - //if(pRecipeIngredientsRequired[iRecipe].bCanMake) - //{ + Recipy::INGREDIENTS_REQUIRED &req = pRecipeIngredientsRequired[iRecipe]; + if (req.iType == RECIPE_TYPE_3x3 && dynamic_cast(player->containerMenu) == NULL) + { + server->warn(L"Player " + player->getName() + L" tried to craft a 3x3 recipe without a crafting bench"); + return; + } + for (int i = 0; i < req.iIngC; i++){ + int need = req.iIngValA[i]; + int have = player->inventory->countResource(req.iIngIDA[i], req.iIngAuxValA[i]); + if (have < need){ + server->warn(L"Player " + player->getName() + L" just tried to craft item " + to_wstring(pTempItemInst->id) + L" with insufficient ingredients"); + return; + } + } + pTempItemInst->onCraftedBy(player->level, dynamic_pointer_cast( player->shared_from_this() ), pTempItemInst->count ); // and remove those resources from your inventory diff --git a/Minecraft.Client/PlayerList.cpp b/Minecraft.Client/PlayerList.cpp index c1ccfe148..42724a4f4 100644 --- a/Minecraft.Client/PlayerList.cpp +++ b/Minecraft.Client/PlayerList.cpp @@ -18,6 +18,7 @@ #include "..\Minecraft.World\ArrayWithLength.h" #include "..\Minecraft.World\net.minecraft.network.packet.h" #include "..\Minecraft.World\net.minecraft.network.h" +#include "Windows64\Windows64_Xuid.h" #include "..\Minecraft.World\Pos.h" #include "..\Minecraft.World\ProgressListener.h" #include "..\Minecraft.World\HellRandomLevelSource.h" @@ -106,11 +107,18 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr } #endif #ifdef _WINDOWS64 - if (networkPlayer != NULL && !networkPlayer->IsLocal()) + if (networkPlayer != NULL) { NetworkPlayerXbox* nxp = (NetworkPlayerXbox*)networkPlayer; IQNetPlayer* qnp = nxp->GetQNetPlayer(); - wcsncpy_s(qnp->m_gamertag, 32, player->name.c_str(), _TRUNCATE); + if (qnp != NULL) + { + if (!networkPlayer->IsLocal()) + { + wcsncpy_s(qnp->m_gamertag, 32, player->name.c_str(), _TRUNCATE); + } + qnp->m_resolvedXuid = player->getXuid(); + } } #endif // 4J Stu - TU-1 hotfix @@ -520,12 +528,20 @@ shared_ptr PlayerList::getPlayerForLogin(PendingConnection *pendin player->setOnlineXuid( onlineXuid ); // 4J Added #ifdef _WINDOWS64 { + // Use packet-supplied identity from LoginPacket. + // Do not recompute from name here: mixed-version clients must stay compatible. INetworkPlayer* np = pendingConnection->connection->getSocket()->getPlayer(); if (np != NULL) { - PlayerUID realXuid = np->GetUID(); - player->setXuid(realXuid); - player->setOnlineXuid(realXuid); + player->setOnlineXuid(np->GetUID()); + + // Backward compatibility: when Minecraft.Client is hosting, keep the first + // host player on the legacy embedded host XUID (base + 0). + // This preserves pre-migration host playerdata in existing worlds. + if (np->IsHost()) + { + player->setXuid(Win64Xuid::GetLegacyEmbeddedHostXuid()); + } } } #endif diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index 2eef5f737..fa4b8366c 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -42,6 +42,7 @@ #include "..\..\Minecraft.World\OldChunkStorage.h" #include "Common/PostProcesser.h" #include "Network\WinsockNetLayer.h" +#include "Windows64_Xuid.h" #include "Xbox/resource.h" @@ -110,6 +111,7 @@ struct Win64LaunchOptions { int screenMode; bool serverMode; + bool fullscreen; }; static void CopyWideArgToAnsi(LPCWSTR source, char* dest, size_t destSize) @@ -256,6 +258,8 @@ static Win64LaunchOptions ParseLaunchOptions() g_Win64MultiplayerPort = (int)port; } } + else if (_wcsicmp(argv[i], L"-fullscreen") == 0) + options.fullscreen = true; } LocalFree(argv); @@ -1218,6 +1222,12 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, Win64LaunchOptions launchOptions = ParseLaunchOptions(); ApplyScreenMode(launchOptions.screenMode); + // Ensure uid.dat exists from startup in client mode (before any multiplayer/login path). + if (!launchOptions.serverMode) + { + Win64Xuid::ResolvePersistentXuid(); + } + // If no username, let's fall back if (g_Win64Username[0] == 0) { @@ -1245,7 +1255,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, } // Restore fullscreen state from previous session - if (LoadFullscreenOption() && !g_isFullscreen) + if (LoadFullscreenOption() && !g_isFullscreen || launchOptions.fullscreen) { ToggleFullscreen(); } diff --git a/Minecraft.Client/Windows64/Windows64_Xuid.h b/Minecraft.Client/Windows64/Windows64_Xuid.h new file mode 100644 index 000000000..93577751a --- /dev/null +++ b/Minecraft.Client/Windows64/Windows64_Xuid.h @@ -0,0 +1,214 @@ +#pragma once + +#ifdef _WINDOWS64 + +#include +#include +#include +#include +#include +#include + +namespace Win64Xuid +{ + inline PlayerUID GetLegacyEmbeddedBaseXuid() + { + return (PlayerUID)0xe000d45248242f2eULL; + } + + inline PlayerUID GetLegacyEmbeddedHostXuid() + { + // Legacy behavior used "embedded base + smallId"; host was always smallId 0. + // We intentionally keep this value for host/self compatibility with pre-migration worlds. + return GetLegacyEmbeddedBaseXuid(); + } + + inline bool IsLegacyEmbeddedRange(PlayerUID xuid) + { + // Old Win64 XUIDs were not persistent and always lived in this narrow base+smallId range. + // Treat them as legacy/non-persistent so uid.dat values never collide with old slot IDs. + const PlayerUID base = GetLegacyEmbeddedBaseXuid(); + return xuid >= base && xuid < (base + MINECRAFT_NET_MAX_PLAYERS); + } + + inline bool IsPersistedUidValid(PlayerUID xuid) + { + return xuid != INVALID_XUID && !IsLegacyEmbeddedRange(xuid); + } + + + // ./uid.dat + inline bool BuildUidFilePath(char* outPath, size_t outPathSize) + { + if (outPath == NULL || outPathSize == 0) + return false; + + outPath[0] = 0; + + char exePath[MAX_PATH] = {}; + DWORD len = GetModuleFileNameA(NULL, exePath, MAX_PATH); + if (len == 0 || len >= MAX_PATH) + return false; + + char* lastSlash = strrchr(exePath, '\\'); + if (lastSlash != NULL) + { + *(lastSlash + 1) = 0; + } + + if (strcpy_s(outPath, outPathSize, exePath) != 0) + return false; + if (strcat_s(outPath, outPathSize, "uid.dat") != 0) + return false; + + return true; + } + + inline bool ReadUid(PlayerUID* outXuid) + { + if (outXuid == NULL) + return false; + + char path[MAX_PATH] = {}; + if (!BuildUidFilePath(path, MAX_PATH)) + return false; + + FILE* f = NULL; + if (fopen_s(&f, path, "rb") != 0 || f == NULL) + return false; + + char buffer[128] = {}; + size_t readBytes = fread(buffer, 1, sizeof(buffer) - 1, f); + fclose(f); + + if (readBytes == 0) + return false; + + // Compatibility: earlier experiments may have written raw 8-byte uid.dat. + if (readBytes == sizeof(unsigned __int64)) + { + unsigned __int64 raw = 0; + memcpy(&raw, buffer, sizeof(raw)); + PlayerUID parsed = (PlayerUID)raw; + if (IsPersistedUidValid(parsed)) + { + *outXuid = parsed; + return true; + } + } + + buffer[readBytes] = 0; + char* begin = buffer; + while (*begin == ' ' || *begin == '\t' || *begin == '\r' || *begin == '\n') + { + ++begin; + } + + errno = 0; + char* end = NULL; + unsigned __int64 raw = _strtoui64(begin, &end, 0); + if (begin == end || errno != 0) + return false; + + while (*end == ' ' || *end == '\t' || *end == '\r' || *end == '\n') + { + ++end; + } + if (*end != 0) + return false; + + PlayerUID parsed = (PlayerUID)raw; + if (!IsPersistedUidValid(parsed)) + return false; + + *outXuid = parsed; + return true; + } + + inline bool WriteUid(PlayerUID xuid) + { + char path[MAX_PATH] = {}; + if (!BuildUidFilePath(path, MAX_PATH)) + return false; + + FILE* f = NULL; + if (fopen_s(&f, path, "wb") != 0 || f == NULL) + return false; + + int written = fprintf_s(f, "0x%016llX\n", (unsigned long long)xuid); + fclose(f); + return written > 0; + } + + inline unsigned __int64 Mix64(unsigned __int64 x) + { + x += 0x9E3779B97F4A7C15ULL; + x = (x ^ (x >> 30)) * 0xBF58476D1CE4E5B9ULL; + x = (x ^ (x >> 27)) * 0x94D049BB133111EBULL; + return x ^ (x >> 31); + } + + inline PlayerUID GeneratePersistentUid() + { + // Avoid rand_s dependency: mix several Win64 runtime values into a 64-bit seed. + FILETIME ft = {}; + GetSystemTimeAsFileTime(&ft); + unsigned __int64 t = (((unsigned __int64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + LARGE_INTEGER qpc = {}; + QueryPerformanceCounter(&qpc); + + unsigned __int64 seed = t; + seed ^= (unsigned __int64)qpc.QuadPart; + seed ^= ((unsigned __int64)GetCurrentProcessId() << 32); + seed ^= (unsigned __int64)GetCurrentThreadId(); + seed ^= (unsigned __int64)GetTickCount(); + seed ^= (unsigned __int64)(size_t)&qpc; + seed ^= (unsigned __int64)(size_t)GetModuleHandleA(NULL); + + unsigned __int64 raw = Mix64(seed) ^ Mix64(seed + 0xA0761D6478BD642FULL); + raw ^= 0x8F4B2D6C1A93E705ULL; + raw |= 0x8000000000000000ULL; + + PlayerUID xuid = (PlayerUID)raw; + if (!IsPersistedUidValid(xuid)) + { + raw ^= 0x0100000000000001ULL; + xuid = (PlayerUID)raw; + } + + if (!IsPersistedUidValid(xuid)) + { + // Last-resort deterministic fallback for pathological cases. + xuid = (PlayerUID)0xD15EA5E000000001ULL; + } + + return xuid; + } + + inline PlayerUID ResolvePersistentXuid() + { + // Process-local cache: uid.dat is immutable during runtime and this path is hot. + static bool s_cached = false; + static PlayerUID s_xuid = INVALID_XUID; + + if (s_cached) + return s_xuid; + + PlayerUID fileXuid = INVALID_XUID; + if (ReadUid(&fileXuid)) + { + s_xuid = fileXuid; + s_cached = true; + return s_xuid; + } + + // First launch on this client: generate once and persist to uid.dat. + s_xuid = GeneratePersistentUid(); + WriteUid(s_xuid); + s_cached = true; + return s_xuid; + } +} + +#endif diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/UI/craft.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/UI/craft.ogg index 9359d3489..eb676afeb 100644 Binary files a/Minecraft.Client/Windows64Media/Sound/Minecraft/UI/craft.ogg and b/Minecraft.Client/Windows64Media/Sound/Minecraft/UI/craft.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/UI/scrollfocus.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/UI/scrollfocus.ogg index eb676afeb..9359d3489 100644 Binary files a/Minecraft.Client/Windows64Media/Sound/Minecraft/UI/scrollfocus.ogg and b/Minecraft.Client/Windows64Media/Sound/Minecraft/UI/scrollfocus.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/blast1/blast1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/blast1/blast1.ogg new file mode 100644 index 000000000..d8b11621f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/blast1/blast1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/blast_far1/blast_far1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/blast_far1/blast_far1.ogg new file mode 100644 index 000000000..93ee3b415 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/blast_far1/blast_far1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/largeblast1/largeblast1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/largeblast1/largeblast1.ogg new file mode 100644 index 000000000..bfd1bf117 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/largeblast1/largeblast1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/largeblast_far1/largeblast_far1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/largeblast_far1/largeblast_far1.ogg new file mode 100644 index 000000000..e8b15053d Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/largeblast_far1/largeblast_far1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/launch1/launch1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/launch1/launch1.ogg new file mode 100644 index 000000000..124b617d2 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/launch1/launch1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/twinkle1/twinkle1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/twinkle1/twinkle1.ogg new file mode 100644 index 000000000..4ee6c85eb Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/twinkle1/twinkle1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/twinkle_far1/twinkle_far1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/twinkle_far1/twinkle_far1.ogg new file mode 100644 index 000000000..25d1aae0d Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/fireworks/twinkle_far1/twinkle_far1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/angry1/angry1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/angry1/angry1.ogg new file mode 100644 index 000000000..98159fc6f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/angry1/angry1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/armor/armor.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/armor/armor.ogg new file mode 100644 index 000000000..11645c54e Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/armor/armor.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/breathe1/breathe1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/breathe1/breathe1.ogg new file mode 100644 index 000000000..c4f2cc4d8 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/breathe1/breathe1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/breathe2/breathe2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/breathe2/breathe2.ogg new file mode 100644 index 000000000..a3bb8e50b Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/breathe2/breathe2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/breathe3/breathe3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/breathe3/breathe3.ogg new file mode 100644 index 000000000..a5d405b63 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/breathe3/breathe3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/death/death.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/death/death.ogg new file mode 100644 index 000000000..fa904e3cf Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/death/death.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/angry1/angry1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/angry1/angry1.ogg new file mode 100644 index 000000000..5a9fa8dff Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/angry1/angry1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/angry2/angry2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/angry2/angry2.ogg new file mode 100644 index 000000000..2e4f976ee Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/angry2/angry2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/death/death.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/death/death.ogg new file mode 100644 index 000000000..9e5f8fee5 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/death/death.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/hit1/hit1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/hit1/hit1.ogg new file mode 100644 index 000000000..717d5bac2 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/hit1/hit1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/hit2/hit2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/hit2/hit2.ogg new file mode 100644 index 000000000..cb1bbd5a5 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/hit2/hit2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/hit3/hit3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/hit3/hit3.ogg new file mode 100644 index 000000000..5c27bdd63 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/hit3/hit3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/idle1/idle1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/idle1/idle1.ogg new file mode 100644 index 000000000..f6e5dab58 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/idle1/idle1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/idle2/idle2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/idle2/idle2.ogg new file mode 100644 index 000000000..3d3e6abab Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/idle2/idle2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/idle3/idle3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/idle3/idle3.ogg new file mode 100644 index 000000000..ee1ba9efc Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/donkey/idle3/idle3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop1/gallop1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop1/gallop1.ogg new file mode 100644 index 000000000..77f1f86b8 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop1/gallop1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop2/gallop2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop2/gallop2.ogg new file mode 100644 index 000000000..c0c64751e Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop2/gallop2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop3/gallop3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop3/gallop3.ogg new file mode 100644 index 000000000..b3e4e79d0 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop3/gallop3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop4/gallop4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop4/gallop4.ogg new file mode 100644 index 000000000..d7391077a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/gallop4/gallop4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit1/hit1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit1/hit1.ogg new file mode 100644 index 000000000..cccdeb120 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit1/hit1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit2/hit2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit2/hit2.ogg new file mode 100644 index 000000000..aa319bebb Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit2/hit2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit3/hit3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit3/hit3.ogg new file mode 100644 index 000000000..e857ade3b Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit3/hit3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit4/hit4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit4/hit4.ogg new file mode 100644 index 000000000..bb7e31130 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/hit4/hit4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/idle1/idle1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/idle1/idle1.ogg new file mode 100644 index 000000000..3b493609b Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/idle1/idle1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/idle2/idle2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/idle2/idle2.ogg new file mode 100644 index 000000000..9df94673c Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/idle2/idle2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/idle3/idle3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/idle3/idle3.ogg new file mode 100644 index 000000000..829d01c7a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/idle3/idle3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/jump1/jump.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/jump1/jump.ogg new file mode 100644 index 000000000..20002aa21 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/jump1/jump.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/land/land.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/land/land.ogg new file mode 100644 index 000000000..886aecaf8 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/land/land.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/leather/leather.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/leather/leather.ogg new file mode 100644 index 000000000..ff8865151 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/leather/leather.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/death/death.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/death/death.ogg new file mode 100644 index 000000000..114eb6b2f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/death/death.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit1/hit1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit1/hit1.ogg new file mode 100644 index 000000000..9cd89d770 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit1/hit1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit2/hit2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit2/hit2.ogg new file mode 100644 index 000000000..f99508b0a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit2/hit2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit3/hit3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit3/hit3.ogg new file mode 100644 index 000000000..f876c0379 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit3/hit3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit4/hit4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit4/hit4.ogg new file mode 100644 index 000000000..accb0f23f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/hit4/hit4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/idle1/idle1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/idle1/idle1.ogg new file mode 100644 index 000000000..c2c2b2d0c Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/idle1/idle1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/idle2/idle2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/idle2/idle2.ogg new file mode 100644 index 000000000..f6f4c843a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/idle2/idle2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/idle3/idle3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/idle3/idle3.ogg new file mode 100644 index 000000000..f10b0c916 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/skeleton/idle3/idle3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft1/soft1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft1/soft1.ogg new file mode 100644 index 000000000..9476820c3 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft1/soft1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft2/soft2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft2/soft2.ogg new file mode 100644 index 000000000..f0f5f1c0e Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft2/soft2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft3/soft3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft3/soft3.ogg new file mode 100644 index 000000000..761b63253 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft3/soft3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft4/soft4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft4/soft4.ogg new file mode 100644 index 000000000..ba74fdd09 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft4/soft4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft5/soft5.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft5/soft5.ogg new file mode 100644 index 000000000..4fd34c20c Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft5/soft5.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft6/soft6.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft6/soft6.ogg new file mode 100644 index 000000000..962957f4c Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/soft6/soft6.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood1/wood1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood1/wood1.ogg new file mode 100644 index 000000000..082dadff7 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood1/wood1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood2/wood2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood2/wood2.ogg new file mode 100644 index 000000000..09dab91d6 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood2/wood2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood3/wood3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood3/wood3.ogg new file mode 100644 index 000000000..1f9c81d3b Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood3/wood3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood4/wood4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood4/wood4.ogg new file mode 100644 index 000000000..74f20315f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood4/wood4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood5/wood5.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood5/wood5.ogg new file mode 100644 index 000000000..f060cf9eb Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood5/wood5.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood6/wood6.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood6/wood6.ogg new file mode 100644 index 000000000..401cf177d Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/wood6/wood6.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/death/death.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/death/death.ogg new file mode 100644 index 000000000..3ef053154 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/death/death.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit1/hit1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit1/hit1.ogg new file mode 100644 index 000000000..2e72181ba Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit1/hit1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit2/hit2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit2/hit2.ogg new file mode 100644 index 000000000..7e566e77a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit2/hit2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit3/hit3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit3/hit3.ogg new file mode 100644 index 000000000..28e5d5b5a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit3/hit3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit4/hit4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit4/hit4.ogg new file mode 100644 index 000000000..eba8cf6bf Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/hit4/hit4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/idle1/idle1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/idle1/idle1.ogg new file mode 100644 index 000000000..a854c96fc Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/idle1/idle1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/idle2/idle2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/idle2/idle2.ogg new file mode 100644 index 000000000..25234567d Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/idle2/idle2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/idle3/idle3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/idle3/idle3.ogg new file mode 100644 index 000000000..5b8c02cfd Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/mob/horse/zombie/idle3/idle3.ogg differ diff --git a/Minecraft.Client/music/cds/11.ogg b/Minecraft.Client/music/cds/11.ogg index e8e1dbfa2..648c61fb1 100644 Binary files a/Minecraft.Client/music/cds/11.ogg and b/Minecraft.Client/music/cds/11.ogg differ diff --git a/Minecraft.Client/music/cds/13.ogg b/Minecraft.Client/music/cds/13.ogg index eb383bc37..f1c777c08 100644 Binary files a/Minecraft.Client/music/cds/13.ogg and b/Minecraft.Client/music/cds/13.ogg differ diff --git a/Minecraft.Client/music/cds/blocks.ogg b/Minecraft.Client/music/cds/blocks.ogg index 5c62fce2c..5cf78ab89 100644 Binary files a/Minecraft.Client/music/cds/blocks.ogg and b/Minecraft.Client/music/cds/blocks.ogg differ diff --git a/Minecraft.Client/music/cds/cat.ogg b/Minecraft.Client/music/cds/cat.ogg index 6bf5a8b5f..e68530e8f 100644 Binary files a/Minecraft.Client/music/cds/cat.ogg and b/Minecraft.Client/music/cds/cat.ogg differ diff --git a/Minecraft.Client/music/cds/chirp.ogg b/Minecraft.Client/music/cds/chirp.ogg index af15712c2..4fb4811fb 100644 Binary files a/Minecraft.Client/music/cds/chirp.ogg and b/Minecraft.Client/music/cds/chirp.ogg differ diff --git a/Minecraft.Client/music/cds/far.ogg b/Minecraft.Client/music/cds/far.ogg index 2b3c26c05..9b459e5da 100644 Binary files a/Minecraft.Client/music/cds/far.ogg and b/Minecraft.Client/music/cds/far.ogg differ diff --git a/Minecraft.Client/music/cds/mall.ogg b/Minecraft.Client/music/cds/mall.ogg index 45a854fb1..107fed4db 100644 Binary files a/Minecraft.Client/music/cds/mall.ogg and b/Minecraft.Client/music/cds/mall.ogg differ diff --git a/Minecraft.Client/music/cds/mellohi.ogg b/Minecraft.Client/music/cds/mellohi.ogg index 3c7b8cde2..76f39468e 100644 Binary files a/Minecraft.Client/music/cds/mellohi.ogg and b/Minecraft.Client/music/cds/mellohi.ogg differ diff --git a/Minecraft.Client/music/cds/stal.ogg b/Minecraft.Client/music/cds/stal.ogg index 84050c11f..9bc85c32a 100644 Binary files a/Minecraft.Client/music/cds/stal.ogg and b/Minecraft.Client/music/cds/stal.ogg differ diff --git a/Minecraft.Client/music/cds/strad.ogg b/Minecraft.Client/music/cds/strad.ogg index cce8af6eb..c13d6ab73 100644 Binary files a/Minecraft.Client/music/cds/strad.ogg and b/Minecraft.Client/music/cds/strad.ogg differ diff --git a/Minecraft.Client/music/cds/ward.ogg b/Minecraft.Client/music/cds/ward.ogg index c40d2115f..c1ada8156 100644 Binary files a/Minecraft.Client/music/cds/ward.ogg and b/Minecraft.Client/music/cds/ward.ogg differ diff --git a/Minecraft.Client/music/cds/where_are_we_now.ogg b/Minecraft.Client/music/cds/where_are_we_now.ogg index 7cb96e80c..7fd8ed123 100644 Binary files a/Minecraft.Client/music/cds/where_are_we_now.ogg and b/Minecraft.Client/music/cds/where_are_we_now.ogg differ diff --git a/Minecraft.Client/music/music/calm1.ogg b/Minecraft.Client/music/music/calm1.ogg index f6e0d16f3..e76b31784 100644 Binary files a/Minecraft.Client/music/music/calm1.ogg and b/Minecraft.Client/music/music/calm1.ogg differ diff --git a/Minecraft.Client/music/music/calm2.ogg b/Minecraft.Client/music/music/calm2.ogg index 3eb60c97f..b02df7b9b 100644 Binary files a/Minecraft.Client/music/music/calm2.ogg and b/Minecraft.Client/music/music/calm2.ogg differ diff --git a/Minecraft.Client/music/music/calm3.ogg b/Minecraft.Client/music/music/calm3.ogg index 56e2b66b9..a4cfafed0 100644 Binary files a/Minecraft.Client/music/music/calm3.ogg and b/Minecraft.Client/music/music/calm3.ogg differ diff --git a/Minecraft.Client/music/music/creative1.ogg b/Minecraft.Client/music/music/creative1.ogg index 24fc41cc6..ad13028d9 100644 Binary files a/Minecraft.Client/music/music/creative1.ogg and b/Minecraft.Client/music/music/creative1.ogg differ diff --git a/Minecraft.Client/music/music/creative2.ogg b/Minecraft.Client/music/music/creative2.ogg index f1169a553..d95505495 100644 Binary files a/Minecraft.Client/music/music/creative2.ogg and b/Minecraft.Client/music/music/creative2.ogg differ diff --git a/Minecraft.Client/music/music/creative3.ogg b/Minecraft.Client/music/music/creative3.ogg index 1e49f010c..0a5b49a3f 100644 Binary files a/Minecraft.Client/music/music/creative3.ogg and b/Minecraft.Client/music/music/creative3.ogg differ diff --git a/Minecraft.Client/music/music/creative4.ogg b/Minecraft.Client/music/music/creative4.ogg index c4a0a785d..011d18e20 100644 Binary files a/Minecraft.Client/music/music/creative4.ogg and b/Minecraft.Client/music/music/creative4.ogg differ diff --git a/Minecraft.Client/music/music/creative5.ogg b/Minecraft.Client/music/music/creative5.ogg index 0ef72b86a..8ee980ee0 100644 Binary files a/Minecraft.Client/music/music/creative5.ogg and b/Minecraft.Client/music/music/creative5.ogg differ diff --git a/Minecraft.Client/music/music/creative6.ogg b/Minecraft.Client/music/music/creative6.ogg index 1be7955bf..b3a723031 100644 Binary files a/Minecraft.Client/music/music/creative6.ogg and b/Minecraft.Client/music/music/creative6.ogg differ diff --git a/Minecraft.Client/music/music/hal1.ogg b/Minecraft.Client/music/music/hal1.ogg index de3c9e8d4..bcbe583a4 100644 Binary files a/Minecraft.Client/music/music/hal1.ogg and b/Minecraft.Client/music/music/hal1.ogg differ diff --git a/Minecraft.Client/music/music/hal2.ogg b/Minecraft.Client/music/music/hal2.ogg index e292af914..3ea6b6f60 100644 Binary files a/Minecraft.Client/music/music/hal2.ogg and b/Minecraft.Client/music/music/hal2.ogg differ diff --git a/Minecraft.Client/music/music/hal3.ogg b/Minecraft.Client/music/music/hal3.ogg index 083d783cc..6f8984f77 100644 Binary files a/Minecraft.Client/music/music/hal3.ogg and b/Minecraft.Client/music/music/hal3.ogg differ diff --git a/Minecraft.Client/music/music/hal4.ogg b/Minecraft.Client/music/music/hal4.ogg index 2b24cfff1..e3f8dbf19 100644 Binary files a/Minecraft.Client/music/music/hal4.ogg and b/Minecraft.Client/music/music/hal4.ogg differ diff --git a/Minecraft.Client/music/music/menu1.ogg b/Minecraft.Client/music/music/menu1.ogg index 1be3dfae2..c3119cdfd 100644 Binary files a/Minecraft.Client/music/music/menu1.ogg and b/Minecraft.Client/music/music/menu1.ogg differ diff --git a/Minecraft.Client/music/music/menu2.ogg b/Minecraft.Client/music/music/menu2.ogg index de9a8fe8f..da1755539 100644 Binary files a/Minecraft.Client/music/music/menu2.ogg and b/Minecraft.Client/music/music/menu2.ogg differ diff --git a/Minecraft.Client/music/music/menu3.ogg b/Minecraft.Client/music/music/menu3.ogg index f1904bfa0..de4b55162 100644 Binary files a/Minecraft.Client/music/music/menu3.ogg and b/Minecraft.Client/music/music/menu3.ogg differ diff --git a/Minecraft.Client/music/music/menu4.ogg b/Minecraft.Client/music/music/menu4.ogg index f50e86ee4..4af5d8900 100644 Binary files a/Minecraft.Client/music/music/menu4.ogg and b/Minecraft.Client/music/music/menu4.ogg differ diff --git a/Minecraft.Client/music/music/nether1.ogg b/Minecraft.Client/music/music/nether1.ogg index 0dbc2197e..1d2ce5e78 100644 Binary files a/Minecraft.Client/music/music/nether1.ogg and b/Minecraft.Client/music/music/nether1.ogg differ diff --git a/Minecraft.Client/music/music/nether2.ogg b/Minecraft.Client/music/music/nether2.ogg index af8634a37..43ff8ed2b 100644 Binary files a/Minecraft.Client/music/music/nether2.ogg and b/Minecraft.Client/music/music/nether2.ogg differ diff --git a/Minecraft.Client/music/music/nether3.ogg b/Minecraft.Client/music/music/nether3.ogg index 6a220b0f5..36aaa29b3 100644 Binary files a/Minecraft.Client/music/music/nether3.ogg and b/Minecraft.Client/music/music/nether3.ogg differ diff --git a/Minecraft.Client/music/music/nether4.ogg b/Minecraft.Client/music/music/nether4.ogg index d70a32545..08eb131f1 100644 Binary files a/Minecraft.Client/music/music/nether4.ogg and b/Minecraft.Client/music/music/nether4.ogg differ diff --git a/Minecraft.Client/music/music/nuance1.ogg b/Minecraft.Client/music/music/nuance1.ogg index 029e96a36..853e8905d 100644 Binary files a/Minecraft.Client/music/music/nuance1.ogg and b/Minecraft.Client/music/music/nuance1.ogg differ diff --git a/Minecraft.Client/music/music/nuance2.ogg b/Minecraft.Client/music/music/nuance2.ogg index 04b196673..d4942a188 100644 Binary files a/Minecraft.Client/music/music/nuance2.ogg and b/Minecraft.Client/music/music/nuance2.ogg differ diff --git a/Minecraft.Client/music/music/piano1.ogg b/Minecraft.Client/music/music/piano1.ogg index 937f7a520..4c7254959 100644 Binary files a/Minecraft.Client/music/music/piano1.ogg and b/Minecraft.Client/music/music/piano1.ogg differ diff --git a/Minecraft.Client/music/music/piano2.ogg b/Minecraft.Client/music/music/piano2.ogg index 990e54f19..ce138e726 100644 Binary files a/Minecraft.Client/music/music/piano2.ogg and b/Minecraft.Client/music/music/piano2.ogg differ diff --git a/Minecraft.Client/music/music/piano3.ogg b/Minecraft.Client/music/music/piano3.ogg index e7a95504e..0b919924b 100644 Binary files a/Minecraft.Client/music/music/piano3.ogg and b/Minecraft.Client/music/music/piano3.ogg differ diff --git a/Minecraft.Client/music/music/the_end_end.ogg b/Minecraft.Client/music/music/the_end_end.ogg index 7d9b91d25..6ef6cd3a9 100644 Binary files a/Minecraft.Client/music/music/the_end_end.ogg and b/Minecraft.Client/music/music/the_end_end.ogg differ diff --git a/Minecraft.World/Boat.cpp b/Minecraft.World/Boat.cpp index 1811c2094..e33875817 100644 --- a/Minecraft.World/Boat.cpp +++ b/Minecraft.World/Boat.cpp @@ -74,7 +74,7 @@ bool Boat::isPushable() Boat::Boat(Level *level, double x, double y, double z) : Entity( level ) { _init(); - setPos(x, y + heightOffset, z); + setPos(x, y + heightOffset + 0.1, z); xd = 0; yd = 0; @@ -209,30 +209,9 @@ void Boat::tick() } double lastSpeed = sqrt(xd * xd + zd * zd); - if (lastSpeed > MAX_COLLISION_SPEED) + if (lastSpeed > MAX_COLLISION_SPEED && waterPercentage > 1) { - double xa = cos(yRot * PI / 180); - double za = sin(yRot * PI / 180); - - for (int i = 0; i < 1 + lastSpeed * 60; i++) - { - - double side = (random->nextFloat() * 2 - 1); - - double side2 = (random->nextInt(2) * 2 - 1) * 0.7; - if (random->nextBoolean()) - { - double xx = x - xa * side * 0.8 + za * side2; - double zz = z - za * side * 0.8 - xa * side2; - level->addParticle(eParticleType_splash, xx, y - 2 / 16.0f, zz, +xd, yd, +zd); - } - else - { - double xx = x + xa + za * side * 0.7; - double zz = z + za - xa * side * 0.7; - level->addParticle(eParticleType_splash, xx, y - 2 / 16.0f, zz, +xd, yd, +zd); - } - } + createSplash(lastSpeed); } if (level->isClientSide && doLerp) @@ -254,7 +233,6 @@ void Boat::tick() } else { -#if 1 // Original //double xt = x + xd; //double yt = y + yd; @@ -273,51 +251,23 @@ void Boat::tick() xd *= 0.99f; yd *= 0.95f; zd *= 0.99f; -#else - // 4J Stu - Fix for #8280 - Gameplay : Boats behave erratically when exited next to land. - // The client shouldn't change the position of the boat - double xt = x;// + xd; - double yt = y + yd; - double zt = z;// + zd; - this->setPos(xt, yt, zt); - - // 4J Stu - Fix for #9579 - GAMEPLAY: Boats with a player in them slowly sink under the water over time, and with no player in them they float into the sky. - // Just make the boats bob up and down rather than any other client-side movement when not receiving packets from server - if (waterPercentage > 0) - { - double bob = waterPercentage * 2 - 1; - yd += 0.04f * bob; - } - else - { - if (yd < 0) yd /= 2; - yd += 0.007f; - } - //if (onGround) - //{ - xd *= 0.5f; - yd *= 0.5f; - zd *= 0.5f; - //} - //xd *= 0.99f; - //yd *= 0.95f; - //zd *= 0.99f; -#endif } return; } + // Bob on water if (waterPercentage > 0) { double bob = waterPercentage * 2 - 1; yd += 0.04f * bob; } - else - { - yd = 0; + + // Reimplement "gravity" + if (level->getTile(x, Mth::floor(y - 0.15), z) == 0 && !onGround) { + yd += 0.04f * -1.0; // -1.0 is what bob should return in this situation, just hardcoded. } - + // Rider Controls if ( rider.lock() != NULL && rider.lock()->instanceof(eTYPE_LIVINGENTITY) ) { shared_ptr livingRider = dynamic_pointer_cast(rider.lock()); @@ -334,6 +284,7 @@ void Boat::tick() double curSpeed = sqrt(xd * xd + zd * zd); + // Speed Clamp if (curSpeed > MAX_SPEED) { double ratio = MAX_SPEED / curSpeed; @@ -354,14 +305,15 @@ void Boat::tick() if (acceleration < MIN_ACCELERATION) acceleration = MIN_ACCELERATION; } + // Slow speed on ground if (onGround) { xd *= 0.5f; - yd *= 0.5f; zd *= 0.5f; } move(xd, yd, zd); + // Break boat if ((horizontalCollision && lastSpeed > 0.20)) { if (!level->isClientSide && !removed) @@ -401,6 +353,7 @@ void Boat::tick() yRot += (float) rotDiff; setRot(yRot, xRot); + // Server only code below if(level->isClientSide) return; vector > *entities = level->getEntities(shared_from_this(), bb->grow(0.2f, 0, 0.2f)); @@ -444,13 +397,37 @@ void Boat::tick() } } +void Boat::createSplash(double particleStrengh) { + double xa = cos(yRot * PI / 180); + double za = sin(yRot * PI / 180); + + for (int i = 0; i < 1 + particleStrengh * 60; i++) + { + double side = (random->nextFloat() * 2 - 1); + + double side2 = (random->nextInt(2) * 2 - 1) * 0.7; + if (random->nextBoolean()) + { + double xx = x - xa * side * 0.8 + za * side2; + double zz = z - za * side * 0.8 - xa * side2; + level->addParticle(eParticleType_splash, xx, y - 2 / 16.0f, zz, +xd, yd, +zd); + } + else + { + double xx = x + xa + za * side * 0.7; + double zz = z + za - xa * side * 0.7; + level->addParticle(eParticleType_splash, xx, y - 2 / 16.0f, zz, +xd, yd, +zd); + } + } +} + void Boat::positionRider() { if (rider.lock() == NULL) return; double xa = cos(yRot * PI / 180) * 0.4; double za = sin(yRot * PI / 180) * 0.4; - rider.lock()->setPos(x + xa, y + getRideHeight() + rider.lock()->getRidingHeight(), z + za); + rider.lock()->setPos(x + xa, y + getRideHeight() + rider.lock()->getRidingHeight()-0.5, z + za); } diff --git a/Minecraft.World/Boat.h b/Minecraft.World/Boat.h index 7e79ef2da..5e28be2d4 100644 --- a/Minecraft.World/Boat.h +++ b/Minecraft.World/Boat.h @@ -60,6 +60,7 @@ public: virtual void lerpTo(double x, double y, double z, float yRot, float xRot, int steps); virtual void lerpMotion(double xd, double yd, double zd); virtual void tick(); + void createSplash(double particleStrengh); virtual void positionRider(); protected: diff --git a/Minecraft.World/Inventory.cpp b/Minecraft.World/Inventory.cpp index 1b9ff630b..4a524bab8 100644 --- a/Minecraft.World/Inventory.cpp +++ b/Minecraft.World/Inventory.cpp @@ -343,6 +343,18 @@ bool Inventory::hasResource(int type) return true; } +int Inventory::countResource(int type, int auxVal) +{ + int count = 0; + for (unsigned int i = 0; i < items.length; i++) + { + if (items[i] != NULL && items[i]->id == type && + (auxVal == -1 || items[i]->getAuxValue() == auxVal)) + count += items[i]->count; + } + return count; +} + void Inventory::swapSlots(int from, int to) { shared_ptr tmp = items[to]; diff --git a/Minecraft.World/Inventory.h b/Minecraft.World/Inventory.h index db5f42d60..539b9f493 100644 --- a/Minecraft.World/Inventory.h +++ b/Minecraft.World/Inventory.h @@ -68,6 +68,7 @@ public: shared_ptr getResourceItem(int type,int iAuxVal); bool hasResource(int type); + int countResource(int type, int auxVal); void swapSlots(int from, int to); bool add(shared_ptr item); shared_ptr removeItem(unsigned int slot, int count); diff --git a/Minecraft.World/Recipes.cpp b/Minecraft.World/Recipes.cpp index 8dcbafdf6..ef2cd7fde 100644 --- a/Minecraft.World/Recipes.cpp +++ b/Minecraft.World/Recipes.cpp @@ -236,7 +236,7 @@ Recipes::Recipes() L"## ", // L"###", // - L'#', Tile::cobblestone, + L'#', Tile::stoneBrick, L'S'); addShapedRecipy(new ItemInstance(Tile::stairs_netherBricks, 4), // diff --git a/Minecraft.World/x64headers/extraX64.h b/Minecraft.World/x64headers/extraX64.h index b89998ace..fa6ee0f99 100644 --- a/Minecraft.World/x64headers/extraX64.h +++ b/Minecraft.World/x64headers/extraX64.h @@ -219,6 +219,7 @@ public: BYTE m_smallId; bool m_isRemote; bool m_isHostPlayer; + PlayerUID m_resolvedXuid; wchar_t m_gamertag[32]; private: ULONG_PTR m_customData;