summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pawn.h
diff options
context:
space:
mode:
authorKingCol13 <48412633+KingCol13@users.noreply.github.com>2021-07-10 22:05:00 +0200
committerGitHub <noreply@github.com>2021-07-10 22:05:00 +0200
commit1d1fa914012125126d1a3656edc428859696f54f (patch)
treed0190a09b6f519ce528e6d8e25d99141a3faa29f /src/Entities/Pawn.h
parentSymmetry in MultiVersionProtocol to fix a crash (#5261) (diff)
downloadcuberite-1d1fa914012125126d1a3656edc428859696f54f.tar
cuberite-1d1fa914012125126d1a3656edc428859696f54f.tar.gz
cuberite-1d1fa914012125126d1a3656edc428859696f54f.tar.bz2
cuberite-1d1fa914012125126d1a3656edc428859696f54f.tar.lz
cuberite-1d1fa914012125126d1a3656edc428859696f54f.tar.xz
cuberite-1d1fa914012125126d1a3656edc428859696f54f.tar.zst
cuberite-1d1fa914012125126d1a3656edc428859696f54f.zip
Diffstat (limited to 'src/Entities/Pawn.h')
-rw-r--r--src/Entities/Pawn.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Entities/Pawn.h b/src/Entities/Pawn.h
index 706c51e49..222e8f3b8 100644
--- a/src/Entities/Pawn.h
+++ b/src/Entities/Pawn.h
@@ -70,6 +70,21 @@ public:
/** Returns the entity effect, if it is currently applied or nullptr if not. */
cEntityEffect * GetEntityEffect(cEntityEffect::eType a_EffectType) const;
+ // tolua_begin
+
+ static bool FindTeleportDestination(cWorld & a_World, const int a_HeightRequired, const unsigned int a_NumTries, Vector3d & a_Destination, const Vector3i a_MinBoxCorner, const Vector3i a_MaxBoxCorner);
+
+ static bool FindTeleportDestination(cWorld & a_World, const int a_HeightRequired, const unsigned int a_NumTries, Vector3d & a_Destination, const cBoundingBox a_BoundingBox);
+
+ /** Used by enderman and chorus fruit.
+ Checks for valid destinations in a cube of length 2 * a_HalfCubeWidth centred at a_Centre.
+ Returns true and places destination in a_Destination if successful.
+ Returns false if destination could be found after a_NumTries attempts.
+ Details at: https://minecraft.fandom.com/wiki/Enderman#Teleportation. */
+ static bool FindTeleportDestination(cWorld & a_World, const int a_HeightRequired, const unsigned int a_NumTries, Vector3d & a_Destination, Vector3i a_Centre, const int a_HalfCubeWidth);
+
+ // tolua_end
+
protected:
typedef std::map<cEntityEffect::eType, std::unique_ptr<cEntityEffect>> tEffectMap;