Posts: 66
Threads: 12
Joined: Oct 2015
Thanks: 0
Given 10 thank(s) in 8 post(s)
(11-22-2015, 02:05 AM)Safwat Wrote: There used to be a Bukkit WorldEdit extension called SafeEdit. It would update the world a bit by bit in a configurable interval and not all at once. It was great for large updates. I wonder if somthing similar could be done here.
AsyncWorldEdit is the current plugin that does that. It's premium, but it wasn't always and you can still get the older non-premium versions for free.
For making cuberite's WE have an AsyncWorldEdit addon/option, could you use tick by tick callbacks and figure out how many blocks to set based on how long the previous tick took?
Posts: 721
Threads: 77
Joined: Apr 2014
Thanks: 113
Given 130 thank(s) in 91 post(s)
(11-24-2015, 01:27 PM)Zee1234 Wrote: could you use tick by tick callbacks and figure out how many blocks to set based on how long the previous tick took?
A simpler approach would be configuring the amount of blocks in a config file.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
11-24-2015, 07:32 PM
(This post was last modified: 11-24-2015, 09:37 PM by NiLSPACE.)
If this is implemented we could do something like this:
function OnPluginsLoaded()
cPluginManager:CallPlugin("WorldEdit", "ExecuteString", [[
-- Retrieve the size of each portion, and ticks between each partion write
local PartionSize, TicksBetweenWrite = ...
PartionSize = Vector3i(PartionSize, PartionSize, PartionSize)
function cBlockArea:Write(a_World, a_Position, a_Y, a_Z)
if (type(a_Position) ~= "Vector3i") then
a_Position = Vector3i(a_Positoin, a_Y, a_Z)
end
local SizeX, SizeY, SizeZ = self:GetCoordRange()
local Positions = {}
for X = 0, SizeX, PartionSize do
for Y = 0, SizeY, PartionSize do
for Z = 0, SizeZ, PartionSize do
table.insert(Positions, Vector3i(X, Y, Z))
end
end
end
local function WriteIntoWorld = function(a_World)
-- TODO add a Max value in Positoins[1] + PortionSize
self:WritePortion(a_World, a_Position + Positions[1], Positions[1], Positions[1] + PartionSize, cBlockArea.baTypes + cBlockArea.baMetas)
table.remove(Positions, 1)
if (Positions[1] ~= nil) then
a_World:ScheduleTask(WriteIntoWorld, TicksBetweenWrite)
end
end
WriteIntoWorld(a_World)
end
]], 25, 40)
end
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
01-17-2016, 08:03 AM
(This post was last modified: 01-18-2016, 06:22 PM by NiLSPACE.)
Well, would you look at that
It's a little inconsistent though. Sometimes it just doesn't get anything back from github, so the connection closed callback doesn't get called until a while later, but without content.
Also, @ xoft, what happens when a plugin uses the cNetwork API but it the server gets reloaded? I've noticed the server sometimes getting an error that the OnRemoteClosed callback failed, but nothing went wrong. Is that because the callback doesn't exist anymore due to the reload?:
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
01-18-2016, 08:11 PM
(This post was last modified: 01-19-2016, 01:24 AM by NiLSPACE.)
Hmm, the same is happening when I try to download the ZIP file. I only managed to download the ZIP file correctly once. Otherwise it either doesn't get anything, just like my problem when checking the version, or it doesn't receive all the information making the download corrupted. Anyone has an idea what could be wrong?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
It is HTTP+TLS, right? It could be that the HTTPS server closes the connection and the TLS decoder gets that information too soon, so it doesn't process the last bit of data.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
So it's not something I can fix in the plugin :/ I'll upload my code soon in case you want to test it.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
01-19-2016, 06:13 PM
(This post was last modified: 01-19-2016, 07:12 PM by NiLSPACE.)
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
I wanted to do some more work on WorldEdit this weekend, but I'm having some trouble with my laptop. I just bought an SSD, but when I have both the SSD and my HDD in the laptop Windows doesn't want to boot normally. It boots just fine when I go into the boot loader using F12 and select Windows there or if I only have the SSD installed, but otherwise it keeps repeating the Lenovo logo when booting.
Posts: 350
Threads: 18
Joined: Oct 2014
Thanks: 26
Given 54 thank(s) in 47 post(s)
Kind of sounds like a boot order issue or something. You might need to set the drive order in the BIOS. You probably already tried that though.
|