Dylan K. Taylor
51a8c2be9d
Player: Move rollback responsibility to network for interact/break block
...
Custom player implementations might not need rollbacks (f.e. Specter).
2019-05-09 14:54:56 +01:00
Dylan K. Taylor
ca7c23c137
Player: remove dead functions
...
these functions belong in the network session, and they are currently just proxies for them. In the future we might have players who don't have IPs at all depending on how they connected (for example Specter) so this stuff shouldn't be in here.
2019-05-08 19:47:25 +01:00
Dylan K. Taylor
4634baeb02
Player: don't repeat yourself
2019-05-08 19:38:57 +01:00
Dylan K. Taylor
cf73c7f5c1
Cleanup to world provider exception handling
2019-05-08 18:26:41 +01:00
Dylan K. Taylor
a51c06116a
Merge branch 'stable'
2019-05-08 17:04:37 +01:00
Dylan K. Taylor
f782a478c4
Player: clarify resetTitles() documentation
2019-05-08 17:03:40 +01:00
Dylan K. Taylor
19ac0811f4
Player: remove deprecated title functions
2019-05-08 16:44:18 +01:00
Dylan K. Taylor
a331c5e13f
Player: reduce SetTitlePacket creation boilerplate
...
it's better to encapsulate all this logic in one place so that third party developers can more easily understand this, and also to reduce the amount of crap we have in Player.
2019-05-08 16:43:05 +01:00
Dylan K. Taylor
9fbf41b9a1
Merge branch 'stable'
2019-05-08 15:41:17 +01:00
Dylan K. Taylor
c06b4830d1
Player: don't spawn entities on out-of-sync chunks on join, closes #2911
2019-05-08 15:36:54 +01:00
Dylan K. Taylor
fc90cdcc95
fix #2910 WorldManager->getLevel() missed in refactor
2019-05-08 14:05:42 +01:00
Dylan K. Taylor
cf0c0e72a9
Assume the player is online when they are, uh, assumed to be online
...
the checks removed here should never be hit under normal circumstances. If they were hit, they'd just conceal bugs which would cause a crash to happen later anyway.
2019-05-07 19:49:06 +01:00
Dylan K. Taylor
78bb6f4a0c
Reduce complexity of chunk sending system
2019-05-07 19:26:01 +01:00
Dylan K. Taylor
51548d1a27
World: remove useless internal function
...
this just complicates the logic for no reason. It had a purpose once, but no longer.
2019-05-07 18:51:26 +01:00
Dylan K. Taylor
c1a483a36d
move entity spawning logic back to Player
2019-05-07 18:35:04 +01:00
Dylan K. Taylor
d7a7ab5102
Move Entity despawn logic back to Player
...
this is not network-session specific, and different implementations will need to do this.
2019-05-07 18:01:23 +01:00
Dylan K. Taylor
66481fedeb
Entity: Protect internal methods setPosition() and setPositionAndRotation()
...
teleport() should be used instead (or setRotation() for rotation-only changes).
2019-05-07 17:38:33 +01:00
Dylan K. Taylor
00944eff72
Removed EntityWorldChangeEvent
...
there's nothing that can be done with this event that can't be done with EntityTeleportEvent. Having this extra event needlessly increases system complexity.
2019-05-07 17:37:10 +01:00
Dylan K. Taylor
cb3a225d45
Merge remote-tracking branch 'origin/stable'
2019-05-07 17:28:07 +01:00
Dylan T
3cd6e12e71
Renaming "Level" -> "World" ( #2907 )
...
This has been a pain point for a long time due to the misleading nature of the name "level". It's also confusing when trying to do things like getting the XP level of the player or such, and also does not translate well to other languages.
This transition was already executed on the UI some time ago (language strings) and now it's time for the same change to occur on the API.
This will burn a lot of plugins, but they'll acclimatize. Despite the scary size of this PR, there isn't actually so many changes to make. Most of this came from renaming `Position->getLevel()` to `Position->getWorld()`, or cosmetic changes like changing variable names or doc comments.
2019-05-07 14:47:28 +01:00
Dylan K. Taylor
427e334426
rename PacketStream to PacketBatch
2019-05-06 19:58:02 +01:00
Dylan K. Taylor
ce61c6e0fd
PacketStream: added fromPackets() sugar
2019-05-06 19:54:42 +01:00
Dylan K. Taylor
3415edf600
PacketStream: add @throws
2019-05-06 17:46:37 +01:00
Dylan K. Taylor
c2771eba88
use the appropriate API for decoding packet batches
2019-05-06 17:46:17 +01:00
Dylan K. Taylor
82974e0271
NullSessionHandler: possibly premature optimization
2019-05-06 17:28:56 +01:00
Dylan K. Taylor
685481b172
NetworkSession: improve GC performance without crashing everything
...
this is necessary because some handlers have circular references to the session, which causes GC lag collecting them. This change allows them to be collected immediately without nuking internal state.
2019-05-06 16:43:05 +01:00
Dylan K. Taylor
5250a432d1
NetworkSession: add a dedicated PrefixedLogger, clean up some boilerplate code
2019-05-06 16:32:34 +01:00
Dylan K. Taylor
6d64ef8d74
Server: fixed crash reporting bug introduced by a6e5b6e158ff82da1a5ee1f12376c37d4f25114c
2019-05-05 20:52:52 +01:00
Fabian Faßbender
c5498bb3fa
Implement a locking variable to circumvent a infinite regression ( #2901 )
...
closes #2876
2019-05-03 14:46:51 +01:00
Dylan K. Taylor
7ae84944ca
protocol: add some missing interfaces for new packets
2019-05-02 17:35:54 +01:00
Dylan K. Taylor
6b4c11febb
Merge branch 'next-minor'
2019-05-02 17:26:02 +01:00
Dylan K. Taylor
9fd922fe6a
Merge branch 'stable' into next-minor
2019-05-02 17:25:29 +01:00
Dylan K. Taylor
59334d652f
3.8.3 is next
2019-05-02 17:13:50 +01:00
Dylan K. Taylor
5c81da9b1e
Release 3.8.2
3.8.2
2019-05-02 17:13:21 +01:00
Dylan K. Taylor
b08affc4c6
Updated preprocessor submodule
2019-05-02 17:11:40 +01:00
Dylan K. Taylor
af07ffb292
Merge branch 'next-minor'
2019-05-02 16:44:50 +01:00
Dylan K. Taylor
fdaf9dce73
Merge branch 'stable' into next-minor
2019-05-02 16:39:05 +01:00
Dylan K. Taylor
cb49f1e835
fixed air being breakable by creative players
...
closes #2851
2019-05-02 16:25:23 +01:00
Dylan K. Taylor
f6a0f4aa82
Player: fixed immobile interference on PlayerJoinEvent
...
closes #2894
this should use a cleaner hack that doesn't affect plugins at all, but that's too much work for this one bug fix.
2019-05-02 16:20:28 +01:00
Dylan K. Taylor
de09c8c082
Player: fix crash handling resource pack requests
2019-05-02 16:17:39 +01:00
Dylan K. Taylor
0ac87989dc
Update RakLib to 0.12.4
2019-05-02 16:08:03 +01:00
Dylan K. Taylor
0317b0f22d
Merge branch 'next-minor'
2019-05-02 15:07:38 +01:00
Dylan K. Taylor
732e27751c
Merge branch 'stable' into next-minor
2019-05-02 15:04:23 +01:00
Dylan K. Taylor
13ea984b12
Server: setup world things at a more appropriate time
...
closes #2859
this also fixes reported headaches attempting to override generators before world load.
2019-05-02 15:02:10 +01:00
Dylan K. Taylor
3878f58847
Level: fixed crash when time overflows
...
this can be triggered by a plugin setting time to PHP_INT_MAX
fixes CA 2346977
2019-05-02 14:22:01 +01:00
Dylan K. Taylor
d7a35a5302
Entity: fixed motion not being initialized when Motion
NBT tag is missing
...
fixes CA 2355485
2019-05-02 14:00:28 +01:00
Dylan K. Taylor
1730415643
Player: remove useless checks from spawnTo(), closes #2897
...
this was caused by changes on 4.0, but this code is nonetheless useless.
2019-05-01 14:43:11 -04:00
Dylan K. Taylor
293311569d
Merge branch 'next-minor'
2019-05-01 18:55:49 +01:00
=?UTF-8?q?Fabian=20Fa=C3=9Fbender?=
932c489de1
Rename addTitle/addSubTitle/addActionBarMessage prefixes to "send", deprecated old variants
...
closes #2896
these deprecated methods will be removed in 4.0.
2019-05-01 18:54:20 +01:00
Dylan K. Taylor
67e75d6c0a
Moved DataPropertyManager to network namespace
...
this is _extremely_ network-focused code.
2019-04-26 18:57:44 +01:00