Add a formatting function for Vector3 (#4282)
* Vector3: Add custom fmt compatible formatter. * cLuaState: Add fmt version of ApiParamError * Use vector formatting in manual bindings * Always log vectors with FLOG
This commit is contained in:
committed by
Alexander Harkness
parent
73689024f0
commit
4727ed2084
@@ -638,7 +638,7 @@ void cChunk::SpawnMobs(cMobSpawner & a_MobSpawner)
|
||||
double ActualX = WorldX + 0.5;
|
||||
double ActualZ = WorldZ + 0.5;
|
||||
newMob->SetPosition(ActualX, WorldY, ActualZ);
|
||||
LOGD("Spawning %s #%i at {%d, %d, %d}", newMob->GetClass(), newMob->GetUniqueID(), WorldX, WorldY, WorldZ);
|
||||
FLOGD("Spawning {0} #{1} at {2}", newMob->GetClass(), newMob->GetUniqueID(), Vector3i{WorldX, WorldY, WorldZ});
|
||||
NumberOfSuccess++;
|
||||
} // while (retry)
|
||||
}
|
||||
@@ -1056,11 +1056,11 @@ bool cChunk::GrowMelonPumpkin(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_Bl
|
||||
{
|
||||
// Place a randomly-facing produce:
|
||||
NIBBLETYPE Meta = (ProduceType == E_BLOCK_MELON) ? 0 : static_cast<NIBBLETYPE>(Random.RandInt(4) % 4);
|
||||
LOGD("Growing melon / pumpkin at {%d, %d, %d} (<%d, %d> from stem), overwriting %s, growing on top of %s, meta %d",
|
||||
a_RelX + x + m_PosX * cChunkDef::Width, a_RelY, a_RelZ + z + m_PosZ * cChunkDef::Width,
|
||||
FLOGD("Growing melon / pumpkin at {0} (<{1}, {2}> from stem), overwriting {3}, growing on top of {4}, meta {5}",
|
||||
PositionToWorldPosition(a_RelX + x, a_RelY, a_RelZ + z),
|
||||
x, z,
|
||||
ItemTypeToString(BlockType[CheckType]).c_str(),
|
||||
ItemTypeToString(Soil).c_str(),
|
||||
ItemTypeToString(BlockType[CheckType]),
|
||||
ItemTypeToString(Soil),
|
||||
Meta
|
||||
);
|
||||
VERIFY(UnboundedRelFastSetBlock(a_RelX + x, a_RelY, a_RelZ + z, ProduceType, Meta));
|
||||
|
||||
Reference in New Issue
Block a user