1
0
Commit Graph

104 Commits

Author SHA1 Message Date
changyong guo
57690b81a2 Experience orb (#4259)
* Replace cWorld::FindClosesPlayer with cWorld::DoWithClosestPlayer
* Implement experience reward splitting into the orb sizes used in vanilla
* Modified speed calculation in cExpOrb::Tick to make the orbs fly towards the player

Fixes #4216
2018-08-02 15:59:10 +01:00
peterbell10
cdd8e42587
cWorld: Manually bind deprecated broadcast functions (#4265)
Ref: https://github.com/cuberite/cuberite/pull/4264#discussion_r204769193
2018-07-27 00:12:41 +01:00
peterbell10
950aeffff8
CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-26 22:24:36 +01:00
peterbell10
a4dbb5c582
Prefer static_cast to reinterpret_cast (#4223)
* Change reinterpret_cast -> static_cast wherever possible
* Remove more unnecessary `const_cast`s.

reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
2018-05-02 08:50:36 +01:00
Alex Sweet
a0896c63d7 Smelting Gives Experience (#4094)
* Smelting Exp

Smelting now gives experience

* Furnace.txt update

Exp rewards are entered in furnace.txt, Reward calculation is now done
is the furnaceentity class

* furnace.txt update

Changed alignment tabs to spaces
Included documentation of exp in recipe

* Updated StringToFloat

changed strtod to strtof

* Explicit Float to Int

* Reworked Smelting Rewards

* No C casts

-Adds new function to the api
-Sets reward counter to 0 in furnace constructor

* Style and exp lock removed

-Fixed  style mistakes accoring to PR notes
-XP isn't locked to a single player anymore

* No Smelter API

-Removed SetLastSmelter and GetLastSmelter
-Fixed comments
-Fixed log reward amounts
2018-04-11 07:46:11 +01:00
peterbell10
0bacda3269 Implement horse inventory (#4053)
* Implement horse inventory

* Fix sign conversions

* Add API doc for ItemCategory::IsHorseArmor

* Improve HandleOpenHorseInventory comment and style fixes.
2017-10-21 17:56:09 +01:00
peterbell10
307e7aaff5 Fix switch warnings (#4013)
* Fix switch warnings
  * Fix a variety of -Wswitch and -Wswitch-enum warnings
  * Remove unneeded -Wno-error flags

* Reorganise some eMonsterType switches
  * Alpha sort eMonsterType cases in WriteMobMetadata
    and in cNBTChunkSerializer::AddMonsterEntity
  * List all mob types in protocol 1.12 and NBTChunkSerializer

* cStructGenTrees::GetNumTrees: remove switch default

* cWSSAnvil::LoadOldMinecartFromNBT: Log unhandled minecart type
2017-09-14 09:48:57 +01:00
Lukas Pioch
4691bc5a29 Removed double includes (#3885) 2017-08-02 19:57:20 +01:00
Lane Kolbly
790e15f2e6 Added anvil enchantment handling. (#3857)
+ Added anvil enchantment handling.
2017-07-28 18:00:20 +01:00
peterbell10
360d8eade0 FastRandom rewrite (#3754) 2017-06-13 21:35:30 +02:00
Lukas Pioch
41bfb22834 Corrected brewingstand and added support for fuel 2017-05-08 06:30:54 +02:00
Mattes D
cbff1378fd Fixed bindings for cBlockArea:Read and Write. (#3568)
The original bindings accepted nil as the World param, causing a crash.
2017-02-05 16:00:38 +01:00
Mattes D
0bffa29358 Removed ClientHandle.h dependencies from common headers. 2016-11-18 20:00:04 +01:00
bibo38
cb640ffea4 Spectators added (#2852) 2016-10-12 14:38:45 +02:00
LogicParrot
ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Lukas Pioch
d620dcdd08 Moved variables into scope, removed unused variables and fixed variables 2015-12-17 10:48:36 +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
Lukas Pioch
9749c3aac9 Implemented brewing 2015-11-03 18:00:55 +01:00
Samuel Barney
804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Tiger Wang
10c9e66aad Fixes #2041 2015-05-24 13:37:36 +01:00
Tiger Wang
1632d5f8f1 Fixes #2003 2015-05-18 15:43:24 +01:00
Howaner
8591935a4b Implemented vanilla-like shift click.
This fixes many visual bugs.
2014-12-13 18:49:11 +01:00
Howaner
b6fd400276 Own classes for all windows. 2014-12-13 15:06:55 +01:00
Tiger Wang
3acdf25b05 Merge remote-tracking branch 'origin/master' into c++11
Conflicts:
	src/OSSupport/Thread.cpp
2014-12-06 17:41:48 +00:00
Mattes D
44644ae025 Fixed reported parentheses around comparisons. 2014-12-05 12:58:47 +01:00
Mattes D
f8c54f4243 Merged branch 'master' into c++11. 2014-10-23 08:40:39 +02:00
Tiger Wang
a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tiger Wang
5089f04cf6 Replace &*[0] accesses with .data() 2014-10-21 13:20:06 +01:00
Tiger Wang
987f79afdd En masse NULL -> nullptr replace 2014-10-20 21:55:07 +01:00
Mattes D
eeb580a74e Functions in cPluginManager get references instead of pointers. 2014-10-15 19:09:09 +02:00
Tiger Wang
3e74113427 Implemented Chest Minecarts 2014-09-12 23:18:02 +01:00
Hownaer
c0c4ac5236 Added comments. 2014-08-28 15:21:50 +02:00
Hownaer
6c3b80f04c Fixed crashes and use std::swap. 2014-08-28 14:58:03 +02:00
Hownaer
0f1fd33123 Enchanting table improvements. 2014-08-28 01:21:54 +02:00
Howaner
89b1bbdc5f Added beacon. 2014-07-30 21:59:35 +02:00
Howaner
6e2025d125 Change comment. 2014-07-26 13:29:25 +02:00
Howaner
897d68dc35 Add armor items directly to the armor slots. 2014-07-20 01:22:58 +02:00
Howaner
e32b0ce4fa Moved comment. 2014-07-18 16:38:59 +02:00
Howaner
2e9aed793a Fixed the armor slot in creative mode. Also removed that armor get directly to the armor slot. It is extremely buggy and unnecessary. 2014-07-18 01:16:49 +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
ea24a4f4aa Merge pull request #1157 from Howaner/Window
Add more inventory actions.
2014-07-09 23:27:02 +02:00
Howaner
0d88e71d18 Removed unused include line. 2014-07-09 14:35:01 +02:00
Howaner
3615bf825b Added inventory number click. 2014-07-09 14:30:06 +02:00
Mattes D
562d14e8ec Fixed crafting grid updating.
Fixes #1152.
2014-07-06 14:42:28 +02:00
Howaner
9d7a59012c Added drop window action. 2014-07-06 00:40:59 +02:00
Howaner
7a78f23b4a Add middle click. 2014-07-05 14:00:04 +02:00
Tiger Wang
909e0ed95b Removed bad comment 2014-06-29 11:41:50 +01:00
Tiger Wang
dde641ce83 Properly implemented enderchests 2014-06-29 11:36:38 +01:00
worktycho
c94d0c8144 derp 2014-06-04 11:39:21 +01:00