Alexander Harkness
ad22922393
Rename cEntity swim states ( #3996 )
...
* Replace cEntity:m_IsSubmerged with m_IsHeadInWater
* Replace cEntity:m_IsSwimming with m_IsInWater
* Add API documentation for new symbols
* Apply SetSwimState to all entities, not just mobs and players
* Pickups now use IsOnFire to check if they are on fire before destruction
Fixes #3987
2018-01-14 18:44:45 +00:00
Alexander Harkness
2529a89835
Golden Apple Fixes ( #4130 )
...
* Do not remove food item until player has been fed
* Golden apples now ignore hunger when eating
* Removed EnchantedGoldenApple recipe, as it was removed in 1.9
Reference: https://minecraft.gamepedia.com/1.9#Items_2
* Adjust golden apple effects, as they were changed in 1.9
Reference: https://minecraft.gamepedia.com/1.9#Items_2
2018-01-06 00:39:23 +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
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
Lane Kolbly
30c8470a52
Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors ( #3959 )
...
* Made BroadcastSoundEffect take vector parameters.
* Added docs for new vectored methods
* Removed old code
* Fixed lua warnings
* Made old BroadcastSoundEffect not an override.
* m_Block to m_BlockPos, used Vector3d constructor where prettier.
* a_Block to a_BlockPos
* Changed thunderbolt a_Block to a_BlockPos
2017-09-19 15:12:54 +01:00
peterbell10
e225b7f826
Replace ItemCallbacks with lambdas ( #3993 )
2017-09-11 23:20:49 +02:00
Lane Kolbly
b12f4ef7d5
Made world data paths adjustable, and added API to temporarily disable saving chunks to disk. ( #3912 )
2017-09-07 13:41:16 +01:00
Lane Kolbly
dc294cdc51
Switched player statistic store to save with UUID filenames. ( #4002 )
2017-09-07 11:57:12 +02:00
Alexander Harkness
e33eb529ad
Fire effect now shown for creative and spectator mode players ( #3998 )
...
* Fire effect now shown for creative and spectator mode players
Fixes #3989
* Add documentation for IsFireproof
2017-09-07 09:59:08 +01: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
peterbell10
f4f2fc7c3d
Add cUUID class ( #3871 )
2017-08-25 13:43:18 +01:00
mathiascode
02775e52c4
Minor changes ( #3909 )
2017-08-24 11:19:40 +02:00
Lane Kolbly
f81e6f6b6d
Changed MoveToWorld to ScheduleMoveToWorld in cPlayer::Respawn ( #3922 )
...
* Changed MoveToWorld to ScheduleMoveToWorld
- Removed empty line
2017-08-18 11:40:35 +01:00
Tiger Wang
72d7027861
Merge pull request #3489 from cuberite/EntityOwnership
...
* Changed entity ownership model to use smart pointers
2017-08-18 11:17:56 +01:00
Lane Kolbly
1ec85a2b2c
Add cLuaWindow OnClicked Callback ( #3901 )
2017-08-17 16:27:43 +02:00
Tiger Wang
4ef47aed62
Changed entity ownership model to use smart pointers
2017-08-07 19:24:16 +01:00
peterbell10
79eb4c3aed
Implement invisibility effect
2017-08-03 15:34:38 +02:00
peterbell10
759618b035
Remove double includes part 2 ( #3890 )
2017-08-03 15:34:19 +02:00
Lukas Pioch
4691bc5a29
Removed double includes ( #3885 )
2017-08-02 19:57:20 +01:00
peterbell10
0d0323608d
cBlockHandler: take player by ref
2017-08-01 08:21:20 +02:00
peterbell10
8eb5672920
cWorld::SendBlockTo take player by ref
2017-08-01 08:21:20 +02:00
Lane Kolbly
5402b214b3
Check for intersection between placed blocks and entities. ( #3850 )
...
* Check for intersection between placed blocks and entities.
+ Implemented GetPlacementCollisionBox, to permit custom placement collision boxes for blocks.
* Factored block-entity placement checking into another function in cPlayer.
- Removed vector min/max functions
* Use GetWorld to get the world in DoesPlacingBlocksIntersectEntity.
+ Added block height checks, allow different cEntity subclasses to decide whether they will prevent block placement.
2017-07-28 17:59:21 +01:00
Tiger Wang
eb4432bb62
Tentative fix for player-limit race condition ( #3862 )
...
* Attempts to fix #2257
Derived from d233e9843148313c71fbaba96ccff660e47b07b1
* Changed player count type to int
* Clarified certain actions
2017-07-28 17:54:40 +01:00
Lane Kolbly
87af95b67c
Updated armor cover calculation. ( #3858 )
...
* Updated armor damage calculation.
+ Added lua docs, added casts from float to int.
* Changed verbage in docstring and comment.
2017-07-23 10:46:38 +01:00
Lane Kolbly
a561886bf3
Implemented draggingitem API.
2017-07-10 05:46:04 +02:00
Lane Kolbly
7c7f85117b
Added armor durability reduction when player is attacked.
2017-07-02 07:45:49 +02:00
peterbell10
360d8eade0
FastRandom rewrite ( #3754 )
2017-06-13 21:35:30 +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
Heiko Hund
a0341d561a
Add rank prefix and suffix to player name in chat ( #3730 )
...
Fixes issue #1721
2017-05-27 02:15:56 +01:00
Lukas Pioch
e35ac1bfb9
Clang 5.0 fixes
...
- Added override keyword
- Removed inherited member variables
2017-05-21 12:19:06 +02:00
Lukas Pioch
74ee255cae
Detach player from entity / object if he is dead
2017-03-19 09:48:15 +01:00
mathiascode
dae2adde65
Updated sounds and effect IDs ( #3422 )
2017-02-15 06:05:24 +01:00
Pokechu22
9c2a0bb7b9
Track skin part and main hand preferences ( #3498 )
2017-01-03 21:19:29 +01:00
mathiascode
efc7fed05b
Updated links and docs ( #3488 )
2016-12-19 17:08:19 +01:00
Mattes D
0bffa29358
Removed ClientHandle.h dependencies from common headers.
2016-11-18 20:00:04 +01:00
mohe2015
32b38fb264
Anticheat fastbreak ( #3411 )
...
Added block hardness checks when breaking blocks.
2016-11-06 19:30:19 +01:00
bibo38
cb640ffea4
Spectators added ( #2852 )
2016-10-12 14:38:45 +02:00
sgtbigman
7bcc3535fd
Initialize m_bIsInBed in cPlayer constructor.
...
This fixes an issue where the return value from the IsInBed method of
the cPlayer class in the lua API would not return a boolean value.
2016-10-08 00:58:43 -04:00
LogicParrot
5625598afa
Improve cPlayer::DoMoveToWorld ( #3113 )
2016-09-03 10:39:52 +03:00
LogicParrot
c088f7ff0a
Proper respawn packets on dimension travel
2016-08-29 11:16:06 +03:00
ElNounch
e9d1a942d1
Delay EntityChangedWorld players' callback until Entity fully linked to world ( #3330 )
...
Otherwise, some API calls just don't seem to happen
.gitignore tweak for test executables
2016-08-22 19:43:43 +02:00
Tiger Wang
a5ec2d8ca2
Fixed fall damage
...
* Fixes #3216
2016-06-01 23:46:24 +01:00
LogicParrot
b3d4e0fca6
Fixed death on teleportation or leaving Minecart ( #3181 )
2016-05-03 10:48:39 +03:00
LogicParrot
adac9cb68e
Fix crash on world travel ( #3180 )
2016-05-03 10:05:48 +03:00
LogicParrot
9bec04ab1e
Fix occasional freeze bug
2016-04-13 15:44:08 +03:00
LogicParrot
bb0e885589
Minor improvements to player freeze
2016-04-05 21:47:49 +03:00
LogicParrot
a431b45641
Improved player freeze code
2016-04-05 14:20:50 +03:00
LogicParrot
dd0ce3287f
Players never fall through unloaded chunks or end up inside solids on teleport
2016-03-31 21:35:43 +03:00
LogicParrot
e223eec1c0
Player death crashfix
2016-03-31 19:55:59 +03:00
LogicParrot
8b184e8083
Bed's world is now saved
2016-03-29 15:50:29 +03:00
LogicParrot
83459d0d89
Proper entity destruction in non-ticking chunks
2016-02-19 07:05:22 +02:00
LogicParrot
3efdfca61d
remove cWorld::createAndInitializeWorld
2016-02-08 12:17:10 +02:00
LogicParrot
4aade202e0
cMonster::m_Target safety across worlds
2016-02-03 22:50:17 +02:00
LogicParrot
07b7fd4ad3
Fixed cChunk::m_Entities corruption upon world travel
2016-02-02 17:55:00 +02:00
LogicParrot
439b3304f4
Improved tamed wolf pack cooperation and projectile reactions
2016-01-22 21:16:27 +02:00
LogicParrot
1379b92edf
Fixed wrong knockback direction after explosion damage
2016-01-16 18:48:07 +02:00
LogicParrot
8c12227687
Fix crash when tamed wolf is hit by arrows
2016-01-16 16:37:37 +02:00
LogicParrot
5ca2f4fd0c
Merge pull request #2875 from LogicParrot/fallDamage
...
Fix fall damage crash when tamed wolves neabry
2016-01-16 11:56:19 +02:00
LogicParrot
0601adba25
Fix fall damage crash when tamed wolves neabry
2016-01-16 11:29:11 +02:00
bibo38
41aa7cf123
Limited the username length to 16 characters.
...
This fixes a client crash, because Minecraft requires that a username is not longer than 16 characters.
See also: http://minecraft.gamepedia.com/The_Player#Name
Fixes #2545
2016-01-13 09:55:48 +01:00
LogicParrot
359e772dee
Tamed wolf assists owner (attack / defence)
2016-01-12 11:47:59 +02:00
Mattes D
491dbda7d3
Fixed Clang warnings.
2016-01-06 16:20:12 +01:00
Safwat Halaby
400f875918
Freeze player until chunk is loaded
2015-12-25 17:47:06 +02:00
Gargaj
66e6589883
blockheight mechanism
2015-12-13 15:16:15 +01:00
Gargaj
5e840cf86f
Avoid reading out of bounds
...
as per https://github.com/cuberite/cuberite/pull/2630#discussion_r44377411
2015-11-10 22:22:28 +01:00
Gargaj
51f8e0e36c
fix shallow water + add future code for liquid fall dampening
2015-11-10 00:36:15 +01:00
Lukas Pioch
5ae19fb332
Debug mode: Fixed assertion, if player below y < 0
2015-10-31 14:26:24 +01:00
OdnetninI
545aa2a989
Spectator Mode doesn't fly[FIX]
2015-10-05 21:59:15 +02:00
Lukas Pioch
e56aa4032d
Maked it compileable for clang-3.7
2015-09-25 17:09:19 +02:00
Matti Hänninen
12fb95ba2f
Namespace qualify std::abs, use explicit cast
...
Without 'std' namespace qualification Clang (at least Apple Clang 6.1)
seems to resolve 'abs' to the 'abs' function in 'cstdlib'. This in turn
triggers the 'absolute-value' warning which in turn is promoted to
error.
Implicit casts trigger 'old-style-cast' warnings which are promoted to
errors.
2015-08-22 00:36:29 +03:00
Tiger Wang
de2cce9b79
Fixed food drain bugs
2015-08-20 16:26:42 +01:00
Samuel Barney
804805d35a
Silenced and fixed many warning messages across multiple files.
2015-07-29 09:49:30 -06:00
Tiger Wang
c390604bc1
Merge pull request #2349 from cuberite/maps
...
Improved maps
2015-07-15 17:13:55 +01:00
Tiger Wang
8656e149c8
Improved maps
2015-07-14 21:46:30 +01:00
LO1ZB
405458d5e2
Fix food drain on movement.
2015-07-14 20:30:30 +02:00
Nounours Heureux
d79f601d5a
Added HOOK_KILLED
2015-06-13 10:00:31 +02:00
Lane Kolbly
73b6a44d5f
Implemented nether portal scanning code.
2015-06-09 18:23:57 -05:00
Alexander Harkness
febc8529b1
Fix gamemode not changing properly.
...
Should fix #604
2015-05-23 19:31:33 +01:00
Alexander Harkness
3a27fabbab
Merge pull request #2103 from beeduck/Issue1980
...
Fixed players head visible when in spectator mode
2015-05-23 11:56:39 +01:00
Alexander Harkness
31f66fd812
Merge pull request #2104 from beeduck/Issue2053
...
Fix for players falling through world when loading in as spectator
2015-05-23 07:27:04 +01:00
b33duck
afb96c5bd6
Added a fix for players falling through the world when connecting in spectator mode
2015-05-22 16:33:11 -07:00
b33duck
906288c6eb
Fixed players head visible when in spectator mode
2015-05-22 12:25:16 -07:00
Lukas Pioch
bc838e5bd2
Renamed hook HOOK_ENTITY_CHANGE_WORLD
2015-05-21 12:27:54 +02:00
Lukas Pioch
4d4d1e9c69
Added hooks HOOK_ENTITY_CHANGE_WORLD and HOOK_ENTITY_CHANGED_WORLD
...
Fixes #1435 .
2015-05-18 22:29:39 +02:00
Mattes D
c13b1931ff
More style checking.
...
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
Mattes D
b5998873e4
cPlayer now checks restrictions.
...
Fixes #1331 .
2015-04-25 21:05:43 +02:00
STRWarrior
399392195f
Fixed players not appearing/disappearing when traveling to a new world.
2015-04-03 18:40:20 +02:00
Howaner
a96c21fc0d
Merge branch 'master' into Inventory
2015-03-09 22:39:11 +01:00
joshi07
f71b1fe799
Added OnTeleportEntity hook for plugins.
...
Plugins may or may not allow teleport to the new position.
Updated the HookNotify plugin with it.
2015-03-05 11:52:42 +01:00
DevToaster
f5a216cabc
Changed C-styled casts to static_cast and removed unneeded casts
2015-03-01 03:45:06 +10:30
DevToaster
b65a6ef210
modified: src/Entities/Player.cpp
...
modified: src/Entities/Player.h
2015-03-01 03:03:41 +10:30
Howaner
2c7925f0ad
Merge branch 'master' into Inventory
2015-02-06 21:52:14 +01:00
Mattes D
7dfeb67f01
Converted cServer to use the cNetwork API.
2015-01-27 14:53:31 +01:00
Howaner
1eedccc56a
Merge branch 'master' into Inventory
2015-01-25 00:34:19 +01:00
Tycho
2a9664d6ca
Initial convertion of a_Dt to std::chrono
...
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2015-01-11 21:12:26 +00:00
Mattes D
63de5f8a55
Replaced a std::hash specialization with explicit type.
...
std::hash is problematic in gcc / clang, one has a class, the other a struct.
2014-12-24 08:38:37 +01:00
Mattes D
ccdf03daaf
Refactored all player block placing to go through hooks.
...
Fixes #1618 .
2014-12-24 07:20:17 +01:00
Howaner
6ee7fd3c67
Merge branch 'master' into Inventory
2014-12-17 17:33:30 +01:00
gushromp
b9977a39c3
Added braces to 'if' according to the code guidelines
2014-12-15 18:41:47 +01:00