Tiger Wang
a62b2b1be2
Move item placement into item handlers ( #5184 )
...
* Move item placement into item handlers
+ Add appropriate CanBeAt checks in cPlayer::PlaceBlocks, into which all placement handlers call.
* Partly addresses #5157
* Fixes #4878
* Fixes #2919
* Fixes #4629
* Fixes #4239
* Fixes #4849
Co-authored-by: changyong guo <guo1487@163.com>
Co-authored-by: Xotheus <shady3300@outlook.com>
Co-authored-by: Krist Pregracke <krist@tiger-scm.com>
* Review fixes
* Update APIDesc.lua
* Rename
Co-authored-by: changyong guo <guo1487@163.com>
Co-authored-by: Xotheus <shady3300@outlook.com>
Co-authored-by: Krist Pregracke <krist@tiger-scm.com>
2021-05-05 13:25:10 +00:00
Tiger Wang
125df19477
Do not fake a tool when converting to pickups ( #5170 )
...
* When the cause of destruction was world-induced (CanBeAt check failed) there is no tool. Pass the nullptr directly to ConvertToPickups and let it handle it.
* Fixes #4795
- Remove unused a_Digger parameter to ConvertToPickups.
2021-03-28 14:41:34 +01:00
peterbell10
a9031b6bae
Fix cmake not adding Werror on clang, and _lots_ of warnings ( #4963 )
...
* Fix cmake not adding Werror on clang, and _lots_ of warnings
* WIP: Build fixes
* Cannot make intermediate blockhandler instance
* Tiger's changes
* Fix BitIndex check
* Handle invalid NextState values in cMultiVersionProtocol
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-10-05 10:27:14 +00:00
Tiger Wang
c53a0ba5f6
Unify block entity pickup conversion
...
- Removed normal BlockHandler knowledge of block entities during conversion
+ Added cBlockEntity::ConvertToPickups that handles it
2020-09-25 09:07:01 +00:00
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
MaxwellScroggs
5cdaf073be
cWindow: Convert XYZ to Vector3 ( #4764 )
2020-07-04 23:49:17 +02: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
Alexander Harkness
8914355895
Fix rotation metas on blocks
2020-04-11 19:00:05 +00:00
Mattes D
221cc4ec5c
Refactored block-to-pickup conversion. ( #4417 )
2019-10-16 10:06:34 +02:00
Lukas Pioch
07f25253a2
Removed unneeded includes ( #3902 )
2017-08-06 20:57:44 +01:00
peterbell10
0d0323608d
cBlockHandler: take player by ref
2017-08-01 08:21:20 +02:00
Lukas Pioch
7922e6addb
Fixes problems with windows:
...
- Changed cPlayer:OpenWindow to accept a ref, tolua adds a nil check
- Close open lua window in destructor, to avoid dangling pointers
2017-06-05 15:14:23 +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
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
tycho
f2689c4887
Fixed a lot of warnings
2015-05-19 11:50:59 +01:00
Howaner
b6fd400276
Own classes for all windows.
2014-12-13 15:06:55 +01:00
Mattes D
97c4c057e4
Fixed conversion warning.
2014-08-29 11:20:33 +03:00
Hownaer
eaf33e22cf
Fixed anvil placing.
2014-08-28 18:57:56 +02:00
madmaxoft
5e198c6730
Basic style fixes.
2014-07-17 22:50:58 +02:00
Howaner
7fe6e40bf7
Add clicks, exp subtraction, item check, ...
2014-05-05 17:34:29 +02:00
Howaner
3c102870f6
Add anvil window and slot area.
2014-05-05 17:34:17 +02:00
madmaxoft
aa7552309a
Simplified the anvil placement code.
2014-04-01 14:23:11 +02:00
madmaxoft
8288e53c0b
Fixed a few Clang warnings in BlockHandlers.
2014-03-30 23:13:13 +02:00
Howaner
568038ab52
Fix anvil pickups.
2014-03-16 19:25:00 +01:00
Howaner
4e0edc9fa7
Add anvil direction.
2014-03-16 17:42:23 +01:00