### Enable mcl_localplayer in mods.conf Source: https://mineclonia.codeberg.page/wiki/guides/localplayer.html Configuration line required in the clientmods/mods.conf file to load the localplayer mod. ```text # ... (if there are other lines here, keep them) load_mod_mcl_localplayer = true ``` -------------------------------- ### Compare textures side-by-side Source: https://mineclonia.codeberg.page/wiki/nerds/scripts.html Uses ImageMagick's montage tool to create side-by-side comparisons of textures between two resource packs. ```shell #!/bin/sh # needs imagemagick's montage (apt install imagemagick) path_to_pp=~/var/src/MT/PixelPerfection #https://resourcepack.net/pixel-perfection-resource-pack path_to_mc=~/var/src/MT/MineCraft #https://texture-packs.com/resourcepack/default-pack/ path_to_sbs=~/var/src/ppmc mkdir -p $path_to_sbs cd $path_to_pp/assets/minecraft/textures/block for f in *.png; do ff=$path_to_mc/assets/minecraft/textures/block/$f; if [ -f $ff ]; then montage $f $ff -tile 2x1 -geometry +0+0 $path_to_sbs/$f; fi; done ``` -------------------------------- ### Calculate codebase size difference Source: https://mineclonia.codeberg.page/wiki/nerds/scripts.html Compares the total lines of code and byte size between two project directories. ```shell #!/bin/sh # Difference in code size between mcla and mcl2 mcla_path=$1 mcl2_path=$2 if [ ! -d ${mcla_path}/mods ] || [ ! -d ${mcl2_path}/mods ]; then echo "Usage: $0 mcla_path mcl2_path"; exit; fi mcla_lines=$(find ${mcla_path}/mods -name "*.lua"|xargs cat |wc -l) mcla_bytes=$(find ${mcla_path}/mods -name "*.lua"|xargs cat |wc -c) mcl2_lines=$(find ${mcl2_path}/mods -name "*.lua"|xargs cat |wc -l) mcl2_bytes=$(find ${mcl2_path}/mods -name "*.lua"|xargs cat |wc -c) echo "# Code size difference of mcla and mcl2" echo "## loc" echo lua lines in mcl2: $mcl2_lines echo lua lines in mcla: $mcla_lines echo -n difference:; echo "$mcl2_lines - $mcla_lines" |bc echo mcla is $(echo "$mcla_lines / $mcl2_lines * 100" |bc -l |head -c5)\% of mcl2 echo "## bytes" echo lua bytes in mcl2: $mcl2_bytes echo lua bytes in mcla: $mcla_bytes echo -n difference:; echo "$mcl2_bytes - $mcla_bytes" |bc echo mcla is $(echo "$mcla_bytes / $mcl2_bytes * 100" |bc -l|head -c5)\% of mcl2 ``` -------------------------------- ### Client data directory structure Source: https://mineclonia.codeberg.page/wiki/guides/localplayer.html The expected file structure for the clientmods directory within the user data folder. ```text .minetest/ ├─ .../ ├─ clientmods/ │ ├─ mcl_localplayer/ │ │ ├─ ... │ ├─ mods.conf ├─ .../ ``` -------------------------------- ### Configure minetest.conf for CSM Source: https://mineclonia.codeberg.page/wiki/guides/localplayer.html Required settings in minetest.conf to enable client-side modding and Mineclonia CSM support. ```text enable_client_modding = true mcl_enable_csm = true ``` -------------------------------- ### Define Realm Barrier boundaries Source: https://mineclonia.codeberg.page/wiki/nerds/world-structure.html Sets the maximum and minimum height constants for the Realm Barrier layer in the End. ```lua mg_realm_barrier_overworld_end_max = mg_end_max mg_realm_barrier_overworld_end_min = mg_end_max - 11 ``` -------------------------------- ### List merged pull requests Source: https://mineclonia.codeberg.page/wiki/nerds/scripts.html Generates a markdown list of all merged pull requests since a specific release ID. ```shell #!/bin/sh # create a markdown list of all PRs since mcl2 release (or since issueid) release=3644 #issue id of mcl2 release git ls-remote mcl2 'pull/*/head' |grep "pull/$release" -A 500000 |cut -d '/' -f 3 | while read pr; do l="https://git.minetest.land/MineClone2/MineClone2/pulls/$pr"; p=$(curl -s $l); if [ "$(echo $p|grep merged)" != "" ]; then echo "- [ ] " $l $(echo $p|grep ""|sed 's/<title>//;s/<\/title>//')|sed 's/ - MineClone2 - Mesehub$//'; fi; done ``` -------------------------------- ### Debug superfluous node definition fields Source: https://mineclonia.codeberg.page/wiki/nerds/scripts.html Hooks into minetest.register_node to identify and print fields in node definitions that match default values. ```lua -- put at the end of builtin/game/register.lua to print superfluous fields in node defs local old_rn = minetest.register_node function minetest.register_node(name, def) local same = {} local same_found = false for k, v in pairs(def) do if type(v) ~= "table" and type(v) ~= "function" then if v == core.nodedef_default[k] and k ~= "type" then --type often gets copied when modified nodes are made from existing defs same[k] = v same_found = true end end end if same_found then print("superfluous node def fields for "..tostring(name)..":") print(dump(same)) end return old_rn(name, def) end ``` -------------------------------- ### Calculate and List Chunk Positions Source: https://mineclonia.codeberg.page/wiki/nerds/world-structure.html Iterates through the defined range of chunk positions and prints the total count and individual coordinates. ```lua local c = {} for i = -30912, 30927, 80 do table.insert(c, i) end print (tostring(#c) .. " chunks: " .. table.concat(c, ", ")) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.