5eb3c52a37
added PunchBlockParticle, encapsulate more network logic
2019-05-09 15:40:58 +01:00
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
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
4634baeb02
Player: don't repeat yourself
2019-05-08 19:38:57 +01:00
a51c06116a
Merge branch 'stable'
2019-05-08 17:04:37 +01:00
f782a478c4
Player: clarify resetTitles() documentation
2019-05-08 17:03:40 +01:00
19ac0811f4
Player: remove deprecated title functions
2019-05-08 16:44:18 +01:00
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
9fbf41b9a1
Merge branch 'stable'
2019-05-08 15:41:17 +01:00
c06b4830d1
Player: don't spawn entities on out-of-sync chunks on join, closes #2911
2019-05-08 15:36:54 +01:00
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
78bb6f4a0c
Reduce complexity of chunk sending system
2019-05-07 19:26:01 +01:00
c1a483a36d
move entity spawning logic back to Player
2019-05-07 18:35:04 +01:00
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
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
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
de09c8c082
Player: fix crash handling resource pack requests
2019-05-02 16:17:39 +01:00
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
293311569d
Merge branch 'next-minor'
2019-05-01 18:55:49 +01:00
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
854a2f5135
Move a giant heap of network garbage out of Entity
2019-04-26 18:52:38 +01:00
6aa8276532
Revert "Player: removed useless addActionBarMessage()"
...
This reverts commit 7d22b2a6d7
.
2019-04-26 15:41:19 +01:00
39360f127a
Player: Don't use iusername in cases where it's useless
...
these calls all do strtolower() anyway, so having iusername here just makes it confusing.
2019-04-26 12:07:47 +01:00
25890e76e2
Player: replace redundant usage of Server->broadcast()
2019-04-26 12:04:56 +01:00
5913d5038b
Cleaned up Entity->close() handling
2019-04-18 17:23:48 +01:00
cc01dfe8df
Player: protect usedChunks
2019-04-18 16:20:56 +01:00
d68501c748
fixed spawn-radius: 0
2019-04-18 16:12:20 +01:00
939dfd9269
First look at separating chunk sending from Level
2019-04-17 19:33:37 +01:00
0e3e984db9
Player: Disconnects no longer nuke player internals, (mostly) fixes #1239
...
there are some problems that haven't been accounted for yet, but this fixes all the direct crashes.
2019-04-03 17:44:34 +01:00
a0b8d9a64e
Merge branch '3.7'
2019-04-03 17:39:45 +01:00
2c678dcf0d
Player: Fixed memory leak when PlayerLoginEvent is cancelled
2019-04-03 17:37:15 +01:00
f901c2a612
Player: move some functions to a more sensible place
...
let's keep disconnect-related logic grouped together.
2019-04-02 19:57:10 +01:00
f332550e52
Player: move toggle* rollback handling to network session
...
this allows network sessions to react to it how they want, or (in the case of things like Specter) perhaps ignore it.
2019-04-02 19:49:53 +01:00
7d22b2a6d7
Player: removed useless addActionBarMessage()
...
this is exactly the same as sendTip().
2019-04-02 18:43:14 +01:00
e5756dbf0b
Move a whole bunch of packet crap to NetworkSession
2019-04-02 18:31:16 +01:00
6214a9398d
Player: remove sendWhisper()
...
this can be done with a standard translated message, and with more customizability.
2019-03-31 19:25:09 +01:00
c59a2d1b93
More hasFiniteResources() usages
2019-03-31 16:51:43 +01:00
f8ce7797db
Player: add hasFiniteResources()
2019-03-31 16:40:54 +01:00
42a263a9df
GameMode is now an enum
2019-03-31 16:19:36 +01:00
8fcb44de7d
Merge branch '3.6' into 3.7
2019-03-29 19:55:36 +00:00
f4480c07ee
Updated NBT dependency
2019-03-29 19:47:15 +00:00
ca22223b62
PlayerDeathEvent: fixed constructor signature, closes #2835
...
can we ban multi-type parameters already? this is tiresome...
2019-03-25 14:55:25 +00:00
2a3e6dcf00
Rename BlockIds -> BlockLegacyIds
2019-03-23 19:46:31 +00:00
79ef8e0803
Replace all legacy blockID references with BlockIds::
2019-03-23 19:44:33 +00:00
034bd716c8
Clean up WritableBook hierarchy
2019-03-23 14:36:03 +00:00
1045088668
Move more packet handling logic out of Player
...
there is now only (1) packet handler remaining in Player. The reason I haven't targeted this is because it needs improvements of its own.
2019-03-23 12:12:30 +00:00
1bc37a1a8a
Player: Clean up movement processing, now API-ified
2019-03-23 11:33:32 +00:00
1d1a416afe
Player: Move construction logic to the top
2019-03-23 10:39:19 +00:00
f3309d3aec
Player: remove some field defaults
2019-03-23 10:29:16 +00:00
9ec62643d5
Player construction now happens when we're ready to create the player entity
...
this fixes a wide range of bugs with the initial spawn sequence, and allows to simplify a whole lot of player setup logic.
2019-03-23 10:13:14 +00:00