1
0
Fork 0
Commit Graph

35 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
Mattes D 221cc4ec5c
Refactored block-to-pickup conversion. (#4417) 2019-10-16 10:06:34 +02:00
Alexander Harkness b4aa19f329
Item durability loss now depends on the item used. (#4123)
Armour durability also no longer changes when it
is used to break blocks or attack mobs.

Fixes #4119
2018-01-05 11:28:06 +00:00
Lukas Pioch 743a50014a Replaced includes with forward declarations 2017-08-13 12:31:10 +01:00
Lukas Pioch 07f25253a2 Removed unneeded includes (#3902) 2017-08-06 20:57:44 +01:00
Lane Kolbly 10d42a2452 Consolidated food effects into EatItem, added all fish type FoodInfos. (#3875)
* Consolidated food effects into EatItem, added all fish types.

* Changed type of NumFishInfos to satisfy clang.

* Removed unused call for a_Item in EatItem
2017-07-30 18:53:21 +01:00
mohe2015 32b38fb264 Anticheat fastbreak (#3411)
Added block hardness checks when breaking blocks.
2016-11-06 19:30:19 +01:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Tiger Wang 8656e149c8 Improved maps 2015-07-14 21:46:30 +01: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
Mattes D de8e5ea8e4 Placing a fluid from bucket calls plugin hooks.
Ref.: #1857.
2015-04-14 10:49:01 +02:00
Mattes D ccdf03daaf Refactored all player block placing to go through hooks.
Fixes #1618.
2014-12-24 07:20:17 +01:00
Tiger Wang 114b14faad Removed unused code 2014-08-29 13:44:01 +01:00
Howaner 84462ba8b2 Fixed hunger bugs, Implemented golden apple, added jump statistic, added correct food effects. 2014-07-31 23:04:00 +02:00
Howaner 4de8f5ca29 Rename function. 2014-07-26 13:26:14 +02:00
Howaner 396739cc0f Fix item durability.
Fixes #1181
2014-07-23 16:32:09 +02:00
madmaxoft d0cc9aedb3 More trailing whitespace fixes. 2014-07-17 23:16:54 +02:00
madmaxoft 5e198c6730 Basic style fixes. 2014-07-17 22:50:58 +02:00
madmaxoft 2423fbf2ef Normalized comments.
This was mostly done automatically and then visually inspected for obvious errors.
All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-07-17 22:15:34 +02:00
archshift 3766ac96d7 ItemHandler: changed IsDrinkable() to take a short argument 2014-06-17 11:39:20 -07:00
archshift 2185c72c2c Implemented drinkable potions, noeffect entity effect,
Clears entity effects on death
2014-06-17 11:39:20 -07:00
archshift 1eb04a48ee Implemented milk, added documentation to Pawn.h 2014-06-17 11:39:19 -07:00
Howaner d6cb6e0423 Add repair cost to cItem, add custom name to NBTChunkSerializer and fix anvil bugs. 2014-05-07 12:30:30 +02:00
Howaner 954b59d6f4 Rename CanRepairWithItem to CanRepairWithRawMaterial and rename Size() to Count() 2014-05-06 19:38:09 +02:00
Howaner 3c102870f6 Add anvil window and slot area. 2014-05-05 17:34:17 +02:00
Howaner 9cbb3a339f Fix armor in survival mode. 2014-04-24 20:41:25 +02:00
jfhumann 5bed1c09bc Fixed clang compilation errors. Apparently gcc and MSVC do not care about the order of initializer lists, but clang does. 2014-04-18 22:47:59 +02:00
jfhumann 013da806ec Did some static analysis, fixed some bugs and optimized a lot of code 2014-04-18 21:09:44 +02:00
Tycho b480148116 Fixed warnings 2014-03-07 10:26:07 -08:00
andrew 3b24bc870b Map item handler; Fixed several bugs 2014-02-17 16:27:12 +02:00
Tycho 8464f689ea Improved Type safety of eBlockFace
May Fix #640
2014-02-04 10:59:05 -08:00
Tycho Bickerstaff d724241407 converted commneted paramater names to the unused macro 2013-12-22 13:46:55 +00:00
Tycho Bickerstaff 9f41761e8e Root is now warnings clean 2013-12-21 15:38:37 +00:00
Alexander Harkness 675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00