diff --git a/data/blocks.csv b/data/blocks.csv index 3db0049..69b4ceb 100644 --- a/data/blocks.csv +++ b/data/blocks.csv @@ -2,7 +2,7 @@ _Name,BlockID,BlockName,Biome Specific,MapGen Alias,Mineclone2,Minetest Game Acacia_Bark,,,,default:acacia_tree,mcl_core:acaciatree_bark,mcl_core:acaciatree_bark Acacia_Bark_Slab,,,,,mcl_stairs:slab_acaciatree_bark,mcl_stairs:slab_acaciatree_bark Acacia_Bark_Stair,,,,,mcl_stairs:stair_acaciatree_bark,mcl_stairs:stair_acaciatree_bark -Acacia_Button,,,,,mesecons_button:button_acaciawood_off,mesecons_button:button_acaciawood_off +Acacia_Button,,minecraft:acacia_button,,,mesecons_button:button_acaciawood_off,mesecons_button:button_acaciawood_off Acacia_Fence,192,minecraft:acacia_fence,,,mcl_fences:acacia_fence,default:fence_acacia_wood Acacia_Fence_Gate,187,minecraft:acacia_fence_gate,,,mcl_fences:acacia_fence_gate,doors:gate_acacia_wood_closed Acacia_Leaves,,minecraft:acacia_leaves,,,mcl_core:acacialeaves,default:acacia_leaves diff --git a/docs/usage.md b/docs/usage.md index a412f82..714ba75 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -73,10 +73,11 @@ On the bottom left corner, you find the Layer-related options `C`: The bottom line is the status bar `D`. You'll see the block names here as you hover over them. Messages like file saved also shown here. On the right, you see: -1. current block's rotation (00 - 1F) -2. current block's force placement indicator icon -3. the current zoom ratio, and -4. the brush's height and shape. +1. current block's probability (param1, 00 - 7F) +2. current block's rotation (param2, 00 - 1F) +3. current block's force placement indicator icon +4. the current zoom ratio, and +5. the brush's height and shape. Everything else on the screen is the main editor area `E`. diff --git a/mt-mod/mtsedit/init.lua b/mt-mod/mtsedit/init.lua index c6526c9..435f2e9 100644 --- a/mt-mod/mtsedit/init.lua +++ b/mt-mod/mtsedit/init.lua @@ -23,7 +23,7 @@ -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -- DEALINGS IN THE SOFTWARE. -- --- @brief Minetest mod that adds support for exporting node spec to MTSEDit and import MTS files +-- @brief Minetest mod that adds support for exporting node spec to MTSEdit and import MTS files -- https://gitlab.com/bztsrc/mtsedit -- diff --git a/mtsedit-i686-win.zip b/mtsedit-i686-win.zip index e83b400..2452ae0 100644 Binary files a/mtsedit-i686-win.zip and b/mtsedit-i686-win.zip differ diff --git a/mtsedit-x86_64-linux.tgz b/mtsedit-x86_64-linux.tgz index b6210a7..8f2f24c 100644 Binary files a/mtsedit-x86_64-linux.tgz and b/mtsedit-x86_64-linux.tgz differ diff --git a/src/schemimp.c b/src/schemimp.c index 907d979..4f034c2 100644 --- a/src/schemimp.c +++ b/src/schemimp.c @@ -54,7 +54,7 @@ int namematch(char *a, char *b) void schem_load(unsigned char *data, unsigned int size) { int i, j, k, l, x, y, z, g = 0, min_x = 0, min_y = 0, min_z = 0, tr[1024]; - char name[256]; + char name[256], rep[1024]; unsigned char *d, *s, *blk, *blkd = NULL, *blkp = NULL, *end = data + size; unsigned int n; @@ -74,6 +74,7 @@ void schem_load(unsigned char *data, unsigned int size) return; } memset(tr, 0, sizeof(tr)); + memset(rep, 0, sizeof(rep)); if(!blkp) { for(i = 1; i < numblocks; i++) for(j = 0; j < 4; j++) @@ -86,7 +87,8 @@ void schem_load(unsigned char *data, unsigned int size) for(l = 0; name[l]; l++) if(name[l] == '[') { name[l] = 0; break; } SCHEM_GETINT(k, j); for(i = l = 0; i < numblocks; i++) - if((blocks[i].name && !strcmp(blocks[i].name, name)) || + if((blocks[i].name && (!strcmp(blocks[i].name, name) || (!strncmp(name, "minecraft:", 10) && + strlen(blocks[i].name) > 11 && !strcasecmp(blocks[i].name + 10, name)))) || (blocks[i].blocknames && namematch(name, blocks[i].blocknames[0]))) { tr[k] = i; l = 1; break; } if(!l) { fprintf(stderr, "mtsedit: %s: %s '%s'\r\n", mtsfile, lang[ERR_NODE], name); @@ -119,15 +121,19 @@ void schem_load(unsigned char *data, unsigned int size) if(!(*d & 0x80)) { d++; break; } } } - if(n < 1024 && tr[n]) { + if(n < 1024 && (tr[n] || (!tr[n] && !n))) { layerprob[y+min_y] = 127; nodes[y+min_y][z+min_z][x+min_x].param0 = tr[n]; nodes[y+min_y][z+min_z][x+min_x].param1 = 127; if(blkd) nodes[y+min_y][z+min_z][x+min_x].param2 = blkd[i] & 3; blocks[tr[n]].numref++; - } else if(!blkp && !*d) - fprintf(stderr, "mtsedit: %s: %s %d\r\n", mtsfile, lang[ERR_NODE], n); + } else if(!blkp && !*d) { + if(n >= sizeof(rep) || !rep[n]) + fprintf(stderr, "mtsedit: %s: %s %d\r\n", mtsfile, lang[ERR_NODE], n); + if(n < sizeof(rep)) + rep[n] = 1; + } } status = lang[LOADED]; } diff --git a/src/search.c b/src/search.c index d53472d..29e214e 100644 --- a/src/search.c +++ b/src/search.c @@ -181,7 +181,7 @@ void search_key(SDL_Event *event) } else { for(numresults = 0, i = 1; i < numblocks; i++) { l = strlen(blocks[i].name) - searchlen; - for(j = 0; j < l; j++) + for(j = 0; j < l + 1; j++) if(!strncasecmp(blocks[i].name + j, search, searchlen)) { results[numresults++] = i; break;