mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
yes
This commit is contained in:
parent
078b9516b3
commit
7ef87ea493
|
|
@ -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 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( 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;
|
bool allowed = true;
|
||||||
for(auto& constraint : constraints[m_CurrentState])
|
for(auto& constraint : constraints[m_CurrentState])
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1656,11 +1656,10 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||||
const Win64LaunchOptions launchOptions = ParseLaunchOptions();
|
const Win64LaunchOptions launchOptions = ParseLaunchOptions();
|
||||||
ApplyScreenMode(launchOptions.screenMode);
|
ApplyScreenMode(launchOptions.screenMode);
|
||||||
|
|
||||||
// Ensure uid.dat exists from startup in client mode (before any multiplayer/login path).
|
// Ensure uid.dat exists from startup (client and headless server).
|
||||||
if (!launchOptions.serverMode)
|
// 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();
|
Win64Xuid::ResolvePersistentXuid();
|
||||||
}
|
|
||||||
|
|
||||||
// If no username, let's fall back
|
// If no username, let's fall back
|
||||||
if (g_Win64Username[0] == 0)
|
if (g_Win64Username[0] == 0)
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,8 @@ bool Ocelot::mobInteract(shared_ptr<Player> player)
|
||||||
shared_ptr<ItemInstance> item = player->inventory->getSelected();
|
shared_ptr<ItemInstance> item = player->inventory->getSelected();
|
||||||
if (isTame())
|
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))
|
if (!level->isClientSide && !isFood(item))
|
||||||
{
|
{
|
||||||
|
|
@ -219,13 +220,12 @@ bool Ocelot::mobInteract(shared_ptr<Player> player)
|
||||||
|
|
||||||
setCatType(1 + level->random->nextInt(3));
|
setCatType(1 + level->random->nextInt(3));
|
||||||
setOwnerUUID(player->getUUID());
|
setOwnerUUID(player->getUUID());
|
||||||
spawnTamingParticles(true);
|
|
||||||
sitGoal->wantToSit(true);
|
sitGoal->wantToSit(true);
|
||||||
|
// broadcast triggers handleEntityEvent which spawns particles
|
||||||
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_SUCCEEDED);
|
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_SUCCEEDED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spawnTamingParticles(false);
|
|
||||||
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_FAILED);
|
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_FAILED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,8 @@ bool Ozelot::interact(shared_ptr<Player> player)
|
||||||
shared_ptr<ItemInstance> item = player->inventory->getSelected();
|
shared_ptr<ItemInstance> item = player->inventory->getSelected();
|
||||||
if (isTame())
|
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))
|
if (!level->isClientSide && !isFood(item))
|
||||||
{
|
{
|
||||||
|
|
@ -234,13 +235,12 @@ bool Ozelot::interact(shared_ptr<Player> player)
|
||||||
|
|
||||||
setCatType(1 + level->random->nextInt(3));
|
setCatType(1 + level->random->nextInt(3));
|
||||||
setOwnerUUID(player->getUUID());
|
setOwnerUUID(player->getUUID());
|
||||||
spawnTamingParticles(true);
|
|
||||||
sitGoal->wantToSit(true);
|
sitGoal->wantToSit(true);
|
||||||
|
// broadcast triggers handleEntityEvent which spawns particles
|
||||||
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_SUCCEEDED);
|
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_SUCCEEDED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spawnTamingParticles(false);
|
|
||||||
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_FAILED);
|
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_FAILED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -767,6 +767,11 @@ void Player::setXuid(PlayerUID xuid)
|
||||||
// This should just be a string version of the xuid
|
// This should just be a string version of the xuid
|
||||||
|
|
||||||
setUUID( xuid.toString() );
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -334,8 +334,8 @@ void Wolf::tame(const wstring &wsOwnerUUID, bool bDisplayTamingParticles, bool b
|
||||||
|
|
||||||
setOwnerUUID(wsOwnerUUID);
|
setOwnerUUID(wsOwnerUUID);
|
||||||
|
|
||||||
// We'll not show the taming particles if this is a baby wolf
|
// Don't spawn particles here - TAMING_SUCCEEDED/FAILED broadcast triggers handleEntityEvent which spawns them.
|
||||||
spawnTamingParticles(bDisplayTamingParticles);
|
// That avoids double-spawning. Baby wolf taming (bDisplayTamingParticles=false) has no broadcast, so no particles - correct.
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Wolf::mobInteract(shared_ptr<Player> player)
|
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))
|
if (!level->isClientSide && !isFood(item))
|
||||||
{
|
{
|
||||||
|
|
@ -421,7 +422,7 @@ bool Wolf::mobInteract(shared_ptr<Player> player)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spawnTamingParticles(false);
|
// broadcastEntityEvent triggers handleEntityEvent which spawns smoke
|
||||||
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_FAILED);
|
level->broadcastEntityEvent(shared_from_this(), EntityEvent::TAMING_FAILED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue