diff options
Diffstat (limited to 'MCServer/Plugins')
-rw-r--r-- | MCServer/Plugins/Debuggers/Debuggers.lua | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index 04f7af3c9..ae639f6a6 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -14,8 +14,9 @@ function Initialize(Plugin) Plugin:SetVersion(1)
PluginManager = cRoot:Get():GetPluginManager()
- PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_USING_ITEM)
- PluginManager:AddHook(Plugin, cPluginManager.HOOK_TAKE_DAMAGE)
+ PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_USING_ITEM);
+ PluginManager:AddHook(Plugin, cPluginManager.HOOK_TAKE_DAMAGE);
+ PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATED);
LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
@@ -186,3 +187,18 @@ end +
+
+function OnChunkGenerated(World, ChunkX, ChunkZ, ChunkDesc)
+ -- Test ChunkDesc / BlockArea interaction
+ local BlockArea = cBlockArea();
+ ChunkDesc:ReadBlockArea(BlockArea, 0, 15, 50, 70, 0, 15);
+ BlockArea:SaveToSchematicFile("ChunkBlocks_" .. ChunkX .. "_" .. ChunkZ .. ".schematic");
+
+ ChunkDesc:WriteBlockArea(BlockArea, 5, 115, 5);
+ return false;
+end
+
+
+
+
|