summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-07 11:45:30 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-07 11:45:30 +0100
commitfe7e07d69d3227d6e5cfbeefd88b47b3f5961184 (patch)
tree1e0b8b33b1b195ad3b90b6c6e81d00240be57291 /MCServer/Plugins
parentcBlockArea can now be saved as a .schematic file. (diff)
downloadcuberite-fe7e07d69d3227d6e5cfbeefd88b47b3f5961184.tar
cuberite-fe7e07d69d3227d6e5cfbeefd88b47b3f5961184.tar.gz
cuberite-fe7e07d69d3227d6e5cfbeefd88b47b3f5961184.tar.bz2
cuberite-fe7e07d69d3227d6e5cfbeefd88b47b3f5961184.tar.lz
cuberite-fe7e07d69d3227d6e5cfbeefd88b47b3f5961184.tar.xz
cuberite-fe7e07d69d3227d6e5cfbeefd88b47b3f5961184.tar.zst
cuberite-fe7e07d69d3227d6e5cfbeefd88b47b3f5961184.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index c80957511..04f7af3c9 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -150,7 +150,7 @@ function OnPlayerUsingItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, C
end
- -- Rclk with an ender pearl saves a predefined area around the cursor into a .schematic file
+ -- Rclk with an ender pearl saves a predefined area around the cursor into a .schematic file. Also tests area copying
if (Player:GetEquippedItem().m_ItemType == E_ITEM_ENDER_PEARL) then
local Area = cBlockArea();
if not(Area:Read(Player:GetWorld(),
@@ -159,8 +159,11 @@ function OnPlayerUsingItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, C
LOG("LUA: Area couldn't be read");
return false;
end
- LOG("LUA: Area read, saving now.");
- if not(Area:SaveToSchematicFile("schematics/out.schematic")) then
+ LOG("LUA: Area read, copying now.");
+ local Area2 = cBlockArea();
+ Area2:CopyFrom(Area);
+ LOG("LUA: Copied, now saving.");
+ if not(Area2:SaveToSchematicFile("schematics/test.schematic")) then
LOG("LUA: Cannot save schematic file.");
return false;
end