From 7f87d6c3d6a116742f25f1846d747a33afdc63f0 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 16 Aug 2013 11:23:24 +0100 Subject: Feature and bugfixes [SEE DESC] Added TNT and Hopper minecarts Fixed piston code failing without an extension set Repeaters are now broken Fixed not being able to place a minecart on an activator rail Added much needed comments on piston code Fixed minor formatting issue --- source/Minecart.h | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'source/Minecart.h') diff --git a/source/Minecart.h b/source/Minecart.h index e205a4963..e120af763 100644 --- a/source/Minecart.h +++ b/source/Minecart.h @@ -29,7 +29,9 @@ public: mpNone, // Empty minecart, ridable by player or mobs mpChest, // Minecart-with-chest, can store a grid of 3*8 items mpFurnace, // Minecart-with-furnace, can be powered - // TODO: Other 1.5 features: hopper, tnt, dispenser, spawner + mpTNT, // Minecart-with-TNT, can be blown up with activator rail + mpHopper, // Minecart-with-hopper, can be hopper + // TODO: Spawner minecarts, (and possibly any block in a minecart with NBT editing) } ; // cEntity overrides: @@ -115,3 +117,32 @@ public: + +class cMinecartWithTNT : + public cMinecart +{ + typedef cMinecart super; + +public: + CLASS_PROTODEF(cMinecartWithTNT); + + cMinecartWithTNT(double a_X, double a_Y, double a_Z); +} ; + + + + + +class cMinecartWithHopper : + public cMinecart +{ + typedef cMinecart super; + +public: + CLASS_PROTODEF(cMinecartWithHopper); + + cMinecartWithHopper(double a_X, double a_Y, double a_Z); + + // cEntity overrides: + virtual void OnRightClicked(cPlayer & a_Player) override; +} ; \ No newline at end of file -- cgit v1.2.3