1
0
Fork 0
Commit Graph

22 Commits

Author SHA1 Message Date
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
Mattes D 487f9a2aa9
Vector3 in Handlers (#4680)
Refactored all cBlockHandler and cItemHandler descendants to use Vector3.
2020-04-21 22:19:22 +02:00
Alexander Harkness f40aba941e Add mixins for blocks that rotate based on player yaw at placement
Also add observer block handler.
2020-04-10 13:07:16 +00:00
peterbell10 4727ed2084 Add a formatting function for Vector3 (#4282)
* Vector3: Add custom fmt compatible formatter.

* cLuaState: Add fmt version of ApiParamError

* Use vector formatting in manual bindings

* Always log vectors with FLOG
2018-09-24 21:33:39 +01:00
Bond-009 701fee334c Prioritize hinge on the left side (#4153) 2018-01-17 19:15:42 +00:00
Tiger Wang 8656e149c8 Improved maps 2015-07-14 21:46:30 +01:00
bibo38 31466fda5f Doors now get placed on the server-side.
The Y-Value is already the lower door block(From ItemHandler.cpp:346).
Increasing it once again, places the door into the air, which is blocked by Cuberite.
Bugfix #2279
2015-06-25 16:17:03 +02:00
Mattes D 3889b2cac2 Refactored block placement workflow.
Multi-blocks can now use the default OnPlayerPlaced() callback in cItemHandler.
2015-06-21 19:49:22 +02:00
wraith11 794013315b Fix door placing in connection with slabs
Except top-half slabs as transparent blocks for doors.
2015-04-21 20:47:02 +02:00
Tommy Santerre 3f6d823aa4 Correct world height validations.
Unify the way we test block above the current one (Height - 1 instead of a_RelY + 1).
Allow generation of world of flat height = 255
2015-03-19 20:32:17 -04:00
Mattes D 88fc70a06a Fixed door placement.
Doors now have hinges on the correct side, based on what the surroundings are when placing them.
2015-02-28 17:16:21 +01:00
Mattes D 1bcc4abd68 Door handler: Removed needless check.
The Y coord has already been checked above.
2015-02-21 14:23:37 +01:00
Freddie Wang b165ab6363 Fix door placement check 2015-02-21 14:22:05 +01:00
Mattes D 9e478c6f29 Fixed door placement. 2014-12-25 01:00:51 +01:00
Mattes D ccdf03daaf Refactored all player block placing to go through hooks.
Fixes #1618.
2014-12-24 07:20:17 +01:00
Masy98 9106a8c29b Moved curly brace to seperate line 2014-09-26 19:45:03 +02:00
Masy98 d4641576c0 Added new doors in ItemDoor.h 2014-09-11 16:33:52 +02:00
madmaxoft 5e198c6730 Basic style fixes. 2014-07-17 22:50:58 +02: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 a13d009a30 Refactored GetPlacementBlockTypeMeta 2014-01-26 07:06:25 -08:00
Alexander Harkness 675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00