Commit Graph

2784 Commits

Author SHA1 Message Date
TheMode
493c397efe Remove EventNodeList.java 2021-06-03 03:39:37 +02:00
TheMode
3727f3f954 Use a global lock when modifying tree data 2021-06-03 03:37:41 +02:00
TheMode
65c303766f Make EventNode a class, fast exist when no children can listen to an event 2021-06-03 03:27:30 +02:00
TheMode
f8eb211d0d Add node mapping support, for per-object listeners 2021-06-03 00:48:37 +02:00
TheMode
8f3b52a8b9 Inline method 2021-06-02 23:04:35 +02:00
TheMode
1a9bdd93d7 Remove unused parameter 2021-06-02 22:58:43 +02:00
TheMode
5b42ce4a52 Reuse EventFilter code 2021-06-02 22:55:24 +02:00
TheMode
b1714641e8 Use Object for EventFilter#ALL 2021-06-02 22:51:11 +02:00
TheMode
d58cd3b578 Add remaining filters 2021-06-02 22:47:45 +02:00
TheMode
6cbc31b114 Allow filtering on more than just EventHandler 2021-06-02 21:18:18 +02:00
TheMode
2977bb7b66 Make EventListener an interface 2021-06-02 21:14:48 +02:00
TheMode
4f127b2e0e Separate conditional event from conditional handler 2021-06-02 21:08:10 +02:00
TheMode
c95c8430b6 Force the use of EventListener 2021-06-02 20:56:47 +02:00
TheMode
ee99c94509 Remove unnecessary generic 2021-06-02 20:53:02 +02:00
TheMode
15ae5fd3c1 Force the use of EventFilter 2021-06-02 20:33:35 +02:00
TheMode
e670a0a40d Remove unnecessary method 2021-06-02 20:25:37 +02:00
TheMode
7aee717196 Add EventFilter 2021-06-02 20:23:50 +02:00
TheMode
aa5a182788 Add EventNode#removeChild 2021-06-02 19:52:05 +02:00
TheMode
11bdcdf92a Add EventNode#removeListener 2021-06-02 19:50:23 +02:00
TheMode
8fa4c22d1f Rename EventNode#create methods 2021-06-02 19:44:44 +02:00
TheMode
f6fe41cfe9 Return proper type 2021-06-02 19:28:02 +02:00
TheMode
0d6dde3ff5 Make EventNode an interface 2021-06-02 19:17:08 +02:00
TheMode
a835a479ae Added EventNode#map 2021-06-02 18:13:17 +02:00
TheMode
cd30a97cbb Make PlayerEvent extends EntityEvent 2021-06-02 18:04:08 +02:00
TheMode
305aa3e8d9 Add support for listener expiration count 2021-06-02 12:12:14 +02:00
TheMode
bdfa164695 Do not reuse node objects 2021-06-02 11:29:16 +02:00
TheMode
12c620df7a Fix conditional factory not actually having a condition 2021-06-02 11:26:36 +02:00
TheMode
5d1b742934 Move type check inside EventNode 2021-06-02 11:18:26 +02:00
TheMode
bc2a075b60 Fix event calling 2021-06-02 11:08:48 +02:00
TheMode
c3f52031e6 Added EventNodeConditional 2021-06-02 10:52:20 +02:00
TheMode
4f7192b6c7 Can now call an event from anywhere in the tree 2021-06-02 10:34:01 +02:00
TheMode
f4db18ea6c Start EventNode implementation 2021-06-02 10:19:23 +02:00
TheMode
5474116e7a Add EventNode#addChild 2021-06-02 09:50:18 +02:00
TheMode
80b2dd2747 Make InventoryEvent an interface 2021-06-02 09:25:08 +02:00
TheMode
096e1de9b5 Delete EventGroup.java, make InstanceEvent an interface 2021-06-02 09:21:13 +02:00
TheMode
0b6c7b0b0e Delete EventTrait 2021-06-02 09:06:04 +02:00
TheMode
52547c5bd6 Rename create method 2021-06-02 08:59:46 +02:00
TheMode
f88a2f3883 Dont allow every event 2021-06-02 08:24:02 +02:00
TheMode
77f74bb7dc Introduce EventNode 2021-06-02 08:17:21 +02:00
TheMode
2d8474282b Made Event an interface 2021-06-02 08:17:03 +02:00
TheMode
9c87b4d54f Add EventTrait interface 2021-06-02 07:15:28 +02:00
TheMode
02fe4c65a2 Use traits for events 2021-06-02 07:09:15 +02:00
TheMode
047d4a92ac Merge branch 'master' into event-api 2021-06-02 06:41:42 +02:00
LeoDog896
f68054d564 Convenience toMilliseconds, add UpdateOption methods 2021-06-01 11:29:40 -04:00
TheMode
93434eb887 Use proper version name 2021-05-31 21:35:26 +02:00
TheMode
c105fcc339 Wait 20 ticks before removing player from the tablist 2021-05-31 21:01:28 +02:00
TheMode
6764d040c3 Fix FakePlayer not being removed from the tablist 2021-05-31 20:49:33 +02:00
TheMode
8712ca364b WIP chunk packet support 2021-05-31 20:39:54 +02:00
TheMode
698469aa60 Fix EntityPropertiesPacket property count 2021-05-31 20:29:12 +02:00
TheMode
b8d1966ce4 Update client/server packets id 2021-05-31 20:09:08 +02:00
TheMode
8820123f15 Add minY & height dimension NBT 2021-05-31 19:11:24 +02:00
TheMode
6858690cc1 Use a static method to create the destroy entity packet 2021-05-31 18:53:57 +02:00
TheMode
9191e8ae1f Update to pre-release 2 2021-05-31 18:50:52 +02:00
TheMode
7a9826fc64 Update world border packets 2021-05-31 18:45:46 +02:00
TheMode
b3692f4f3f Delete outdated packets 2021-05-31 18:36:43 +02:00
TheMode
17fc62632d Update most packets 2021-05-31 18:29:44 +02:00
TheMode
98ccde56fb Add tickFrozen entity metadata 2021-05-31 18:05:01 +02:00
TheMode
fd977e05be Update serverbound packet, update clientside ids 2021-05-31 18:00:57 +02:00
TheMode
191e97b186 Initial commit changing the protocol version 2021-05-31 17:44:27 +02:00
TheMode
63bff29838 Compute block properties for arguments 2021-05-31 00:00:23 +02:00
TheMode
8b0991139d WIP property retrieval 2021-05-30 23:37:22 +02:00
TheMode
52d0ef7f53 Send trade packet for every new viewer 2021-05-30 16:39:09 +02:00
TheMode
c080750a88 Fix trade index in VillagerInventory 2021-05-30 16:33:02 +02:00
TheMode
5a485a3aab Added block handler destroy/place listener 2021-05-29 01:05:12 +02:00
TheMode
e62a837bf0 Added custom block drag support 2021-05-29 00:58:40 +02:00
TheMode
ba892ced05 Added BlockHandler#handleContact 2021-05-29 00:55:24 +02:00
TheMode
d937660cf8 Improve Block interface 2021-05-29 00:34:01 +02:00
TheMode
e0d54f5958 Store handler & nbt inside DynamicChunk 2021-05-29 00:07:22 +02:00
Stef van Schie
cb4ce09d85 Remove deprecated click types 2021-05-28 20:24:02 +02:00
TheMode
ffca5eea00 Added ItemStack#withTag 2021-05-28 17:05:14 +02:00
TheMode
d4fc6a094a Make ItemStack TagReadable 2021-05-28 17:00:48 +02:00
TheMode
9a1062b028 Simplify Tag#defaultValue 2021-05-28 16:21:54 +02:00
TheMode
60c1b2c4e9 Change Tag#Custom to only affect an external compound, allow tag mapping 2021-05-28 16:19:58 +02:00
TheMode
cb8ad02c0d Replace BlockModifier.java to BlockSetter & BlockGetter 2021-05-28 15:11:55 +02:00
TheMode
41f769b8b2 Rename #getBlockId to #getId 2021-05-28 14:35:55 +02:00
TheMode
58df9a9ba8 Use a BiPredicate for block comparison 2021-05-28 14:34:24 +02:00
TheMode
4739dbd0b8 Improve ChunkBatch 2021-05-28 14:29:26 +02:00
Articdive
674c6d6182
Add Supplier instead of direct reference and fix a @NotNull error. 2021-05-25 19:07:26 +02:00
TheMode
b31f76615a Fix connection 2021-05-25 13:20:44 +02:00
Articdive
042311d5e3
Download data to the correct directory and remove redundancy. 2021-05-25 10:42:39 +02:00
TheMode
36d2834b18 Remove unnecessary block manager reference 2021-05-25 04:44:11 +02:00
TheMode
47c7e36b1d Fix remaining errors 2021-05-24 23:39:22 +02:00
Articdive
a95a89932e
Remove CustomBlock and fix some compiler errors. 2021-05-24 22:51:34 +02:00
TheMode
37aa7c5aa2 Added some methods inside BlockHandler 2021-05-24 22:10:16 +02:00
TheMode
b15422f406 More error fix 2021-05-24 22:00:18 +02:00
TheMode
86f7fa7e27 Fix more errors 2021-05-24 21:39:30 +02:00
Articdive
7d47f46261
PFBlockDescription & PFBlockObject 2021-05-24 13:52:19 +02:00
stefvanschie
2122685d5f
Split dragging into separate left and right drags 2021-05-23 21:42:16 +02:00
Arne Dalhuisen
1da372eb3b Deprecation notice for callItemUpdateStateEvent(allowFood, hand) 2021-05-23 20:36:51 +02:00
Arne Dalhuisen
e3c41a254d Added callItemUpdateStateEvent(allowFood, hand) overload, getEatingHand is now @Nullable 2021-05-23 20:19:46 +02:00
Arne Dalhuisen
ca96ed3420 Also cancel food animation when PlayerPreEatEvent is cancelled 2021-05-23 16:56:48 +02:00
Arne Dalhuisen
8b79945992 Fixed eating particles when eating was cancelled by client 2021-05-23 16:46:29 +02:00
TheMode
f30e580aad Added Block#compare 2021-05-23 13:32:35 +02:00
TheMode
333825c032 Cleanup... 2021-05-23 00:28:31 +02:00
TheMode
21df05605d Fix a few errors related to placement rules 2021-05-22 23:41:55 +02:00
TheMode
9fe34cc32c Move BlockRegistry 2021-05-22 23:29:22 +02:00
Articdive
dba8b65c03
Add the Block Data API and Block Generator. 2021-05-22 21:56:01 +02:00
Matt Worzala
a749f07a3f
Inline nullable and nonnull annotations 2021-05-21 08:56:30 -04:00
Matt Worzala
51409705e1
Stop using reflection, update to latest 2021-05-20 22:26:35 -04:00
Anders
ef51a3765b
Use the block value to find the current block 2021-05-19 13:42:57 +02:00
Cp1987
ca25cc0470 Merge branch 'Minestom:master' into chunk-block-count 2021-05-18 17:31:11 +02:00
TheMode
cc97062dfa Remove soft values 2021-05-18 16:18:51 +02:00
Cp1987
c9d0dc62f6
Make isCurrentAir final. 2021-05-18 15:12:48 +02:00
Anders
67494255b5
Count non air blocks in a section. 2021-05-18 15:09:03 +02:00
TheMode
5ddda986a7
Merge pull request #293 from Minestom/tag-api
Tag API
2021-05-17 21:13:51 +02:00
TheMode
1f30e2af77 TagHandler in beta until a proper name is decided 2021-05-17 21:11:52 +02:00
TheMode
0c71030221 Do not crash the server when receiving an invalid packet 2021-05-17 20:58:36 +02:00
R0bbyYT
17ce859bdd Use Pattern#quote instead of \\ 2021-05-17 20:40:29 +02:00
R0bbyYT
107e1e3e19 Avoid server crash if the character is a metacharacter 2021-05-17 19:15:34 +02:00
TheMode
7e5940d1a5 Rename TagReadable & TagWritable 2021-05-17 18:26:38 +02:00
TheMode
418fc8b4be Deprecate old tag getters in ItemMeta 2021-05-17 17:50:05 +02:00
TheMode
354b4e3bc3 Replace ItemTag 2021-05-17 17:46:56 +02:00
TheMode
0a9fa31804
Merge pull request #275 from Minestom/respect-client-chat-settings
Respect client chat settings
2021-05-17 16:21:08 +02:00
Kieran Wallbanks
931806d40a Send rejection message on incorrect command execution 2021-05-17 14:48:44 +01:00
Kieran Wallbanks
cdedcd89d6 Simplify Messenger implementation 2021-05-17 14:46:25 +01:00
TheMode
9255adb7ec No need to expose tag default value 2021-05-17 15:17:53 +02:00
TheMode
429a14e220 Add tag comments 2021-05-17 15:14:16 +02:00
TheMode
1ec631fa5b Create TagReader/Writer from compound 2021-05-17 14:05:03 +02:00
TheMode
d3b4b2ac56 Added TagSerializer 2021-05-17 14:02:14 +02:00
TheMode
1715e55b4d Handle tag logic inside read/write 2021-05-17 13:04:00 +02:00
TheMode
0a7b773aa8 Added tag default value 2021-05-17 12:44:22 +02:00
TheMode
9c41a19592 Initial tag commit 2021-05-17 12:34:45 +02:00
TheMode
9e2d8bc408 Fix view being reset after velocity application 2021-05-16 23:57:42 +02:00
TheMode
c4b3e40225
Merge pull request #282 from Bloepiloepi/equipment-improvements
Equipment improvements
2021-05-16 11:55:04 +02:00
TheMode
b36c620a98
Merge pull request #285 from Project-Cepi/args-documentation
Add documentation to Argument methods
2021-05-16 11:54:03 +02:00
TheMode
d31fe2d88e
Merge pull request #229 from Project-Cepi/better-catching
Better catching for events/commands
2021-05-15 22:51:20 +02:00
TheMode
b67e438ddc
Merge pull request #291 from Kebab11noel/fix/player-sync
Fix player sync
2021-05-15 21:25:45 +02:00
Németh Noel
3081ffbb00 Include the check 2021-05-15 21:11:48 +02:00
Németh Noel
e3d31f113a Don't send scheduled sync to the player it self 2021-05-15 21:07:42 +02:00
TheMode
bb1f4a3792 Add CommandContext#getOrDefault 2021-05-15 11:02:07 +02:00
TheMode
2b17edfc46 Fix build 2 2021-05-15 10:14:05 +02:00
TheMode
bcf184123d Fix build 2021-05-15 10:12:04 +02:00
TheMode
88dba380f9 Remove apache common text dependency 2021-05-15 08:31:24 +02:00
TheMode
dfad9f2947 Remove minecraft repo 2021-05-15 07:57:28 +02:00
TheMode
3bd389fb57
Merge pull request #149 from Minestom/authlib-removal
Stop using authlib
2021-05-15 07:53:35 +02:00
R0bbyYT
710d02e210 Merge remote-tracking branch 'origin/master' into feature/implement-entity-action 2021-05-14 20:57:01 +02:00
R0bbyYT
cd988f1271 Reset flying with elytra when the player is on the ground 2021-05-14 19:02:22 +02:00
R0bbyYT
34d428be10 Start with the elytra implementation 2021-05-14 18:35:09 +02:00
TheMode
93360d7e1b Fix thread count stuck to 1 2021-05-14 18:15:41 +02:00
LeoDog896
d50b5ac179 Add documentation to Argument methods 2021-05-13 08:15:02 -04:00
TheMode
36942708bb Introduce EventGroup 2021-05-13 09:11:02 +02:00
TheMode
6a712b33a0 Revert "Added CachedObject to access a single-object cache"
This reverts commit 1c39e06d
2021-05-13 08:32:26 +02:00
TheMode
1c39e06d55 Added CachedObject to access a single-object cache 2021-05-13 08:06:42 +02:00
Arne Dalhuisen
00278881ee Revert "Made EntityEquipEvent cancellable"
This reverts commit d72fb72e
2021-05-11 20:11:56 +02:00
Arne Dalhuisen
d72fb72e74 Made EntityEquipEvent cancellable 2021-05-11 17:05:16 +02:00
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