1
0
Fork 0
Commit Graph

40 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
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
Bond_009 dc4df66548 Trapdoor can be placed anywhere since 1.9 2020-04-15 21:58:27 +00:00
Mattes D 221cc4ec5c
Refactored block-to-pickup conversion. (#4417) 2019-10-16 10:06:34 +02:00
peterbell10 c94d7184eb Broadcast refactor (#4264)
* Move Broadcast functions from cChunkMap to cBroadcaster

- Remove cBroadcastInterface in favour of cBroadcaster.

- cChunk: Remove broadcast functions.

* resurect broadcast interface

* Absorb cBroadcaster into cWorld.
Removes the need for forwarding the function calls.

* Improve const-correctness

* Use Int8 instead of char

+ Comment `ForClients` functions

* Improve comments

* Broadcaster: Rename ForClients functions
2018-07-24 22:30:49 +01:00
peterbell10 d3c1c626f5
Deal with covered switches consistently (#4161)
* Fixes a number of "<function>: not all control paths return a value" warnings on MSVC.

* Introduces the UNREACHABLE global macro and uses it instead of conditionally compiled switch defaults.

* Move cNBTParseErrorCategory from FastNBT.h into FastNBT.cpp to prevent bad calls to message()
2018-02-04 23:07:12 +00:00
Bond-009 5badb9bcca cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050) 2017-11-20 11:13:11 +00: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
mathiascode dae2adde65 Updated sounds and effect IDs (#3422) 2017-02-15 06:05:24 +01:00
gaurav sehgal 97b9422a3e removed cast from BlockTrapdoor.h (#3256) 2016-07-07 09:55:07 +02: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
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Tiger Wang 8656e149c8 Improved maps 2015-07-14 21:46:30 +01:00
Mattes D 48c153bf53 Fixed warnings in MSVC.
It complained about undefined return values or using uninitialized variables.
2015-06-02 12:51:43 +02:00
tycho fa4fb75e03 Fixed compile and a few more warnings 2015-05-19 12:28:31 +01:00
Mattes D c13b1931ff More style checking.
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
Howaner 7d3016c7ad Code improvements 2014-09-30 20:59:59 +02:00
Howaner 83973520c8 Fixed iron trapdoors 2014-09-30 20:04:49 +02:00
Masy98 27edb7f0d0 Removed old sound-configuration for Trapdoors 2014-09-09 19:37:07 +02:00
Howaner b5ffe06f88 Code formatting fixes. 2014-08-19 22:14:37 +02:00
narroo 2343b0dfbe Added MetaRotate/Mirror Support for a number of classes. 2014-03-23 22:11:01 -04: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
Mattes D 71ae689eb7 Merge pull request #746 from Howaner/Slabs
Add Trapdoor Functions to cWorld and fix Trapdoor Redstone Bugs
2014-03-03 20:52:08 +01:00
Howaner e4b2502896 Add Trapdoor Functions to cWorld and fix Trapdoor Redstone Bugs 2014-03-02 16:01:37 +01:00
andrew d73cdba1f6 g_BlockXXX => cBlockInfo::XXX 2014-03-01 21:34:19 +02:00
Tiger Wang c68bdaf34b Fixed compile and some warnings in MSVS 2014-02-09 00:57:22 +00:00
Tiger Wang f86f066615 Merge branch 'master' into playerimprovements
Conflicts:
	MCServer/Plugins/APIDump/APIDesc.lua
2014-02-09 00:04:42 +00:00
Tiger Wang 630507fd5b Fixed a bunch of MSVS warnings
* Possibly also fixed some bugs with pathfinding and TNT, though
unlikely
2014-02-04 23:07:22 +00: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
Tiger Wang b115f3d636 Added trapdoor cursor Y detection 2013-12-06 21:31:55 +00:00
Tiger Wang 008c515b4b Fixed trapdoors not overriding OnUse 2013-12-06 20:01:52 +00:00
Tiger Wang 1d69c80ad3 Implemented trapdoors, fixes #43 and #105
Also updated redstone simulator to support it
2013-11-29 22:27:08 +00:00