737 Commits

Author SHA1 Message Date
Dylan K. Taylor
caf4937222 Fixed arrow flight and spawning bugs, fixed critical trail, close #420 2017-04-26 18:55:48 +01:00
Dylan K. Taylor
7a2ed232cc Merge branch 'api3/network' into api3/network-mcpe-1.1 2017-04-24 13:56:19 +01:00
Dylan K. Taylor
d682fdfdf0 Food and exhaustion should not apply in creative, close #860 2017-04-24 13:31:05 +01:00
Dylan K. Taylor
0e7f364a41 Fixed chunk object memory leak when chunks are changed, close #419
If a player quit the server in the 1-second between a chunk changing and a fresh chunk-order requesting a resend of that chunk, the player wouldn't know they were using that chunk and did not unregister themselves, causing the subject chunks to always remain loaded.
2017-04-24 11:55:33 +01:00
Dylan K. Taylor
179210aa27 Merge branch 'api3/network' into api3/network-mcpe-1.1 2017-04-21 22:50:14 +01:00
Dylan K. Taylor
6ece57e23e Merge changes from master 2017-04-21 22:48:18 +01:00
Dylan K. Taylor
2204942338 Fixed the half-done hunger implementation, fixed lots of bugs related to hunger
- Fixed starvation doesn't deal any damage at all (Human->getFood() returns a float, not an int, === 0 won't work so great)
- Added exhaustion for sprinting, walking, jumping and sprint-jumping as per MCPE (these use MCPE values, and yes MCPE does walking exhaustion!)
- Fixed attributes don't get reset after player death
- Added food and hunger regeneration in peaceful difficulty
- Added API methods Living->jump() (motion isn't updated yet, so this won't actually do much if plugins try to use it) and Living->getJumpVelocity()

TODO: implement exhaustion for swimming
2017-04-21 19:48:25 +01:00
Dylan K. Taylor
00a226921c Fixed server crash when taking damage after being killed when having Health Boost effect 2017-04-21 18:52:04 +01:00
Dylan K. Taylor
3f1790bcb8 Found some missing data flags and proper fix for ladders 2017-04-20 19:42:00 +01:00
Dylan K. Taylor
86de0bddd9 World should only be completely immutable if we're in spectator mode
Fixes being unable to break any blocks at all in adventure mode
2017-04-18 20:01:51 +01:00
Dylan K. Taylor
b55929b382 Merge branch 'api3/network' into api3/network-mcpe-1.1 2017-04-15 10:30:02 +01:00
Dylan K. Taylor
4ab8233fe0 Fixed shooting bow while sprinting, close #827 2017-04-14 15:27:32 +01:00
Dylan K. Taylor
a327a74ece Protocol changes for 1.1.0.3, fixed red sky, fixed crashes 2017-04-14 15:17:56 +01:00
Dylan K. Taylor
f3ab45e7d5 Merged in 1.0.6 changes, added autogenerated data for 1.1.0.3 (doesn't work yet) and deliberately made the same merge error as Mojang 2017-04-14 13:00:43 +01:00
Muqsit Rayyan
319763dd93 Fix #823
Thanks to @SuperMaXAleX
2017-04-13 22:32:53 +03:00
Sandertv
1c7773c5f1 Visibility keyword before final or abstract keyword. (#814) 2017-04-13 20:58:53 +08:00
Dylan K. Taylor
cb7264e0e5 Hexdump unhandled packets 2017-04-12 11:20:58 +01:00
Dylan K. Taylor
f7e1939ae8 Changed some handling of unknown packet content 2017-04-12 11:16:50 +01:00
Dylan K. Taylor
894beed59b Removed time stopping fields from SetTimePacket and fixed #526
TODO: rules
2017-04-11 20:13:37 +01:00
Dylan K. Taylor
e312c697fd Merge master into api3/network 2017-04-10 21:21:29 +01:00
Luke | 14
80292c6c7a Actually use iusername instead of repeatedly lowercasing player names (#811)
#blameshoghi
2017-04-10 21:15:38 +01:00
Dylan K. Taylor
f7e959d602 Fixed inventory crash, fixed crafting 2017-04-02 10:58:39 +01:00
Dylan K. Taylor
874afc2fd2 fixed players need to move to pick up dropped items, close #498 2017-04-01 19:33:16 +01:00
Dylan K. Taylor
9c25ec3afd Some protocol changes for 1.1.0.0 2017-04-01 19:20:30 +01:00
Dylan K. Taylor
e47c7ea55f A bunch of really dirty hacks to get 1.1.0.0 working
Mojang: once again, what the hell have you done.
2017-04-01 19:18:15 +01:00
Dylan K. Taylor
b24d516eda Send TransferPacket with immediate priority, should fix #497 2017-04-01 10:40:05 +01:00
Dylan K. Taylor
7f838a8c36 Fixed crashes due to adding players 'online' far too early, fixed some Player save logic 2017-03-31 13:45:28 +01:00
Dylan K. Taylor
69ac80518c some improvements to the horrendous mess that is the handling of joining and quitting, fixed some crashes, probably caused some other crashes
I can't fix this completely because it's just too much of a fucking mess. NEED to separate network stuff from Player.
2017-03-30 19:33:47 +01:00
Dylan K. Taylor
45e5b6b04c Do not subscribe to broadcast permissions until the player spawns
This is unnecessary since the player won't see any messages sent before they spawn anyway. This was also causing an occasional client-sided crash due to TextPackets being sent to players at bad times during the login sequence.
2017-03-30 16:29:18 +01:00
Dylan K. Taylor
cb059ea713 fix some PhpStorm inspections 2017-03-30 12:10:59 +01:00
Dylan K. Taylor
6b747f9272 Added basic API for working with titles 2017-03-29 20:02:16 +01:00
madecode15
c84ec90398 Set forceMovement to null when player is closed (#472)
Cater for the very very very slim chance that a player could quit while teleporting, be leaked and then have their level unloaded and leak their level.
2017-03-29 09:20:31 +01:00
Dylan K. Taylor
3e76c3a6dd Added handling for tile picking, added API for setting item lore
worked almost out of the box (some W10 equipment bugs though)
2017-03-28 18:47:51 +01:00
Dylan K. Taylor
52f2596dc5 Merge branch 'master' into api3/network 2017-03-28 12:27:40 +01:00
Dylan K. Taylor
2079e2fd88 Fixed entity visibility Player object memory leak, close #416 2017-03-28 12:26:02 +01:00
Dylan K. Taylor
07f32765ba Merge branch 'api3/network_mcpe-1.0.5' into api3/network 2017-03-26 18:52:30 +01:00
Dylan K. Taylor
788bd6fc20 Fixed resource packs/login sequence fail, added basic safety restrictions for packet sending before clients are logged in
close #452
2017-03-26 14:42:23 +01:00
Dylan K. Taylor
01440fb659 Fixed players receiving double SetEntityMotionPackets for themselves 2017-03-26 13:40:39 +01:00
Dylan K. Taylor
dda8c6cc8f Removed a condition that's been useless almost since the beginning of PocketMine
This condition has been useless since before NBT was introduced to PocketMine.
If there was a use for it, it should have been placed BEFORE anything attempted to read from the NBT.

However, Server now handles bad data automatically now, so Server->getOfflinePlayerData() will never _not_ return a CompoundTag. Hence I've added a CompoundTag type-hint.
2017-03-26 13:20:46 +01:00
Dylan K. Taylor
bb79684480 Merge branch 'api3/network' into api3/network_mcpe-1.0.5 2017-03-25 21:31:48 +00:00
Dylan K. Taylor
4245274aec Merge branch 'master' into api3/network 2017-03-25 21:26:46 +00:00
Dylan K. Taylor
a5a51fb9c5 Merge branch 'master' into api3/network_mcpe-1.0.5 2017-03-21 10:47:41 +00:00
Irish
06f2a9c674 Fix client-side death bug (#438) 2017-03-20 12:21:58 +00:00
Dylan K. Taylor
0e64d4bbc2 Given Player->iusername a use, added Player->getLowerCaseName()
Micro optimizations by not repeatedly lowercasing names when searching
2017-03-20 12:21:02 +00:00
Dylan K. Taylor
284c18d401 Added debug for mismatched item equipment
tool damage packets sent in the wrong order?
This could be bad for performance since the entire inventory is resent every time this issue crops up.
2017-03-20 10:58:43 +00:00
Dylan K. Taylor
6ba4a8fe5c Moved batch packet handling into BatchPacket->handle(), fixed data packet receive timings to include MCPE packet decode time 2017-03-20 10:26:53 +00:00
Dylan K. Taylor
4638ccbb68 Remove this workaround (client bug fixed in 1.0.5 beta) 2017-03-19 21:58:12 +00:00
Dylan K. Taylor
36cda5de61 Merge branch 'api3/network' into api3/network_mcpe-1.0.5 2017-03-19 21:54:14 +00:00
Dylan K. Taylor
9c350dbe47 Fixed DataPacketReceiveEvent, fixed packet receive timings, gave Player->handleDataPacket() a new use 2017-03-19 21:50:09 +00:00
Dylan K. Taylor
be449b6106 Removed useless condition from RemoveBlockPacket handler 2017-03-19 10:32:54 +00:00