Dylan K. Taylor
b333a0e24c
PlayStatusPacket: add new constant
2018-05-17 10:33:18 +01:00
Dylan K. Taylor
8312ad709e
InventoryTransaction: Removed creationTime
...
this is no longer necessary because transactions now always arrive in a single packet.
2018-05-16 12:14:29 +01:00
Dylan K. Taylor
63fc04b3dd
thanks for being useless PhpStorm
2018-05-13 11:56:32 +01:00
Dylan K. Taylor
34b8557094
Moved parseDocComment from PluginManager to Utils
2018-05-13 11:24:04 +01:00
Dylan K. Taylor
edaef588ab
CommandReader: remove unnecessary setClassLoader() call
...
this is already handled in start() anyway.
2018-05-12 12:47:28 +01:00
Dylan K. Taylor
889222e9c5
MainLogger: Use PTHREADS_INHERIT_NONE
...
this thread doesn't need to inherit anything because its sole purpose is to write log messages to file.
2018-05-12 12:39:13 +01:00
Dylan K. Taylor
8239c67b1a
Enchantment: split up primary and secondary flags
...
closes #1911
2018-05-12 11:20:27 +01:00
Dylan K. Taylor
ed65e91a3c
Tree: avoid astonishing behaviour with dark-oak and acacia saplings
...
ref #1973 , these should simply not grow at all since they are not implemented yet.
2018-05-12 10:03:20 +01:00
Dylan K. Taylor
619390c5b7
Sapling: Account for light level when trying to grow on random ticks
2018-05-11 09:53:03 +01:00
Dylan K. Taylor
7e70569ba2
Player: Send all open inventories instead of hardcoded selection
...
Players have a few associated inventories which might need sending nowadays, such as main, armour, offhand (not implemented yet), cursor, crafting (if it ever worked). Under these conditions we should be sending all open windows.
2018-05-11 09:28:59 +01:00
Dylan K. Taylor
083ac8a770
Clean up Tool garbage leftovers
...
these were intended to be removed long ago, but other things came up and durability handling still depended on them.
2018-05-11 09:23:51 +01:00
Dylan K. Taylor
b21572774a
Tool: cleanup durability handling, closes #379
...
long overdue... this isn't quite as extensible as the original api3/blocks system was, but this is primarily intended to replace Item->useOn(). If plugins want to use it it can be extended later on.
2018-05-10 19:48:51 +01:00
Dylan K. Taylor
b8523cb304
Merge branch 'remove-weak-position'
2018-05-10 13:53:07 +01:00
Dylan K. Taylor
6ceb9af749
.-.
2018-05-10 12:51:39 +01:00
Dylan K. Taylor
bcd197d7bb
AsyncWorker: fixed __construct() signature
2018-05-10 12:50:09 +01:00
Dylan K. Taylor
3148f692c1
AsyncWorker: No need to register static logger - it's inherited by default with pthreads 3.1.7
2018-05-10 12:49:03 +01:00
Dylan K. Taylor
d8d22efc3b
Server: avoid abusing Throwable in a couple of places
2018-05-10 12:46:13 +01:00
Dylan K. Taylor
7b3653f75d
SetupWizard: remove dead constant
2018-05-10 12:39:15 +01:00
Dylan K. Taylor
9c5f7128a4
RCON: lots of cleanup, now notification-based instead of poll-based
...
This now utilizes Snooze in order to have the server wake up to process RCON commands ondemand, similar to how the CommandReader thread operates. This is better for performance and response times.
This also makes a few other changes:
- RCON thread will now waste less CPU since it uses a blocking select() with timeout to read
- Following from that, IPC sockets are used to allow interrupting select() from the RCON thread.
- Multiple threads for RCON has been removed (this is entirely unnecessary, reading data from sockets is not CPU-intensive, and a single thread is easier to work with)
2018-05-10 12:33:05 +01:00
Dylan K. Taylor
1e4a97f921
Server: remove dead code from forceShutdown()
2018-05-10 11:30:50 +01:00
Dylan K. Taylor
4d743ade45
CrashDump: resource hygiene
2018-05-10 11:29:16 +01:00
Dylan K. Taylor
78b5cc993b
Server: fixed signatures and type-checks for logger
...
this might not be a MainLogger instance, but it definitely has to be an \AttachableThreadedLogger instance.
2018-05-10 10:49:41 +01:00
Dylan K. Taylor
5e91c05424
Server::getIp() now returns 0.0.0.0 if the IP string is empty
2018-05-10 10:25:44 +01:00
Muqsit
e7c5d14af3
Fix DoubleSlab name ( #2177 )
2018-05-09 21:17:35 +01:00
Dylan K. Taylor
126a97b405
ServerKiller: fixed start/stop race condition
...
in some cases the main thread was trying to signal the server killer to stop before it was even started due to limited resources available for scheduling.
2018-05-09 20:59:56 +01:00
Dylan K. Taylor
753ed3801d
update RakLib version
2018-05-09 20:18:36 +01:00
Dylan K. Taylor
68ef4b210d
Allow RakLibServer to inherit constants (PATH const is needed for exception logging)
...
this is very annoying and needs a better fix.
2018-05-09 20:08:25 +01:00
Dylan K. Taylor
c3822b795c
CommandReader: use PTHREADS_INHERIT_NONE
...
probably not necessary to register autoloader, but just in case...
2018-05-09 20:02:51 +01:00
Dylan K. Taylor
be0e85dfae
CommandReader: fix notifier race condition crash, don't start self in constructor
...
self-start is extremely annoying!
2018-05-09 20:01:16 +01:00
Dylan K. Taylor
72690ea7f5
RakLibInterface: start RakLibServer with PTHREADS_INHERIT_NONE
...
this is now OK since the logger colours will be initialized on the fly.
2018-05-09 20:00:09 +01:00
Dylan K. Taylor
c9bd60123b
Scheduler: shutdown async pool properly instead of relying on ThreadManager
2018-05-09 19:49:12 +01:00
Dylan K. Taylor
05f4262e81
MainLogger: moved format to private variable
2018-05-09 18:14:46 +01:00
Dylan K. Taylor
dd11bcaf11
Fixed #1979 : logger colours don't show on other threads when classes are not inherited
2018-05-09 18:07:12 +01:00
Dylan K. Taylor
b96adda14d
MainLogger: Colorize at point of echo, not beforehand
...
this removes the need for a hack I had to do with ClientConsole to translate ANSI colour codes back into MC colour codes.
2018-05-09 18:04:16 +01:00
Dylan K. Taylor
5c66c615bf
Living: fix possible crash in getTargetBlock()
...
ArrayOutOfBoundsException is not thrown by SPL anymore since the exception handler throwing it was removed by @shoghicp. Regardless, it seems cleaner to to check it properly.
2018-05-09 17:11:37 +01:00
Dylan K. Taylor
2ff2a2de08
FormattedCommandAlias: use multiple catch clauses
2018-05-09 16:58:55 +01:00
Dylan K. Taylor
78f8d54f89
Merge branch 'release/alpha12'
2018-05-09 16:53:41 +01:00
Dylan K. Taylor
5b6762d0d5
Fixed lang submodule version
2018-05-09 14:53:22 +01:00
Dylan K. Taylor
2a0a2134d1
Server: Implemented an signal/sleep interrupt mechanism for ticking ( #2171 )
...
This allows other threads to notify the main thread to wake it up while it's sleeping between ticks, allowing reduction of processing latency.
Currently only RakLib and the CommandReader threads utilize this, but it's planned to extend it to more things in the near future.
CommandReader is now event-driven instead of poll-based - the server will not poll the CommandReader thread for messages each tick anymore.
RakLib utilizes this mechanism to get packets processed without delays to lower latency.
This now adds an extra dependency - `pocketmine/snooze` library contains the meat of the code used for this. See the Snooze repository for details.
2018-05-09 14:18:13 +01:00
Dylan K. Taylor
e70af362d0
RCONInstance: fixup bad continues
2018-05-07 13:55:23 +01:00
Dylan K. Taylor
24aab8365e
RCONInstance: remove redundant size ref param from readPacket()
2018-05-07 13:53:34 +01:00
Dylan K. Taylor
0e5504ed3f
RCONInstance: add docs to fields, make 'stop' private
2018-05-07 13:52:33 +01:00
Dylan K. Taylor
83008440c0
RCONInstance: replace hardcoded status values with constants
...
I thought I'd seen the worst of PM, but I haven't.........
2018-05-07 13:44:59 +01:00
Dylan K. Taylor
b14dfa9f7e
RCONInstance: Remove pointless code that makes pthreads segfault
...
pthreads doesn't play well with resources, and this code upsets it. Also, this code is utterly pointless.
The whole of RCON needs burning to the ground...
2018-05-07 10:05:05 +01:00
Dylan K. Taylor
197102ca3d
Level: fixed blocks not dropping when not broken by player
...
closes #2172
2018-05-05 21:50:28 +01:00
Dylan K. Taylor
f497e43db3
SourceInterface: removed redundant return value from process()
2018-05-05 15:30:46 +01:00
Dylan K. Taylor
38c3f00ef7
avoid crashes when XUID is null
2018-05-05 13:33:13 +01:00
Dylan K. Taylor
396056c636
Sign: Pad exploded blob to appropriate size
...
I'm not sure how it's possible to get one of these blobs with less newlines than expected, but whatever I guess
closes #2152
2018-05-04 23:29:32 +01:00
Dylan K. Taylor
dd1dfefd83
ItemEntity: remove unnecessary damage types restrictions
...
Invalid damage types are all restricted by other means anyway. This fixes items not getting killed by fire (close #2143 ) and cacti.
2018-05-04 22:57:28 +01:00
Dylan K. Taylor
68638f9779
Fixed translations
...
Apparently the translation type doesn't translate unless this flag is set now...
2018-05-04 22:14:02 +01:00