eaglerforge / EaglerForge-old

older custom client for EaglerForge, use injector instead for latest version
Other
54 stars 107 forks source link

Tracker for modding dedicated server #35

Open ZXMushroom63 opened 4 months ago

ZXMushroom63 commented 4 months ago

by requesting a bug you must check these boxes

about the bug

This is a tracker for modding the single player dedicated server. Currently, all mods run client-side, even in single player. Exposing the dedicated server is probably going to be hard due to it running in it's own sandboxed web worker (no exposing instances).

Current best idea from me is add a custom packet that you can send to a server that runs a new Function() in the web worker's context. Then, you can use the Web BroadcastChannel API to exchange information backwards and forwards between client and dedicated server.

Additionally, to make use of the already existing ModAPI, using globalThis rather than window. (web workers do not have a window)

Screenshots

No response

STPv22 commented 2 months ago

V1.4 (i assume) is going to be fire

ZXMushroom63 commented 2 months ago

V1.4 (i assume) is going to be fire

if i get this working

STPv22 commented 2 months ago

V1.4 (i assume) is going to be fire

if i get this working

Theres still the java gui if it doesn't

OeildeLynx31 commented 2 months ago

You could try beginning with a packet to send to the server which can execute a cheat command as player, so we can summon mobs and place blocks

ZXMushroom63 commented 1 month ago

Posting an update here: I successfully hooked into the dedicated server, meaning that you can now mod it when the new release comes out

STPv22 commented 1 month ago

NOICE

STPv22 commented 1 month ago

Wait, what does this allow is to do?

OeildeLynx31 commented 1 month ago

Wait, what does this allow is to do?

Everything you can do with a basic mod, which isn't adding new mobs or blocks. You can edit as you want, but I don't think you can make new ones.

STPv22 commented 1 month ago

Wait, what does this allow is to do?

Everything you can do with a basic mod, which isn't adding new mobs or blocks. You can edit as you want, but I don't think you can make new ones.

?

ZXMushroom63 commented 1 month ago

Wait, what does this allow is to do?

Everything you can do with a basic mod, which isn't adding new mobs or blocks. You can edit as you want, but I don't think you can make new ones.

you can definetely add new items, just in a non traditional way. You would have items differentiated via lore tags or similar, and then modify the client side renderer and add custom behaviours server side.

STPv22 commented 1 month ago

Nice huh

OeildeLynx31 commented 1 month ago

Wait, what does this allow is to do?

Everything you can do with a basic mod, which isn't adding new mobs or blocks. You can edit as you want, but I don't think you can make new ones.

you can definetely add new items, just in a non traditional way. You would have items differentiated via lore tags or similar, and then modify the client side renderer and add custom behaviours server side.

Could you make an example mod of this?

ZXMushroom63 commented 1 month ago

Wait, what does this allow is to do?

Everything you can do with a basic mod, which isn't adding new mobs or blocks. You can edit as you want, but I don't think you can make new ones.

you can definetely add new items, just in a non traditional way. You would have items differentiated via lore tags or similar, and then modify the client side renderer and add custom behaviours server side.

Could you make an example mod of this?

eventually