Dylan K. Taylor
ebfe9caca3
Move too-early-send check to NetworkSession
2019-03-14 14:45:30 +00:00
Dylan K. Taylor
26a5d97499
Some cleanup to player net session handling for connect/disconnect
2019-03-14 14:32:43 +00:00
Dylan T
8f1bc5d497
Flatten wall_banner and wall_sign into single blocks ( #2798 )
...
This comes with some problems, but the problems are more bearable than the previous code.
2019-03-08 16:37:26 +00:00
Dylan K. Taylor
72233a509d
preprocessor fix
2019-03-01 18:08:03 +00:00
Dylan K. Taylor
c9eb642afd
PacketPool: missing @throws
2019-02-28 17:15:06 +00:00
Dylan K. Taylor
5cca4b5e31
Revamp Sign API, flatten API into blocks
2019-02-28 17:10:37 +00:00
Dylan K. Taylor
f680a239f7
NetworkSession: some exception handling cleanup
2019-02-28 16:36:03 +00:00
Dylan K. Taylor
13b9fd7b66
RakLibInterface: Add error ID to make logs searchable when players report legitimate issues
2019-02-28 16:31:14 +00:00
Dylan K. Taylor
d528fdddfa
DataPacket: Remove useless abstract function
...
this is declared in the Packet interface, so it doesn't need to be here anymore.
2019-02-28 16:20:58 +00:00
Dylan K. Taylor
9ad0ea85c7
Rename two misleadingly-named functions
2019-02-27 12:59:12 +00:00
Dylan K. Taylor
53af7f5da8
Implemented dragon egg
2019-02-26 15:35:37 +00:00
Dylan K. Taylor
6124f93cb4
Player: Clean up item frame drop-item hack
...
This is now re-routed through a newly-created attack-block handler.
Closes #339
2019-02-25 18:40:04 +00:00
Dylan K. Taylor
66a1b35767
Merge branch '3.6'
2019-02-23 11:05:23 +00:00
Dylan K. Taylor
79b7e08e60
Silence NetworkStackLatencyPacket spam from dev builds
2019-02-23 11:03:50 +00:00
Dylan K. Taylor
01255c5368
Updated RakLib to get ITC efficiency enhancements
2019-02-15 12:29:16 +00:00
Dylan K. Taylor
19f0d7f336
NetworkSession: Don't apply handlers to a disconnected session
...
closes #2756
2019-02-15 10:11:31 +00:00
Dylan K. Taylor
0c89159cf2
Merge branch '3.6'
2019-02-09 19:22:00 +00:00
Dylan K. Taylor
b8703d5dff
Protocol changes for 1.9.0
2019-02-07 21:56:42 +00:00
Dylan K. Taylor
d23e32622e
Clean up internal inconsistency in Color
2019-02-05 13:52:34 +00:00
Dylan K. Taylor
dbae667dec
Silence more InteractPacket noise
2019-02-04 19:51:38 +00:00
Dylan K. Taylor
3e58708130
Add some missing @throws annotations
2019-02-04 19:50:43 +00:00
Dylan K. Taylor
c9f9f551f4
Merge branch '3.5' into master-rollback
2019-02-04 19:47:21 +00:00
Drew
d7f86f0240
Hack for client side regeneration (disable natural regeneration gamerule) ( #2722 )
2019-01-31 18:45:25 +00:00
Dylan K. Taylor
d378371cc8
Transition to spl_object_id()
2019-01-26 15:06:38 +00:00
Dylan K. Taylor
d2284d5c47
Move Particle IDs to protocol namespace
2019-01-23 12:16:01 +00:00
Dylan K. Taylor
ae7d6cc4a2
Merge branch '3.5'
2019-01-20 15:53:47 +00:00
Dylan K. Taylor
47321114eb
login: allow 60 seconds clock drift on login JWT
...
can everyone please just use NTP already?
2019-01-20 15:51:29 +00:00
Dylan K. Taylor
467caf347d
NetworkSession: Consistently don't use 0x prefix
2019-01-20 11:06:47 +00:00
Dylan K. Taylor
5d8568b1a4
Add NetworkSession->getDisplayName(), clean up ip/port ad-hoc usages
2019-01-20 11:05:12 +00:00
Dylan K. Taylor
6b7710e62b
Introduce dedicated NBT data exceptions, fix up some corrupted chunk handling
2019-01-19 12:43:47 +00:00
Dylan K. Taylor
38cf8d157d
Max players check now works properly
...
This now includes all connected sessions, whether they are considered online or not.
2019-01-17 21:40:10 +00:00
Dylan K. Taylor
76f1ee1827
Add restrictions on packet send directions with interfaces
...
This prevents plugins sending wrong packets at the compiler level (or would, if we had a compiler). It's more robust than a getter for client/server and throwing an exception since a static analysis tool can detect faults created by sending wrong packets from the server. This is also used to deny service to dodgy clients which send wrong packets to the server to attack it.
2019-01-17 12:51:24 +00:00
Dylan K. Taylor
b82e00ffdf
Extract a Packet interface from DataPacket
...
this is in preparation for clientbound/serverbound packet separation. I did this already on another branch, but the changeset was dependent on a massive refactor to split apart packets and binarystream which i'm still not fully happy with.
2019-01-17 12:21:56 +00:00
Dylan K. Taylor
2e7e56de1e
Merge branch '3.5'
2019-01-16 21:52:03 +00:00
Dylan K. Taylor
cb591a98f4
NetworkBinaryStream: Skip item NBT which is too large when encoded
...
Encoded tags larger than 32KB overflow the length field, so we can't send these over network. However, it's unreasonable to randomly throw this burden off onto users by crashing their servers, so the next best solution is to just not send the NBT. This is also not an ideal solution (books and the like with too-large tags won't work on the client side) but it's better than crashing the server or client due to a protocol bug. Mojang have confirmed this will be resolved by a future MCPE release, so we'll just work around this problem until then.
2019-01-16 21:50:43 +00:00
Dylan K. Taylor
fc98f4c42b
Address more error cases, some minor cleanup
2019-01-16 21:30:31 +00:00
Dylan K. Taylor
44ef9fc577
LoginPacket: account for some missed error cases
2019-01-16 21:00:28 +00:00
Dylan K. Taylor
c9c6a5dc94
Fixed some doc comments
2019-01-16 20:48:26 +00:00
Dylan K. Taylor
23269da1a6
Fixed the disaster of packet receive error handling
2019-01-16 19:53:48 +00:00
Dylan K. Taylor
728bc95d73
NetworkSession: remove premature GC optimization
...
The only cyclic references here are both destroyed during normal collection directly (net interface removes from sessions array, player destroys its session reference), so there's no need to destroy them again here. This just causes a giant swathe of potential crashes for no real benefit.
close #2669
2019-01-16 16:50:16 +00:00
Dylan K. Taylor
acdd0fec5f
NetworkSession: player may be null
2019-01-16 16:19:39 +00:00
Dylan K. Taylor
9c53b41851
Added PlayerInfo, Player is no longer accessible during PlayerPreLoginEvent
2019-01-13 19:32:30 +00:00
Dylan K. Taylor
27761ac26e
Fixed casing: Gamemode -> GameMode
...
it's two words, not one.
2019-01-12 16:19:31 +00:00
Dylan K. Taylor
a756519e6b
Move gamemode constants & functions to their own class
...
future enhancements:
- make gamemode an object containing information about abilities that players have in this gamemode (gamemodes are just predefined ability sets)
- get the magic numbers out of the API
2019-01-12 16:10:14 +00:00
Dylan K. Taylor
49bdd92faa
LoginPacket: Assert that extradata must exist
2019-01-11 17:56:18 +00:00
Dylan K. Taylor
e9f023fe69
LoginPacket: fix corruption false-positives in offline mode
2019-01-11 17:55:58 +00:00
Dylan K. Taylor
5d8fa2e126
Crash main server thread when RakLib dies
...
this way we get crashdumps and find out what's actually wrong with RakLib in the wild.
2019-01-09 19:04:12 +00:00
Dylan K. Taylor
cc230034f9
Fixed TransactionData->actions default value, closes #2652
2019-01-09 14:15:06 +00:00
Dylan K. Taylor
2924303169
Sync NBT dependency
2019-01-07 22:38:04 +00:00
Dylan K. Taylor
9c16caf27b
Fixed an edge-case in AvailableCommandsPacket decoding
2019-01-07 22:23:51 +00:00