Selecting any sword to prevent accidentally breaking any blocks in creative mode. #62

Open
opened 2018-06-22 08:25:39 +02:00 by Wuzzy · 6 comments
Member

Author: @WSDguy2014 Posted at: 20.02.2017 21:33

Author: @WSDguy2014 Posted at: 20.02.2017 21:33
Wuzzy added the
missing feature
controls
needs engine change
items
labels 2018-06-22 08:25:39 +02:00
Author
Member

Author: @Wuzzy2 Posted at: 01.04.2017 16:31

I'm currently looking for ways to implement this:
https://forum.minetest.net/viewtopic.php?f=47&t=17125

Author: @Wuzzy2 Posted at: 01.04.2017 16:31 I'm currently looking for ways to implement this: https://forum.minetest.net/viewtopic.php?f=47&t=17125

@ryvnf

Is this possible with mcl_autogroups?

@ryvnf Is this possible with mcl_autogroups?
Contributor

Is this possible with mcl_autogroups?

Not with the API currently.

I would implement this by setting tool_capabilities for swords to the following with creative is enabled

tool_capabilities = {
    groupcaps = {
        [""] = {
            times = { 1000000 } -- A really big number
        }
    }
}

and then not setting _mcl_diggroups (or setting it to {}) when that is the case. This can be implemented in a register_sword function in mcl_tools.

This should make all nodes undiggable with sword. They will still show cracks but the nodes will be practically unbreakable. Setting it to empty groupcaps as mentioned in the forum post will not work because then it will be overwritten by the digging times for hand.

I do not think it is a good idea to extend the mcl_autogroup API to be able to do this. This is because I think the responsibility to implement the sword behaviour should be elsewhere like in mcl_tools.

> Is this possible with mcl_autogroups? Not with the API currently. I would implement this by setting `tool_capabilities` for swords to the following with creative is enabled ```lua tool_capabilities = { groupcaps = { [""] = { times = { 1000000 } -- A really big number } } } ``` and then not setting `_mcl_diggroups` (or setting it to `{}`) when that is the case. This can be implemented in a `register_sword` function in `mcl_tools`. This should make all nodes undiggable with sword. They will still show cracks but the nodes will be practically unbreakable. Setting it to empty groupcaps as mentioned in the forum post will not work because then it will be overwritten by the digging times for hand. I do not think it is a good idea to extend the mcl_autogroup API to be able to do this. This is because I think the responsibility to implement the sword behaviour should be elsewhere like in `mcl_tools`.

Yes, the question was more or less just whether the needs engine change label can be removed.

Yes, the question was more or less just whether the needs engine change label can be removed.
Contributor

Yes, the question was more or less just whether the needs engine change label can be removed.

The label can be definitely removed. I tested making a tool with those tool_capabilities values in singleplayer and it worked.

> Yes, the question was more or less just whether the needs engine change label can be removed. The label can be definitely removed. I tested making a tool with those `tool_capabilities` values in singleplayer and it worked.
LizzyFleckenstein03 removed the
needs engine change
label 2021-04-29 12:04:07 +02:00
ryvnf was assigned by LizzyFleckenstein03 2021-04-29 12:04:17 +02:00

Feel free to remove your assignment if you want to!

Feel free to remove your assignment if you want to!
LizzyFleckenstein03 added this to the 0.72.0 milestone 2021-05-03 11:01:25 +02:00
LizzyFleckenstein03 self-assigned this 2021-05-04 10:46:49 +02:00
ryvnf was unassigned by LizzyFleckenstein03 2021-05-04 10:46:55 +02:00
cora removed this from the 0.72.0 milestone 2022-02-15 04:31:19 +01:00
ancientmarinerdev added this to the 3 - Near future milestone 2023-02-03 02:20:04 +01:00
ancientmarinerdev added the
creative mode
label 2023-03-03 12:25:10 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#62
No description provided.