summaryrefslogtreecommitdiffstats
path: root/src/Entities/Minecart.h
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2020-05-04 23:04:21 +0200
committerGitHub <noreply@github.com>2020-05-04 23:04:21 +0200
commit4e4ef9052ebac129b2e792d6fd458df1e29f45d2 (patch)
tree9aef21bd749e84212d3b15fe2d366bd46d83e313 /src/Entities/Minecart.h
parentAdd two missing include guards (diff)
downloadcuberite-4e4ef9052ebac129b2e792d6fd458df1e29f45d2.tar
cuberite-4e4ef9052ebac129b2e792d6fd458df1e29f45d2.tar.gz
cuberite-4e4ef9052ebac129b2e792d6fd458df1e29f45d2.tar.bz2
cuberite-4e4ef9052ebac129b2e792d6fd458df1e29f45d2.tar.lz
cuberite-4e4ef9052ebac129b2e792d6fd458df1e29f45d2.tar.xz
cuberite-4e4ef9052ebac129b2e792d6fd458df1e29f45d2.tar.zst
cuberite-4e4ef9052ebac129b2e792d6fd458df1e29f45d2.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Minecart.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Entities/Minecart.h b/src/Entities/Minecart.h
index fe9ad8ce8..ad3b3d40d 100644
--- a/src/Entities/Minecart.h
+++ b/src/Entities/Minecart.h
@@ -83,8 +83,13 @@ protected:
void SnapToRail(NIBBLETYPE a_RailMeta);
/** Tests if a solid block is in front of a cart, and stops the cart (and returns true) if so; returns false if no obstruction */
bool TestBlockCollision(NIBBLETYPE a_RailMeta);
+ /** Tests if there is a block at the specified position which is impassable to minecarts */
+ bool IsSolidBlockAtPosition(Vector3i a_Offset);
/** Tests if a solid block is at a specific offset of the minecart position */
bool IsSolidBlockAtOffset(int a_XOffset, int a_YOffset, int a_ZOffset);
+
+ bool IsBlockCollisionAtOffset(Vector3i a_Offset);
+
/** Tests if this mincecart's bounding box is intersecting another entity's bounding box (collision) and pushes mincecart away if necessary */
bool TestEntityCollision(NIBBLETYPE a_RailMeta);