[FIXED] MCForge level loading not functioning correctly

Fixed bugs, solved problems, and old reports.
Locked
00pol
Offline
Posts: 6
Joined: October 2nd, 2012, 1:01 pm

[FIXED] MCForge level loading not functioning correctly

Post 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 :)

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: MCForge level loading not functioning correctly

Post by fragmer »

I'm looking into it; thanks for taking the time to report a problem

00pol
Offline
Posts: 6
Joined: October 2nd, 2012, 1:01 pm

Re: MCForge level loading not functioning correctly

Post by 00pol »

Thanks!

00pol
Offline
Posts: 6
Joined: October 2nd, 2012, 1:01 pm

Re: MCForge level loading not functioning correctly

Post 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(),
            };


User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: MCForge level loading not functioning correctly

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

BobKare
Offline
Posts: 279
Joined: May 26th, 2011, 2:15 pm

Re: MCForge level loading not functioning correctly

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

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: MCForge level loading not functioning correctly

Post by fragmer »

Fixed in 0.636. Thanks again for reporting.

Locked