898 Commits

Author SHA1 Message Date
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
Dylan K. Taylor
ab1150382a Merge branch 'api3/network' into api3/network_mcpe-1.0.5 2017-03-18 16:30:06 +00:00
Dylan K. Taylor
8114ceaf68 Merge branch 'master' into api3/network 2017-03-18 16:29:38 +00:00
Dylan K. Taylor
b7b73aab23 Fixed username regex failing, close #427 2017-03-15 19:22:43 +00:00
Dylan K. Taylor
d26713ab59 Use assoc instead of object for command data, fix data modifications affecting all commands
how did I do manage to do somthing this stupid -_- smh what an idiot
Lucky permission is a root node, or the whole commands system would've been compromised. Epic fail.
2017-03-14 11:39:59 +00:00
Dylan K. Taylor
3c709b1d3e Return false on unhandled/unknown resource pack client response status 2017-03-13 15:52:00 +00:00
Dylan K. Taylor
bb85308b01 Fix undefined variable 2017-03-13 09:46:39 +00:00
Dylan K. Taylor
565335f29e Revert "TODO: REVERT - Added a workaround for client text duplication"
This reverts commit 52748fcf64830453967fab4b43d6e823aeb37ecf.
2017-03-12 16:18:30 -04:00
Dylan K. Taylor
083d1e9ef8 Deprecated Item->deepEquals(), added automatic deep checking in equals(), added some documentation for Item API methods 2017-03-12 14:46:34 +00:00
Dylan K. Taylor
90abc28c29 Merge branch 'api3/network' into api3/network_mcpe-1.0.5 2017-03-12 12:30:56 +00:00
Dylan K. Taylor
6c5dbd7359 Merge branch 'master' into api3/network 2017-03-12 12:22:11 +00:00
Dylan K. Taylor
6f1b12b021 Added new 1.0.5 packets 2017-03-11 19:58:32 +00:00
Dylan K. Taylor
ed765a2c9b Added debug messages for resource requests with invalid pack IDs 2017-03-11 11:19:14 +00:00
Dylan K. Taylor
e1fb4a44e9 Updated PocketMine-Language submodule 2017-03-11 11:03:14 +00:00
Dylan K. Taylor
d41bdfc31c Added resource packs support 2017-03-10 21:10:46 +00:00
Dylan K. Taylor
132e04fdbb Hotbar/inventory bugfixes (#399)
- Fixed most issues with item equipment in creative
- Added save and restore of currently-held item
- Reset hotbar on death, added API method PlayerInventory->resetHotbar()
- Creative players now have more leeway to get items, alleviates issues with item equipment in desktop GUI
- Fixed creative players wearing armour
- Found unknown field in ContainerSetSlotPacket
- Removed outdated/redundant constants
- Use a case statement in ContainerSetSlotPacket handler, added handling for 0x7a hotbar slot link update
2017-03-09 20:31:55 +00:00
Dylan K. Taylor
08cd944e5d Merge branch 'master' into api3/network 2017-03-09 18:12:37 +00:00
Dylan K. Taylor
7e1bdd474a Revert multi-world hack (client issue fixed in 1.0.4.0), close #260
This reverts commit 162b993e65f2e15b25d1997af3b0e77db2bc2de7.
2017-03-09 17:55:25 +00:00
Dylan K. Taylor
c7fdbea0f0 Merge branch 'master' into api3/network 2017-03-08 20:35:41 +00:00
Dylan K. Taylor
9e92a350e3 ClientboundMapItemDataPacket 2017-03-08 20:29:15 +00:00
Dylan K. Taylor
9b47aed0ab Added MapInfoRequestPacket 2017-03-08 20:29:13 +00:00
Dylan K. Taylor
55598ba703 Moaaaar resource packets 2017-03-08 20:29:13 +00:00
Dylan K. Taylor
425686755b Added basic resource-pack response handling, fixed sounds, broadcast sounds received from client
There are still a lot of sounds which do not work, these are supposed to be sent by the server and will be fixed at a later date.
2017-03-08 20:29:04 +00:00
Dylan K. Taylor
6676029319 Improved some handlers, added detection for no-clip 2017-03-08 20:29:03 +00:00
Dylan K. Taylor
e008a3cd5e Added handling for unknown packets 2017-03-08 20:29:03 +00:00
Dylan K. Taylor
d0faf3df91 Added S2C and C2S handshake packet classes and stub handlers
TODO: implement encryption

Add boilerplate reset() for C2S packet encode

This crap really needs fixing
2017-03-08 20:28:52 +00:00
Dylan K. Taylor
564b50ea33 Added API methods for validating usernames and skins 2017-03-08 20:28:41 +00:00
Dylan K. Taylor
56990eb28b MCPE protocol gets its own namespace 2017-03-08 20:28:39 +00:00
Dylan K. Taylor
477cb77002 Exploded Player->handleDataPacket() into 70+ methods 2017-03-08 20:28:20 +00:00
Dylan K. Taylor
93896977d0 Add default 2017-03-07 10:18:58 +00:00
Dylan K. Taylor
f204422432 Fixed precedence issue 2017-03-06 11:40:28 +00:00
Dylan K. Taylor
d6d3184e37 Fixed players can't join if spawn-radius is higher than the player's view distance
TODO: use this properly instead of calculating a count
2017-03-06 11:37:39 +00:00
Dylan K. Taylor
4ee8d14584 Added API for transferring players to other servers (#355)
* Added API method `Player->transfer()` and PlayerTransferEvent
2017-03-04 18:22:31 +00:00
Dylan K. Taylor
1ee689e759 Fixed mess of entity ID 0 for players, fixed emeralds 2017-03-02 11:04:00 +00:00
Dylan K. Taylor
4fbc5738e3 Re-implemented chunk sending (#304)
Re-implement chunk sending, send chunks inside a radius instead of below a count

This sends chunks in concentric squares around players. When the radius is hit, it will pad out the radius until a full circle of chunks is loaded around the player.
TODO: implement radius-per-tick, send chunks in concentric circles, use radius for player spawning.

To set your server chunk radius, change `view-distance` in server.properties. Values are intended to be the same as MCPE render distance values. With matching client and server render distances the chunks should reach the horizon.

NOTE: You may notice significantly increased memory usage per player when increasing these values to something respectable. This is normal and expected.
A player with render distance 14 for example will cause loading of 600+ chunks. A player cannot however exceed the render distance limit set in server.properties - the server will simply not send any more chunks.

Render distance of 8 chunks is approximately 200 chunks. This is roughly equivalent to the original default max-chunks of 192 in pocketmine.yml, but sent in a circle instead of a square.

Wait for client to request a chunk radius before ordering chunks

Use 8 for default maximum radius (roughly matches old setting of 192)

Calculate spawn chunk count from chunk-sending.spawn-radius
2017-03-02 10:30:30 +00:00
Dylan K. Taylor
d588222e84 Added an exception throw for accessing permissions of closed players 2017-02-28 10:49:09 +00:00
Dylan K. Taylor
c3fb2e9f23 Fixed broadcasting quit messages to quitting player, fixed accessing permission of closed players on quit 2017-02-28 10:43:11 +00:00
Dylan K. Taylor
cfb6856634 Fixed Player object memory leak when players with admin channel permissions are closed 2017-02-25 15:39:36 +00:00
Dylan K. Taylor
c21197ef17 Removed entanglement between chunks and providers. WARNING: BREAKING API CHANGES.
- All entity and tile constructors now require a \pocketmine\level\Level instead of a \pocketmine\level\format\Chunk.
- Chunk->getProvider() and Chunk->setProvider() have been removed.
- Chunk::__construct() has had the $provider parameter removed.
- Chunk->unload() has had the unused $save parameter removed.
- ChunkEvents now take a Level parameter instead of going through the Chunk

API bump to 3.0.0-ALPHA4
2017-02-21 17:08:45 +00:00
Dylan K. Taylor
408f63f8fa Accuracy again -_- 2017-02-20 19:46:10 +00:00