Cuberite Forum
WorldEdit - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html)
+--- Thread: WorldEdit (/thread-870.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18


RE: WorldEdit - Zee1234 - 11-24-2015

(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?


Sim[pler - LogicParrot - 11-24-2015

(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.


RE: WorldEdit - NiLSPACE - 11-24-2015

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



RE: WorldEdit - NiLSPACE - 01-17-2016

Well, would you look at that Smile
[Image: cdef4b39cf.png]

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?:
[Image: b1a17ffa19.png]


RE: WorldEdit - NiLSPACE - 01-18-2016

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?


RE: WorldEdit - xoft - 01-19-2016

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.


RE: WorldEdit - NiLSPACE - 01-19-2016

So it's not something I can fix in the plugin :/ I'll upload my code soon in case you want to test it.


RE: WorldEdit - NiLSPACE - 01-19-2016

Done: https://github.com/cuberite/WorldEdit/pull/95


RE: WorldEdit - NiLSPACE - 02-06-2016

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.


RE: WorldEdit - DiamondToaster - 02-07-2016

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.