summaryrefslogtreecommitdiffstats
path: root/src/Entities/Minecart.h
diff options
context:
space:
mode:
authorMichal Havlíček <80639037+havel06@users.noreply.github.com>2023-01-25 21:50:08 +0100
committerGitHub <noreply@github.com>2023-01-25 21:50:08 +0100
commit847884b6a803650903b871054adcde19921af8b5 (patch)
tree6a2db0672130b74ba90794423188aa727d3c718a /src/Entities/Minecart.h
parentAllow certain blocks to be placed on top of upside-down stairs/slabs (#5468) (diff)
downloadcuberite-847884b6a803650903b871054adcde19921af8b5.tar
cuberite-847884b6a803650903b871054adcde19921af8b5.tar.gz
cuberite-847884b6a803650903b871054adcde19921af8b5.tar.bz2
cuberite-847884b6a803650903b871054adcde19921af8b5.tar.lz
cuberite-847884b6a803650903b871054adcde19921af8b5.tar.xz
cuberite-847884b6a803650903b871054adcde19921af8b5.tar.zst
cuberite-847884b6a803650903b871054adcde19921af8b5.zip
Diffstat (limited to 'src/Entities/Minecart.h')
-rw-r--r--src/Entities/Minecart.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Entities/Minecart.h b/src/Entities/Minecart.h
index 0d62d98f1..0e6336330 100644
--- a/src/Entities/Minecart.h
+++ b/src/Entities/Minecart.h
@@ -72,8 +72,8 @@ protected:
*/
void HandleDetectorRailPhysics(NIBBLETYPE a_RailMeta, std::chrono::milliseconds a_Dt);
- /** Handles activator rails - placeholder for future implementation */
- void HandleActivatorRailPhysics(NIBBLETYPE a_RailMeta, std::chrono::milliseconds a_Dt);
+ /** Handles activator rails */
+ virtual void HandleActivatorRailPhysics(NIBBLETYPE a_RailMeta, std::chrono::milliseconds a_Dt);
/** Snaps a mincecart to a rail's axis, resetting its speed
For curved rails, it changes the cart's direction as well as snapping it to axis */
@@ -89,7 +89,6 @@ protected:
/** 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);
-
} ;
@@ -222,10 +221,14 @@ public:
CLASS_PROTODEF(cMinecartWithTNT)
cMinecartWithTNT(Vector3d a_Pos);
+ void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
private:
+ int m_TNTFuseTicksLeft;
+ bool m_isTNTFused = false;
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
+ void HandleActivatorRailPhysics(NIBBLETYPE a_RailMeta, std::chrono::milliseconds a_Dt) override;
} ;