From 7ef87ea49368680ec60398d4f9e80040ae25bd76 Mon Sep 17 00:00:00 2001 From: troglodyte9 <122689783+troglodyte9@users.noreply.github.com> Date: Fri, 13 Mar 2026 18:00:47 +0200 Subject: [PATCH] yes --- Minecraft.Client/Common/Tutorial/Tutorial.cpp | 6 ++++++ Minecraft.Client/Windows64/Windows64_Minecraft.cpp | 9 ++++----- Minecraft.World/Ocelot.cpp | 6 +++--- Minecraft.World/Ozelot.cpp | 6 +++--- Minecraft.World/Player.cpp | 5 +++++ Minecraft.World/Wolf.cpp | 9 +++++---- 6 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Minecraft.Client/Common/Tutorial/Tutorial.cpp b/Minecraft.Client/Common/Tutorial/Tutorial.cpp index c985ef491..bf6dd7278 100644 --- a/Minecraft.Client/Common/Tutorial/Tutorial.cpp +++ b/Minecraft.Client/Common/Tutorial/Tutorial.cpp @@ -2109,6 +2109,12 @@ bool Tutorial::isInputAllowed(int mapping) // If the player is under water then allow all keypresses so they can jump out if( Minecraft::GetInstance()->localplayers[m_iPad]->isUnderLiquid(Material::water) ) return true; + // If we're in a riding state but the player has dismounted, allow all input (covers race where + // ride(nullptr) hasn't fired changeTutorialState yet, or alternate dismount paths). + if( (m_CurrentState == e_Tutorial_State_Riding_Minecart || m_CurrentState == e_Tutorial_State_Riding_Boat) && + Minecraft::GetInstance()->localplayers[m_iPad]->riding == nullptr ) + return true; + bool allowed = true; for(auto& constraint : constraints[m_CurrentState]) { diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index 3934a022b..7f68642b7 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -1656,11 +1656,10 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, const 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(); - } + // Ensure uid.dat exists from startup (client and headless server). + // Clients need it for their identity; headless server needs it so any XUID-dependent + // code (e.g. fake host, profile stubs) has a valid persistent ID. + Win64Xuid::ResolvePersistentXuid(); // If no username, let's fall back if (g_Win64Username[0] == 0) diff --git a/Minecraft.World/Ocelot.cpp b/Minecraft.World/Ocelot.cpp index 75c6e0f07..c6a27fb47 100644 --- a/Minecraft.World/Ocelot.cpp +++ b/Minecraft.World/Ocelot.cpp @@ -189,7 +189,8 @@ bool Ocelot::mobInteract(shared_ptr player) shared_ptr item = player->inventory->getSelected(); if (isTame()) { - if (equalsIgnoreCase(player->getUUID(), getOwnerUUID())) + // Windows64: owner may be stored as name (legacy) or xuid string; check both for compatibility + if (equalsIgnoreCase(player->getUUID(), getOwnerUUID()) || equalsIgnoreCase(player->getName(), getOwnerUUID())) { if (!level->isClientSide && !isFood(item)) { @@ -219,13 +220,12 @@ bool Ocelot::mobInteract(shared_ptr player) setCatType(1 + level->random->nextInt(3)); setOwnerUUID(player->getUUID()); - spawnTamingParticles(true); sitGoal->wantToSit(true); + // broadcast triggers handleEntityEvent which spawns particles level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_SUCCEEDED); } else { - spawnTamingParticles(false); level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_FAILED); } } diff --git a/Minecraft.World/Ozelot.cpp b/Minecraft.World/Ozelot.cpp index 3c05f3578..4f5c02abb 100644 --- a/Minecraft.World/Ozelot.cpp +++ b/Minecraft.World/Ozelot.cpp @@ -204,7 +204,8 @@ bool Ozelot::interact(shared_ptr player) shared_ptr item = player->inventory->getSelected(); if (isTame()) { - if (equalsIgnoreCase(player->getUUID(), getOwnerUUID())) + // Windows64: owner may be stored as name (legacy) or xuid string; check both for compatibility + if (equalsIgnoreCase(player->getUUID(), getOwnerUUID()) || equalsIgnoreCase(player->getName(), getOwnerUUID())) { if (!level->isClientSide && !isFood(item)) { @@ -234,13 +235,12 @@ bool Ozelot::interact(shared_ptr player) setCatType(1 + level->random->nextInt(3)); setOwnerUUID(player->getUUID()); - spawnTamingParticles(true); sitGoal->wantToSit(true); + // broadcast triggers handleEntityEvent which spawns particles level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_SUCCEEDED); } else { - spawnTamingParticles(false); level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_FAILED); } } diff --git a/Minecraft.World/Player.cpp b/Minecraft.World/Player.cpp index 00c7148e4..f190bc79a 100644 --- a/Minecraft.World/Player.cpp +++ b/Minecraft.World/Player.cpp @@ -767,6 +767,11 @@ void Player::setXuid(PlayerUID xuid) // This should just be a string version of the xuid setUUID( xuid.toString() ); +#elif defined _WINDOWS64 + // Windows64: PlayerUID is ULONGLONG - convert to hex string for wolf/ocelot ownership + wchar_t buf[24]; + swprintf_s(buf, 24, L"%016llX", (unsigned long long)xuid); + setUUID(wstring(buf)); #endif } diff --git a/Minecraft.World/Wolf.cpp b/Minecraft.World/Wolf.cpp index 7588a67b0..1f3108498 100644 --- a/Minecraft.World/Wolf.cpp +++ b/Minecraft.World/Wolf.cpp @@ -334,8 +334,8 @@ void Wolf::tame(const wstring &wsOwnerUUID, bool bDisplayTamingParticles, bool b setOwnerUUID(wsOwnerUUID); - // We'll not show the taming particles if this is a baby wolf - spawnTamingParticles(bDisplayTamingParticles); + // Don't spawn particles here - TAMING_SUCCEEDED/FAILED broadcast triggers handleEntityEvent which spawns them. + // That avoids double-spawning. Baby wolf taming (bDisplayTamingParticles=false) has no broadcast, so no particles - correct. } bool Wolf::mobInteract(shared_ptr player) @@ -381,7 +381,8 @@ bool Wolf::mobInteract(shared_ptr player) } } } - if (equalsIgnoreCase(player->getUUID(), getOwnerUUID())) + // Windows64: owner may be stored as name (legacy) or xuid string; check both for compatibility + if (equalsIgnoreCase(player->getUUID(), getOwnerUUID()) || equalsIgnoreCase(player->getName(), getOwnerUUID())) { if (!level->isClientSide && !isFood(item)) { @@ -421,7 +422,7 @@ bool Wolf::mobInteract(shared_ptr player) } else { - spawnTamingParticles(false); + // broadcastEntityEvent triggers handleEntityEvent which spawns smoke level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_FAILED); } }