Giter Club home page Giter Club logo

minetest-worldedit's Introduction

WorldEdit v1.3

The ultimate in-game world editing tool for Minetest! Tons of functionality to help with building, fixing, and more.

For more information, see the forum topic at the Minetest forums.

New users should see the tutorial.

Screenshot

Installing

There is a nice installation guide over at the Minetest Wiki. Here is a short summary:

  1. Download the mod from the official releases page. The download links are labelled "Source Code". If you are using Windows, you'll want to download the ZIP version.
  2. You should have a file named Minetest-WorldEdit-x.x.zip.
  3. Extract this file using your archiver of choice. If you are using Windows, open the ZIP file and move the folder inside to a safe place outside of the ZIP file.
  4. Make sure that you now have a folder with a file named README.md inside it. If you just have another folder inside this folder, use the nested folder instead.
  5. Move this folder into the MINETEST_FOLDER/mods folder, where MINETEST_FOLDER is the folder Minetest is located in.
  6. Open Minetest to a world selection screen.
  7. Select a world you want to use WorldEdit in by left clicking on it once and press the Configure button.
  8. You should have a mod selection screen. Select the one named something like Minetest-WorldEdit by left clicking once and press the Enable Modpack button.
  9. Press the Save button. You can now use WorldEdit in that world. Repeat steps 7 to 9 to enable WorldEdit for other worlds too.

If you are having trouble, try asking for help in the IRC channel (faster but may not always have helpers online) or ask on the forum topic (slower but more likely to get help).

Usage

WorldEdit works primarily through the WorldEdit GUI and chat commands. Depending on your key bindings, you can invoke chat entry with the "T" key and open the chat console with the "F10" key.

WorldEdit has a huge potential for abuse by untrusted players. Therefore, users will not be able to use WorldEdit unless they have the worldedit privilege. This is available by default in singleplayer, but in multiplayer the permission must be explicitly given by someone with the right credentials, using the following chat command: /grant <player name> worldedit. This privilege can later be removed using the following chat command: /revoke <player name> worldedit.

Certain functions/commands such as WorldEdit //lua and //luatransform chat commands additionally require the server privilege. This is because it is extremely dangerous to give access to these commands to untrusted players, since they essentially are able to control the computer the server is running on. Give this privilege only to people you trust with your computer.

For in-game information about these commands, type //help <command name> in the chat. For example, to learn more about the //copy command, simply type //help copy to display information relevant to copying a region.

Interface

WorldEdit is accessed in-game in two main ways.

The GUI adds a screen to each player's inventory that gives access to various WorldEdit functions. The tutorial may be helpful in learning to use it.

The chat interface adds many chat commands that perform various WorldEdit powered tasks. It is documented in the Chat Commands Reference.

Compatibility

This mod supports Minetest versions 5.0 and newer. Older versions of WorldEdit may work with older versions of Minetest, but are not recommended or supported.

WorldEdit works quite well with other mods and does not have any known mod conflicts.

WorldEdit GUI requires one of sfinv (included in minetest_game), Unified Inventory, Inventory++ or Smart Inventory.

If you use any other inventory manager mods, note that they may conflict with the WorldEdit GUI. If this is the case, it may be necessary to disable them.

WorldEdit API

WorldEdit exposes all significant functionality in a simple Lua interface.

Adding WorldEdit as a dependency to your mod gives you access to all of the worldedit functions. The API is useful for tasks such as high-performance node manipulation, alternative interfaces and map creation.

AGPLv3 compatible mods may further include WorldEdit files in their own mods. This can be useful if a modder wishes to completely avoid any dependency on WorldEdit. Note that it is required to give credit to the authors in this case.

This API is documented in the WorldEdit API Reference.

Axes

The coordinate system is the same as that used by Minetest; positive Y is upwards, positive X is rightwards, and positive Z is forwards, if a player is facing North (positive Z axis).

When an axis is specified in a WorldEdit chat command, it is specified as one of the following values: x, y, z, or ?.

In the GUI, there is a dropdown menu for this purpose. The "Look direction" option has the same effect as ? does in chat commands.

The value ? represents the axis the player is currently facing. If the player is facing more than one axis, the axis the player face direction is closest to will be used.

Nodes

Node names are required for many types of commands that identify or modify specific types of nodes. They can be specified in a number of ways.

First, by description - the tooltip that appears when hovering over the item in an inventory. This is case insensitive and includes values such as "Cobblestone" and "bronze block". Note that certain commands (namely, //replace and //replaceinverse) do not support descriptions that contain spaces in the <searchnode> field.

Second, by name - the node name that is defined by code, but without the mod name prefix. This is case sensitive and includes values such as "piston_normal_off" and "cactus". If there are multiple possible nodes (such as "a:celery" and "b:celery"), one is chosen in no particular order.

Finally, by full name - the unambiguous identifier of the node, prefixes and all. This is case sensitive and includes values such as "default:stone" and "mesecons:wire_00000000_off".

The node name "air" can be used anywhere a normal node name can and acts as a blank node. This is useful for clearing or removing nodes. For example, //set air would remove all the nodes in the current WorldEdit region. Similarly, //sphere 10 air, when WorldEdit position 1 underground, would dig a large sphere out of the ground.

Regions

Most WorldEdit commands operate on regions. Regions are a set of two positions that define a 3D cuboid. They are local to each player and chat commands affect only the region for the player giving the commands.

Each positions together define two opposing corners of the cube. With two opposing corners it is possible to determine both the location and dimensions of the region.

Regions are not saved between server restarts. They start off as empty regions and cannot be used with most WorldEdit commands until they are set to valid values.

Markers

Entities are used to mark the location of the WorldEdit regions. They appear as boxes containing the number 1 or 2 and represent the first and second position of the WorldEdit region, respectively.

To remove the entities, simply punch them. This does not reset the positions themselves.

Schematics

WorldEdit supports two different types of schematics.

The first is the WorldEdit Schematic format, with the file extension ".we", and in some older versions, ".wem". There have been several previous versions of the WorldEdit Schematic format, but WorldEdit is capable of loading any past versions, and will always support them - there is no need to worry about schematics becoming obsolete.

As of version 5, WorldEdit schematics include a header. The header is seperated from the content by a colon (:). It may contain fields seperated by commas (,). Currently only one field is used, which contains the version as an ASCII decimal.

The current version of the WorldEdit Schematic format is essentially an array of node data tables in Lua 5.1 table syntax preceded by a header. Specifically it looks like this:

5:return {
	{
		y      = <y-axis coordinate>,
		x      = <x-axis coordinate>,
		z      = <z-axis coordinate>,
		name   = <node name>,
		param1 = <param1 value>,
		param2 = <param2 value>,
		meta   = <metadata table>,
	},
	<...>
}

The ordering of the values and minor aspects of the syntax, such as trailing commas or newlines, are not guaranteed to stay the same in future versions.

The WorldEdit Schematic format is accessed via the WorldEdit API, or WorldEdit serialization chat commands such as //serialize and //deserialize.

The second is the Minetest Schematic format (MTS). The details of this format may be found in the Minetest documentation and are out of the scope of this document. Access to this format is done via specialized MTS commands such as //mtschemcreate and //mtschemplace.

Authors

WorldEdit would not be possible without the contributions of many developers and designers. Below, they are listed alphabetically:

Alexander Weber
ANAND
beyondlimits
Carter Kolwey
cornernote
Cy
Daniel Sosa
electricface
est31
Eugen Wesseloh
h3ndrik
HybridDog
Isidor Zeuner
Jean-Patrick Guerrero
Joseph Pickard
kaeza
kilbith
KodexKy
Kyle
MT-Modder
Niwla23
Panquesito7
Pedro Gimeno
Rui
Sebastien Ponce
sfan5
ShadowNinja
shivajiva101
spillz
Starbeamrainbowlabs
TalkLounge
tenplus1
Uberi/Temperest
Wuzzy

License

Copyright (c) 2012 sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote).

This mod is licensed under the GNU Affero General Public License.

Basically, this means everyone is free to use, modify, and distribute the files, as long as these modifications are also licensed the same way. Most importantly, the Affero variant of the GPL requires you to publish your modifications in source form, even if the mod is run only on the server, and not distributed.

minetest-worldedit's People

Contributors

beyondlimits avatar codexp avatar cornernote avatar danierukun avatar est31 avatar fluxionary avatar h3ndrik avatar hybriddog avatar imre84 avatar kaeza avatar khonkhortisan avatar kilbith avatar kodexky avatar luk3yx avatar nathansalapat avatar nauta-turbidus avatar niwla23 avatar panquesito7 avatar pickardjoe avatar sbrl avatar sfan5 avatar shadowninja avatar shivajiva101 avatar spillz avatar talklounge avatar tenplus1 avatar uberi avatar wsor4035 avatar wuzzy2 avatar yugiohjcj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minetest-worldedit's Issues

Unhandled exception in stacks command

19:41:15: ERROR[main]: ERROR: An unhandled exception occurred: ...worldmods/Minetest-WorldEdit/worldedit_commands/init.lua:621: attempt to perform arithmetic on a nil value

Obscure sign-off-before-media-finishes crash

I know this one sounds totally obscure, but here goes:

The server in question runs the Realtest game, though this may not actually matter. A player signed on as "You" (capital "Y") just as a joke, though this also may not matter. No problems when he signed on. He signed off before the media had finished downloading, and thus without actually ever touching worldedit or the worldedit GUI. The server crashed, citing the following errors:

terminate called after throwing an instance of 'ServerError'
what(): ...ealtest_World/worldmods/worldedit/worldedit_gui/init.lua:137: attempt to index local 'player' (a nil value)
stack traceback:
...ealtest_World/worldmods/worldedit/worldedit_gui/init.lua:137: in function 'update_main_formspec'
...ealtest_World/worldmods/worldedit/worldedit_gui/init.lua:145: in function 'func'
/usr/local/share/minetest/builtin/misc.lua:17: in function </usr/local/share/minetest/builtin/misc.lua:9>
/usr/local/share/minetest/builtin/misc_register.lua:348: in function </usr/local/share/minetest/builtin/misc_register.lua:336>
/home/minetest/Scripts/minetestserver-realtest.sh: line 27: 18551 Aborted

This may be related to some discussion Sapier and I had had in #minetest-dev where the server and client could get out of sync with one another during the initial connection if the server is sufficiently fast, causing certain parts of the initial connection data to be exchanged at the wrong time. Thus, this may actually be a server bug, rather than a Worldedit bug.

//transpose is broken for non-square regions

//transpose, and as a result //rotate, do not work for non-square regions. So it turns out that in-place matrix transposition is something that is actually much more difficult than it seems.

Square matrices are easy, though, so for now make sure a square region is selected before transposing.

Use chat command return values

Currently worldedit.player_notify is used, but all that does now is prepend "WorldEdit -!- ", which is obvious given the context of the command.

crash when hiding/restoring a region

terminate called after throwing an instance of 'ServerError'
what(): ...vanessae_game/mods/worldedit/worldedit/visualization.lua:138: bad
argument #4 to 'add_node' (string expected, got nil)
stack traceback:
[C]: in function 'add_node'
...vanessae_game/mods/worldedit/worldedit/visualization.lua:138: in func
tion 'restore'
...vanessae_game/mods/worldedit/worldedit_commands/init.lua:911: in func
tion 'func'
...ssae_game/mods/worldedit/worldedit_gui/functionality.lua:575: in func
tion 'on_select'
...ames/vanessae_game/mods/worldedit/worldedit_gui/init.lua:220: in func
tion <...ames/vanessae_game/mods/worldedit/worldedit_gui/init.lua:210>
/usr/local/share/minetest/builtin/misc_register.lua:330: in function </u
sr/local/share/minetest/builtin/misc_register.lua:318>
/home/minetest/Scripts/minetestserver-survival.sh: line 25: 25671 Aborted

Region Selection Improvements

I had a few thoughts about making region selection a bit more user friendly.

I would like to add the following types of commands (thought not necessarily with these names)

//setactivenode -- select the active region node (1 or 2)
//toggleactivenode -- switch to the other region node
//setactivefore -- move the active node n units (1 by default) in the nearest horizontal direction from the camera (NHDC)
//setactiveback -- move the active node n units (1 by default) backward NHDC
//setactiveleft -- move the active node n units (1 by default) left NHDC
//setactiveright -- move the active node n units (1 by default) right NHDC
//setactiveup -- move the active node up n units (1 by default) (y axis)
//setactivedown -- move the active node down n units (1 by default) (y axis)

Then I am going to try to patch minetest to allow binding commands to shortcut keys as I suggested here: https://forum.minetest.net/viewtopic.php?id=8611

It could be nice to have a set of shortcuts bound to the keypad, like
Up //setactivefore
Down //setactiveback
Left //setactiveleft
Right //setactiveright
PgUp //setactiveup
PgDn //setactivedown
Ins //toggleactivenode

(Could also imagine using shift+arrow keys for moving the inactive anchor, ctrl+arrow for moving both anchors at once, ctrl+click to set anchors without needing to set them etc)

Is this worth pursuing in your opinion?

Server Crash - Error Points to Chat Commands

Our server has crashed a few times over the past couple months due to something with WE's chat commands. The crashes have occurred when no admins were ingame (only admins have the WE privs).

Not enough info to be able to reproduce this crash.

Log snippet from most recent crash:


19:05:36: ACTION[ServerThread]: BluAngel places node default:cobble at (1389,-186,714)
19:05:36: ACTION[ServerThread]: facedir: 0
19:05:36: ACTION[ServerThread]: BluAngel places node default:cobble at (1389,-185,714)
19:05:36: ACTION[ServerThread]: facedir: 0
19:05:43: ACTION[ServerThread]: hoog digs default:grass_4 at (-315,20,805)
19:05:59: ERROR[ConnectionSend]: con(5/1)RunTimeouts(): Peer 24 has timed out. (source=peer->timeout_counter)
19:05:59: ERROR[ConnectionSend]: con(5/1)RunTimeouts(): Peer 40 has timed out. (source=peer->timeout_counter)
19:05:59: ERROR[ConnectionSend]: con(5/1)RunTimeouts(): Peer 73 has timed out. (source=peer->timeout_counter)
19:05:59: ERROR[ConnectionSend]: con(5/1)RunTimeouts(): Peer 54 has timed out. (source=peer->timeout_counter)
19:05:59: ERROR[ConnectionSend]: con(5/1)RunTimeouts(): Peer 90 has timed out. (source=peer->timeout_counter)
19:05:59: ERROR[ConnectionSend]: con(5/1)RunTimeouts(): Peer 92 has timed out. (source=peer->timeout_counter)
19:05:59: ERROR[ConnectionSend]: con(5/1)RunTimeouts(): Peer 96 has timed out. (source=peer->timeout_counter)
19:05:59: ERROR[main]: ERROR: An unhandled exception occurred: ...../mods/worldedit_2014_03_15/worldedit_commands/init.lua:36: bad argument #1 to 'chat_send_player' (string expected, got nil)
19:05:59: ERROR[main]: stack traceback:
19:05:59: ERROR[main]:  [C]: in function 'chat_send_player'
19:05:59: ERROR[main]:  ...../mods/worldedit_2014_03_15/worldedit_commands/init.lua:36: in function 'player_notify'
19:05:59: ERROR[main]:  ...../mods/worldedit_2014_03_15/worldedit_commands/safe.lua:42: in function 'func'
19:05:59: ERROR[main]:  ...test/minetest-0.4.9/bin/../builtin/game/chatcommands.lua:27: in function <...test/minetest-0.4.9/bin/../builtin/game/chatcommands.lua:16>
19:05:59: ERROR[main]:  ...minetest/minetest-0.4.9/bin/../builtin/game/register.lua:348: in function <...minetest/minetest-0.4.9/bin/../builtin/game/register.lua:336>

In thread 7fdeccc1f780:
/home/minetest/new_minetest-0.4.9/src/main.cpp:1870: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 7fdec4ec4700:
#0  virtual void* CurlFetchThread::Thread()
DEBUG STACK FOR THREAD 7fdeccc1f780:
#0  int main(int, char**)
(Leftover data: #1  Dedicated server branch)
(Leftover data: #2  virtual void ServerMap::save(ModifiedState))
(Leftover data: #3  virtual void Database_SQLite3::saveBlock(MapBlock*))
(Leftover data: #4  void ItemStack::serialize(std::ostream&) const)

//load air

//save will save nodes.
//load will load those nodes.
But air isn't saved. So if you //load into a place that isn't completely filled with air already, the area will be a combination (or merge) of the first and second places.

If you do this:

//p set (first place)
//save file
//p set (second place)
//load file
//save file
//p set (first place)
//load file

you won't end up with the first place being the same because it will load nodes saved from the second place that weren't cleared when loading from the first place.

Now to explain it in pictures:

//p set //save test
before move
//pos1 //pos2 //load test
after first move
//save test //p set //load test
after second move

//copy //copy behaves differently than //save //load //save //load:

//p set
before copy
//copy x 6
after copy
//p set //copy x -6
after second copy

//save //load ~= //copy

Save Node Metadata

Somehow figure out a way to save all node metadata in the WorldEdit save.

Also make sure everything is backwards-compatible with the current version of the .we format, as well as the first version.

Probably should also add some sort of version marker to WE files too.

Multinode Interface

mauvebic has expressed interest in combining the WE API with the Multinode interface to make some sort of ultimate node-manipulation tool.

Should probably have both interfaces available for use if possible. Not sure how that would work.

(Feature Request) Confirmation if command will affect >5000 nodes

There was an... incident on VanessaE's Creative Server involving a moderator accidentally making a 1000m long 10000m deep trench. I was thinking that this could have been prevented if WorldEdit had some sort of confirmation system that would prompt the user before executing any command that would affect more than 5000 nodes (configurable). An example of how I think this should work:

//pos1
WorldEdit -!- Position 1 set to (position)
//pos2
WorldEdit -!- Position 2 set to (position)
//set default:stone
WorldEdit -!- WARNING: This would affect 13348 nodes. Type the command again if you are sure you want to do this.
//set default:stone
WorldEdit -!- 13348 nodes set

WE Crashes Minetest when Loading (dot)we File

WorldEdit GitHub commit, 2014_10_24, fb49cc4
MIneteset engine, GitHub commit, 2014_12_09, dcc48976ce

I tried three times to transfer a small build (286 nodes) from one singleplayer world to another using //save and //load. I saved the build (//save shack), then copied the "shack.we" file to the schems folder of another singleplayer world, and then tried to place the build in that world using "//load shack". At this point, Minetest crashed each time.

Here are error messages from the terminal output:

05:17:17: ERROR[main]: ServerError: ...ty_mods/WorldEdit_2014_10_24/worldedit/serialization.lua:172: bad argument #2 to 'insert' (number expected, got nil)
05:17:17: ERROR[main]: stack traceback:
05:17:17: ERROR[main]:  [C]: in function 'insert'
05:17:17: ERROR[main]:  ...ty_mods/WorldEdit_2014_10_24/worldedit/serialization.lua:172: in function 'load_schematic'
05:17:17: ERROR[main]:  ...ty_mods/WorldEdit_2014_10_24/worldedit/serialization.lua:219: in function 'deserialize'
05:17:17: ERROR[main]:  ...ty_mods/WorldEdit_2014_10_24/worldedit_commands/init.lua:978: in function 'func'
05:17:17: ERROR[main]:  ...f/01_minetest/lazyj/bin/../builtin/game/chatcommands.lua:40: in function <...f/01_minetest/lazyj/bin/../builtin/game/chatcommands.lua:29>
05:17:17: ERROR[main]:  ...stuff/01_minetest/lazyj/bin/../builtin/game/register.lua:348: in function <...stuff/01_minetest/lazyj/bin/../builtin/game/register.lua:336>

//save command doesn't work

The save command doesn't always work. In the following map:
?????????????
??A??????????
?????????????
?????????B???
?????????????
Doing a //set pos from A to B and saving could work, but if you do it from B to A it won't. (so one of them will work and the other won't, depending on the way you are facing). When it doesn't work, it says 0 blocks were saved. The problem is how those while's in the serialize function work, I think.

Cuboid manipulation chat commands

Hi, I'm working on adding cuboid manipulation commands such as outset, inset, etc. To match those in the minecraft version of worldedit. I already have some working. I was wondering if you would be interested in accepting the changes.

I already have:

  • Outset
  • Inset
  • Shift
  • Expand (WIP)

The code still needs some cleaning, but it shouldnt take too much time.

"?" axis is incorrect

If I add

spawned = false
minetest.register_globalstep(function(dtime)
        if spawned then
                print(worldedit.player_axis('singleplayer'))
        end
end)

and then add

spawned = true

to any command, then when I run it, it gives me a live ?-to-axis mapping.

Here's how it maps:
Anything above 45° up maps to y.
Looking down doesn't map to y.
From halfway between +z and +x, to +x, to -z, to about 30° clockwise past -z, maps to x.
From about 30° clockwise past -z, to about 30° before -x, maps to y.
From about 30° before -x, to -x, to +z, to halfway between +z and +x, maps to z.

So, with axes like this:
....+z....
-x....+x
....-z....

it maps like this:
zzzzz.
z...|...x
z...|...x
z--+--x
z...|...x
y...|...x
yyxxxx

with y on top. (looking more that 45° vertical maps to y)

Also, looking down (about 45°) on the y side (-x and -z) maps to either x or z (instead of y) depending on your horizontal angle.

Code in question:

worldedit.player_axis = function(name)
        local dir = minetest.env:get_player_by_name(name):get_look_dir()
        if dir.x > dir.y then
                if dir.x > dir.z then
                        return "x"
                end
        elseif dir.y > dir.z then
                return "y"
        end
        return "z"
end

When I first noticed it, I was looking in the -z direction and my microcontrollers stacked in the +x direction.
Speaking of which, the ? axis should return both positive and negative axes, with the functions that use it stripping off the negative sign. When //stacking, the sign of the axis matters.

Trying to load a schematic I get the following error.

This issue has been resolved.

The .we files were not being downloaded in a raw format, but rather included html code.

The wget used in linux was not working the same as right-click save as in windows.

My apologies if I put anyone to unnecessary work.

Runtime error when using worldedit.deserialize

I'm attempting to make a mod (well, subgame) use ".we" files for its world generation. For this I'm using worldedit.deserialize directly from within my mod.

However, when I attempt to do this I obtain the following error:

Lua: Runtime error from mod 'default' in callback ScriptApiServer::on_chat_message(): 
   ...worldedit/serialization.lua:27: attempt to call method 'find' (a nil value)
   stack traceback:
   ...worldedit/serialization.lua:27: In function 'read_header'
   ...worldedit/serialization.lua:115: In function 'load_schematic'
   ...worldedit/serialization.lua:220: In function 'deserialize'

I'm actually not sure if this is really an issue that I should be posting here or is a mistake I made (I'm not very familiar with minetest development).

The schematic loads fine when I use the //load command from the console, and I'm basically using a very similar code to the one implemented in that command. It's just that I call it from a command implemented in my mod (the 'default' mod of my subgame).

What could be causing 'find' to be nil? Do I need to import some library or something?

//scale parameter

The //scale parameter should be used like this:

//scale 2 to double the size of the structure, so a 1 cube becomes 2^3, and so on.

So, using this, you can make a small tree say 5 blocks high, then scale it 2x, it should then be 10 blocks tall, plus the other directions times two.

error when placing .we

ERROR[ServerThread]: Map::setNode(): Not allowing to place CONTENT_IGNORE while trying to replace "air" at (21,79,29) (block (1,4,1))

The schematic is placed just fine (I think). I didn't use my own file so I will test again and reply.

Edit: Nvm the file must have been messed up or something.

Crash :-)

Ok, not the most descriptive subject line, but that's because I have no clue how this happened or why, as I wasn't the one who actually triggered the crash. This might be related to the //inspect command, as I'd instructed one of my moderators to use that feature while investigating some vandalism on a server.

Here's the backtrace:

terminate called after throwing an instance of 'ServerError'
what(): ...st_World/worldmods/worldedit/worldedit_commands/init.lua:36: bad argument #1 to 'chat_send_player' (string expected, got nil)
stack traceback:
[C]: in function 'chat_send_player'
...st_World/worldmods/worldedit/worldedit_commands/init.lua:36: in function 'player_notify'
...st_World/worldmods/worldedit/worldedit_commands/safe.lua:42: in function 'func'
/usr/local/share/minetest/builtin/chatcommands.lua:25: in function </usr/local/share/minetest/builtin/chatcommands.lua:16>
/usr/local/share/minetest/builtin/misc_register.lua:348: in function </usr/local/share/minetest/builtin/misc_register.lua:336>
/home/minetest/Scripts/minetestserver-minetest.sh: line 25: 28052 Aborted /usr/local/bin/minetestserver --worldname Minetest_World --config /home/minetest/.minetest/minetest-server-minetest.conf --gameid minetest_game --port 30005 --disable-unittests --logfile $DEBUG

GUI button breaks Creative Inventory

I can't change pages in the creative inventory if the WorldEdit GUI button is installed. It flashes to the page I selected, then back to page 1.

metadata support when using //save and //load

would be awesome if the //save and //load supported the metadata features. It would make it a lot easier to move parts around where copy doesn't work (eg, you want to copy to x+10,y+20, //copy only takes 1 directional argument).

//metaload disabling inventory

When a filled chest is //moved or //copyed it keeps its inventory.
full chest

When the filled chest is //saved and //loaded it loses its inventory.
empty chest

When the filled chest is //metasaved and //metaloaded it loses the capability of having inventory, instead of being either filled or empty.
disabled chest

//stack is horrendously slow

Make a region of 50 x 5 x 50
Select it
//stack y 10

...the whole thing runs for a while, says it's stacked N nodes, then continues to spin the CPU at 100% and never finishes.

Meanwhile, //copy seems to work fine for the same amount of data - just a matter of several seconds. The slowness is to the point that, even for a relatively small area (say 10x5x5 nodes) I can //copy the structure repeatedly (with increasing coordinates) and get the job done faster than using //stack to do the same thing.

Clean up worldedit.spiral

Currently the spiral code is taken from RosettaCode. I really doubt this is compatible with the license of the WorldEdit mod. According to RosettaCode, all content on the site is under the GFDL, so we probably need to rewrite the spiral function.

Also it's sort of inscrutable anyways, check out this monster of a line:

return (2*l-1)^2+4*l+2*l*sn(x+y)+sn(y^2-x^2)*(l-(av(y)==l and sn(y)*x or sn(x)*y)) -- OH GOD WHAT

Does anyone actually know what that does?

Can't change axis in GUI

Changing the axis from "Look direction" to any other axis causes player's inventory to appear instantly.

Is //lua safe enough?

https://github.com/Uberi/Minetest-WorldEdit/blob/master/worldedit_commands/init.lua#L940
I saw that this command looks for the name the admin of the server uses.
If this admin didn't set a password or set a bad one (eg. "1") and he/she leaves the server, a player could join as admin and has access to the his/her computer ("//lua os.execute('notify-send hi')"). Without worldedit this person could only change some stuff of the minetest server (without having the mesecons commando block or terminal mod installed).
I think the ip address of the player should be "127.0.0.1" if he/she is allowed to use //lua.
https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L1355

local admin = minetest.setting_get("name")
if not (admin and name == admin and minetest.get_player_ip(name) == "127.0.0.1") then
worldedit.player_notify(name, "this command can only be run by the server administrator")
return
end

Mountain function

Could you create a function in WE that when you place a //pos1 (-> the summit), it create a mountain under the pos to the ground ?

It must be place //pos1 for the summit, and //pos2 (pos1 <-> pos2 = radius) on the ground for the mountain width.

Thanks !

//cone command

Add //sphere, //cone, and //pyramid commands for simpler building.

/home/minetest/Server/src/main.cpp:1955: int main(int, char**): Assertion '0' failed.

Hi, I couldnt track down when this happens, I wasnt online when it crashed.

21:16:59: ACTION[ServerThread]: Jessch8281 uses fake_fire:flint_and_steel, pointing at [node under=-502,-1565,991 above=-502,-1565,990]
21:16:59: ACTION[ServerThread]: Gronx digs default:stone at (-488,-1565,1020)
21:16:59: ACTION[ServerThread]: Gronx digs default:stone at (-488,-1565,1021)
21:17:00: ACTION[ServerThread]: Gronx digs default:stone at (-489,-1565,1020)
21:17:00: ACTION[ServerThread]: Gronx digs default:stone at (-489,-1565,1021)
21:17:01: ACTION[ServerThread]: Gronx digs default:stone at (-490,-1565,1019)
21:17:02: ACTION[ServerThread]: Gronx digs default:stone at (-490,-1565,1020)
21:17:02: ACTION[ServerThread]: Gronx digs default:stone at (-490,-1565,1021)
21:17:02: ACTION[ServerThread]: Jessch8281 uses fake_fire:flint_and_steel, pointing at [node under=-511,-1566,990 above=-511,-1565,990]
21:17:03: ACTION[ServerThread]: Gronx digs default:stone at (-490,-1565,1022)
21:17:03: ACTION[ServerThread]: Gronx digs default:stone at (-491,-1565,1022)
21:17:04: ACTION[ServerThread]: Gronx digs default:stone at (-492,-1565,1022)
21:17:05: ACTION[ServerThread]: Gronx digs default:stone at (-494,-1566,1022)
21:17:06: ACTION[ServerThread]: Gronx digs default:stone at (-494,-1565,1022)
21:17:06: ACTION[ServerThread]: CHAT: <Jessch8281> Yay! Furnaces
21:17:08: ACTION[ServerThread]: Jessch8281 uses fake_fire:flint_and_steel, pointing at [node under=-515,-1563,993 above=-514,-1563,993]
21:17:10: ACTION[ServerThread]: Jessch8281 uses fake_fire:flint_and_steel, pointing at [node under=-511,-1565,993 above=-511,-1564,993]
21:17:13: ERROR[main]: ERROR: An unhandled exception occurred: std::bad_alloc
21:17:13: ERROR[main]: stack traceback:
21:17:13: ERROR[main]:  [C]: in function 'read_from_map'
21:17:13: ERROR[main]:  ...Server/bin/../mods/WolrdEdit/worldedit_commands/mark.lua:68: in function 'mark_region'
21:17:13: ERROR[main]:  ...Server/bin/../mods/WolrdEdit/worldedit_commands/mark.lua:25: in function 'mark_pos1'
21:17:13: ERROR[main]:  ...Server/bin/../mods/WolrdEdit/worldedit_commands/init.lua:242: in function 'callback'
21:17:13: ERROR[main]:  /home/minetest/Server/bin/../builtin/game/item.lua:383: in function </home/minetest/Server/bin/../builtin/game/item.lua:376>

In thread b689b220:
/home/minetest/Server/src/main.cpp:1955: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD b3817440:
#0  virtual void* CurlFetchThread::Thread()
DEBUG STACK FOR THREAD b689b220:
#0  int main(int, char**)
(Leftover data: #1  Dedicated server branch)
(Leftover data: #2  virtual void ServerMap::save(ModifiedState))
(Leftover data: #3  void ItemStack::serialize(std::ostream&) const)
Aborted

[BUG] Server crash

11:54:37: ERROR[main]: ERROR: An unhandled exception occurred: ...test/mods/Minetest-WorldEdit/worldedit_commands/init.lua:36: bad argument #1 to 'chat_send_player' (string expected, got nil)
11:54:37: ERROR[main]: stack traceback:
11:54:37: ERROR[main]: [C]: in function 'chat_send_player'
11:54:37: ERROR[main]: ...test/mods/Minetest-WorldEdit/worldedit_commands/init.lua:36: in function 'player_notify'
11:54:37: ERROR[main]: ...test/mods/Minetest-WorldEdit/worldedit_commands/safe.lua:42: in function 'func'
11:54:37: ERROR[main]: /usr/share/minetest/builtin/chatcommands.lua:25: in function </usr/share/minetest/builtin/chatcommands.lua:16>
11:54:37: ERROR[main]: /usr/share/minetest/builtin/misc_register.lua:348: in function </usr/share/minetest/builtin/misc_register.lua:336>

In thread b6c96700:
/build/buildd/minetest-201404190451/src/main.cpp:1887: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD b4bffb40:
#0 virtual void* CurlFetchThread::Thread()

DEBUG STACK FOR THREAD b6c96700:
#0 int main(int, char**)

(Leftover data: #1 Dedicated server branch)
(Leftover data: #2 virtual void ServerMap::save(ModifiedState))
(Leftover data: #3 virtual void Database_SQLite3::saveBlock(MapBlock*))
(Leftover data: #4 void ItemStack::serialize(std::ostream&) const)

Orient gui error

2015-06-09 12:00:10: ERROR[main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2015-06-09 12:00:10: ERROR[main]: .../bin/../mods/WorldEdit/worldedit_commands/init.lua:814: attempt to index local 'param' (a number value)
2015-06-09 12:00:10: ERROR[main]: stack traceback:
2015-06-09 12:00:10: ERROR[main]:   .../bin/../mods/WorldEdit/worldedit_commands/init.lua:814: in function 'nodes_needed'
2015-06-09 12:00:10: ERROR[main]:   .../bin/../mods/WorldEdit/worldedit_commands/safe.lua:21: in function 'func'
2015-06-09 12:00:10: ERROR[main]:   .../bin/../mods/WorldEdit/worldedit_gui/functionality.lua:500: in function <.../bin/../mods/WorldEdit/worldedit_gui/functionality.lua:496>
2015-06-09 12:00:10: ERROR[main]:   /home/(user)/(server)/bin/../builtin/game/register.lua:341: in function </home/(user)/(server)/bin/../builtin/game/register.lua:329>

Flipped loading with legacy file format

When loading a WE file in the original WorldEdit format, nodes are loaded upside-down/flipped. This probably has something to do with worldedit.deserialize_old, but can't discount the possibility of the file itself being saved upside down.

Solution, obviously, is to either fix the function in the former case, or flip it in the latter case.

Gentoo ebuild for mod

Hi there,

I am writing an ebuild for Gentoo and have a slight problems with installation.
Do you know where exactly I should place mod files if I am installing system-wide ?

I've tried to put them into /usr/share/games/minetest/mods/minetest/ dir, but they became invisible for game.

Do you know if there any setting I should tweak or set to make it work ?

Cheers,
Iegor

Undo

Hi,
I think a undo function to rollback the last change made by WorldEdit would be a good addition to the tool.
Thank you for considering it :-)

Re-license under GPL-3

Hi,

I am currently packaging the "popular" minetest mods for Debian. For Debian (and most likely others), AGPL-3 is an issue, because it has incompatibilities with older GPL licenses.

Most importantly, the plugin cannot be distributed with other plugins that are GPL-2 only.

Also, the AGPL-3 is not fulfillable as it requires the UI to expose a download button to the source code. Being a Minetest plugin, doing so is almost impossible and makes no sense at all (yes, being able to run Minetest through a remote dispaly connection does mean it communicates with the user over a network).

It is highly adviseable to re-license WorldEdit under GPL-3 (or GPL-2+) to make it fully compatible with Minetest itself and others.

-nik

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.