Commit Graph

3864 Commits

Author SHA1 Message Date
themode
13eade4e35 Workers should be minestom threads 2021-10-22 03:09:32 +02:00
TheMode
b1ef97b5af Use toList in stream chains
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-22 02:23:14 +02:00
TheMode
7891cc5bbe Use more instanceof pattern matching
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-22 02:19:38 +02:00
TheMode
5030664ff9 Use more enhanced switches
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-22 02:14:12 +02:00
TheMode
b308ce5baa
Update to Java 17 (#462) 2021-10-22 01:55:55 +02:00
TheMode
85d9256fa8 Viewable packet process cleanup
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-20 13:36:00 +02:00
Alex K
0b7b7283e6
Fix adding viewers to FakePlayer (#497) 2021-10-19 20:04:54 +02:00
TheMode
3685bf22b7 Improve CachedPacket
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-19 12:41:34 +02:00
Corey Shupe
11d0f82b86
Make Mojang SessionServer Configurable (#499) 2021-10-19 10:11:04 +02:00
Konstantin Shandurenko
b6bce86eca
Fixed with* methods in Pos (#495) 2021-10-17 21:39:10 +02:00
Konstantin Shandurenko
ba76e746a2
Entity#lookAt and updating view in melee/ranged/combined attack goals when within attackable range (#494) 2021-10-17 21:07:59 +02:00
TheMode
68ff09df8a Initialized field can be made final, as it happen earlier during construction
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-17 14:33:18 +02:00
TheMode
999d774f90 Trim registry hashmaps to improve lookup performance
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-17 14:29:27 +02:00
Andre Roldan
fb39fa59f5
fix 'seeInvisiblePlayers' friendly flag (#491) 2021-10-17 08:21:38 +02:00
TheMode
06189ee783
Async flush (#492) 2021-10-16 19:55:24 +02:00
TheMode
13a8a22546 Add preventive kick instead of hard to debug timeouts
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-15 15:54:11 +02:00
themode
099397b968 Limit viewable packet allocations 2021-10-15 11:09:05 +02:00
TheMode
0bd519c894 Use fastutil for viewable packets
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-15 06:17:48 +02:00
EpicPlayerA10
ca6fbe4d09 Misspelled firework type enum 2021-10-14 19:29:33 -04:00
TheMode
21b751dbd1 Reduce default worker thread count
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-13 12:37:54 +02:00
TheMode
b5b281c717 Use a parallel stream for viewable packets
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-13 12:25:35 +02:00
TheMode
c0024fe4dd Optimize getEquipmentsPacket
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-13 06:36:43 +02:00
TheMode
bd4aa90753
Framed packet cleanup (#489) 2021-10-13 06:33:44 +02:00
TheMode
0f4698bed7 Potentially fix removed entities from still being ticked
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-11 23:38:32 +02:00
TheMode
5c2ab68a0a Add experimental Point#sameBlock
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-11 11:08:35 +02:00
TheMode
eca9b5e32d Flush packets before computing mspt
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-11 03:33:16 +02:00
Andre Roldan
b94d196021
use legacySection() instead of legacyAmpersand() (#488) 2021-10-10 04:19:32 +02:00
TheMode
022ec237ba KeepAliveListener cleanup
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-10 03:29:51 +02:00
EpicPlayerA10
6e16fb7b13
Fix writable book (#478) 2021-10-08 22:24:01 +02:00
TheMode
11806b9166 Ensure no packet corruption due to encryption. A proxy is still recommended for optimal performance
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-06 21:14:08 +02:00
TheMode
45071cebd8
Add EntityInstanceEvent (#480) 2021-10-06 20:40:17 +02:00
TheMode
2f1e4101d1 Add more try-catch to prevent the worker from returning
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-06 18:47:40 +02:00
Matt Worzala
d89e5cf2ee
Hardcode heightmap value to dimension height. (#481) 2021-10-05 23:29:05 +02:00
TheMode
a6f59fc9e9 Ensure that player connections reference are not kept for viewable packets
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-03 19:23:09 +02:00
TheMode
b9746a0574 Give InventoryClickEvent the proper inventory for drag clicks
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-02 20:03:38 +02:00
TheMode
e71c420fa8 Remove unnecessary air check
Signed-off-by: TheMode <themode@outlook.fr>
2021-10-02 01:58:42 +02:00
Moulberry
26341005b1
Passenger Fixes (#476)
Don't teleport player when entering/exiting vehicle + better height offset logic
2021-10-01 16:35:42 +02:00
TheMode
36bcf69728 Buffer collection cleaner
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-29 18:31:28 +02:00
themode
729fc14e6d Skip 3 bytes instead of overwriting 0 2021-09-26 17:39:30 +02:00
themode
d02a898646 Fix buffer view not being used with compression disabled 2021-09-26 17:35:14 +02:00
TheMode
236683c986 No volatile read for compression/encryption
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-26 17:02:05 +02:00
TheMode
f07ab21d3e Use LocalCache for deflaters
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-25 20:29:47 +02:00
TheMode
9fe3f28497 Improve ThreadLocal performance when calling from a minestom thread
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-25 19:37:14 +02:00
TheMode
be9b11f238 Simplify path finding code, do not expose internal parts
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-24 19:31:54 +02:00
TheMode
619a9b3209 Use a parallel stream for flushing
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-23 11:32:13 +02:00
TheMode
68107c9a90 Reuse the tick buffer when possible & avoid iteration
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-22 23:24:22 +02:00
TheMode
d5d4a97694 EntityTeleportPacket must also be prepared
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-22 19:12:48 +02:00
TheMode
93a62ba133 Optimize entity teleport, prevent movement packets from being sent with teleport ones
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-22 01:13:05 +02:00
themode
1d8addaea6 Prevent TickThreads from stopping if something weird happens 2021-09-21 21:31:02 +02:00
TheMode
e97f1db184 Call Player#remove on server shutdown
Signed-off-by: TheMode <themode@outlook.fr>
2021-09-21 19:30:36 +02:00