Page 1 of 1

Negative numbers onchunkgenerated

Posted: Sat Nov 09, 2013 4:07 pm
by ficolas

Code: Select all

game.onevent(defines.events.onchunkgenerated, function(event)
	local x = event.area.lefttop.x/32
	local y = event.area.lefttop.y/32
	
	game.getplayer().print((x).." "..(y))
end
Adding that to the control.lua, should give me numbers between -5,-5 and 5,5 at the first chunks, and when im going further, it should give a combination of two numbers, beeing one of them bigger than 5 (like 6,5 or 6,3), but those numbers should be going up slowly as I walk, but what do I find?

134217725, 134217720
134217726, 134217720
134217727, 134217720
0, 134217720

(This only seems to happen when im going to negative directions, and im not sure if the numbers of the first chunks that are negative work)

Then I noticed that any world generation is generated in negative cordinates. (from my mod)

Re: Negative numbers onchunkgenerated

Posted: Wed Nov 20, 2013 12:29 pm
by kovarex
Thank you for the report, there is a bug indeed, it is fixed for 0.8 now.