427 Commits

Author SHA1 Message Date
Dylan K. Taylor
1da870b298 Measure block break times in ticks instead of floating-point real-time 2017-03-26 10:36:19 +01:00
Dylan K. Taylor
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
jasonwynn10
b9dfc7551a Added Permission to bypass spawn protection, close #440 (#451) 2017-03-25 20:34:42 +00:00
Dylan K. Taylor
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 35c33ba980887e9680d62bbcb65f8537bb063f2c.

* 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
Dylan K. Taylor
d25c8d93ca Revert "Better time ticking and sync (#2)"
didn't consider modded clients, how naive 🤦

This reverts commit e9f2bf0085e89955ec6eb7ff9b07b004e8153e2c.
2017-03-02 10:53:40 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
282095513a Throw exception when attempting to save a non-generated chunk (#367) 2017-02-21 19:24:16 +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
91fd99d76a Fixed DestroyBlockParticle 2017-02-12 16:01:23 +00:00
Dylan K. Taylor
0c35c16727 Fix some doc comments 2017-02-06 14:50:05 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
21f5be27b6 Added options and API to enable/disable random ticking for specific block IDs 2017-01-23 10:59:27 +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
0428894cc6 Merge branch 'master' into mcpe-1.0 2017-01-09 16:04:11 +00:00
Dylan K. Taylor
6fbb9b6083 Check for closed target Levels in Position (#241)
More foolproof
2017-01-09 13:18:28 +00:00
Dylan K. Taylor
2e865a3af9 Fix doc comment fail 2017-01-08 19:35:28 +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
598e7aac8f More PhpStorm inspections, import cleanup 2017-01-04 14:55:11 +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
55791e0819 Fix doc formatting from FullChunk -> Chunk mass-replace 2017-01-03 22:24:28 +00:00
Dylan K. Taylor
69061ba4ad Removed the need for subchunks to know their Y coordinates 2017-01-01 14:12:58 +00:00
Dylan K. Taylor
0e10a149ef Refactor Level::chunkBlockHash() (makes no sense to put it here) 2017-01-01 01:10:10 +00:00
Tim (robske_110)
6d2a57f83a Prevent attempting to calculate lighting changes below y = 0 (#201) 2016-12-23 20:16:28 +00:00
Dylan K. Taylor
2930cf80b4 Merge branch 'master' into mcpe-1.0 2016-12-16 10:29:58 +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
e92052c2ab Fix blockhash fail (this would have returned excessive Y coordinates including the bits for X!) 2016-12-05 16:31:47 +00:00
Dylan K. Taylor
25560a52b0 Remove unused Level field 2016-12-05 16:26:45 +00:00
Dylan K. Taylor
aafe0c4f69 Remove biome colours and fix biome id arrays 2016-12-04 15:12:23 +00:00
Dylan K. Taylor
577dbbce1f Support 256-block build height and fixed world saving 2016-12-01 23:45:12 +00:00
Dylan K. Taylor
ce289cbe25 Merge branch 'master' into 0.17-chunks 2016-12-01 17:50:12 +00:00
Dylan K. Taylor
d6629d6843 More ?? (#131)
* More ??

* fix undefined variable
2016-11-30 10:07:37 +00:00
Dylan K. Taylor
4c49db6036 New generic in-memory chunk format, fixed 0.17.0.1 chunk loading
Terrible performance, needs profiling. TODO: fix this.
2016-11-27 21:57:59 +00:00
Dylan K. Taylor
60260a294b Remove chunk order fields 2016-11-27 21:57:59 +00:00
Dylan K. Taylor
e51a2725de Remove circular dependency between Item and NBT modules (#121) 2016-11-25 10:17:50 +00:00
Dylan K. Taylor
86ed0f1397 Updated existing packets and added new ones 2016-10-27 10:55:01 +01:00
Intyre
e7e476b65e
Wooden and Stone slabs both placable 2016-10-18 18:19:58 +02:00
Intyre
bcc641a25a
Fix for slab placing, close #31 2016-10-18 17:37:40 +02: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
SOF3
6fc435da0e
Imports rearrangement 2016-10-03 00:43:46 +08:00
Dylan K. Taylor
e9f2bf0085 Better time ticking and sync (#2)
* Remove unnecessary SetTimePacket spam

This is handled automatically client-side, as long as it is calculated correctly server side there is no issue (unless the server hits a spot of bad lag)

* Better client/server time sync when lagging
2016-10-02 12:54:27 +01:00
thebigsmileXD
900c4adb66 Create sign tile like it should be. 2016-09-30 19:19:56 +01:00
Dylan K. Taylor
e962f7fb0a Fixed bug in updateAround where only one block is updated 2016-09-30 19:19:54 +01:00
dktapps
795d6c8ddf Fix entity-related memory leak on chunk unload 2016-09-30 19:19:48 +01:00
dktapps
a6f8379c40 Fix time bugs 2016-09-28 13:59:52 +01:00
Intyre
6fb41c5c7f
UpdateBlockPacket fixed and changed skinName to skinId 2016-06-22 01:09:48 +02:00
Intyre
df8e1e8702
Spawn unleashed, movement fixed and some Player DataProperty cleanup 2016-06-22 00:08:52 +02:00
PEMapModder
f82c59bdc4 Fixes #3991, closes #4011 2016-03-15 22:52:49 +08:00
PEMapModder
0b06a4f703 Fixed #3692; fixed "arrows should not catch fire in fire blocks" 2016-03-10 17:45:06 +08:00
PEMapModder
781de3efab Addresses #4024 2016-03-06 23:13:33 +08:00