[Mod] Better Commands [better_commands]

Post Reply
User avatar
ThePython
Member
Posts: 42
Joined: Sat Feb 18, 2023 18:00
GitHub: ThePython10110
In-game: ThePython or ThePython10110
Location: Earth
Contact:

[Mod] Better Commands [better_commands]

by ThePython » Post

Adds commands and syntax from a certain other voxel game (such as /kill @e[type=mobs_mc:zombie, distance = 2..]) to Minetest. Designed to work with my other mod, Better Command Blocks.

You can even do /execute as @e at @s run me is closest to @e[sort=nearest,distance=.1..,limit=1]

More info on ContentDB/GitHub

License: MIT

GitHub repo
ContentDB
Direct download
Links to my stuff: ContentDB, GitHub, Website.

User avatar
Wuzzy
Member
Posts: 4817
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Better Commands [better_commands]

by Wuzzy » Post

Interesting.
Do the new commands support tilde syntax for relative numbers? This is natively supported by the built-in Minetest commands, and there are helper functions available see lua_api.md.

E.g. "/teleport ~ ~10 ~" teleports you 10 blocks upwards.

I think what could also be added to Minetest by default are some of those "@" parameters, at least in their basic form.

User avatar
ThePython
Member
Posts: 42
Joined: Sat Feb 18, 2023 18:00
GitHub: ThePython10110
In-game: ThePython or ThePython10110
Location: Earth
Contact:

Re: [Mod] Better Commands [better_commands]

by ThePython » Post

Yes, they support both tilde (relative to position) and caret (relative to position and rotation) notation. I didn't know about the built-in helper functions, though.
Links to my stuff: ContentDB, GitHub, Website.

User avatar
Wuzzy
Member
Posts: 4817
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Better Commands [better_commands]

by Wuzzy » Post

Cool. It would be great if caret notation could be added to native Minetest as well, so that more players benefit from it. I suppose the code for the tilde notation could be reused.

It was me, actually, who added tilde notation back then but I decided against also adding caret notation because it was extra work and it seemed like a somewhat esoteric feature.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest