world generator
#5
Okay, tested that now under linux. Cloned source with git from github and compiled it without any problems.
Created a release version of the server. Added my plugin, started the server and joined the world. Then the console get spammed with this error.
Code:
[20:51:23] UnboundedRelGetBlock: requesting a block with a_RelY out of range: -1

If I try to start the debug version of the server, it stops with that error.
Code:
[7fe29337d740|20:58:34] Assertion failed: m_World == NULL, file /home/lukas/cpp/MCServer/src/LightingThread.cpp, line 93
MCServer_debug: /home/lukas/cpp/MCServer/src/LightingThread.cpp:93: bool cLightingThread::Start(cWorld*): Assertion `0' failed.
Aborted

Here's the source of the plugin, do I make a very big mistake?
PLUGIN = nil

function Initialize(Plugin)
	Plugin:SetName("TestPlugin")
	Plugin:SetVersion(1)
	
	PLUGIN = Plugin
	LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())

	-- create the world
	CreateWorld()
	
	-- Hooks
	cPluginManager:AddHook(cPluginManager.HOOK_CHUNK_GENERATING, AirGenerator)

	-- Command Bindings
	cPluginManager.BindCommand("/checkworld", "testplugin.checkworld", CheckWorld, " - Check if world exists")
	cPluginManager.BindCommand("/teleportto", "testplugin.teleportto", TeleportTo, " - Teleport to world")
	return true
end

function OnDisable()
	LOG(PLUGIN:GetName() .. " is shutting down...")
end

function CheckWorld(Split, Player)
	if (#Split ~=2) then
		Player:SendMessage("Usage: /checkworld <worldname>")	
		return true
	end
	
	if (cRoot:Get():GetWorld(Split[2]) == Nil) then
		Player:SendMessage("No world exists with that name.")
		return true
	end
	
	Player:SendMessage("The world exists.")
	return true
end

function TeleportTo(Split, Player)
	if (#Split ~=2) then
		Player:SendMessage("Usage: /teleportto <worldname>")	
		return true
	end

	if (cRoot:Get():GetWorld(Split[2]) == Nil) then
		Player:SendMessage("No world exists with that name.")
		return true
	end
	

	Player:MoveToWorld(Split[2])
	Player:TeleportToCoords(0, 100, 0)
	Player:SendMessage("Teleported you...")
	return true
end

function CreateWorld()
	cRoot:Get():CreateAndInitializeWorld("airworld")
end

function AirGenerator(a_World, a_ChunkX, a_ChunkZ, a_ChunkDesc)
	if (a_World:GetName() == "airworld") then
		FillBlocks(a_ChunkDesc)
	end
end

function FillBlocks(a_ChunkDesc)
	a_ChunkDesc:FillBlocks(E_BLOCK_AIR, 0)
    a_ChunkDesc:FillRelCuboid(0, 15, 60, 60, 0, 15, E_BLOCK_STONE, 0)  -- Fill 1 layer with stone, at height 60
    a_ChunkDesc:SetUseDefaultBiomes(false)
    a_ChunkDesc:SetUseDefaultHeight(false)
    a_ChunkDesc:SetUseDefaultComposition(false)
    a_ChunkDesc:SetUseDefaultFinish(false)
end
Reply
Thanks given by:


Messages In This Thread
world generator - by Seadragon91 - 05-04-2014, 10:05 PM
RE: world generator - by xoft - 05-04-2014, 10:31 PM
RE: world generator - by Seadragon91 - 05-04-2014, 11:39 PM
RE: world generator - by xoft - 05-05-2014, 12:34 AM
RE: world generator - by Seadragon91 - 05-05-2014, 05:06 AM
RE: world generator - by bearbin - 05-05-2014, 05:20 AM
RE: world generator - by NiLSPACE - 05-05-2014, 05:33 AM
RE: world generator - by xoft - 05-05-2014, 03:10 PM
RE: world generator - by Seadragon91 - 05-05-2014, 03:29 PM
RE: world generator - by tigerw - 05-05-2014, 08:06 PM
RE: world generator - by Seadragon91 - 05-05-2014, 09:00 PM
RE: world generator - by worktycho - 05-06-2014, 01:00 AM
RE: world generator - by worktycho - 05-06-2014, 01:12 AM
RE: world generator - by Seadragon91 - 05-06-2014, 03:16 AM
RE: world generator - by xoft - 05-06-2014, 04:52 AM
RE: world generator - by Seadragon91 - 05-06-2014, 05:00 AM
RE: world generator - by NiLSPACE - 09-20-2014, 08:02 PM
RE: world generator - by xoft - 09-21-2014, 01:03 AM
RE: world generator - by worktycho - 09-22-2014, 02:27 AM



Users browsing this thread: 3 Guest(s)