summaryrefslogtreecommitdiffstats
path: root/src/Simulator/FireSimulator.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-10-16 10:06:34 +0200
committerGitHub <noreply@github.com>2019-10-16 10:06:34 +0200
commit221cc4ec5cb6301743e947eaabed3fecedba796f (patch)
tree4e44c8bb7523e5d1d04468fc906ae24674c10abc /src/Simulator/FireSimulator.cpp
parentFixed crash in hopper while pulling items from blockentity above itself (#4412) (diff)
downloadcuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.gz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.bz2
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.lz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.xz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.zst
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.zip
Diffstat (limited to 'src/Simulator/FireSimulator.cpp')
-rw-r--r--src/Simulator/FireSimulator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Simulator/FireSimulator.cpp b/src/Simulator/FireSimulator.cpp
index 9a00d00a8..7862ed335 100644
--- a/src/Simulator/FireSimulator.cpp
+++ b/src/Simulator/FireSimulator.cpp
@@ -129,7 +129,7 @@ void cFireSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX,
// Randomly burn out the fire if it is raining:
if (!BurnsForever && Raining && GetRandomProvider().RandBool(CHANCE_BASE_RAIN_EXTINGUISH + (BlockMeta * CHANCE_AGE_M_RAIN_EXTINGUISH)))
{
- a_Chunk->SetBlock(x, y, z, E_BLOCK_AIR, 0);
+ a_Chunk->SetBlock({x, y, z}, E_BLOCK_AIR, 0);
itr = Data.erase(itr);
continue;
}
@@ -157,7 +157,7 @@ void cFireSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX,
FIRE_FLOG("FS: Fire at {0} burnt out, removing the fire block",
a_Chunk->PositionToWorldPosition({itr->x, itr->y, itr->z})
);
- a_Chunk->SetBlock(x, y, z, E_BLOCK_AIR, 0);
+ a_Chunk->SetBlock({x, y, z}, E_BLOCK_AIR, 0);
RemoveFuelNeighbors(a_Chunk, x, y, z);
itr = Data.erase(itr);
continue;
@@ -314,7 +314,7 @@ int cFireSimulator::GetBurnStepTime(cChunk * a_Chunk, int a_RelX, int a_RelY, in
// Checked through everything, nothing was flammable
// If block below isn't solid, we can't have fire, it would be a non-fueled fire
// SetBlock just to make sure fire doesn't spawn
- a_Chunk->SetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_AIR, 0);
+ a_Chunk->SetBlock({a_RelX, a_RelY, a_RelZ}, E_BLOCK_AIR, 0);
return 0;
}
return static_cast<int>(m_BurnStepTimeNonfuel);
@@ -403,18 +403,18 @@ void cFireSimulator::RemoveFuelNeighbors(cChunk * a_Chunk, int a_RelX, int a_Rel
if (BlockType == E_BLOCK_TNT)
{
m_World.SpawnPrimedTNT({static_cast<double>(AbsX), static_cast<double>(Y), static_cast<double>(AbsZ)}, 0);
- Neighbour->SetBlock(X, Y, Z, E_BLOCK_AIR, 0);
+ Neighbour->SetBlock({X, Y, Z}, E_BLOCK_AIR, 0);
return;
}
bool ShouldReplaceFuel = (GetRandomProvider().RandBool(m_ReplaceFuelChance * (1.0 / MAX_CHANCE_REPLACE_FUEL)));
if (ShouldReplaceFuel && !cRoot::Get()->GetPluginManager()->CallHookBlockSpread(m_World, AbsX, Y, AbsZ, ssFireSpread))
{
- Neighbour->SetBlock(X, Y, Z, E_BLOCK_FIRE, 0);
+ Neighbour->SetBlock({X, Y, Z}, E_BLOCK_FIRE, 0);
}
else
{
- Neighbour->SetBlock(X, Y, Z, E_BLOCK_AIR, 0);
+ Neighbour->SetBlock({X, Y, Z}, E_BLOCK_AIR, 0);
}
} // for i - Coords[]
}