Carpet

Carpet

2M Downloads

Add default value for mobcaps

NikitaCartes opened this issue · 4 comments

commented

The title explains itself. This would be useful for servers as this setting is reset after a reboot.

commented

@NikitaCartes k u can close this now

commented

@Ghoulboy78
Not sure if this should be closed. This was more of an issue of having a default value for something, and we only provided a workaround.

It's like if for Carpet rules when someone asked to make them be able to be setDefault we just told them "Oh, just put a Scarpet app that runs the command for you every time".

Or for other Scarpet APIs, "just use run()".

I would not need for myself the ability to set default mobcaps, but I find it's a valid feature request that makes sense, and probably gnembon should decide.

commented

As a workaround, you could make a scarpet app to automatically run the mobcaps command when starting the server.

commented

In a text file ended with .sc, paste the following, replacing your_command_without_slash with, well, your command without slash. Keep the single quotes:

run('your_command_without_slash');

__config() -> {'stay_loaded'-> false}

Save that in your world's scripts folder, set the rule /carpet setDefault scriptsAutoload true, and it should be automatically set every time you start the world.