Commit Graph

2993 Commits

Author SHA1 Message Date
Kieran Wallbanks
58e108bd37 Fix deprecated API usages 2021-06-15 13:19:49 +01:00
Kieran Wallbanks
0ba27939d9 Implement new sound changes 2021-06-15 13:19:48 +01:00
Kieran Wallbanks
e5ca8d992e Create providers for Adventure serializers 2021-06-15 13:19:36 +01:00
Kieran Wallbanks
ee1ca5e03b Deprecate AdventureSerializer 2021-06-15 13:19:36 +01:00
Kieran Wallbanks
e532f16735 Fix default locale 2021-06-15 13:19:36 +01:00
Kieran Wallbanks
b1f72faa67 Implement pointer feature 2021-06-15 13:19:36 +01:00
Kieran Wallbanks
e7e0d4cb0d Implement Sound.Source.Provider 2021-06-15 13:19:36 +01:00
TheMode
df38061c6b Inline condition 2021-06-15 02:54:03 +02:00
TheMode
0c0b387345 Use a for-each loop, and prevent iterator allocation when empty 2021-06-15 02:29:58 +02:00
TheMode
051fbcb34b Potentially fix map packet 2021-06-14 22:01:12 +02:00
TheMode
27f30fa394 Remove a few magic metadata indexes 2021-06-14 21:49:16 +02:00
TheMode
6315bd5c61 Add try-catch for EventNode condition 2021-06-14 14:42:10 +02:00
TheMode
f2bf27c86e Fix rebase 2021-06-14 00:18:53 +02:00
TheMode
eadb32eba3 Merge branch 'master' into event-api 2021-06-14 00:17:42 +02:00
TheMode
911c983957 Merge branch 'master' into event-api
# Conflicts:
#	src/main/java/net/minestom/server/entity/Player.java
#	src/main/java/net/minestom/server/event/player/UpdateTagListEvent.java
#	src/main/java/net/minestom/server/instance/Chunk.java
2021-06-14 00:11:41 +02:00
TheMode
af61c77a26
Merge pull request #319 from Minestom/resource_gatherer_java
Resource gatherer fixes
2021-06-13 14:58:49 +02:00
TheMode
6cd3952fb5
Merge pull request #316 from thiccaxe/server-list-ping-update
Updated Server List Ping
2021-06-13 14:58:05 +02:00
Matt Worzala
a84bc7be46
add stderr print 2021-06-12 09:29:00 -04:00
Matt Worzala
831dd6d610
use java home for resource gatherer. Should cause the same jdk to be used for resource gatherer and work if you dont have java in the path. 2021-06-12 09:17:18 -04:00
Matt Worzala
e5076832b1
Change to have an actual option which can be changed before startup 2021-06-12 09:07:09 -04:00
thiccaxe
6ff5f7e93c Fix Grammar in ResponseData 2021-06-11 23:08:57 -07:00
Matt Worzala
8529249b85
Add option to start server without terminal enabled 2021-06-11 20:03:16 -04:00
thiccaxe
7641b8a75d Updated Server List Ping
Added playersHidden field to ResponseData; shows "???" in Vanilla.
Added event for ping/pong packet
2021-06-11 13:54:52 -07:00
TheMode
37f8306fb4 Use dedicated component write method 2021-06-11 16:23:07 +02:00
TheMode
0200788b22 Add dedicated method to ignore string/component size 2021-06-11 16:19:17 +02:00
TheMode
9fed96abe2
Merge pull request #307 from Minestom/1.17
1.17 Update
2021-06-11 16:08:08 +02:00
TheMode
265ae83b4d Fix tags packet 2021-06-11 16:00:14 +02:00
TheMode
72bf894162 Fix chunk packet read 2021-06-11 15:41:02 +02:00
TheMode
97d17f9b8b Fix Light & window click test 2021-06-11 15:38:46 +02:00
TheMode
88052576b3 Support for forced resource packs 2021-06-11 12:32:24 +02:00
TheMode
78cc392007 Merge branch 'master' into event-api 2021-06-10 14:42:07 +02:00
TheMode
c0e956bef5 Fix javadoc 2021-06-10 14:41:44 +02:00
TheMode
ea05a6f784 Add trait to ItemDropEvent 2021-06-10 11:58:48 +02:00
TheMode
74d323126f Add traits to EntityEquipEvent 2021-06-10 11:57:13 +02:00
TheMode
3b80335134 Avoid foreach for sensitive code 2021-06-10 11:53:50 +02:00
Articdive
9ae8c96091
Finish TagsPacket read method 2021-06-10 09:45:30 +02:00
Articdive
29bac6fe24
Use enum for AxolotlMeta 2021-06-10 09:18:17 +02:00
TheMode
6ef40e08c7 Link to the packet event 2021-06-10 09:01:49 +02:00
TheMode
13350d0ab8 Fix ignoreCancelled option 2021-06-09 22:01:46 +02:00
Articdive
2976be947b
Fix and improve tags 2021-06-09 21:23:35 +02:00
TheMode
ad7b01fb9a Added NettyServer#getServerChannel 2021-06-09 20:36:27 +02:00
Articdive
9e64935af8
Let's just use the correct number here 2021-06-09 20:02:22 +02:00
Articdive
049592d1c2
Fix game event tags missing. 2021-06-09 19:26:46 +02:00
TheMode
b8bd7f3d02 Fix ResourceGatherer 2021-06-09 17:13:17 +02:00
TheMode
603e3293a6 Catch event exceptions 2021-06-09 14:05:37 +02:00
TheMode
0bd4a68290 Added ignoreCancelled option for EventListener 2021-06-09 08:46:19 +02:00
TheMode
12a215349d Lazily add eventhandler node to root for backward compatibility 2021-06-09 08:31:06 +02:00
TheMode
d800c94dcc Remove EventHandler mention in Event 2021-06-09 08:25:56 +02:00
TheMode
68ba4b232d Remove EventHandler mention in Event 2021-06-09 08:25:32 +02:00
TheMode
16d8597195 Make CancellableEvent a trait 2021-06-09 07:11:01 +02:00
TheMode
dd44b752c3 Remove addListener0 2021-06-09 06:57:08 +02:00
TheMode
fc70d4528e formatting 2021-06-09 06:52:00 +02:00
Matt Worzala
d38c0368fc
add event api javadocs v1 2021-06-08 16:58:48 -04:00
stefvanschie
99855a3ea7
Allow for cancelling at start and end of drag 2021-06-08 21:27:34 +02:00
stefvanschie
ddbd621535
Change dragging events
Now fires a start dragging, then a dragging for each slot and then an end dragging.
2021-06-08 19:55:11 +02:00
stefvanschie
cd319b047c Merge branch 'Minestom:master' into master 2021-06-08 19:52:50 +02:00
TheMode
3b00c2e010 1.17 release 2021-06-08 17:41:37 +02:00
TheMode
3fae5ed35f Fix checks 2021-06-08 17:18:00 +02:00
TheMode
34cde8390a Add more node children manipulation methods 2021-06-08 17:09:24 +02:00
TheMode
eb3cdd1495 Added EventNode#findChildren 2021-06-08 16:55:21 +02:00
TheMode
8c6d7ad1c3 Provide an event node per extension 2021-06-08 16:25:46 +02:00
TheMode
1e90d67511 Formatting 2021-06-08 14:20:48 +02:00
TheMode
5469190e64 Add annotations 2021-06-08 14:15:30 +02:00
TheMode
9705915e21 Add support for predicate expiration 2021-06-08 14:07:27 +02:00
TheMode
f47159d131 Add EventNode#setPriority 2021-06-08 13:47:10 +02:00
TheMode
cf1e5222ca Fix rebase 2021-06-08 13:05:12 +02:00
TheMode
7c2d07b911 Merge branch 'master' into event-api
# Conflicts:
#	src/main/java/net/minestom/server/listener/UseItemListener.java
2021-06-08 13:03:01 +02:00
Articdive
c86a460ade
Add the missing tags (done manually) 2021-06-07 22:21:02 +02:00
Articdive
a3b10ec18a
Fix ChatPosition and update to 1.17-rc2 2021-06-07 20:46:09 +02:00
TheMode
0da9c20b5a WIP tags update 2021-06-07 13:25:04 +02:00
Matt Worzala
d5987f91b5
update code generators, add axolotl (needs some more detail) 2021-06-07 01:24:39 -04:00
Matt Worzala
8ed49906fa
change generated EntityType to use metas 2021-06-07 00:55:41 -04:00
Matt Worzala
6cd0cf6bcc
add 1.17 entity meta 2021-06-07 00:53:48 -04:00
TheMode
5f1db3084d Add review work - update generated code 2021-06-07 05:27:42 +02:00
Matt Worzala
1850efb3fc
update existing metadata to 1.17, using new system 2021-06-06 22:45:22 -04:00
Matt Worzala
1065ad346e
get light section count from dimension type, add some missing getters to DimensionType 2021-06-06 19:33:21 -04:00
Matt Worzala
9de6c5aa8f
Create light packet slightly more dynamically. 2021-06-06 16:46:03 -04:00
TheMode
491ef8b514 Merge branch 'master' into 1.17 2021-06-06 15:31:27 +02:00
TheMode
3e73ec5646 Properly unescape displayname & lore 2021-06-06 14:21:25 +02:00
TheMode
aee429add3
Merge pull request #309 from Minestom/new-data-preperation-1.17
Use minestom-data to generate our enums.
2021-06-06 10:44:59 +02:00
TheMode
c930eed412 propagate listener changes to parents 2021-06-06 07:55:30 +02:00
TheMode
9594d848bc Use for-each loops during event calling 2021-06-06 07:34:33 +02:00
TheMode
180a3fa898 Improve event calling performance, reduce memory footprint 2021-06-06 07:28:07 +02:00
TheMode
459b50863e Update title/actionbar methods 2021-06-06 03:52:40 +02:00
TheMode
6c51631a29 Fix inventory drop 2021-06-06 03:30:33 +02:00
TheMode
56eead948a Fix inventory click 2021-06-06 01:50:28 +02:00
TheMode
a63c16892c Update light packet, fix biome count 2021-06-05 08:51:57 +02:00
TheMode
6b5125bcff WIP support for infinite chunk height 2021-06-05 07:56:16 +02:00
TheMode
3dfd4678d5 Add PlayerPacketEvent 2021-06-05 01:04:51 +02:00
TheMode
31d2f3488b Update protocol version to 1.17-rc1 2021-06-05 00:46:58 +02:00
TheMode
5d8ed5041f Use AtomicReferenceFieldUpdater to update the tick context 2021-06-04 22:30:35 +02:00
TheMode
25f1183a1b Remove EventNode#map 2021-06-04 21:12:27 +02:00
TheMode
2872a25325 Improve redirection performance 2021-06-04 10:07:46 +02:00
TheMode
b979c9b624 Temporary fix for mapped object 2021-06-04 09:50:26 +02:00
TheMode
030e5b6857 Create #addListener0 to ensure proper stacktrace when adding a listener 2021-06-04 07:45:15 +02:00
TheMode
d9b26f84d3 Keep using GlobalEventHandler 2021-06-04 04:54:07 +02:00
TheMode
a585e4e45b Improve event calling performance 2021-06-04 04:39:45 +02:00
TheMode
80c6bb3fa5 Deprecate GlobalEventHandler 2021-06-04 04:24:25 +02:00
TheMode
f39fc8c81e Fast exit when a node as no child 2021-06-04 04:14:41 +02:00
TheMode
c4d521cde5 All node should have a name 2021-06-04 04:10:13 +02:00
TheMode
d81df24132 Support old EventHandler API 2021-06-04 04:05:57 +02:00
TheMode
8b255651ab Call events using EventDispatcher 2021-06-04 03:48:51 +02:00
TheMode
5d3bae3d7f Make some events implement ItemEvent 2021-06-04 00:54:36 +02:00
TheMode
f1ddedfb44 Add EventNode#getParent 2021-06-04 00:30:48 +02:00
TheMode
94e315e3b2 Rename predicate to type 2021-06-03 21:59:27 +02:00
TheMode
5aa8d95ed9 Remove debug print 2021-06-03 21:54:42 +02:00
TheMode
734e6f5bcb Remove predicate from the EventNode factory methods 2021-06-03 21:54:07 +02:00
TheMode
a15717ae49 Remove unnecessary generic 2021-06-03 21:41:28 +02:00
TheMode
9177e94d1b Allow node predicate based on tag 2021-06-03 21:39:38 +02:00
TheMode
27bdbe7275 Rename removeMap to unmap 2021-06-03 20:59:05 +02:00
TheMode
81e2072bc5 Add shortcut to add listener 2021-06-03 20:46:11 +02:00
TheMode
03ff75f685
Merge pull request #304 from Bloepiloepi/food-fix
Food animation fix
2021-06-03 19:17:49 +02:00
Articdive
105f2fdc7e
Use minestom-data to generate our enums. 2021-06-03 12:11:42 +02:00
TheMode
e5031ff37e Prevent a node from having its parent as child 2021-06-03 09:47:48 +02:00
TheMode
e300d3ec57 Simplify EventNode#map 2021-06-03 05:59:13 +02:00
TheMode
8ec33bb6c8 EventNode methods return self 2021-06-03 04:41:08 +02:00
TheMode
d5cce11562 Remove second generic from EventNode 2021-06-03 04:26:47 +02:00
TheMode
5fa750fde3 Remove EventNodeConditional.java 2021-06-03 03:56:05 +02:00
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
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
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
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
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