summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/ChunkWorx/chunkworx_main.lua
diff options
context:
space:
mode:
authortau.tihon@gmail.com <tau.tihon@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-30 17:54:51 +0200
committertau.tihon@gmail.com <tau.tihon@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-30 17:54:51 +0200
commitd5f8701f633b22abfe86249650da22db021fd101 (patch)
tree874045e3dce7c45d4b75e64227c7c6a6f66e819c /MCServer/Plugins/ChunkWorx/chunkworx_main.lua
parentChunkWorx: fixed API change breaking exact and 3x3 playerpos regeneration (fix contributed by Taugeshtu) (diff)
downloadcuberite-d5f8701f633b22abfe86249650da22db021fd101.tar
cuberite-d5f8701f633b22abfe86249650da22db021fd101.tar.gz
cuberite-d5f8701f633b22abfe86249650da22db021fd101.tar.bz2
cuberite-d5f8701f633b22abfe86249650da22db021fd101.tar.lz
cuberite-d5f8701f633b22abfe86249650da22db021fd101.tar.xz
cuberite-d5f8701f633b22abfe86249650da22db021fd101.tar.zst
cuberite-d5f8701f633b22abfe86249650da22db021fd101.zip
Diffstat (limited to 'MCServer/Plugins/ChunkWorx/chunkworx_main.lua')
-rw-r--r--MCServer/Plugins/ChunkWorx/chunkworx_main.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/MCServer/Plugins/ChunkWorx/chunkworx_main.lua b/MCServer/Plugins/ChunkWorx/chunkworx_main.lua
index 87702ff79..95d17aefc 100644
--- a/MCServer/Plugins/ChunkWorx/chunkworx_main.lua
+++ b/MCServer/Plugins/ChunkWorx/chunkworx_main.lua
@@ -5,6 +5,7 @@ OPERATION_CODE = 0 -- 0 = generation
CX = 0
CZ = 0
CURRENT = 0
+TOTAL = 0
-- AREA Variables
AreaStartX = -10
AreaStartZ = -10
@@ -23,7 +24,7 @@ function Initialize(Plugin)
PLUGIN = Plugin
PLUGIN:SetName("ChunkWorx")
- PLUGIN:SetVersion(5)
+ PLUGIN:SetVersion(6)
PluginManager = cRoot:Get():GetPluginManager()
PluginManager:AddHook(PLUGIN, cPluginManager.E_PLUGIN_TICK)
@@ -95,8 +96,8 @@ function Tick( DeltaTime )
CURRENT = 0
if (WW_instance == nil) then
- LOG("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": works ABORTED")
- LOG("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": NO WORLD found :(")
+ LOGERROR("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": works ABORTED")
+ LOGERROR("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": NO WORLD found :(")
GENERATION_STATE = 0
end
end
@@ -108,6 +109,7 @@ function Tick( DeltaTime )
and WW_instance:GetLightingQueueLength() < 200
and (WW_instance:GetStorageSaveQueueLength() + WW_instance:GetStorageLoadQueueLength()) < 80) then
local chunk_sum = (1+ AreaEndX - AreaStartX) * (1+ AreaEndZ - AreaStartZ)
+ TOTAL = chunk_sum
LOG("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": PROCESSING 100 chunks, (" .. CURRENT .. "/" .. chunk_sum .. ")")
for C = 1, 100 do
if (GENERATION_STATE == 2) then WW_instance:GenerateChunk(CX, CZ) end