1
0
Fork 0
Commit Graph

47 Commits

Author SHA1 Message Date
x12xx12x 3ff57559e3
ItemHandler initialisation is a constant expression (#5344)
* Transition to non-pointer item handler
* That is my destructor - I decide when I leave this world
* I declare your destruction private and you final
2021-12-01 23:31:10 +00:00
Feyo Korenhof 1be14ebf7f
Added ExperienceAmount variable to HOOK_PLAYER_FISHING and HOOK_PLAYER_FISHED (#5345)
* Implemented cServer::ScheduleTask() and cServer::TickQueuedTasks()

* Fixed formatting and added ScheduleTask to APIDesc

* Added feyokorenhof to contributors

* Added ExperienceAmount variable to all the hook calls.

* Made ExperienceAmount int reference instead of int in HOOK_PLAYER_FISHING. Fixed bug: a_Reward is now a reference

* Add documentation, change ItemFishingRod to pass in experience

Co-authored-by: Alexander Harkness <me@bearbin.net>
2021-11-29 12:53:58 +00:00
nshah25 8be1dd54bb
Add player statistics to API (#5193)
* Fixed issue #5166

Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2021-05-03 21:07:09 +01:00
Tiger Wang 090d8305e4 Warnings improvements
* Turn off global-constructors warning. These are needed to implement cRoot signal handler functionality
* Add Clang flags based on version lookup instead of a compile test. The CMake config process is single threaded and slow enough already
* Reduced GetStackValue verbosity
+ Clarify EnchantmentLevel, StayCount, AlwaysTicked, ViewDistance signedness
+ Give SettingsRepositoryInterface a move constructor to simplify main.cpp code
- Remove do {} while (false) construction in redstone handler
2020-12-18 21:03:40 +00:00
KingCol13 8947147c25
Enchanting table shows detail on hover. Enchanting is deterministic. (#4937)
* Use lapis for enchanting, subtract correct number of levels, ClientHandle now selects from pregenerated list.

Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-10-01 22:33:32 +01:00
12xx12 7d0813ce8c Add Statistics and Achievements for newer Network standards 2020-08-19 20:45:27 +01:00
Mattes D 46398f4671 Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +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 ef2d5027d3
Removed extended ASCII, and added a check against it. (#4642) 2020-04-12 09:24:30 +02:00
Mat 581c1e5034
Fix typo in fish meta 2020-03-22 14:43:12 +02:00
Mat c0c9bf2b86
Don't enchant an already enchanted book 2020-03-22 13:32:24 +02:00
Mat 7d4934534e
Stabilise MoveToWorld (#4004)
* Stabilise MoveToWorld

* Fix comments and deprecate ScheduleMoveToWorld

* Enhanced thread safety for m_WorldChangeInfo

* Return unique_ptr from cAtomicUniquePtr::exchange

* cWorld now calls entity cEntity::OnAddToWorld and cEntity::OnRemoveFromWorld.

Allows broadcasting entities added to the world from the world's tick thread.
This also factors out some common code from cEntity::DoMoveToWorld and cEntity::Initialize.

As a consequence, cEntity::Destroy(false) (i.e. Destroying the entity without broadcasting) is impossible.
This isn't used anywhere in Cuberite so it's now deprecated.

* Update entity position after removing it from the world.
Fixes broadcasts being sent to the wrong chunk.

* Fix style

* cEntity: Update LastSentPosition when sending spawn packet

* Add Wno-deprecated-declarations to the lua bindings

* Kill uses of ScheduleMoveToWorld
2020-03-05 12:52:34 +02:00
Mattes D 365cbc6e1c
Refactored more of Entities and BlockEntities to use Vector3. (#4403) 2019-09-29 14:59:24 +02:00
Bond-009 7e9695ecb0 Damage fishing rod when catching the hook on a block, then reeling it in (#4151)
Fixes #4132
2018-02-11 12:40:16 +00:00
Bond-009 d7de2dccf0 Improved fishing rewards (#4120)
* Damage fishing rod after use
* Give xp to the player for catching something
* Fixed junk drops
* Implement Luck of the Sea
2018-01-05 14:32:30 +00: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
peterbell10 e225b7f826 Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
LogicParrot 49c443896d Revert "Replace ItemCallbacks with lambdas (#3948)"
This reverts commit 496c337cdf.
2017-09-02 08:50:23 +01:00
peterbell10 496c337cdf Replace ItemCallbacks with lambdas (#3948) 2017-09-01 13:04:50 +02:00
Tiger Wang 4ef47aed62 Changed entity ownership model to use smart pointers 2017-08-07 19:24:16 +01:00
Lukas Pioch 07f25253a2 Removed unneeded includes (#3902) 2017-08-06 20:57:44 +01:00
peterbell10 360d8eade0 FastRandom rewrite (#3754) 2017-06-13 21:35:30 +02:00
Lukas Pioch 5580d558a5 Added missing checks for Initialize function and updated APIDoc 2017-05-08 06:31:45 +02:00
Alex 9cb1ad546f Changed fish launching mechanism (#3520)
Fish and other fishing loot now correctly fly towards played when reeled in.
2017-02-20 10:03:19 +01:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Mattes D de8e5ea8e4 Placing a fluid from bucket calls plugin hooks.
Ref.: #1857.
2015-04-14 10:49:01 +02:00
madmaxoft c03161f75d Fixed tabs used for alignment. 2014-07-17 23:16:55 +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
Mattes D af4a21ea06 Fixed deadlock when moving players to other worlds.
Fixes #1039, fixes #851
2014-06-08 21:58:30 +02:00
andrew 07baf9bdd3 Cleaned up cPlayer::UpdateMovementStats; Wither achievements 2014-05-20 15:52:59 +03:00
madmaxoft 402d85d896 Fixed Clang warnings in itemhandlers. 2014-04-04 09:56:57 +02:00
Tycho 8464f689ea Improved Type safety of eBlockFace
May Fix #640
2014-02-04 10:59:05 -08:00
STRWarrior cd435ffca9 Implented OnPlayerFishing and OnPlayerFished. 2013-12-30 22:56:08 +01:00
STRWarrior 17a84111ce You are now able to sweep mobs to your position using fishing rods. 2013-12-25 17:26:17 +01:00
STRWarrior 318dc76fc9 Made the lure enchantment work. 2013-12-22 16:03:11 +01:00
STRWarrior 9de847c9b1 Countdown time is between 100 and 900 ticks. 2013-12-22 14:51:19 +01:00
STRWarrior c676216791 Using regular assignments. 2013-12-21 22:20:54 +01:00
STRWarrior 76ff71810a Once again better Y direction for the items given when fishing. 2013-12-21 20:42:43 +01:00
STRWarrior f244dbfb12 You are now able to get different items from fishing. 2013-12-21 19:58:52 +01:00
STRWarrior 3c73076be4 Fixed bug where you could pickup the floater only to get one spawned instantly or the other way around. 2013-12-21 14:08:58 +01:00
STRWarrior 6afe6b7928 Increased the range an Floater can shoot to. 2013-12-20 19:49:30 +01:00
STRWarrior 61120686c6 Fish now actualy jumps to the player instead of a few block bellow them. 2013-12-20 18:35:13 +01:00
STRWarrior 018c65b4e3 You can get fish from fishing :D. Only one type of fish though. 2013-12-19 22:16:15 +01:00
STRWarrior d9c8ae37cf Implented cItemFishingRodHandler. 2013-12-19 17:34:03 +01:00