this is nearly the same as 1.5.0.0, except the skin packet premium boolean has been dropped.
This isn't production ready yet because the blockID table needs updating (waiting on MrARM to fix his script for that).
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.
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.
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)
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.
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.
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.
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...