Commit Graph

458 Commits

Author SHA1 Message Date
3687b149b9 Fix a couple of bugs exposed by php 7.2.0alpha1 2017-06-10 14:51:28 +01:00
7870a8672e Remove useless duplicate check 2017-06-09 16:02:30 +01:00
75863e2a44 OCD commit 2017-06-07 12:54:12 +01:00
87e54d7a3a Send block updates in batches 2017-06-06 11:40:30 +01:00
29e88d8592 Send area broadcasted packets in batches
- I don't know why it wasn't done like this to start with
- This provides a significant lightening of workload for large servers with lots of players in the same area because packets are only compressed once instead of for each player.
- Improves client-sided performance receiving these in batches instead of being spammed with many individual packets.
2017-06-05 23:39:16 +01:00
54453d0b0a Refactored entity IDs in packets for consistency and to clarify on types 2017-06-05 15:41:27 +01:00
26577d9d5b fixed a doc warning 2017-06-04 14:37:06 +01:00
2f4943ac90 Fixed some doc issues 2017-06-04 14:27:30 +01:00
60f5c7ccef Async chunk compression and serialization is now non-optional 2017-05-18 12:19:27 +01:00
046f17c9e2 Merge branch 'master' into mcpe-1.1 2017-05-08 17:43:09 +01:00
c383c7b0dd Found an unknown field in LevelSoundEventPacket 2017-05-05 18:34:52 +01:00
8a7259aa73 Merge #826: use getEffectLevel() instead of getAmplifier() + 1
Closes #412
2017-05-05 19:01:04 +08:00
13fd8b681e Added some sounds, fixed DestroyBlockParticle wrong particles for blocks with different meta values 2017-05-04 16:50:13 +01:00
179210aa27 Merge branch 'api3/network' into api3/network-mcpe-1.1 2017-04-21 22:50:14 +01:00
207056fb9d Fixed adventure mode being useless 2017-04-18 19:51:42 +01:00
b7b7a93e4e Merge branch 'api3/network' into api3/network-mcpe-1.1 2017-04-18 14:52:06 +01:00
d2efcee115 Fixed tiles and entities being closed when replacing chunks, should fix #490 2017-04-18 14:47:42 +01:00
a34573643f Fixed transparent blocks filtering direct sky light 2017-04-18 14:14:19 +01:00
dab73d8950 Implemented sky light generation-time population and updating, obsolete and close #160 2017-04-18 13:05:01 +01:00
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
894beed59b Removed time stopping fields from SetTimePacket and fixed #526
TODO: rules
2017-04-11 20:13:37 +01:00
e312c697fd Merge master into api3/network 2017-04-10 21:21:29 +01:00
630f0fab7f Fixed block update recursion issues (#464)
* Schedule all neighbour block updates to execute at the end of the tick, fixed recursion crash, close #251

* doTickPending timings now include neighbour block update times, refactored some var names
2017-04-01 20:18:56 +01:00
b5f473a3df Throw an exception when attempting to tick closed Levels 2017-03-31 13:14:05 +01:00
40a6f4dee9 Elevated level close check to exception level
As an assertion, this will crash on save if the level is already closed due to the provider being null.
2017-03-30 19:41:42 +01:00
52f2596dc5 Merge branch 'master' into api3/network 2017-03-28 12:27:40 +01:00
1da870b298 Measure block break times in ticks instead of floating-point real-time 2017-03-26 10:36:19 +01:00
7a36d80384 Fixed broken block-break timer logic causing creative players to be unable to remove fire after breaking blocks
This also causes some annoying issues with instabreak (false positives). Shoghi dude, this did _not_ fix those issues, only hid them and replaced them with different ones.
2017-03-26 10:36:19 +01:00
bb79684480 Merge branch 'api3/network' into api3/network_mcpe-1.0.5 2017-03-25 21:31:48 +00:00
4245274aec Merge branch 'master' into api3/network 2017-03-25 21:26:46 +00:00
b9dfc7551a Added Permission to bypass spawn protection, close #440 (#451) 2017-03-25 20:34:42 +00:00
5926bab323 Block light bug fixes (#454)
* Fixed an age-old light calculation bug causing solid blocks to filter their own light, fixed #375, probably fixed #288
Light spread reduction should be done based on the _target's_ light filter level, not the source.

* Revert "Fix Glowing Obsidian lighting"
This hack is no longer necessary.
This reverts commit 35c33ba980.

* Fixed wrong light levels for torch and redstone torch

* Take adjacent light levels and opacity changes into account, block light will now spread when an obstruction is removed, close #455

* Added timings for Level->setBlock() and lighting updates
2017-03-24 17:56:26 +00:00
c21768df26 Updated Effect constants, removed incorrect/misleading SWIFTNESS constant
So what? I'd rather crash plugins than have them suddenly behave strangely because SWIFTNESS is now an alias for SPEED instead of HASTE.
2017-03-21 11:49:18 +00:00
51a20470f6 Switch back to the old chunk-packet method since MoveEntityPacket and SetEntityMotionPacket no longer have lists 2017-03-18 15:03:41 +00:00
56990eb28b MCPE protocol gets its own namespace 2017-03-08 20:28:39 +00:00
d25c8d93ca Revert "Better time ticking and sync (#2)"
didn't consider modded clients, how naive 🤦

This reverts commit e9f2bf0085.
2017-03-02 10:53:40 +00:00
5eab956da6 Add block-break check for spectator mode, fixes players in spectator able to break blocks when adventure settings are not set correctly 2017-02-23 19:39:08 +00:00
282095513a Throw exception when attempting to save a non-generated chunk (#367) 2017-02-21 19:24:16 +00:00
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
91fd99d76a Fixed DestroyBlockParticle 2017-02-12 16:01:23 +00:00
0c35c16727 Fix some doc comments 2017-02-06 14:50:05 +00:00
661f17b6e0 Anti-cheat fixes, settings and API (#287)
* Added options to disable movement checks and anti-instabreak and API methods to control this
* Fixed anti-flight false positives
* Fix flight toggle kick cannot be disabled
* Added PlayerIllegalMoveEvent
2017-01-25 09:40:48 +00:00
21f5be27b6 Added options and API to enable/disable random ticking for specific block IDs 2017-01-23 10:59:27 +00:00
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
0428894cc6 Merge branch 'master' into mcpe-1.0 2017-01-09 16:04:11 +00:00
6fbb9b6083 Check for closed target Levels in Position (#241)
More foolproof
2017-01-09 13:18:28 +00:00
2e865a3af9 Fix doc comment fail 2017-01-08 19:35:28 +00:00
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
598e7aac8f More PhpStorm inspections, import cleanup 2017-01-04 14:55:11 +00:00
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