From 5432c6bd9247bb0cce94be1a8c494f43780b68fb Mon Sep 17 00:00:00 2001 From: CableGuy67 Date: Fri, 22 Apr 2022 13:51:17 +0000 Subject: [PATCH] /spawnstruct placed schematics one block lower than player is standing Because the position of the player is -0.5 from the block (when not flying) /spawnstruct would place the schematic a block lower than the player's feet. --- mods/MAPGEN/mcl_structures/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index c99970813..13609be59 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -75,6 +75,7 @@ local function spawnstruct_function(name, param) local pos = player:get_pos() if not pos then return end + pos.y = math.floor(pos.y) + 1 local pr = PseudoRandom(math.floor(pos.x * 333 + pos.y * 19 - pos.z + 4)) pos = vector.round(pos) local dir = minetest.yaw_to_dir(player:get_look_horizontal())