Commit Graph

707 Commits

Author SHA1 Message Date
559504225a Throw an exception before calling base entity constructor if skin is not set or invalid, close #835 (#855) 2017-04-24 09:50:55 +01:00
6ece57e23e Merge changes from master 2017-04-21 22:48:18 +01:00
207056fb9d Fixed adventure mode being useless 2017-04-18 19:51:42 +01:00
d2efcee115 Fixed tiles and entities being closed when replacing chunks, should fix #490 2017-04-18 14:47:42 +01:00
eefa8abaf2 Throw exceptions if something attempts to add a closed Tile or Entity to a chunk 2017-04-18 14:45:33 +01:00
8a775e0c45 Fix PopSound giving failed click sound. (#829) 2017-04-15 10:02:00 +01:00
a455e25665 Merge remote-tracking branch 'jacknoordhuis/patch-2' 2017-04-13 13:28:06 +00:00
1c7773c5f1 Visibility keyword before final or abstract keyword. (#814) 2017-04-13 20:58:53 +08:00
c01e0354bd Address #816
Removes redundant compression argument from NBT::readCompressed() and
NBT:: readNetworkCompressed()
2017-04-12 00:42:27 +10:00
e312c697fd Merge master into api3/network 2017-04-10 21:21:29 +01:00
dda47ee566 Fix typo in explosion (#700) 2017-04-10 09:17:34 +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
202bac28fc Merge master into api3/network 2017-04-01 19:37:15 +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
1c3d89cfef Fixed lighting issues with subchunks containing no blocks
A subchunk with no blocks is not necessarily empty.
2017-03-29 11:34:43 +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
f98a964cdc Fixed and silenced some inspections 2017-02-23 15:17:28 +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
2ff565afe5 Fix heightmap crashes at the corner of chunks
Stupid unpack() return array indices start at 1, not 0 >_<
2017-02-20 10:28:50 +00:00
91fd99d76a Fixed DestroyBlockParticle 2017-02-12 16:01:23 +00:00
8f9c52507a Some PhpStorm cleanup 2017-02-12 12:36:02 +00:00
5a12f40074 Only Region file formats are allowed as parameters for RegionLoaders 2017-02-12 12:18:25 +00:00
d430ad50be Fixed wrong temperature and temperature -> rainfall (#347) 2017-02-11 20:15:22 +00:00
06de85fd33 Revert "Fix entities missing in imported leveldb worlds", fixed entities missing after restart in anything OTHER than LevelDB
🤦 I should test this stuff more

This reverts commit ffadc34691.
2017-02-11 19:22:59 +00:00
ffadc34691 Fix entities missing in imported leveldb worlds 2017-02-11 11:15:15 +00:00
0c35c16727 Fix some doc comments 2017-02-06 14:50:05 +00:00
0535acf211 Update some LevelEvents 2017-01-27 18:21:11 +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
e4c889ae16 Check if the array contents are already the same, massive performance improvement for Anvil in a lot of cases 2017-01-18 20:04:19 +00:00
7de7593b89 Improved nibble array re-ordering in most cases by checking for common values 2017-01-18 19:51:43 +00:00
bcf049a660 Remove obsolete methods from Chunk 2017-01-15 18:03:40 +00:00
0114cb8399 Better vanilla layers support (no meta, MCPE doesn't support it) 2017-01-15 17:26:21 +00:00
b72218ac5b Fixed flat world terrain generation by MCPE 2017-01-15 17:26:21 +00:00
6b9c2b961b Fix invalid timestamp causing W10 Edition to crash, fixes one bug in #254 2017-01-15 17:26:20 +00:00
8ba0b49022 Initial working R/W of 0.16 + 1.0 worlds, highly unstable 2017-01-15 17:26:20 +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