From 45591cbe7bef4c54c241a286ece07bc4ade4489e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 15 Mar 2021 02:28:18 +0000 Subject: Properly deprecate more XYZ parameter'd functions (#5147) * Fixes #5144 --- src/Mobs/Sheep.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Mobs/Sheep.cpp') diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp index e208420db..0a3f68e96 100644 --- a/src/Mobs/Sheep.cpp +++ b/src/Mobs/Sheep.cpp @@ -113,11 +113,11 @@ void cSheep::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) if (m_TimeToStopEating == 0) { - if (m_World->GetBlock(PosX, PosY, PosZ) == E_BLOCK_GRASS) // Make sure grass hasn't been destroyed in the meantime + if (m_World->GetBlock({ PosX, PosY, PosZ }) == E_BLOCK_GRASS) // Make sure grass hasn't been destroyed in the meantime { // The sheep ate the grass so we change it to dirt - m_World->SetBlock(PosX, PosY, PosZ, E_BLOCK_DIRT, 0); - GetWorld()->BroadcastSoundParticleEffect(EffectID::PARTICLE_BLOCK_BREAK, {PosX, PosY, PosZ}, E_BLOCK_GRASS); + m_World->SetBlock({ PosX, PosY, PosZ }, E_BLOCK_DIRT, 0); + GetWorld()->BroadcastSoundParticleEffect(EffectID::PARTICLE_BLOCK_BREAK, { PosX, PosY, PosZ }, E_BLOCK_GRASS); m_IsSheared = false; m_World->BroadcastEntityMetadata(*this); } @@ -127,7 +127,7 @@ void cSheep::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { if (GetRandomProvider().RandBool(1.0 / 600.0)) { - if (m_World->GetBlock(PosX, PosY, PosZ) == E_BLOCK_GRASS) + if (m_World->GetBlock({ PosX, PosY, PosZ }) == E_BLOCK_GRASS) { m_World->BroadcastEntityStatus(*this, esSheepEating); m_TimeToStopEating = 40; -- cgit v1.2.3