1
0
Fork 0
Commit Graph

44 Commits

Author SHA1 Message Date
Tiger Wang 68cced73af
BlockHandler initialisation is a constant expression (#4891)
* BlockHandler initialisation is a constant expression

If we can't make it all namespaces, this is the next best I guess.

+ Tag handlers constexpr, const as needed
+ Inherit constructors
* Privatise handler functions

* More constexpr

Co-authored-by: Alexander Harkness <me@bearbin.net>
2020-09-20 13:50:52 +00:00
Tiger Wang 5bb6512435 Simply Y-check in door handler 2020-08-04 18:26:25 +01:00
Tiger Wang 766a950d20 Continue with placement when using iron doors 2020-08-04 18:18:37 +01:00
Tiger Wang 71ba18d6c6 Door drops respect player gamemode
* Rely on caller to handle converting to pickups, all OnBroken needs to do is to maintain the unity of the door
* Fixes #4797
* Fixes #4796
2020-08-04 18:15:18 +01:00
Mattes D 487f9a2aa9
Vector3 in Handlers (#4680)
Refactored all cBlockHandler and cItemHandler descendants to use Vector3.
2020-04-21 22:19:22 +02:00
Mattes D 9ee47e5999 Using Super. 2020-04-16 20:07:48 +00:00
Mattes D 221cc4ec5c
Refactored block-to-pickup conversion. (#4417) 2019-10-16 10:06:34 +02:00
peterbell10 cdd8e42587
cWorld: Manually bind deprecated broadcast functions (#4265)
Ref: https://github.com/cuberite/cuberite/pull/4264#discussion_r204769193
2018-07-27 00:12:41 +01:00
peterbell10 950aeffff8
CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-26 22:24:36 +01:00
Bond-009 5badb9bcca cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050) 2017-11-20 11:13:11 +00:00
Lukas Pioch 4691bc5a29 Removed double includes (#3885) 2017-08-02 19:57:20 +01:00
peterbell10 0d0323608d cBlockHandler: take player by ref 2017-08-01 08:21:20 +02:00
peterbell10 8eb5672920 cWorld::SendBlockTo take player by ref 2017-08-01 08:21:20 +02:00
Lane Kolbly 5402b214b3 Check for intersection between placed blocks and entities. (#3850)
* Check for intersection between placed blocks and entities.

+ Implemented GetPlacementCollisionBox, to permit custom placement collision boxes for blocks.

* Factored block-entity placement checking into another function in cPlayer.

- Removed vector min/max functions

* Use GetWorld to get the world in DoesPlacingBlocksIntersectEntity.

+ Added block height checks, allow different cEntity subclasses to decide whether they will prevent block placement.
2017-07-28 17:59:21 +01:00
mathiascode dae2adde65 Updated sounds and effect IDs (#3422) 2017-02-15 06:05:24 +01:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Gargaj f9008a4860 allow use failures to propagate from the entity/block to the player 2015-12-13 13:27:38 +01:00
Dave Tucker 83870f9fc0 Add enum for Sound and Particle Effects
Fixes #2603

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-11-24 13:21:40 +00:00
Nicholas W fbbf27feea Fixed Iron Door 2015-08-01 08:47:55 -05:00
Tiger Wang 8656e149c8 Improved maps 2015-07-14 21:46:30 +01:00
b33duck ed3c0b771f Added open/close and sound effects for all door types 2015-05-20 16:24:16 -07:00
Mattes D c13b1931ff More style checking.
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
Mattes D ccdf03daaf Refactored all player block placing to go through hooks.
Fixes #1618.
2014-12-24 07:20:17 +01:00
Mattes D e2a04f580a BasicStyle: Added missing braces to control statements. 2014-12-05 16:59:11 +01:00
Tycho a3f940f47c Removed more unessicary includes 2014-09-26 18:13:19 +01:00
Howaner fcf558173e Fixed farmland issues. 2014-09-12 19:07:20 +02:00
Masy98 6cc4ac0bca Removed old sound-configuration for doors 2014-09-09 16:28:08 +02:00
madmaxoft 5e198c6730 Basic style fixes. 2014-07-17 22:50:58 +02:00
Howaner 8de8768f02 Add UNUSED() Tags 2014-06-17 17:01:23 +02:00
Howaner 0d08b9a62e Add door sound 2014-06-17 17:00:51 +02:00
Howaner d8e16f8c1f Better SetOpen() and IsOpen() function from the doors. 2014-05-30 22:22:42 +02:00
narroo 90415ff798 Fixed Minor typos. 2014-03-26 08:54:17 -04:00
narroo d5c7fc6bd6 Added a comment about the behavior of doors under mirros. Simply put, the current implementation of MetaMirror causes glitchy behavior. The door class itself needs to be edited. (I've got an idea on that....) 2014-03-25 17:35:48 -04:00
narroo 2343b0dfbe Added MetaRotate/Mirror Support for a number of classes. 2014-03-23 22:11:01 -04:00
Mattes D 3a6499b192 Merge pull request #729 from worktycho/MetaRotate
Alternitive solution to #503
2014-03-08 18:27:24 +01:00
Howaner 594ddd86a0 Add SendBlockTo to cWorldInterface 2014-03-05 19:33:43 +01:00
Howaner d4a5b16c52 Add data backsending, when the Client interacts a Block and the Interact is cancelled. 2014-03-05 15:10:20 +01:00
Tycho 84913299f4 Added some Metadate rotaters using templated Mixin 2014-02-27 11:33:35 -08:00
Tycho 8464f689ea Improved Type safety of eBlockFace
May Fix #640
2014-02-04 10:59:05 -08:00
Tycho c6304b2b4f Changed pointers to references 2014-02-01 05:06:32 -08:00
Tycho 25ec7750aa Changed signitures of Several BLockHandler Methods
Changed the signitures of the following to use interfaces:
GetPlacementBlockTypeMeta
OnPlaced
OnPlacedByPlayer
OnDestroyed
OnNeighbourChanged
NeighbourChanged
OnUse
CanBeAt
Check
2014-01-31 15:17:41 -08:00
Tycho 15b92af166 First attempt at Implementing Interfaces 2014-01-25 11:14:14 -08:00
madmaxoft 00911c5f94 Fixed missing parenthesis. 2013-12-20 15:44:56 +01:00
Alexander Harkness 675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00