MCPcopy Create free account
hub / github.com/cuberite/cuberite / MoveToPosition

Method MoveToPosition

src/Mobs/Skeleton.cpp:49–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48
49void cSkeleton::MoveToPosition(const Vector3f & a_Position)
50{
51 // If the destination is in the sun and if it is not night AND the skeleton isn't on fire then block the movement.
52 if (
53 !IsOnFire() &&
54 (m_World->GetTimeOfDay() < 13187) &&
55 (m_World->GetBlockSkyLight((int) a_Position.x, (int) a_Position.y, (int) a_Position.z) == 15)
56 )
57 {
58 m_bMovingToDestination = false;
59 return;
60 }
61
62 super::MoveToPosition(a_Position);
63}
64
65
66

Callers

nothing calls this directly

Calls 2

GetTimeOfDayMethod · 0.80
GetBlockSkyLightMethod · 0.45

Tested by

no test coverage detected