Commit Graph

2955 Commits

Author SHA1 Message Date
Arne Dalhuisen
ed010ff110 Renamed armorItem to equippedItem in EntityEquipEvent 2021-05-11 14:48:52 +02:00
Arne Dalhuisen
77ef5f7d42 Made EntityEquipEvent, replacing ArmorEquipEvent 2021-05-11 14:45:14 +02:00
Arne Dalhuisen
92d97c624f Added isHand and isArmor to EquipmentSlot 2021-05-11 14:12:19 +02:00
Arne Dalhuisen
29b0f5448d Moved EquipmentSlot out of equipment packet 2021-05-11 14:10:45 +02:00
TheMode
19e22d03ce Deprecate packet listening API 2021-05-11 08:35:42 +02:00
TheMode
920a36399f Merge branch 'master' into event-api 2021-05-11 04:53:03 +02:00
TheMode
3cb7cdaea8 Create EventListener class 2021-05-11 04:52:57 +02:00
TheMode
4ab35fbbc0 Remove magic value for pre-filled var ints 2021-05-11 03:10:18 +02:00
TheMode
d41a4dcf54 Reduce grouped packet buffer overhead 2021-05-10 11:16:17 +02:00
TheMode
96fe9f1063 Framed packet cleanup 4 2021-05-10 11:03:58 +02:00
TheMode
aaa012a975 Framed packet cleanup 3 2021-05-10 11:02:12 +02:00
TheMode
590b42c223 Framed packet cleanup 2 2021-05-10 07:00:16 +02:00
TheMode
b96386cee5 PacketUtils#writeFramedPacket cleanup 2021-05-10 05:47:14 +02:00
TheMode
653417be75 Modifiable TPS 2021-05-10 04:58:23 +02:00
TheMode
a8f52aa39d Remove unnecessary constant 2021-05-10 01:38:29 +02:00
TheMode
9cf897a4cc Remove empty lines 2021-05-10 01:17:43 +02:00
TheMode
db8219d5ee Remove unnecessary condition 2021-05-10 01:08:51 +02:00
TheMode
7deeb66089 Reintroduce updateChunks boolean 2021-05-10 00:51:35 +02:00
TheMode
71a6d88338 Merge remote-tracking branch 'Kebab11noel/position-cleanup' into position-cleanup 2021-05-10 00:31:29 +02:00
TheMode
f69b40109c Merge branch 'master' into position-cleanup 2021-05-10 00:31:17 +02:00
TheMode
5d7a49c009 Steal velocity VarInt optimization 2021-05-09 07:36:09 +02:00
TheMode
7ac0834123 Dont hardcode thread count 2021-05-09 00:11:35 +02:00
TheMode
165b7bced2 Only direct buffer should be used for IO 2021-05-08 22:45:57 +02:00
TheMode
abe4d0f6ad Remove unused traffic handler 2021-05-08 04:41:14 +02:00
TheMode
073f5872f8 Fix jline reader thread never being shutdown 2021-05-08 04:33:32 +02:00
TheMode
b880788124 BenchmarkManager thread should be daemon 2021-05-08 04:30:06 +02:00
TheMode
40f52ba49e Reduce memory used by chunk packet caching 2021-05-08 01:53:12 +02:00
TheMode
fbae08a5a6 Remove unused method 2021-05-08 01:05:51 +02:00
TheMode
f1e48b07b9 Reduce use of the pooled allocator 2021-05-08 00:52:46 +02:00
TheMode
8b98472ddf Ignore case for generated string arguments 2021-05-07 21:55:49 +02:00
TheMode
fb03b953bb Tick scheduling micro-optimization 2021-05-07 20:41:40 +02:00
TheMode
a33234d886 Fast exit when no chunk should be unloaded 2021-05-07 20:29:37 +02:00
TheMode
52732ed4cd Fix wrong slot being used in left/right click inside the player inventory 2021-05-07 06:48:13 +02:00
Németh Noel
443a097984 Merge remote-tracking branch 'upstream/master' into position-cleanup 2021-05-07 02:55:22 +02:00
Németh Noel
6bd1fcff65 Remove block light data and send full sky data 2021-05-07 02:46:07 +02:00
Németh Noel
b75a034b2d Reintroduced two phase chunk sending 2021-05-07 02:24:28 +02:00
Németh Noel
de7241ef6c Re-enable chunk unloading, corrected packet order 2021-05-07 00:54:38 +02:00
TheMode
744b8e7886 Smarter code 2021-05-07 00:16:09 +02:00
TheMode
9a4fdae38a Fix block being transformed to AIR on interaction when in adventure mode 2021-05-07 00:15:16 +02:00
Kieran Wallbanks
2404f19fe2 Avoid NPEs when obtaining chat message type from player 2021-05-06 16:12:46 +01:00
Németh Noel
d360904f77 Fix different spawn pos check 2021-05-05 23:55:01 +02:00
Kieran Wallbanks
a9d2f4e8ca Respect client chat settings 2021-05-05 18:21:38 +01:00
Németh Noel
2f1ada9a9f Merge remote-tracking branch 'upstream/master' into position-cleanup 2021-05-05 18:26:57 +02:00
Németh Noel
3eb4981990 Removed redundant initial value 2021-05-05 18:25:20 +02:00
Németh Noel
7881cea36c Wait for client settings 2021-05-05 18:11:24 +02:00
Németh Noel
bea622db0b Only load spawning chunk before spawning the player 2021-05-05 17:48:57 +02:00
Kieran Wallbanks
0789bd619e Remove QueryResponse class in favor of Writable 2021-05-05 16:27:50 +01:00
Kieran Wallbanks
a43c0e1291 Modify OpenToLANConfig method names 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
42933e58b0 Minor formatting and javadoc changes 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
2968ea2513 Debug cleanup, expose session ID 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
c6082a35bb Fix query responses 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
17d584a2e3 Swap to SocketAddress 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
a6294ffd5b Cleanup imports 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
94ecb8de7b Add Query system 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
c92829e3cf Correct javadoc 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
f9245e8404 Move free port obtaining to util class 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
ec5ecb49bf Update javadoc 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
01fe452783 Implement OpenToLAN system 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
009f7cb1da Remove lazy initialisation of username component 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
462397d102 Remove Named and Identified interfaces 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
a15e3aef44 Make legacy server pings use the ServerListPingEvent 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
42e1811b7c Switch to per-version response data generation and implement NamedAndIdentified in ResponseData 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
0ac6d1aa37 Add shorthand methods for string creation 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
3651a132fe Correct Javadoc 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
a16c8d3273 Use Component in NamedAndIdentified 2021-05-05 16:18:10 +01:00
Kieran Wallbanks
8d192fcb9c Add NamedAndIdentified interface 2021-05-05 16:18:10 +01:00
Németh Noel
5b41f3ffd0 Spiral chunk loading 2021-05-05 17:05:22 +02:00
TheMode
916650b4c8 Fix ghost item on respawn 2021-05-05 05:43:41 +02:00
Németh Noel
78937a6b0b Updated javadoc 2021-05-05 00:48:29 +02:00
TheMode
e4680d1f8d Fix syntaxes tree branching when a literal is present in the middle of a syntax 2021-05-05 00:01:50 +02:00
TheMode
4012b6d0bd Use a predicate instead of boolean function 2021-05-04 23:26:51 +02:00
TheMode
4b6026f18d Remove unnecessary scopes 2021-05-04 23:15:20 +02:00
TheMode
79a4bd135a Merge remote-tracking branch 'origin/master' 2021-05-04 23:01:03 +02:00
TheMode
dfcf908abc Initial command syntaxes tree attempt 2021-05-04 23:00:38 +02:00
LeoDog896
bf41513d82 Avoid NPE when getting NBT 2021-05-04 11:52:36 -04:00
Kieran Wallbanks
2fdfce703d Fix javadoc errors 2021-05-04 15:46:34 +01:00
TheMode
22eb5c6bcd
Merge pull request #260 from MrBretze/master
Close the option
2021-05-04 04:25:13 +02:00
TheMode
4ef101d5fe
Merge pull request #269 from Kebab11noel/position-cleanup
Position cleanup
2021-05-04 01:30:27 +02:00
TheMode
26224d6373 Fix build 2021-05-04 01:24:16 +02:00
TheMode
44c777395b Merge remote-tracking branch 'Kebab11noel/position-cleanup' into position-cleanup 2021-05-04 01:21:03 +02:00
Németh Noel
1b059c5981 Inverted and renamed method parameter 2021-05-04 01:19:33 +02:00
TheMode
ef47e7e5b2 Merge remote-tracking branch 'Kebab11noel/position-cleanup' into position-cleanup 2021-05-04 00:59:26 +02:00
TheMode
e45c60c225 Initial revamped event listening API 2021-05-04 00:46:18 +02:00
TheMode
748e3d7b39 Player#refreshVisibleEntities cleanup 2021-05-03 01:58:17 +02:00
Németh Noel
818251331f Made #sendPositionUpdate(boolean) protected 2021-05-02 00:05:48 +02:00
TheMode
cd0ea0c0c2 Remove deprecated CommandProcessor.java 2021-05-01 20:27:41 +02:00
TheMode
6e9adb2b9b Removed longely deprecated Arguments.class 2021-05-01 20:20:23 +02:00
TheMode
3f7e36ab8c Merge remote-tracking branch 'Kebab11noel/position-cleanup' into position-cleanup 2021-05-01 04:38:51 +02:00
Németh Noel
f4c55dd4b2 Fixed javadoc 2021-05-01 04:38:28 +02:00
Németh Noel
78dc2b32cd Removed isNettyClient field 2021-05-01 04:38:04 +02:00
Németh Noel
3abef8c9a7 Fix position update 2021-05-01 04:27:21 +02:00
TheMode
7a6763f73f Merge remote-tracking branch 'Kebab11noel/position-cleanup' into position-cleanup 2021-05-01 04:06:38 +02:00
Németh Noel
dbd0c302d5 Fix player unable to move 2021-05-01 04:00:25 +02:00
TheMode
679baba570 Merge branch 'master' into position-cleanup 2021-05-01 03:49:24 +02:00
TheMode
3fa64d6b24 Fix entity synchronization on join 2021-05-01 03:46:13 +02:00
Németh Noel
66f1c8847d Extracted position sending from Entity#tick and improved checks, also removed duplicate code from Player#update 2021-05-01 02:21:11 +02:00
Németh Noel
998d0d6f5c Renamed method 2021-05-01 00:51:10 +02:00
Németh Noel
5e55c0199d Moved cloning back into methods 2021-05-01 00:34:04 +02:00
Németh Noel
ea368876af Merged Entity#sendSynchronization and Player#updatePlayerPosition to #sendTeleportPacket and increased scheduled sync delay 2021-05-01 00:05:49 +02:00
Németh Noel
fa8a499321 Merged individual position values to position fields 2021-04-30 23:01:43 +02:00
TheMode
20ed4926c8 Fix entity collision 2021-04-28 15:02:06 +02:00
TheMode
35c60733d1 Dont deprecate setDefaultValue with constant result 2021-04-28 14:05:20 +02:00
TheMode
929a377dc0 Fix Acquirable#currentEntities
Signed-off-by: TheMode <themode@outlook.fr>
2021-04-27 12:16:38 +02:00
themode
e54f685ff9 Fix javadoc build 2021-04-26 18:36:04 +02:00
TheMode
495164d03b Use single thread by default 2021-04-26 16:27:50 +02:00
TheMode
79d936936e Merge branch 'master' into acquirable 2021-04-26 16:15:42 +02:00
TheMode
b27e1fcf94 Added beta annotations 2021-04-26 14:53:47 +02:00
TheMode
9ca09a32bf Rename AcquirableCollection acquire methods name 2021-04-26 13:23:32 +02:00
TheMode
c3f1b9159c Unchecked cast for acquirable getter 2021-04-26 12:52:02 +02:00
TheMode
ec9658e7d3 Fix shift click ghost item when click is cancelled 2021-04-26 01:35:44 +02:00
TheMode
8ba99bb931 Acquirable#async is not blocking 2021-04-25 23:28:41 +02:00
TheMode
b8b62c4ff7 Simplify Acquirable#lock 2021-04-25 23:07:31 +02:00
MrBretzel
e0dffea190
Merge pull request #4 from Minestom/master
PR 3
2021-04-25 22:49:07 +02:00
TheMode
47e7d35949 Support standalone itemstack string parsing 2021-04-25 21:42:40 +02:00
TheMode
6c3c6e1438 Put implementation detail in AcquirableImpl 2021-04-25 20:00:03 +02:00
TheMode
b47946bfed Remove Acquisition.java 2021-04-25 19:08:04 +02:00
TheMode
5e385c7c9b Fix section resize performance 2021-04-25 12:39:18 +02:00
TheMode
41d61e7df6 Added CommandSyntax#getSyntaxString 2021-04-25 10:46:10 +02:00
TheMode
b0afadf093 Override Argument#toString for all subclasses 2021-04-25 10:42:05 +02:00
TheMode
fd17a63f7c Remove debug code 2021-04-25 09:50:48 +02:00
TheMode
1f06603c5b Acquirable comment 2021-04-25 09:42:47 +02:00
TheMode
8e642b9116 Remove unnecessary synchronization 2021-04-25 09:33:52 +02:00
TheMode
2713650b23 Remove unused consumers 2021-04-25 01:46:27 +02:00
TheMode
41a0f22468 Prevent Acquired from being used after unlock 2021-04-24 21:39:39 +02:00
TheMode
9c99cb9b2e Removed unused method 2021-04-24 20:53:41 +02:00
TheMode
2577307da0 Make AcquirableCollection a simple collection wrapper 2021-04-24 20:40:23 +02:00
TheMode
2509085dc2 Rename optional to local 2021-04-24 19:56:39 +02:00
TheMode
db619243da Ensure that the opened inventory is the same before refreshing the cursor item 2021-04-24 19:25:26 +02:00
TheMode
4eaa15477b Potentially fix cursor ghost item when opening a new inventory 2021-04-24 19:14:19 +02:00
TheMode
b662e331f0 Fix shift clicks not being cancelled 2021-04-24 19:08:02 +02:00
TheMode
098a12961d Fix ghost item when cancelling inventory click 2021-04-24 19:00:30 +02:00
TheMode
34d10e57fa Reuse lock code 2021-04-24 18:30:21 +02:00
TheMode
0043cc7275 Re-added acquired to support manual locking 2021-04-24 18:25:15 +02:00
TheMode
845a8608db Simplify Acquirable, support for all objects 2021-04-24 18:14:12 +02:00
TheMode
26bd0dd43c Added Acquired 2021-04-24 17:41:33 +02:00
TheMode
0462c8f9a7 Cleanup 2021-04-24 15:15:23 +02:00
TheMode
db2550f9ab Merge branch 'master' into acquirable 2021-04-24 15:03:39 +02:00
TheMode
7d4e04bc66 Prevent potion effect filter when the list is empty 2021-04-24 15:03:27 +02:00
TheMode
99920a77ba Use stream instead of a collection for current thread entities 2021-04-24 14:59:43 +02:00
TheMode
7983362f25 ThreadProvider comment 2021-04-24 14:44:21 +02:00
TheMode
83271a00eb Merge branch 'master' into acquirable 2021-04-24 14:36:57 +02:00
TheMode
a6314abbad Improve physics performance 2021-04-24 12:41:52 +02:00
TheMode
7d1dfabc51 Fix color argument 2021-04-24 10:37:09 +02:00
TheMode
cf38103621 Merge branch 'master' into acquirable 2021-04-23 23:50:14 +02:00
TheMode
a671de1e01 Change addViewer0/removeViewer0 access to protected 2021-04-23 21:06:47 +02:00
TheMode
02ceed0563 Merge branch 'master' into acquirable 2021-04-23 17:52:41 +02:00
TheMode
e92fb1e8d5 Invalidate cache chunk packets when unloaded 2021-04-23 17:52:10 +02:00
TheMode
17409ee737 Merge branch 'master' into acquirable 2021-04-23 17:29:52 +02:00
TheMode
ef44c67204 Remove debug statements 2021-04-23 17:26:35 +02:00
TheMode
88be6fdfd8 Merge branch 'master' into acquirable 2021-04-23 16:39:55 +02:00
TheMode
84912f48b6 Fix memory leak 2021-04-23 16:38:40 +02:00
TheMode
2773a2d46c Make StackingRule an interface, support per item max size, fix double click stacking 2021-04-23 15:02:39 +02:00
TheMode
3035b3257d Rename #getBatchThread 2021-04-23 13:49:27 +02:00
TheMode
555cdb66de Fix entity memory leak, improve entity collection creation performance 2021-04-23 12:58:14 +02:00
TheMode
136ed17c0b No thread refresh for perchunk-instance thread provider 2021-04-23 12:25:23 +02:00
TheMode
cad488bb5d Override Player#getAcquirable 2021-04-23 11:51:14 +02:00
TheMode
129f720295 Merge branch 'master' into acquirable 2021-04-23 11:42:14 +02:00
TheMode
f432308197 Use long distance particle by default 2021-04-23 10:38:13 +02:00
TheMode
8e9838c6b6 Add tick scheduler to BenchmarkManager 2021-04-23 10:20:54 +02:00
TheMode
c24cc07b7c Improve efficiency of entity chunk update 2021-04-23 10:17:42 +02:00
TheMode
9a5af9514e The acquirable api is now only for entities 2021-04-23 10:01:17 +02:00
TheMode
0a837d2714 Renamed BatchThread.java 2021-04-23 09:58:52 +02:00
TheMode
defdbea29b Added entity/player consumer for inheritance 2021-04-23 08:59:40 +02:00
TheMode
370f4c2f57 Added more options inside ThreadProvider 2021-04-22 19:33:07 +02:00
TheMode
ef6f2ac5c9 Rename few methods 2021-04-22 16:59:42 +02:00
TheMode
297652c610 Remove generic Acquirable 2021-04-22 16:38:37 +02:00
TheMode
844671daab
Merge pull request #244 from Project-Cepi/nbt-hep
Compound and list ItemTags
2021-04-22 16:01:48 +02:00
LeoDog896
19e55f985e Add generic NBT 2021-04-22 09:52:51 -04:00
TheMode
4b5489dba6
Merge pull request #249 from Project-Cepi/ext-meta
Add Meta Object to Extensions
2021-04-22 12:36:58 +02:00
ALS
14ea17ce77 Try another test 2021-04-22 01:25:29 +02:00
MrBretzel
189b8fd552
Merge pull request #3 from Minestom/master
Update PR 3
2021-04-21 23:54:32 +02:00
MrBretzel
8047a203cb Possible fix a when storage location is closed an re opened 2021-04-21 23:53:47 +02:00
TheMode
09c22b4e49 ArgumentWord restrictions are case sensitive (because of brigadier) 2021-04-21 22:29:54 +02:00
TheMode
86faa435f7 Added SingleThreadProvider 2021-04-21 18:33:51 +02:00
TheMode
dba368d16f Thread count should depend on the processor count 2021-04-21 17:14:40 +02:00
TheMode
15b116a770 Remove unnecessary try-catch 2021-04-21 14:39:28 +02:00
TheMode
9660ee30fb More line ending 2021-04-21 14:35:35 +02:00
TheMode
5b1784fa39 Fix line ending 2021-04-21 14:34:16 +02:00
TheMode
8f6e0240eb added new #tryAcquire method with a return value instead of consumer 2021-04-21 14:32:42 +02:00
TheMode
72002a3d75 Wait monitoring should always be enabled 2021-04-21 11:37:53 +02:00
TheMode
224a1f57b4 #currentEntities documentation 2021-04-21 11:31:56 +02:00
TheMode
73dee1fb1a Better abstraction 2021-04-21 11:27:49 +02:00
TheMode
470cc09767 Merge branch 'master' into acquirable 2021-04-20 22:19:42 +02:00
TheMode
75da093475 Shift click code cleanup 2021-04-20 22:10:04 +02:00
TheMode
2aba4c49f6 Change stresstest to profile per-instance thread 2021-04-20 10:18:48 +02:00
themode
c91d957fe4 Merge branch 'master' into acquirable 2021-04-20 09:50:28 +02:00
TheMode
3fa89737d9 Reduce tick buffer copy overhead 2021-04-20 08:54:33 +02:00
TheMode
66513025c7 Fix thread safety with inventory click, add Internal annotation 2021-04-20 07:32:53 +02:00
TheMode
359d18e8a5 Remove unused class 2021-04-20 07:30:09 +02:00
TheMode
5390cd14f0 Simplify double click handling 2021-04-20 07:29:01 +02:00
TheMode
e9b5779b24 Simplify shift click handling, fix click processor ignoring non-air slot 2021-04-20 06:41:55 +02:00
TheMode
1daaeda63f Temporary fix for shift click 2021-04-19 20:09:42 +02:00
TheMode
d8e28ad73a Remove unnecessary volatile, fix acquisition from threads other than the tick ones 2021-04-19 15:25:19 +02:00
TheMode
321d185ffe use a ReentrantLock instead of guava monitor 2021-04-19 11:57:42 +02:00
TheMode
562927ee44 Added comment 2021-04-19 08:53:54 +02:00
TheMode
44b22ce1f1 Reduce monitor acquisition 2021-04-19 08:51:44 +02:00
TheMode
a6b1749e9e Added max refresh time 2021-04-19 08:17:00 +02:00
TheMode
1f08f5dc34 Use a parallel stream
Signed-off-by: TheMode <themode@outlook.fr>
2021-04-19 07:42:48 +02:00
TheMode
07471a8b5b Fix acquisition of newly instantiated entities 2021-04-18 17:31:50 +02:00
TheMode
e00b3a6fba Fix build 2021-04-18 16:56:17 +02:00
TheMode
bd9cab5805 Remove AcquirableImpl.java, more comment 2021-04-18 16:50:06 +02:00
TheMode
e63dbf28db Cleanup 2021-04-18 16:38:00 +02:00
TheMode
e342dd2b70 Merge branch 'master' into acquirable 2021-04-18 15:23:09 +02:00
TheMode
1dbd3078c3 Fix incremental thread refresh 2021-04-18 11:53:38 +02:00
TheMode
92f30070db Implement incremental chunk thread refresh 2021-04-18 11:28:28 +02:00
TheMode
2df5484e1a Dynamic chunk thread change 2021-04-18 06:43:51 +02:00
TheMode
e9f13d0a82 WIP dynamic chunk thread change 2021-04-18 06:29:44 +02:00
TheMode
6b5f755bfd Allow null nbt, remove NBTUtils.loadItem 2021-04-18 04:44:16 +02:00
TheMode
cb34d34799 ArgumentItemStack cleanup 2021-04-18 04:35:11 +02:00
TheMode
1d2a647efa Fix tickBuffer refCnt 2021-04-18 03:35:41 +02:00
TheMode
2e4a443bec Use multiple instances in the demo server 2021-04-18 02:35:17 +02:00
TheMode
2c1084d97b Use hashcode 2021-04-18 02:22:35 +02:00
TheMode
7dd6aa2360 Separate PerChunkThreadProvider from PerInstanceThreadProvider, support arbitrary ThreadProvider#findThread number 2021-04-18 01:55:35 +02:00
TheMode
dd88a14b90 Remove unused class 2021-04-18 00:19:57 +02:00
TheMode
f0607f776a Remove unused class 2021-04-18 00:08:13 +02:00
TheMode
eb63681c37 better comment 2021-04-18 00:00:02 +02:00
TheMode
8123e839ec Improve acquisition performance, fix current thread lock not being occupied 2021-04-17 23:51:23 +02:00
LeoDog896
ee590e8325 Add meta 2021-04-17 15:00:52 -04:00
TheMode
23664292de Simplify acquisition, reduce overhead 2021-04-17 14:22:47 +02:00
TheMode
a5df2376cf Improve performance 2021-04-17 03:00:34 +02:00
TheMode
3b7353300d Acquisition rework 2021-04-17 02:50:33 +02:00
TheMode
8f3ee93191 Use literal as the default argument when generating a syntax 2021-04-16 21:51:33 +02:00
TheMode
be0c425dfc Merge branch 'master' into acquirable 2021-04-16 02:36:46 +02:00
TheMode
502ec22b92 Reduce synchronization overhead when writing tick buffer 2021-04-16 01:52:46 +02:00
TheMode
bc04534290 Use a while loop to detect deadlocks 2021-04-15 22:56:09 +02:00
TheMode
4f05887f32 Send time packet on login 2021-04-15 21:03:21 +02:00
Eoghanmc22
1bb5c7e89b fix deadlock 2021-04-15 14:23:18 -04:00
TheMode
2045ce5743 Override AcquirableCollection#forEach 2021-04-15 10:06:34 +02:00
TheMode
b5add32ad6 Added AcquirableCollection + waiting time monitor 2021-04-15 09:51:37 +02:00
TheMode
56cc33fcfa Merge branch 'master' into acquirable 2021-04-15 09:13:20 +02:00
TheMode
e17ce94241 Fix build for real 2021-04-15 08:21:24 +02:00
TheMode
232e4b8a28 Fix build 2021-04-15 08:10:32 +02:00
TheMode
5cb4be26ff Try to close the terminal when shutting down the server 2021-04-15 08:07:17 +02:00
TheMode
b066b6029a
Merge pull request #223 from thiccaxe/master
Add events for STATUS packets.
2021-04-15 07:10:32 +02:00
TheMode
aef05893e1 Fix high CPU usage on startup 2021-04-15 04:11:52 +02:00
TheMode
f4ee5505ca Fix tick thread not being properly terminated 2021-04-15 04:06:55 +02:00
TheMode
b3a548287a Improve thread safety 2021-04-15 03:53:18 +02:00
TheMode
2b79e91295 Add comment + todo 2021-04-15 03:38:27 +02:00
TheMode
bd3e4e2f0a Added Acquirable#currentEntities 2021-04-15 03:08:19 +02:00
TheMode
11b1bbea2e Update entities thread 2021-04-15 01:44:08 +02:00
LeoDog896
c41c202589 Deepclone and cast 2021-04-14 18:19:07 -04:00
LeoDog896
7eb13de433 Compound and list tags 2021-04-14 18:12:41 -04:00
TheMode
fec36d4706 Run thread directly 2021-04-14 22:48:13 +02:00
TheMode
73cdfed5ce Merge branch 'master' into acquirable 2021-04-14 22:29:55 +02:00
TheMode
250907df6c Return constant empty set if the chunk is not loaded 2021-04-14 22:29:38 +02:00
TheMode
7dc0387ecf Add a way to find the current threadid of a chunk 2021-04-14 22:22:46 +02:00
TheMode
79f0d97664 Cleanup tick preparation 2021-04-14 21:41:14 +02:00
TheMode
a55ea6d0c2 WIP per-chunk thread 2021-04-14 21:29:37 +02:00
TheMode
356150847e Per-chunk batch management 2021-04-14 20:32:02 +02:00
TheMode
9b8dd6e768 Merge branch 'master' into acquirable
# Conflicts:
#	src/main/java/net/minestom/server/thread/ThreadProvider.java
2021-04-14 20:13:26 +02:00
TheMode
ccab205a54 Initial acquirable API commit 2021-04-14 20:12:56 +02:00
TheMode
c1b278f4b9 Fix merge, remove unnecessary methods (for now)
Signed-off-by: TheMode <themode@outlook.fr>
2021-04-14 20:09:49 +02:00
TheMode
683a6d35fa Merge branch 'master' into tickable
# Conflicts:
#	src/main/java/net/minestom/server/entity/Entity.java
#	src/main/java/net/minestom/server/instance/DynamicChunk.java
#	src/main/java/net/minestom/server/instance/Instance.java
2021-04-14 20:06:35 +02:00
TheMode
dc5b764732 Inventory id generation cleanup 2021-04-14 07:25:51 +02:00
TheMode
97f2f3f06c Fix inventory id overflow 2021-04-14 05:03:37 +02:00
TheMode
c57e35c58a Add completable future return to AsyncUtils 2021-04-14 04:06:41 +02:00
TheMode
7d574317dc ClientCloseWindowPacket window id is a byte, not a var int 2021-04-14 02:00:19 +02:00
TheMode
b68c30423c Add BinaryWriter#write(ByteBuf) 2021-04-14 01:40:21 +02:00
TheMode
a3f1235df4 Stacking rule should be defaulted to vanilla if null 2021-04-13 23:15:51 +02:00
TheMode
6ba336ee73 Added hand inside eat events 2021-04-13 22:59:40 +02:00
TheMode
a55ae4d048 Cache unmodifiable players set, remove print 2021-04-13 21:39:42 +02:00
TheMode
49944fb651 Keep StackingRule across builders 2021-04-13 09:24:37 +02:00
TheMode
58a532ac03 Annotate ItemStackBuilder#stackingRule with Beta 2021-04-13 09:19:39 +02:00
TheMode
70b97951e4 Added setter for StackingRule 2021-04-13 05:50:11 +02:00
TheMode
fed4e6897a Fix FireworkEffect byte reading 2021-04-13 04:14:32 +02:00
TheMode
61d2ef2f06 Fix ItemStack#fromNBT 2021-04-13 03:45:01 +02:00
TheMode
508659fd30 Fix potential race condition 2021-04-13 03:29:55 +02:00
TheMode
2b74d7697c Added ItemStack#fromNBT 2021-04-13 03:27:51 +02:00
TheMode
32430882a5 ItemStack is final 2021-04-13 03:10:04 +02:00
TheMode
3b8ed1df32 Add api status annotations 2021-04-13 02:21:03 +02:00
TheMode
56439a2330 Merge branch 'master' into jline 2021-04-13 02:18:10 +02:00
TheMode
1b98a65869 Get entities from all instances when none is specified in an entity query 2021-04-13 02:08:09 +02:00
TheMode
20c947650f Clear command cache after unregistering a command 2021-04-12 22:45:45 +02:00
TheMode
cdaef2b4f0 Remove LivingEntity outdated TODO 2021-04-12 19:56:40 +02:00
TheMode
2755add8df Fix item tags not being saved when going through a builder 2021-04-12 17:11:28 +02:00
TheMode
1e99810451 Inventory title can be raw string 2021-04-12 16:42:57 +02:00
TheMode
6b165c7692 Fix MapMeta not being a provider 2021-04-12 16:29:15 +02:00
TheMode
2531161964 Fix drag click 2021-04-12 16:27:12 +02:00
TheMode
0fea9b39a2 Return AIR if the amount is 0 or below 2021-04-12 09:11:08 +02:00
TheMode
adfb487140 Fix entity currentChunk being null 2021-04-12 04:50:45 +02:00
TheMode
4932262750 Use chunk instead of instance to check if an entity is on ground 2021-04-12 04:45:11 +02:00
TheMode
bd90de0df2 Remove unnecessary string concat 2021-04-12 04:27:36 +02:00
TheMode
0ff9e3e435 Remove debug print 2021-04-12 04:05:18 +02:00
TheMode
8f6a651bda Added StackingRule#apply with unary operator for amount 2021-04-12 01:27:33 +02:00
TheMode
aac32420de Annotation cleanup 2021-04-12 01:07:05 +02:00
TheMode
1d5262caf2 Merge branch 'master' into item-api
# Conflicts:
#	src/test/java/demo/PlayerInit.java
2021-04-12 00:44:47 +02:00
TheMode
7e3035709f Annotation, fix cursor item not being cleared 2021-04-12 00:42:32 +02:00
TheMode
8e9d7098e5 Allow custom transaction type, simplify inventory superclasses 2021-04-12 00:33:27 +02:00
TheMode
ecb77fc847 Rename FillOption to TransactionOption 2021-04-12 00:07:38 +02:00
TheMode
1100aa98a5 Annotation & comment 2021-04-12 00:04:40 +02:00
TheMode
17fcd23c77 Fix condition, add documentation 2021-04-11 23:52:12 +02:00
TheMode
d86a733b79 WIP FillOption 2021-04-11 23:43:35 +02:00
TheMode
db8f071633 Cleanup, make PingPlayer immutable 2021-04-11 20:46:48 +02:00
TheMode
9f3b7d4ca8
Update FakePlayerConnection.java 2021-04-11 20:32:09 +02:00
thiccaxe
fadbe39494 Getters for fields in HandshakeData 2021-04-11 10:46:09 -07:00
thiccaxe
c451d46ce0 document ServerListPingEvent 2021-04-11 10:30:47 -07:00
TheMode
c7cd8c332a Rename meta package to metadata to limit breaking changes 2021-04-11 19:13:50 +02:00
TheMode
df20670ce8 Use AIR as default in CrossbowMeta instead of null 2021-04-11 17:12:28 +02:00
TheMode
ea3aedd76f ItemMeta#getOrDefault annotation 2021-04-11 17:05:32 +02:00
TheMode
792dd9787f Remove ItemStore API until a stable solution is found 2021-04-11 17:01:05 +02:00
TheMode
f7bf7c1321
Merge pull request #204 from kezz/send-packets-to-audience
Add util method to send a packet to an audience
2021-04-11 15:29:04 +02:00
TheMode
34a7c68e16
Merge pull request #237 from Minestom/update_structure_packet
Add update structure block packet
2021-04-11 15:26:19 +02:00
TheMode
2fadf1da94 Added varargs equivalent for canPlace/Destroy 2021-04-11 15:01:43 +02:00
TheMode
3b37987f15 Remove dead line 2021-04-11 14:55:27 +02:00
Matt Worzala
1f27f2e6cd
provide default location 2021-04-11 00:46:04 -04:00
Matt Worzala
11146186cc
add update structure block packet 2021-04-11 00:37:00 -04:00
thiccaxe
8a9abff98b Remove Duplicate Code; unlinking ResponseData & ServerListPingEvent
Removed code that would cause maintaining more difficult after an update in ResponseData, and additionally PlayerConnection

Updated demo to reflect changes.
2021-04-10 21:14:36 -07:00
TheMode
2f53388b9f Fix velocity IP forwarding 2021-04-11 05:46:52 +02:00
TheMode
6e0202c33b Fix math, improve physics performance 2021-04-11 03:21:38 +02:00
TheMode
e0c2c4b655 Support for canPlace & canDestroy meta 2021-04-11 00:42:09 +02:00
TheMode
5adbc287b3 Added TickMonitor 2021-04-11 00:09:01 +02:00
TheMode
c347f55c1f Make it clear that ArgumentEntity uses a bitmask 2021-04-10 23:18:07 +02:00
TheMode
d219570fe6 Make it clear that PlayerAbilitiesPacket uses a bitmask 2021-04-10 23:17:20 +02:00
TheMode
2da42cb8cb Remove unnecessary chunk callback 2021-04-10 22:33:38 +02:00
TheMode
032343011a Reduce map lookup when looping through surrounding custom blocks 2021-04-10 22:03:03 +02:00
TheMode
f5a21948c6 Reduce chunk lookup when switching 2021-04-10 21:57:33 +02:00
TheMode
c74946cc3c Cache entity current chunk 2021-04-10 21:42:45 +02:00
TheMode
aaab620839 Reduce entity movement overhead (chunk lookup) 2021-04-10 21:21:37 +02:00
TheMode
be2d1db9e0 Merge branch 'master' into item-api 2021-04-10 19:37:36 +02:00
TheMode
ea293bd376 Added EquipmentHandler#setEquipment 2021-04-10 19:30:25 +02:00
TheMode
0be4c6d8c7 More meta utils method, fix openBook 2021-04-10 18:55:26 +02:00
TheMode
0619b1b14b Fix immutability inside ItemMeta 2021-04-10 18:36:20 +02:00
TheMode
e81c31f61b Remove Ownership code 2021-04-10 17:47:45 +02:00
TheMode
bd3c678bde Add HoverEventSource to ItemStack 2021-04-10 17:01:50 +02:00
TheMode
ebbfe7868b Prevent implicit cast from int to double 2021-04-10 06:11:43 +02:00
TheMode
d2efb43625 Improve immutability & prevent NPE 2021-04-10 06:08:08 +02:00
TheMode
50ceeb33e4 Use proper meta based on material 2021-04-10 06:03:48 +02:00
TheMode
1d12a5de95 Implement all meta 2021-04-10 05:53:40 +02:00
TheMode
e4f7a66046 Packet cache rename 2021-04-10 02:02:59 +02:00
TheMode
d88f81e5f3 Use UnaryOperator instead of Function 2021-04-10 01:16:21 +02:00
TheMode
d1f8e60a7e Cache meta binary 2021-04-10 00:55:18 +02:00
TheMode
f5b8f267d6 Clone instead of caching 2021-04-10 00:25:50 +02:00
TheMode
5e8e7cbaf4 Rename nbt method to remove confusion about the object being mutable or not 2021-04-10 00:24:29 +02:00
TheMode
64e70c3b64 Use the builder methods instead of fields 2021-04-10 00:01:06 +02:00
TheMode
d6e7c9a635 Handle nbt directly inside builders instead of lazily 2021-04-09 23:57:05 +02:00
TheMode
4f5fd125c4 ItemMetaBuilder doesnt need to be cloneable 2021-04-09 23:23:33 +02:00
TheMode
e19af0377c Merge branch 'master' into item-api
# Conflicts:
#	src/main/java/net/minestom/server/item/ItemDisplay.java
#	src/main/java/net/minestom/server/utils/binary/BinaryReader.java
2021-04-09 23:19:38 +02:00
TheMode
e4a26df2b6 Rename ItemMeta#nbt, remove unnecessary cache 2021-04-09 23:16:57 +02:00
TheMode
05a553eb4e Fix javadoc build 2021-04-09 19:01:37 +02:00
TheMode
4b31e27348 Fix ArgumentMap when the argument accepts space 2021-04-09 18:59:24 +02:00
TheMode
b50c2831bf
Merge pull request #228 from Project-Cepi/argument-map
Add ArgumentMap
2021-04-09 18:55:36 +02:00
LeoDog896
ca6ee7c23a Move ArgumentMapper inside ArgumentMap 2021-04-09 12:54:02 -04:00
LeoDog896
e4c3345da7 Add beta to map 2021-04-09 12:50:05 -04:00
TheMode
b03752afbe Fix javadoc build 2021-04-09 18:28:03 +02:00
TheMode
5ef4d0f9b4 Reduce the overhead of converting chunk indexes to chunk object, dont tick empty entity list 2021-04-09 18:22:29 +02:00
Kieran Wallbanks
05192de8e1 Make NamespaceID implement Key directly 2021-04-09 13:47:53 +01:00
thiccaxe
61242dc185 Remove extra setters and congregate into refreshServerInformation 2021-04-08 22:06:16 -07:00
TheMode
164873c313 Ensure thread safety 2021-04-09 06:04:16 +02:00
TheMode
abbf7f932d Prevent memory leak when dealing with cached packets 2021-04-09 06:02:07 +02:00
TheMode
56bdb402b1 Merge remote-tracking branch 'origin/master' 2021-04-09 05:41:03 +02:00
TheMode
01d233f7d8 Overall performance improvement 2021-04-09 05:40:40 +02:00
thiccaxe
fce63a91d5 actually remove the code this time 2021-04-08 18:21:00 -07:00
thiccaxe
b086dc82ca Remove extra code in FakePlayerConnection, add refershServerInformation back 2021-04-08 18:20:23 -07:00
thiccaxe
94c4ec79e1 simplify data storage, fix annotations
Removed HandshakeData  - too excessive

Added abstract methods in PlayerConnection as replacement

in FakePlayerConnection setters do nothing and Getters return MinecraftServer defaults
2021-04-08 16:51:50 -07:00
thiccaxe
cad128a393 update demo to show example
may be cut down later as it is very excessive.
2021-04-08 14:41:22 -07:00
thiccaxe
cd27d1d6c7 ServerListPingEvent
An implementation of what could be done to make this event - not perfect in my opinion.
2021-04-08 14:19:32 -07:00
TheMode
102c060114
Merge pull request #232 from strajabot/master
Add multiple colors for FireworkEffect
2021-04-08 20:25:54 +02:00
strajabot
96155e826e Add multiple colors for FireworkEffect 2021-04-08 19:02:42 +02:00
LeoDog896
45cc41c99e
Merge branch 'master' into argument-map 2021-04-08 13:01:50 -04:00
TheMode
c2f302ad0e Fix Inventory never being null when clicking inside an inventory (when the click happens on a player inventory slot) 2021-04-08 17:47:44 +02:00
TheMode
25176e9b9d
Merge pull request #231 from DiamondCodingYT/yaw-fix
Added a yaw fix to for issue #168
2021-04-08 15:04:08 +02:00
Florian Fuhrmann
9c1eeb56d3 Added the Position#fixYaw method that fixes yaw values an used it on Position#setYaw and on a Position constructor to fix issue #168 2021-04-08 12:45:17 +02:00
TheMode
4c495f401d Code cleanup 2021-04-07 18:35:19 +02:00
TheMode
5b98fbeb8b Rename CommandCondition 'source' to 'sender' 2021-04-07 15:48:05 +02:00
LeoDog896
5e4af20992 And handle event exceptions 2021-04-06 22:29:24 -04:00
LeoDog896
512ec8dcbc Catch command execution 2021-04-06 22:28:12 -04:00
LeoDog896
dfae6ad5f8 Documentation and visibility changes 2021-04-06 22:12:30 -04:00
LeoDog896
0e4168ba45 Add ArgumentMap 2021-04-06 22:07:38 -04:00
LeoDog896
97cad24b14 Merge remote-tracking branch 'upstream/master' into update-option-equals 2021-04-06 21:39:17 -04:00
TheMode
2606f2b291 Added PlayerChatEvent#getDefaultChatFormat 2021-04-07 02:47:19 +02:00
TheMode
093cce7242 Dependency update 2021-04-06 23:59:48 +02:00
LeoDog896
9d1d60cdcd Equals & hashcode overrides 2021-04-06 15:25:18 -04:00
TheMode
0bb8144d33 Improve BinaryReader & BinaryWriter 2021-04-06 18:31:30 +02:00
TheMode
017bbf8a60 Remove 0 size check 2021-04-06 06:43:16 +02:00
TheMode
720c986cea Fix reading of non-ASCII characters being higher than the protocol limit 2021-04-06 06:39:57 +02:00
Felix Cravic
e3867c659b Merge branch 'master' into item-api
# Conflicts:
#	src/main/java/net/minestom/server/item/ItemStack.java
2021-04-06 05:10:58 +02:00
themode
008b7fb223 Fix FishingHookMeta NPE 2021-04-05 20:55:51 +02:00
KrystilizeNevaDies
7a6fb4d601 Format FishingHookMeta + make owner not null 2021-04-06 04:43:19 +10:00
KrystilizeNevaDies
b1cfa3d9b2 make FishingHookMeta implement ObjectDataProvider 2021-04-06 04:39:47 +10:00
thiccaxe
159ff3f646 Remove reprecated code
Removed deprecated code,
Added missing code,
Optimized imports.
2021-04-05 09:57:18 -07:00
themode
88765dd703 Fix test 2021-04-05 18:26:57 +02:00
themode
49397957a2 Style cleanup, add more information when the server is not run using bootstrap 2021-04-05 18:24:38 +02:00
themode
63159cc49a Fix client 0x1E & 0x1F packets 2021-04-05 18:22:08 +02:00
thiccaxe
56f8728890 Fix Deprecation of ResponseDataConsumer 2021-04-04 19:53:01 -07:00
thiccaxe
02982c0ee2 Shortcut methods in StatusRequestEvent 2021-04-04 18:52:55 -07:00
thiccaxe
2dec361836 Deprecate ResponseDataConsumer
Not sure if this is how to correctly deprecate, please lmk!
2021-04-04 18:50:41 -07:00
thiccaxe
7c0fcadd4f Add HandshakeEvent 2021-04-04 16:26:58 -07:00
thiccaxe
4f8e94dcf2 Note about favicon format 2021-04-04 15:57:42 -07:00
thiccaxe
cf4a8756ef StatusRequestEvent
Added basic event

notes:
 - minestom will only accept the 1.16.5 protocol version, as of now there is no way to get the protocol version from the event. Assume 1.16.5

- there is also no way to currently get the address the client used to ping the server, as that is sent in another packet and minestom does not currently pass that data through.

 - favicon appears to not be working
2021-04-04 15:43:19 -07:00
themode
15c0e64703 Fix AbstractInventory#addItemStack comment 2021-04-04 22:53:08 +02:00
themode
81f2127a9d Annotation style 2021-04-04 21:48:11 +02:00
themode
5a5531723c Fix original nbt overwriting modified meta 2021-04-04 21:34:48 +02:00
themode
d34d3a2b50 Add comment about ItemMetaBuilder#clone 2021-04-04 20:50:06 +02:00
themode
d1d973018e Lore is non-null 2021-04-04 20:49:21 +02:00
TheMode
2b72f91909
Merge pull request #214 from MrBretze/master
Added isRegistered(DimensionType) and getDimension(NamespaceID) to DimensionTypeManager
2021-04-04 18:29:40 +02:00
Konstantin Shandurenko
88c2e82604 AbstractInventory: more StackingRule#apply usages instead of ItemStack#withAmount 2021-04-04 19:15:34 +03:00
themode
005d70e3a6 Annotation + ItemStoreBuilder should be more like a builder 2021-04-04 17:54:05 +02:00
Kieran Wallbanks
4ee9d8ee91 Fix Javadoc build error 2021-04-04 14:51:04 +01:00
themode
68de2b1980 Cleanup 2021-04-04 15:44:09 +02:00
themode
ea58d0f693 Fix StackingRule not being used inside to retrieve item count 2021-04-04 15:41:05 +02:00