Missing Server Events in `events.d.ts`
C0D3-M4513R opened this issue ยท 4 comments
Now hear me out please:
I want to create Scripts for server side.
I want to have type annotations.
In the current state, I can only dump client side events and classes .
Server Side events and classes are not included.
If you wanted to implement it, by having dumps differ on Server vs on Client, go ahead:
The Plugin stopping the internal server in this scenario is not important, since you use the tool once to generate the type annotations, and then disable the mod.
So performance or Blocking the server doesn't even matter.
For my own use, I have just disabled the .isSingleplayer()
annotations, to get around the current limitations and get at least some classes of the server.
Spoiler: It didn't work.
The generated dump is not useful, and the serverside kubejs events are also not included.
Also there were ton's of mising class errors, because client classes are not in a server... duh!
Edit:
I modified some code a little, removing client sided references where they were causing exceptions, and I think I got a usable dump.
Server Side events are still not included though.
My main point is missing like all of the important events: item.right_click, item.left_click, item.crafted, player.* , etc.
There are many many more. Essentially I could check all events, that are marked as Server only here.
These have all been searched in events.d.ts:
Here is a full list of all missing events (`//` means the event is in the regular dumps, but not my server dump.)
- client.debug_info.left
- client.debug_info.right
- //client.generate_assets
- //client.logged_in
- client.logged_out
- //client.tick
- server.unload
- recipes.after_load
- level.unload
- level.explosion.pre
- level.explosion.post
- //player.logged_in
- player.logged_out
- //player.tick
- player.data_from_server.
- player.data_from_client.
- player.chat
- player.advancement
- player.inventory.opened
- player.inventory.closed
- player.inventory.changed
- player.chest.opened
- player.chest.closed
- //entity.death
- entity.attack
- //entity.drops
- //entity.check_spawn
- block.missing_mappings
- block.right_click
- block.left_click
- block.place
- block.break
- block.drops
- item.missing_mappings
- item.right_click
- item.right_click_empty
- item.left_click
- item.entity_interact
- item.pickup
- //item.tooltip
- item.crafted
- item.smelted
On another note: net.minecraftforge.server.permission.PermissionAPI
is indexed by my server dump (types, as well as java(PermissionAPI)), but not by the regular Client dump.
I think, I will just use both dumps in parralell, for the best results.
ProbeJS can only dump events that are fired before typing /probejs dump
in 1.18.2, this design is carried out due to KubeJS's limits in event system (in 1.18.2). You should ensure that you fired events you mentioned before /probejs dump
.