This commit is contained in:
troglodyte9 2026-03-13 18:00:47 +02:00
parent 078b9516b3
commit 7ef87ea493
6 changed files with 26 additions and 15 deletions

View file

@ -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])
{

View file

@ -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)

View file

@ -189,7 +189,8 @@ bool Ocelot::mobInteract(shared_ptr<Player> player)
shared_ptr<ItemInstance> 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> 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);
}
}

View file

@ -204,7 +204,8 @@ bool Ozelot::interact(shared_ptr<Player> player)
shared_ptr<ItemInstance> 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> 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);
}
}

View file

@ -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
}

View file

@ -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> player)
@ -381,7 +381,8 @@ bool Wolf::mobInteract(shared_ptr<Player> 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> player)
}
else
{
spawnTamingParticles(false);
// broadcastEntityEvent triggers handleEntityEvent which spawns smoke
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_FAILED);
}
}