8503 Commits

Author SHA1 Message Date
Dylan K. Taylor
f671da99a6 BlockFactory: fix failing test 2018-10-12 21:40:45 +01:00
Dylan K. Taylor
7af7783cc8 BlockFactory: Register block to id|variant without setting state to allow non-zero default states
This will be needed to deal with things like chest/furnace which don't use 0 as a valid state (these both use facing horizontal for rotation, and vertical is invalid, so 0 would mean downwards facing which is invalid.
2018-10-12 20:05:44 +01:00
Dylan K. Taylor
0520598584 BlockFactory: skip blockstates which corrupt the metadata
if the metadata doesn't match what was inputted when reading back, it's an invalid state and should not be registered.
2018-10-12 19:49:26 +01:00
Dylan K. Taylor
873b64259d Torch: remove trailing comma 2018-10-12 19:07:43 +01:00
Dylan K. Taylor
d151a89037 Vine: don't break when a supported vine is above, closes #2452 2018-10-12 18:38:52 +01:00
Dylan K. Taylor
c96203b528 Set immobile flag on player pre-spawn
The client likes to fall involuntarily as soon as PLAYER_SPAWN PlayStatus is sent, which causes debug spam on the PM side and then movement reversions if falling far enough. This now prevents the client moving until the server knows the client has spawned.
2018-10-12 17:08:22 +01:00
Dylan K. Taylor
acb794e728 Remove garbage from Entity(De)SpawnEvent
These methods:
a) add concrete dependencies
b) are pointless (event->getEntity() instanceof Creature, anyone? an IDE can better understand this as well...)
c) encourage bad code (they don't enforce type contracts the same way an instanceof check does - oh, and why not let's add an is*() for every new mob that gets added ever?
2018-10-12 16:35:51 +01:00
Dylan K. Taylor
97c836f199 Remove nasty network crap from API 2018-10-12 16:31:17 +01:00
Andrew
a944641509 Torch: Fix placement issues when clicking the bottom of a block, closes #2453 (#2474) 2018-10-12 12:26:44 +01:00
Dylan K. Taylor
9901e61d65 Merge branch 'release/3.3' 2018-10-12 09:32:17 +01:00
Dylan K. Taylor
a0ab996b9f Merge branch 'release/3.2' into release/3.3 2018-10-12 09:31:48 +01:00
Dylan K. Taylor
97980d4516 Update composer dependency versions 2018-10-12 09:31:19 +01:00
Dylan K. Taylor
9ac7c75e5b Merge branch 'release/3.3' 2018-10-11 19:44:06 +01:00
Dylan K. Taylor
b261129788 Merge branch 'release/3.2' into release/3.3 2018-10-11 19:42:18 +01:00
Dylan K. Taylor
d9220395d1 Dummy decode for ResourcePacksInfoPacket and ResourcePackStackPacket
while we can't deal with this information, it's needed for the sake of unit testing so we don't shit on every bit of incoming data of these packet types.
2018-10-11 19:42:00 +01:00
Dylan K. Taylor
d583dc25c3 Merge branch 'release/3.3' 2018-10-10 13:45:31 +01:00
Dylan K. Taylor
4f2f373a24 Merge branch 'release/3.2' into release/3.3 2018-10-10 13:41:51 +01:00
Dylan K. Taylor
2858db430e Fixed AsyncTask publishProgress() race condition on task exit
It's possible for a progress update to be lost due to the task finishing before the main thread found the progress update.
2018-10-10 13:41:15 +01:00
Dylan K. Taylor
2e265423c7 Fixed NBT leveldata fixer never getting called 2018-10-10 04:44:45 -04:00
Dylan K. Taylor
e2af394c81 Revert "Level: Identify chunk loaders by their object ID"
This reverts commit 3bb450244fda8c2e7050e44e8a392960ef63f02f.

PhpStorm you lying piece of shit... you only showed me the usages in Level!

This change should be revised and redone later.
2018-10-10 03:59:07 -04:00
Dylan K. Taylor
9b31484655 Merge branch 'release/3.3' 2018-10-09 22:53:44 +01:00
Dylan K. Taylor
de6d62aba2 Merge branch 'release/3.2' into release/3.3 2018-10-09 22:51:40 +01:00
Dylan K. Taylor
32836cbfb8 Don't handle remaining packets in a batch when an earlier one triggered a disconnect 2018-10-09 22:50:02 +01:00
Dylan K. Taylor
8316e00927 Player: Throw exception on failure to encode form JSON 2018-10-09 22:39:48 +01:00
Dylan K. Taylor
3bb450244f Level: Identify chunk loaders by their object ID
chunkloader ID is completely unnecessary extra complication. spl_object_hash() would be fine for this as well, but a number is better. Since it's unique for the object lifetime (and the Level keeps a ref to loaders) this system should work just fine.
2018-10-09 16:32:34 +01:00
Dylan K. Taylor
a653289c40 Rename Plugin->setEnabled() with a more clear name
This is intended to break API in order to jerk the rug out from underneath plugin developers who have been misusing this without noticing the side effects.
2018-10-08 13:06:51 +01:00
Dylan K. Taylor
24677e1d79 Prevent undefined behaviour when accessing async worker thread-store from outside the worker itself 2018-10-08 13:01:12 +01:00
Dylan K. Taylor
a0f3c03b50 oopsie woopsie
I made a fucky wucky! a wittle fucko boingo!
2018-10-08 12:59:47 +01:00
Dylan K. Taylor
6ac0c517f5 Improve and simplify AsyncTask thread-local storage
This is now self-maintaining and doesn't rely on the async pool to wipe its ass on task completion. Instead, the garbage collector will cause thread-local data to be automatically released when the async task is garbage-collected on the main thread.
2018-10-08 12:48:44 +01:00
Dylan K. Taylor
2bc663968e Merge branch 'release/3.3' 2018-10-07 19:45:38 +01:00
Dylan K. Taylor
6f694b0801 Merge branch 'release/3.2' into release/3.3 2018-10-07 19:45:26 +01:00
Dylan K. Taylor
fd459cda54 3.2.5 is next 2018-10-07 19:45:06 +01:00
Dylan K. Taylor
a66dd4a7d9 Release 3.2.4 3.2.4 2018-10-07 19:32:04 +01:00
Dylan K. Taylor
3617eba4a3 Merge branch 'release/3.1' into release/3.2 2018-10-07 19:31:16 +01:00
Dylan K. Taylor
e79cc98883 Release 3.1.8 3.1.8 2018-10-07 19:20:20 +01:00
Dylan K. Taylor
db9b235aa5 Merge branch 'release/3.3' 2018-10-07 17:48:32 +01:00
Dylan K. Taylor
a3552875cb Merge branch 'release/3.2' into release/3.3 2018-10-07 17:48:26 +01:00
Dylan K. Taylor
d259b2c9ee Merge branch 'release/3.1' into release/3.2 2018-10-07 17:48:19 +01:00
Dylan K. Taylor
10fa74b417 Make clear that Plugin->setEnabled() is @internal
Use of this by plugins will produce a lot of undefined behaviour, such as event handlers not being unregistered, scheduled tasks not being removed, and registered permissions causing memory leaks.
2018-10-07 17:48:11 +01:00
Dylan K. Taylor
cc876b0e03 Merge branch 'release/3.3' 2018-10-07 16:36:43 +01:00
Dylan K. Taylor
ab5aec6c30 Event: Remove unnecessary check from call() hot path
This check is completely unnecessary since handlers get unregistered when a plugin is disabled. Additionally, this is an extremely hot path and this change produces a modest 5% performance improvement to event calls.
2018-10-07 16:36:30 +01:00
Dylan K. Taylor
8d1400115e fixed unsupported leveldb format versions crashing the server 2018-10-07 15:42:59 +01:00
Dylan K. Taylor
e13764832d Merge branch 'release/3.3' 2018-10-07 15:34:14 +01:00
Dylan K. Taylor
0e508876d2 RakLibInterface: Disconnect players who trigger errors during handler
this is cleaner than leaving the player hanging for 5 seconds (which they'll often timeout from anyway). Banning the IP without kicking the player can often look like "lag" and end up getting brushed off as a performance issue.
2018-10-07 15:32:23 +01:00
Dylan K. Taylor
7c1432526f Remove pointless ID maths from Level 2018-10-07 15:28:10 +01:00
Dylan K. Taylor
139aaa5577 Protect Item->count 2018-10-07 14:34:04 +01:00
Dylan K. Taylor
82c718cff0 Split Bucket into multiple classes 2018-10-07 14:03:13 +01:00
Dylan K. Taylor
706082deb1 Fixed Flat generator using item ID/damage to build block layers 2018-10-07 12:01:43 +01:00
Dylan K. Taylor
36548a335c Fixed some items disappeared after 5fb782548516316475fd286c48ea2a34c52903ed 2018-10-06 21:30:21 +01:00
Dylan K. Taylor
5fb7825485 Flatten Item variants, remove Item->setDamage() 2018-10-06 20:09:11 +01:00