Carpet

Carpet

2M Downloads

How to use in Survival Single Player?

MestreLion opened this issue ยท 7 comments

commented

I've successfully installed Carpet (it shows fine in Fabric's ModMenu), but I'm unable to use it in my Survival Single Player world unless I select "Open to LAN". Only then commands such as /carpet or /script load are available. Is there a way to use it without opening the world to LAN? I'd like to keep my world as Single Player. (I'm only interested in /script load ai_tracker)

Also, regardless of the solution, this should be in the manual/wiki. I've seen many videos on how to install Carpet Mod (which I've already done, as easy as any other Fabric Mod), and some on using it (after it is enabled), but I've found no documentation on how to enable it. Is opening to LAN required? Should cheats be enabled? If so, how?

commented

Your world probably has cheats disabled, you can enable them if you open level.dat in the world folder with a nbt editor (like NBT Explorer), in the level.dat file there is a value called allowCommands, set that to 1, then enter your world.

Yeah, that solved it, thanks! I created this world a long time ago, probably using the default settings, which is likely disabled cheats. It's weird that Minecraft has no in-game option for that after world creation.

[...] or by adding them to your carpet.conf file in your world's folder

Care to explain this approach a little more, @altrisi ? Sounds like a nice solution too!

And please, please mention this somewhere in the documentation/wiki. A simple note such as, for example:

"For Survival Single Player, most commands require cheats enabled. It can be enabled at World Creation, or by "Open World to LAN", or setting allowCommands=1 in its level.dat using a tool such as NBTExplorer. Alternatively, you could edit your carpet.conf like this and that and so..."

commented

There are docs on the Carpet wiki about this actually (called something like Carpet Configuration), but the carpet.conf file is basically where all permanently set rules are saved. It's inside the world folder, with the following structure:

rule1 value1
rule2 value2
... 

Since each command has a rule to control its permission level, you could have set the permissions for the commands you wanted by setting some rules (the ones you see when doing /carpet, which are the same as the ones listed in the Current Available Settings page).

That way you don't need to enable cheats if you don't want to.

commented

There are docs on the Carpet wiki about this actually (called something like Carpet Configuration)

Carpet Configuration does explain how to edit carpet.conf, but it does not mention that some configuration is required to enable Carpet in Single Player. While it mentions "OP is required", one might assume this is only for multiplayer servers, not single player (and many players might not know that in single player "OP" means "Enable Cheats"). It also only talks about the /carpet main command, there's no mention of /script.

IMHO the note I suggested should be in the wiki home page, specifically at How can I learn to use carpet mod?. The video in that section assumes Carpet is already installed and enabled. Installing is covered in the main README, but again, no mention of the additional steps required to make /carpet (and /script) work in Single Player.

commented

just.

Like any other mod, right? Wiki is open to edit for anyone. It can mention the fact that carpet needs cheats to manipulate its features.

commented

Your world probably has cheats disabled, you can enable them if you open level.dat in the world folder with a nbt editor (like NBT Explorer), in the level.dat file there is a value called allowCommands, set that to 1, then enter your world.

commented

Most Carpet commands by default require op access (/carpet requires it always).

You can change the required permission for commands changing the command[What] rules. To load scripts I think you also need commandScriptACE.

Carpet Permission levels:

  • 0 or true: Anyone/no op
  • 1-4: Such OP level (2 being most vanilla commands and shortcutted as ops, also Carpet commands that affect the world)
  • false completely disabled
commented

You can change them either by getting op by LAN or similar or by adding them to your carpet.conf file in your world's folder