• 9,522 views, 4 today
  • 649 downloads, 0 today
  • 7
  • 1
  • 11
King Korihor's Avatar King Korihor
Level 34 : Artisan Modder
8
A great many players use extreme survival maps like the SkyBlock (and related) maps. Unfortunately there is a "bug" right now in vanilla Minecraft that causes players to randomly move around the spawn location. This is particularly bad for players on maps where the areas right near the spawn are deadly.... where you can fall into lava or into the void (like the SkyBlock map). This can be very irritating to even making some maps impossible to use at the moment.

The bit of code in vanilla Minecraft which causes this is as follows:

if (!par2World.provider.hasNoSky && par2World.getWorldInfo().getGameType() != EnumGameType.ADVENTURE) { int var9 = Math.max(5, par1MinecraftServer.getSpawnProtectionSize() - 6); var6 += this.rand.nextInt(var9 * 2) - var9; var7 += this.rand.nextInt(var9 * 2) - var9; var8 = par2World.getTopSolidOrLiquidBlock(var6, var7); }

Note the "getSpawnProtectionSize" function is as following in vanilla Minecraft:

public int getSpawnProtectionSize()
{
return 16;
}

For non-programmers, what this means is that in vanilla Minecraft you will move around about 16 blocks in a random direction from the spawn point when you die or appear on the map for the first time. This is a really good thing in a multi-player server on ordinary maps, as multiple players will appear in slightly different locations when they are respawning in large numbers. For survival single player games and some specialized maps, this is not a very good thing.

What this mod attempts to do is simply "fix" Minecraft to get rid of that "fuzz", making the spawn point as selected with MC Edit or other tools to be a fixed and specific point on the map. What I've done is pretty much remove the above code from a single class that isn't used by many mods. This should be compatible with both ModLoader and Minecraft Forge, and goes into the "minecraft.jar" file or rather whatever you have named the modified Minecraft jar file with the new launcher where you would like to use this fix.
Progress100% complete
Game VersionMinecraft 1.6.2
Tags

Create an account or sign in to comment.

1
07/31/2013 6:32 pm
Level 11 : Journeyman Miner
Dat Tree Gaming
Dat Tree Gaming's Avatar
This isn't a bug, the game chooses a "spawn chunk" that you'll spawn in every time, not an exact location. If anyone wants to fix it to a single location without this mod all they have to do is type /spawnpoint (with cheats on). Before you spend your time making a fix mod I suggest you do your research on if the fix in question is a bug at all.
1
07/31/2013 7:47 pm
Level 34 : Artisan Modder
King Korihor
King Korihor's Avatar
The game chooses a specific X,Y,Z coordinate. I've seen this in the Minecraft software itself, and in fact the code which causes the spawn location to change is specifically listed in the description of this mod. Specifically in the "EntityPlayerMP" class (assuming you are using MCP to help decompile the obfuscated names).

The specific spawn location is stored in the save file, and is editable by MCEdit as well as other programs. It is not a chunk, but a specific location. That data is also requested in the WorldChunkManager.findBiomePosition method, which calculates that original position which is in turn saved in the data file.

You are simply wrong on what you are are saying, as the code of Minecraft itself contradicts everything you said. Mind you, this "fix" is already done, and it works with Noobcrew's Skyblock map.... which is one of the reasons why Noobcrew edited his original Skyblock post to link to my mod.

At least try it before you throw cold water on this and claim it doesn't work. I certainly did the research on this.

Mind you, I think the reason for this is because Mojang wants to spread players out from the original spawn point on multi-player servers. This became an issue even with LAN servers, but the fuzz distance setting has not been brought forward into the configuration file. It is indeed a bug that needs to be fixed eventually in Minecraft. This mod really doesn't "fix" the bug in the sense of loading the data from the Minecraft config file like a proper fix would do, but it does the same thing as setting that fuzz distance to zero.

Note that the "/set spawn point" does the same thing as sleeping in a bed, which is a different X,Y,Z location and not the "default" spawn point.
1
08/19/2013 9:19 pm
Level 22 : Expert Robot
EpicFailProductions8
EpicFailProductions8's Avatar
public int getSpawnProtectionSize()
{
return 16;
}

This means the game chooses a 32x32 X, Z coordinate centered around the original spawnpoint to spawn the player when they die...if the spawn wasn't set directly to an X, Y, Z location. If the spawnpoint was modified, the game will spawn you where it was set to.

I don't know how to program, but I understand programming just fine.
1
07/31/2013 10:55 pm
Level 11 : Journeyman Miner
Dat Tree Gaming
Dat Tree Gaming's Avatar
No, I totally agree, it works just fine. I tried this myself even. I was saying that you can do it without the mod installed by typing the command "/spawnpoint" is all. Maybe it'd help if you actually understood what I said before you throw any stones.
1
08/01/2013 11:07 am
Level 34 : Artisan Modder
King Korihor
King Korihor's Avatar
When you start saying very insulting things like "Before you spend your time making a fix mod", look up the reasons and the motivations for my making this mod in the first place. If you agreed with me, you would keep your mouth shut (or at least not be so damn insulting).

Yes, there are alternatives for map makers to do things like setting the spawn point as you suggest. Not all map makers have done that, for whatever reason that may be. There are even some vanilla maps (depending on the seed) where this can be a problem... although admittedly Minecraft tries to make that not happen. The SkyBlock map in particular and some of the older extreme survival maps have not set this spawn point, because the randomization was something Dinnerbone (I am presuming) added to Minecraft about version 1.3 of Minecraft. Setting the spawn point like you suggest also doesn't work if other people are getting into your world through LANs or in a multiplayer server either.

BTW, that particular version was even more buggy than it was now, where the randomization would even throw you into solid rock to sufficate upon spawning in some situations. Thank goodness this particular problem has been fixed (as of MC 1.5), but the random fuzzy spawning still does happen.

I'm not saying this is a universal fix, as it isn't. For most people playing Minecraft, they really wouldn't care. But for those who are frustrated with a particular thing that I still insist is a bug in Minecraft that hasn't been fixed yet as of 1.6.2, this particular patch to Minecraft might help them play on some custom maps that otherwise are unplayable when you die.
1
08/01/2013 12:04 pm
Level 11 : Journeyman Miner
Dat Tree Gaming
Dat Tree Gaming's Avatar
Jesus Christ, why the essay. I agreed with you and get all this already. What are you trying to prove at this point?
1
08/01/2013 2:40 pm
Level 34 : Artisan Modder
King Korihor
King Korihor's Avatar
You were the one accusing me of ignorance on the topic and that this mod was pointless (or at least suggested I shouldn't have even bothered releasing this mod in the first place in a veiled sort of way). I am explaining my motives. I am also showing that your suggested "fix" doesn't always work, hence the need for this mod.

I'll also note that this mod was more of an afterthought for something else I was working on. I made it available to people to use because they were complaining about problems on some of these maps, so I figured "why not" to make it available.

I sure am not interested in trying to earn "Planet Minecraft" points or any other such drivel from this, as I posted the mod originally almost a year ago. In fact, I didn't really expect anybody to use the mod, but apparently it is quite popular and has been used by far more people than I ever imagined. That is why I also updated it to 1.6.2. I threw it on Planet Minecraft simply to expose it to more people as I think it is perhaps a bit useful in some situations.

Perhaps Dinnerbone will get around to finishing the "fix" to what was originally a pretty serious bug. At the moment it still is a minor bug, and an annoyance in some situations.
1
07/28/2013 10:02 pm
Level 48 : Master Slime Tamer
kingsmidget16
kingsmidget16's Avatar
great mod for single player!
1
07/28/2013 1:11 am
Level 16 : Journeyman Lumberjack
Skullkrusher
Skullkrusher's Avatar
i just build a 33x33 square with command blocks underneath it that teleport you to the start of the map.
1
07/29/2013 2:25 pm
Level 34 : Artisan Modder
King Korihor
King Korihor's Avatar
That of course is another option. It doesn't work so well on things like SkyBlock, which are already very minimalistic maps or in places where you may not want to put command blocks.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome