352 Commits

Author SHA1 Message Date
Dylan K. Taylor
4245274aec Merge branch 'master' into api3/network 2017-03-25 21:26:46 +00:00
Dylan K. Taylor
c9cf3d5aa4 Throw an exception when something attempts to serialize Server (#459) 2017-03-25 10:33:05 +00:00
Dylan K. Taylor
0750b3ab59 Added pocketmine.yml option to disable the title ticker (#447)
This gets really spammy on some consoles when you stick it in the background, but I don't want to lose colour for the sake of that.
2017-03-24 16:03:10 +00:00
Dylan K. Taylor
47f7af6739 Fixed usage reporting cannot be disabled 2017-03-20 21:26:20 +00:00
Dylan K. Taylor
6a03f8d434 Fixed server creating resource packs directory inside itself when running from a phar
Once again, epic facepalm @dktapps
2017-03-20 13:28:45 +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
4c61ad9f2d Stop skipping stack frames (#425) 2017-03-19 10:24:33 +00:00
Dylan K. Taylor
8114ceaf68 Merge branch 'master' into api3/network 2017-03-18 16:29:38 +00:00
Dylan K. Taylor
92193fd27b Use entity IDs in EntityDamageBy*EntityEvents, fixed memory leaks related to PvP/PvE/PvM (#418) 2017-03-13 10:30:31 +00:00
Dylan K. Taylor
d41bdfc31c Added resource packs support 2017-03-10 21:10:46 +00:00
Dylan K. Taylor
56990eb28b MCPE protocol gets its own namespace 2017-03-08 20:28:39 +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
9c36e0cd1c Added crafting data packet cache, reduces on-join lag spikes, close #248 (#269) 2017-01-23 11:03:46 +00:00
Dylan K. Taylor
8ba0b49022 Initial working R/W of 0.16 + 1.0 worlds, highly unstable 2017-01-15 17:26:20 +00:00
Dylan K. Taylor
74c9ed04a0 LevelDB is loaded? Tell me about it 2017-01-15 17:17:57 +00:00
Dylan K. Taylor
b28e38ab26 Move some exceptions out of utils into their relevant namespaces, move some Chunk methods to ChunkUtils for I/O, refactor "colour" -> "color" 2017-01-15 11:31:12 +00:00
Dylan K. Taylor
4577f3ee22 Added config to warn if assertions are enabled and to disable exception throws 2017-01-15 00:38:30 +00:00
Dylan K. Taylor
ad0553fbf8 Bump to API 3.0.0-ALPHA2 - READ DESCRIPTION!
Refactored level\format\generic\GenericChunk -> level\format\Chunk.
Re-added support for async chunk sending
Refactored most Level IO into new namespaces for more organisation
Removed LevelDB loader completely (will be re-added at a later date)
2017-01-06 17:13:45 +00:00
Dylan K. Taylor
096836faaa Moved Entity initialization into Entity class 2017-01-03 22:24:41 +00:00
Dylan K. Taylor
0bd7ea211d Refactored Server::broadcastPacket() to be non-static
Why the hell was this static at all? Seriously Shoghi?
2017-01-03 22:24:40 +00:00
Dylan K. Taylor
747aae94ec Refactor PMCustomAnvil -> PMAnvil 2016-12-23 20:38:31 +00:00
Dylan K. Taylor
e2bbb76900 Use PMCustomAnvil as the default format for new worlds
mcregion is now "deprecated" due to its lack of suitability (fullchunk style, and no support for 256-high worlds)
2016-12-23 18:15:10 +00:00
Dylan K. Taylor
f180167955 Add PMCustomAnvil format
Exactly the same as Anvil, but with XZY data ordering. Significantly more performant than Anvil due to no re-ordering necessary.
2016-12-23 18:15:09 +00:00
Dylan K. Taylor
00158d4805 Refactor namespace of Anvil/McRegion 2016-12-23 11:52:55 +00:00
Dylan K. Taylor
8bdfe0d297 Report CPU and tick usage accurately using averages (#195) 2016-12-22 14:11:46 +00:00
Dylan K. Taylor
e2b143a7cf Merge branch 'master' into mcpe-1.0 2016-12-20 13:03:49 +00:00
Dylan K. Taylor
4063bc4ffb Relocated Server->registerTiles() to Tile::init() 2016-12-20 12:59:27 +00:00
Dylan K. Taylor
90957cd908 Some tile improvements and added ItemFrame tile 2016-12-20 12:59:26 +00:00
Dylan K. Taylor
50d59619a6 Remove unnecessary @throws 2016-12-20 12:25:46 +00:00
Dylan K. Taylor
8db4b7116c Silence this error
Apply STFU operator
2016-12-20 11:08:46 +00:00
SOFe
a122ea9e75 Merge pull request #161 from pmmp/deprecate-version-constants
Deprecate Minecraft game version constants in the `pocketmine` root namespace
2016-12-19 21:21:38 +08:00
Dylan K. Taylor
a8694dcbf7 Relocated MINECRAFT_VERSION and MINECRAFT_VERSION_NETWORK to ProtocolInfo and deprecated the originals 2016-12-19 13:16:29 +00:00
SOFe
175dd0efa6 PhpStorm inspections
Fixed some minor bugs and dropped some obsolete code

pocketmine\level\generator namespace is ignored in this commit
2016-12-14 21:49:35 +00:00
Dylan K. Taylor
a0111d04ee Log exception with backtrace 2016-11-24 21:20:10 +00:00
Dylan K. Taylor
c494af618c Clean up some old code 2016-11-04 21:46:14 +00:00
Dylan K. Taylor
fdf3c0c1c7 Change Unknown Command message colour to Gold to highlight client command issues 2016-10-30 10:20:17 +00:00
Dylan K. Taylor
9d16f145dd Creative inventory update with unknown item filter 2016-10-27 12:13:27 +01:00
Dylan K. Taylor
5eb2459355 Fix player list duplicates 2016-10-27 10:55:02 +01:00
Dylan K. Taylor
dd0c5efb56 Initial spawn on 0.16 2016-10-27 10:55:00 +01:00
Dylan K. Taylor
3692ddab1d Remove duplicate call to gc_collect_cycles
This is already done in forceShutdown(), and if it is not then the
process will have committed suicide and this will never be called
anyway. Either way, it's useless.
2016-10-19 22:08:44 +01:00
SOF3
2a07638af3
Do not show playerNotFound notice if player data should not be saved 2016-10-07 17:52:25 +08:00
Dylan K. Taylor
d6fd9259cf Added options to disable saving player.dat 2016-10-07 10:25:26 +01:00
SOFe
58ff381557 PhpStorm automated formatting (#11)
* PhpStorm reformatting

* Tuned PhpStorm reformatting

* Improved ItemIds and BlockIds formatting

* Tuned more PhpStorm reformatting

* Improved string concatenation
2016-10-03 19:05:48 +08:00
SOF3
e913b16804
Fixed some lines indented with 4 spaces rather than tabs 2016-10-03 00:58:34 +08:00
SOFe
39f731aa06 Remove use of deprecated Utils::getRandomBytes(16) (#3)
Whichever guy did that, somehow this one just got missed out?
2016-10-01 16:08:59 +01:00
Dylan K. Taylor
7b8548b2b1 Added Flower Pots 2016-09-30 19:19:51 +01:00
Tux
8e9a078ff9 Use built-in random_bytes functionality 2016-09-06 11:47:58 +01:00
Intyre
6fb41c5c7f
UpdateBlockPacket fixed and changed skinName to skinId 2016-06-22 01:09:48 +02:00
Jorge González
012d46dfd8 Added Mob Heads
Fixed duplicated items in JSON file
2016-03-22 22:25:36 -06:00
PEMapModder
ed9888a2cb Fixed #3963, closes #3979, added hash for non-numeric seeds 2016-02-22 19:40:40 +08:00