meteor-client icon indicating copy to clipboard operation
meteor-client copied to clipboard

[Suggestion] Scripting

Open Cypphi opened this issue 4 years ago • 22 comments

Add JavaScript script support so we can code our own modules while not having to reload all the time. It would be very useful and way better than the addons since the addons are separate mods we have to reload all the time.

If the option above isn't gonna be implemented, please allow meteor addons to modify anything of meteor itself. By this I'm talking about themes, extra module options and what not.....

Cypphi avatar Apr 10 '21 20:04 Cypphi

Addons can already add themes, and for modifying existing modules thats extremely tricky to do, not even possible without changing how every module fundamentally works

MineGame159 avatar Apr 10 '21 20:04 MineGame159

fyi you can overwrite a module by naming it the same thing and putting it in the same category

gigglingbed avatar Apr 10 '21 20:04 gigglingbed

Well yeah but it has some problems

MineGame159 avatar Apr 11 '21 08:04 MineGame159

This is just my own opinion, but I would like a JS API, since then I don't need to learn Java, compile anything, and make a bunch of classes and files, when I only want to make a simple script that I only need once.

CountBleck avatar Apr 12 '21 01:04 CountBleck

Also if js you can add stuff and maybe do .reload so you wouldn’t have to restart your game

ghost avatar Apr 19 '21 09:04 ghost

This is just my own opinion, but I would like a JS API, since then I don't need to learn Java, compile anything, and make a bunch of classes and files, when I only want to make a simple script that I only need once.

I think some other things should be added and some bugs be fixed before anyone thinks abt adding a javascript api

ghost avatar Apr 23 '21 11:04 ghost

This is just my own opinion, but I would like a JS API, since then I don't need to learn Java, compile anything, and make a bunch of classes and files, when I only want to make a simple script that I only need once.

I think some other things should be added and some bugs be fixed before anyone thinks abt adding a javascript api

Yeah very true, or just make addons more flexible instead of adding a whole new scripting system

Cypphi avatar Apr 28 '21 15:04 Cypphi

Scripts are much easier to code tho

ghost avatar Apr 28 '21 19:04 ghost

Yeah, scripts are easier to make without compiling and stuff. However, you would somehow have to add a JavaScript engine or some other interpreter (depends on what language is used to write scripts in). In the case of JavaScript, you would need to embed V8, Spidermonkey, or ChakraCore somehow. And none of those are written in Java; they use C++. So probably no scripting APIs using JS any time soon.

CountBleck avatar May 07 '21 23:05 CountBleck

Yeah, scripts are easier to make without compiling and stuff. However, you would somehow have to add a JavaScript engine or some other interpreter (depends on what language is used to write scripts in). In the case of JavaScript, you would need to embed V8, Spidermonkey, or ChakraCore somehow. And none of those are written in Java; they use C++. So probably no scripting APIs using JS any time soon.

How do liquidbounce and astolfo do JS script support then? I'm actually kinda curious

Cypphi avatar Oct 11 '21 16:10 Cypphi

Yeah, scripts are easier to make without compiling and stuff. However, you would somehow have to add a JavaScript engine or some other interpreter (depends on what language is used to write scripts in). In the case of JavaScript, you would need to embed V8, Spidermonkey, or ChakraCore somehow. And none of those are written in Java; they use C++. So probably no scripting APIs using JS any time soon.

How do liquidbounce and astolfo do JS script support then? I'm actually kinda curious

cypphi been in a coma for 6 months

gigglingbed avatar Oct 11 '21 18:10 gigglingbed

Yeah, scripts are easier to make without compiling and stuff. However, you would somehow have to add a JavaScript engine or some other interpreter (depends on what language is used to write scripts in). In the case of JavaScript, you would need to embed V8, Spidermonkey, or ChakraCore somehow. And none of those are written in Java; they use C++. So probably no scripting APIs using JS any time soon.

How do liquidbounce and astolfo do JS script support then? I'm actually kinda curious

cypphi been in a coma for 6 months

sorry im having a moment again

Cypphi avatar Oct 12 '21 16:10 Cypphi

LiquidBounce uses Nashorn, which, if I remember correctly, doesn't support ES6+?

CountBleck avatar Oct 28 '21 04:10 CountBleck

compile it with the typescript compiler to es5 then lol

linkle69 avatar Jan 07 '22 09:01 linkle69

Technically, theres GraalJS, but I agree that this doesn't seem worthwhile, especially when there are fully-featured fabric mods solely focused on this

JFronny avatar Jan 10 '22 17:01 JFronny

There's a addon that adds scripting in python by cloudburst (Link) but it's unmaintained

SIMULATAN avatar Jan 11 '22 15:01 SIMULATAN

compile it with the typescript compiler to es5 then lol

You mean Babel. Also, that's inconvenient for making scripts when you need them. Moreover, that adds a dependency on Node.js, which is stupid for a Minecraft mod.

CountBleck avatar Jan 21 '22 17:01 CountBleck

Technically, theres GraalJS, but I agree that this doesn't seem worthwhile, especially when there are fully-featured fabric mods solely focused on this

LiquidBounce has GraalJS now. But it makes the size of jar file doubled or more. And because LiquidBounce has many usages of Kotlin language features, the script writer should read the utils written in Kotlin and try to understand its ASM(Java) interop with JS. To be honest I rarely see anyone use it. I'd rather write the feature I want with Kotlin.

MukjepScarlet avatar Nov 11 '25 10:11 MukjepScarlet

I think Groovy or Kotlin script will be much better here. But I never know how they work.

MukjepScarlet avatar Nov 11 '25 10:11 MukjepScarlet

I think Groovy or Kotlin script will be much better here. But I never know how they work.

Possibly, but judging by how long this has been open. It doesn't have priority. And honestly back then I didn't even know what I was talking about, still sometimes don't lol

Cypphi avatar Dec 03 '25 00:12 Cypphi

lol I think it's even easier to write a mod which depends on the client

MukjepScarlet avatar Dec 03 '25 02:12 MukjepScarlet

lol I think it's even easier to write a mod which depends on the client

It is undoubtedly easier. The addon system is nice the way it is tbh. Nowadays I don't even use addons anymore and just use my own base

Cypphi avatar Dec 03 '25 02:12 Cypphi