Dylan K. Taylor
c4d8c28338
Some inspection fixes
2017-08-16 13:07:33 +01:00
Dylan K. Taylor
23eb8600ab
Added methods for endian-flipping
2017-08-06 18:46:03 +01:00
Dylan K. Taylor
3fdbcee10f
Add some typehints and documentation to MainLogger
2017-08-06 11:43:42 +01:00
Dylan K. Taylor
4e9af1ac45
Fixed several extremely stupid bugs in MainLogger
...
- Fixed log writes being blocking (these were executed on a thread, but IN A SYNCHRONIZED BLOCK - what the fuck shoghi?!)
- Fixed log file being open for reading as well as writing
- The logger will now be buffered for 25ms before writing to disk, as it should have been to begin with.
- Moved the log resource to a local variable (it's unsafe to try to access resources from different threads, this takes away the ability to do so)
- Fixed line endings to use PHP_EOL instead of hardcoded LF, fix viewing logs in Notepadi
2017-08-06 10:56:39 +01:00
Dylan K. Taylor
475066c9f5
Removed minor code duplication in MainLogger
2017-08-06 08:55:46 +01:00
Dylan K. Taylor
ecba80fd63
Fixed some trailing whitespace
...
$ shopt -s globstar
$ sed -i 's/[ \t]*$//' src/pocketmine/*/**.php
:P
2017-08-05 21:07:21 +01:00
Dylan K. Taylor
dbb92096e4
More typehints, documentation fixes and static analysis cleanup
2017-07-15 12:12:06 +01:00
Dylan K. Taylor
2018ad6376
Merge master
2017-07-14 12:12:35 +01:00
Dylan K. Taylor
b5790d19bf
Cleaned up MainLogger registration and declared a typehint
...
Remove null hint from MainLogger::getLogger() so static analysis doesn't complain everywhere
just make sure you register the logger before trying to use MainLogger::getLogger() on a different thread!
2017-07-14 11:39:04 +01:00
Dylan K. Taylor
c3b8be3f60
and more typehints
2017-07-14 10:56:51 +01:00
Dylan K. Taylor
8fc1501e89
Moar typehints
2017-07-14 08:52:27 +01:00
Dylan K. Taylor
2a7b736f18
Heap of bugfixes, cleanup and PHP 7 upgrades
2017-07-13 19:18:56 +01:00
Dylan K. Taylor
4d874e7e78
static analysis
2017-07-13 16:45:24 +01:00
Dylan K. Taylor
9c9095060f
Register MainLogger on AsyncWorkers to make MainLogger::getLogger() usable in AsyncTasks
...
Threaded static properties aren't thread-local anymore in pthreads 3.1.7dev
2017-07-04 16:50:17 +01:00
Dylan K. Taylor
ae612b913e
Fixed config type detection, fixed configs being saved empty
...
Fixes LegendOfMCPE/EssentialsPE#354
When the config file didn't exist, no type detection was performed. This resulted in the case statement for Config->save() falling through and not writing anything to the file.
2017-06-27 16:44:05 +01:00
Dylan K. Taylor
a365c831a8
Fixed some doc problems
2017-06-25 12:07:28 +01:00
Dylan K. Taylor
c0377fc63a
more typehints, removed more 32-bit leftovers
2017-06-25 11:40:12 +01:00
Dylan K. Taylor
6a2a74a457
Improved git hash handling, add dirty git detection and disable automatic reporting for dirty builds
2017-06-22 13:35:04 +01:00
Dylan K. Taylor
e3b3f60c66
Fixed item stack count and effect amplifier overflows, close #1072
2017-06-17 12:22:38 +01:00
Dylan K. Taylor
75cc2d6914
Cleaned up Utils::getIP(), resolved strict-type issues, close #1062
2017-06-11 10:25:48 +01:00
Dylan K. Taylor
2024e9ecdf
Fixed extremely stupid zero-length bug in BinaryStream
...
pls don't kill me 😢
2017-06-10 18:33:54 +01:00
Dylan K. Taylor
4765242397
Drop support for 32 bit systems/PHP ( #984 )
...
* Cutting out 32-bit and minor improvements to bootstrap
* Byeeeeee
* Removing legacy code
* added note to the issue template
as suggested by @xxFlare
2017-06-10 16:11:28 +01:00
Dylan K. Taylor
78c09267e5
Typehinted things in BinaryStream, sorted some methods and related bugfixes
2017-06-07 13:53:10 +01:00
Dylan K. Taylor
51b0673b4b
Bite the bullet and enable strict types on everything
2017-06-07 12:53:16 +01:00
Dylan K. Taylor
2b02fcfe2c
fixed #992
2017-06-04 16:54:35 +01:00
Dylan K. Taylor
2f4943ac90
Fixed some doc issues
2017-06-04 14:27:30 +01:00
Dylan K. Taylor
105917a534
Fixed type issues writing longs and var-longs on 32-bit
2017-06-03 12:04:08 +01:00
Dylan K. Taylor
22ba017965
Binary strict types ( #969 )
...
* Some Binary cleanup, type-hints and strict types
yes, I know this is very crashy... that's good, because it highlights unexpected behaviour
* added some default values
2017-06-03 09:39:45 +01:00
Dylan K. Taylor
e4e4ef5f2a
Fixed preprocessor issues with signed bytes and floats, close #967
2017-06-02 12:50:48 +01:00
Dylan K. Taylor
b6ae92e1a7
Updated crafting data and item serialization for 1.1, fixed #963
2017-06-02 10:36:14 +01:00
Dylan K. Taylor
8382970d56
Merge branch 'master' into mcpe-1.1
2017-05-30 16:09:46 +01:00
Dylan K. Taylor
db3cd1829c
Made Binary::readVarInt/VarLong methods less useless
2017-05-30 14:19:34 +01:00
Dylan K. Taylor
a9afad10bc
BinaryStream no longer extends stdClass, fixed a couple of minor bugs
...
Seems :shoghi: used stdClass to silence IDEs, which before ALPHA5 would complain about myriad undefined fields due to lack of type checking (switch based on packet id 🤦 )
2017-05-15 19:28:39 +01:00
Dylan K. Taylor
71af694cc1
Use getBool() more
2017-05-10 11:30:24 +01:00
Dylan K. Taylor
56306f6636
Merge branch 'master' into mcpe-1.1
2017-05-04 21:15:49 +01:00
Dylan K. Taylor
f889bf9cf5
Fixed player list self-duplication
2017-05-02 12:28:27 +01:00
Dylan K. Taylor
2f87dfdcb0
Merge branch 'master' into mcpe-1.1
2017-04-25 18:05:32 +01:00
SOFe
5a9b5db103
Better cURL API, use async in timings ( #834 )
...
* Improved cURL functions
* Created BulkCurlTask
* Use asynchronous cURL posting in /timings paste
Closes #509
2017-04-25 11:52:18 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
e312c697fd
Merge master into api3/network
2017-04-10 21:21:29 +01:00
SOFe
6b72bbc234
Allow custom JSON pretty print options
...
Resolves #516
Closes #517
2017-04-06 15:05:39 +08:00
Dylan K. Taylor
90f1efc667
Found use of extra bytes in Item serialization
...
No idea why these are separate from the NBT data, but this is what they do.
2017-04-02 19:29:14 +01:00
Dylan K. Taylor
f7e959d602
Fixed inventory crash, fixed crafting
2017-04-02 10:58:39 +01:00
Dylan K. Taylor
16972bf9a5
Fix issues with writing negative numbers as non-zigzag varints, close #493
2017-03-31 18:59:40 +01:00
Dylan K. Taylor
4245274aec
Merge branch 'master' into api3/network
2017-03-25 21:26:46 +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
bcbb5de5bb
Added reference parameters for errors for Utils::getURL() and Utils::postURL(), close #332 ( #357 )
2017-03-16 19:15:31 +00:00
Dylan K. Taylor
f8c2eb8c3a
Fixed signed VarInt encoding on 64-bit systems
...
Numbers represented as hex or binary with the 32nd bit set, for example 0xffffffff, were not considered as signed on 64-bit.
2017-03-09 12:23:24 +00:00
Dylan K. Taylor
295d9bc80b
Cleaned up muddled varint/varlong mess, added separate methods for entity unique and runtime ids, moved some MCPE-protocol-specific methods out of BinaryStream
2017-03-08 20:29:24 +00:00