Page 1 of 1
[FIXED] MCForge level loading not functioning correctly
Posted: October 7th, 2012, 6:23 am
by 00pol
MCSharp level loading gives a incorrect spawn. Here is an example level:
http://www.mediafire.com/?5lmpc9dsno0syuj
You should spawn at 40, 199, 40 in FCraft, however the correct spawn is 2, 159, 38 (you can see this using a MCForge 5.5.0.3 server).
I tried fixing it but I don't know what the problem is. If someone could help that would be great.
Thanks
Re: MCForge level loading not functioning correctly
Posted: October 7th, 2012, 6:37 am
by fragmer
I'm looking into it; thanks for taking the time to report a problem
Re: MCForge level loading not functioning correctly
Posted: October 7th, 2012, 6:47 am
by 00pol
Thanks!
Re: MCForge level loading not functioning correctly
Posted: October 8th, 2012, 8:58 am
by 00pol
Fixed it. MCForge 5.5.x.x Spawns are saved as X Y Z instead of X Z Y. To fix change line 85 of MapMCSharp.cs to this:
Code: Select all
// Read in the spawn location
map.Spawn = new Position {
X = (short)(bs.ReadInt16() * 32),
Y = (short)(bs.ReadInt16() * 32),
Z = (short)(bs.ReadInt16() * 32),
R = bs.ReadByte(),
L = bs.ReadByte(),
};
Re: MCForge level loading not functioning correctly
Posted: October 9th, 2012, 1:13 am
by fragmer
I wonder if that's a recent change, or if it's been that way all along. I could've sworn that it functioned properly before...
Re: MCForge level loading not functioning correctly
Posted: October 9th, 2012, 9:10 pm
by BobKare
fragmer wrote:I wonder if that's a recent change, or if it's been that way all along. I could've sworn that it functioned properly before...
AFAIK, MCForge has always saved coordinates like that. I had to get used to the other way when I switched to fCraft.
Re: MCForge level loading not functioning correctly
Posted: October 10th, 2012, 1:02 pm
by fragmer
Fixed in 0.636. Thanks again for reporting.