This bug, while technically fixed in the newer version of Minecraft, still is "broken" as of Minecraft version 1.6.1. My suggestion of introducing a parameter into the game has been partially implemented by Jeb & Dinnerbone, but unfortunately it is still a hard coded constant in another class and not yet something read by the configuration file or anything else similar. It is for this reason I'm updating this "mod" for people using extreme survival maps.
== Introduction ==
I've encountered a bug in Minecraft 1.3.x that doesn't seem to be fixed in 1.3.2, and while I've reported the bug on the MC Wiki and have gone out of my way to publicize the bug, I have doubts it will be fixed any time soon or at least not before the 1.4 branch, if even then. My hope would be that this mod would be completely shut down by Dinnerbone or somebody else in the Mojang dev team by simply fixing this bug.
What is happening is that when players spawn in a new world, including when they die or appear in the world for the first time, the terrain generator first of all tries to determine a suitable location for players to spawn. After that happens, on servers the spawn location is "fuzzed up" to randomize the location a little bit so players don't all bunch up together at the same location. For a great many servers, this is even acceptable behavior as the spawn location is a nice flat location in the middle of a "public square" and expected.
This is a new behavior for people used to single player maps though, so it really turns into a bug. It becomes a very serious bug for people who are using extreme survival island maps, especially things like the very popular SkyBlock map by Noobcrew and numerous related maps which have a very tiny initial spawn area surrounded by "dangerous" areas. At times you need to respawn as many as 20-30 times before you can finally land on some "solid" ground with some of those maps. I think that is more than just frustrating, so I created this mod to help those people who use those kind of maps.
There is also a sinister bug that impacts almost everybody else though, and it is something that should have been caught a while back. See down in the technical details below for further information.
== Installation ==
There is only one class that you need to install, but that needs to be put into your "minecraft.jar" file. If you have installed other mods this should be something of an old hat. Please consult other threads about how to install mods if you can't figure it out. I'm throwing the class file into a zip file strictly for consistency with other mod installation guides.
The only mods this may cause some incompatibility with are those which modify this class. To the best of my knowledge, neither ModLoader nor Forge should have problems with this class changing and should be compatible with almost all mods which use those libraries. If there is a mod conflict, please make a comment and let me know what problems are encountered.
Remember, if you haven't already done this for other mods, please remove the "META-INF" folder in the "minecraft.jar" file... otherwise the game will crash and become unplayable. This folder must be either recalculated (which is done by some installation programs) or removed for almost any mod to Minecraft, and this mod is no different.
== Obligatory Picture ==
This really doesn't change anything visually in the game, in fact it just removes code from the game. None the less, to keep trolls from commenting on this thread and to oblige by forum rules, here is the pic of a world using this mod:
== Technical Details ==
The problem that happens here is with the constructor for the "EntityPlayerMP" class in Minecraft (obfuscated as gt for version 1.3.1 and gu for 1.3.2). The sourcecode can be seen as follows:
public gu(MinecraftServer paramMinecraftServer, up paramup, String paramString, gv paramgv)
{
super(paramup);
paramgv.b = this;
this.c = paramgv;
this.cm = paramMinecraftServer.ab().o();
j localj = paramup.E();
int k = localj.a;
int m = localj.c;
int n = localj.b;
if ((!paramup.w.e) && (paramup.H().q() != uy.d)) {
k += this.Z.nextInt(20) - 10;
n = paramup.h(k, m);
m += this.Z.nextInt(20) - 10;
}
b(k + 0.5D, n, m + 0.5D, 0.0F, 0.0F);
this.b = paramMinecraftServer;
this.W = 0.0F;
this.bJ = paramString;
this.M = 0.0F;
}
The Deobfuscated code (thanks to the guys making the Minecraft Coder Pack [MCP]):
Note that the world terrain generators have already selected a spawn location that is appropriate for the world map which has been generated, or perhaps somebody set the spawn location with MCEdit on a custom map made with that tool. Minecraft is saying essentially that it knows better where players should be spawning and moves the location around again.
Also, look at that code again. Note that the y position is being changed based upon the x & z position on the map, and then the z position is set again. Special thanks needs to be given to KeyBounce pointing this bug out on the MC Wiki. Even if you aren't concerned about some silly map maker like Noobcrew, this still will cause harm to many players causing them to be killed by spawning inside of a hillside or inside of a tree if the land is sloped along the z-axis. Basically it would cause some players to immediately die with a hardcore version of the map or world and be locked out of the world without doing a single thing.
If I was involved with the Mojang dev team, I'd likely make this change:
where the "spawnFuzz" field would be something read from a configuration file and set by default to 10 with server installations and set to 0 for "single player" clients. Instead, with this "mod", I just culled the code completely but I'll admit there is a legitimate reason for having this in the game... just that it should be something more under the control of server operators or a player on single player worlds.
== From about 1.5.x onward ==
There have been some changes that more or less updated the issue. The code inside of the above routine mentioned has been changed to the following:
This "protection size" argument comes from the "server" configuration.... which is exactly what it should be doing. All is well with how this should be working except that the "protection size" parameter is a bit interesting and has the following code in the MinecraftServer class:
public int getSpawnProtectionSize()
{
return 16;
}
So close.... yet not quite done. I would definitely consider this to be a bug or at least an unimplemented feature by having a "magic number" constant. I have to assume Mojang plans on either reading this constant from a configuration file or from the argument strings as something settable by server operators or players.
== Disclaimer ==
Disclaimer: This mod require altering minecraft.jar, and SMP or other aspects of Minecraft may or may not work with this mod installed. This mod may add new content. Do not load worlds with this new content if the respective mod is not installed. I am not responsible for any damage done to your computer, worlds, network, time lost and lowered productivity, or your copy of Minecraft. That said, backup your worlds and bin folder, but that is just friendly advise!
I cant get it to work, do i download 1.3.1 or 1.3.2, cuz i installed the mod right...but i installed .2
You should match the same version of Minecraft as the version number.
Keep in mind that this isn't like a ModLoader mod, as you don't put it in a mod folder or anything like that. You need to put the class file into the "minecraft.jar" file.
What file do I put it in? I have a minecraft file (I'm not talking about .minecraft file) and I don't have minecraft.jar.
You need to find the ".minecraft" file and then look in the "bin" folder. You should see a file called "minecraft.jar". Where it is located at depends on the operating system you are using and other factors.
Since Java uses the same file format for "jar" files as the "zip" compression algorithm uses, you can use any sort of archiving software (like 7-zip or something similar) to open up that "jar" file and add or remove files... almost like you would do with your file manager.
In fact, both Windows (as of Windows XP and later) and Linux (check the version... but it has been in there for several years) can do this by default simply using the ordinary file explorer. That is a bit tricky, so I wouldn't do that unless you are pretty skilled with using computers as you need to rename the extension and change it back. Other archive managers will often just let you change the contents of a jar file directly.
You can also try to download some Minecraft mod installation programs that can help you out. I'd suggest looking around the forums for several suggestions if you want to go that route. I don't use them myself, so you need to get a suggestion on which one is better from somebody else.
this causes my fresh install of Minecraft to crash. Works without the modified .class, crashes with it. I have nothing else installed. I bought Minecraft just to play Skyblock, and it's apparently pretty unplayable without this. awesome.
any advice?
i put the gu.class file in minecraft.jar, ensuring that the old file is replaced. seems like a straight forward procedure. my game says 1.32, i'm using 1.32.
this causes my fresh install of Minecraft to crash. Works without the modified .class, crashes with it. I have nothing else installed. I bought Minecraft just to play Skyblock, and it's apparently pretty unplayable without this. awesome.
any advice?
As a quick and dirty fix, you can try the version on my WorldGen API: http://adf.ly/BzzND
The code should be the same as what I provided in the download link above, but bundled with other classes. You can ignore the other classes in that zip file unless you want to install my other mod. At the very least it is something to try.
I should also mention that you need to delete the "META-INF" directory in your minecraft.jar file. The point of that file in jar files is to perform a "checksum" to verify that 3rd party applications aren't fiddling with the jar files. Unfortunately if you are modifying Minecraft, you are changing the classes, so the checksums don't work. In fact, I'd suggest that is likely the problem you are having here if you claim you are using the correct version of Minecraft.
Just notifying everyone, it is incompatible with player api, and therefore smart moving.
If you can provide a link to other API libraries that use the gu.class (aka EntityPlayerMP class), I would like to talk with those developers and at least encourage them to make this change to their libraries as well, or at least consider making the same change so they can be compatible with this fix.
As a side note, for those people who have been experiencing problems with travel through Nether portals, I think this current version (as of today, September 23, 2012) should solve the problem. I'm keeping the same link on the original post, but it should pull up an updated version of the class file that you can install in the minecraft.jar file. If you are having other problems, please let me know.
Some older versions of this class did cause problems with enchantment tables and other features. That should be fixed as well, but if you are getting the file from anywhere but the above link you are likely getting an older version that definitely has bugs.
As a side note, for those people who have been experiencing problems with travel through Nether portals, I think this current version (as of today, September 23, 2012) should solve the problem. I'm keeping the same link on the original post, but it should pull up an updated version of the class file that you can install in the minecraft.jar file. If you are having other problems, please let me know.
Some older versions of this class did cause problems with enchantment tables and other features. That should be fixed as well, but if you are getting the file from anywhere but the above link you are likely getting an older version that definitely has bugs.
Woot! Major Woot! for nether portals! Believe it or not, I've got mystcraft linking books up at each of my nether portals just because the linking books are fail-safe while nether portals are fail-fail.
So what else had to be changed for nether portals/enchantment tables/etc?
Seriously, when a nether portal (old) failed, it would put you in the new dimension at the old co-ordinates. Not only are you 8 times as far from origin as you expected, but in the nether that likely means over lava. Or, going the other way into the overworld, you're near origin -- which in our world is in the middle of the ocean, and for one portal, in the middle of an underwater cave system that I only found because of this bug.
If a mystcraft linking book failed, you either were logged out at the location of the source book (dimension unchanged), or (happened once) at the proper location at the destination). No deaths, no fatal failure. Not that it didn't fail, but it was fail-safe -- you were safe when a failure happened. Not true with nether portals.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
This bug, while technically fixed in the newer version of Minecraft, still is "broken" as of Minecraft version 1.6.1. My suggestion of introducing a parameter into the game has been partially implemented by Jeb & Dinnerbone, but unfortunately it is still a hard coded constant in another class and not yet something read by the configuration file or anything else similar. It is for this reason I'm updating this "mod" for people using extreme survival maps.
== Introduction ==
I've encountered a bug in Minecraft 1.3.x that doesn't seem to be fixed in 1.3.2, and while I've reported the bug on the MC Wiki and have gone out of my way to publicize the bug, I have doubts it will be fixed any time soon or at least not before the 1.4 branch, if even then. My hope would be that this mod would be completely shut down by Dinnerbone or somebody else in the Mojang dev team by simply fixing this bug.
What is happening is that when players spawn in a new world, including when they die or appear in the world for the first time, the terrain generator first of all tries to determine a suitable location for players to spawn. After that happens, on servers the spawn location is "fuzzed up" to randomize the location a little bit so players don't all bunch up together at the same location. For a great many servers, this is even acceptable behavior as the spawn location is a nice flat location in the middle of a "public square" and expected.
This is a new behavior for people used to single player maps though, so it really turns into a bug. It becomes a very serious bug for people who are using extreme survival island maps, especially things like the very popular SkyBlock map by Noobcrew and numerous related maps which have a very tiny initial spawn area surrounded by "dangerous" areas. At times you need to respawn as many as 20-30 times before you can finally land on some "solid" ground with some of those maps. I think that is more than just frustrating, so I created this mod to help those people who use those kind of maps.
There is also a sinister bug that impacts almost everybody else though, and it is something that should have been caught a while back. See down in the technical details below for further information.
== Installation ==
There is only one class that you need to install, but that needs to be put into your "minecraft.jar" file. If you have installed other mods this should be something of an old hat. Please consult other threads about how to install mods if you can't figure it out. I'm throwing the class file into a zip file strictly for consistency with other mod installation guides.
FallFix for 1.6.2: http://adf.ly/RiCKG
Earlier versions:
Fall Fix for 1.6.1: http://adf.ly/RgCzx
FallFix for 1.5.2: http://adf.ly/RgCbi
FallFix for 1.3.2: http://dl.dropbox.co...llFix_1_3_2.zip
FallFix for 1.3.1: http://dl.dropbox.co...llFix_1_3_1.zip
The only mods this may cause some incompatibility with are those which modify this class. To the best of my knowledge, neither ModLoader nor Forge should have problems with this class changing and should be compatible with almost all mods which use those libraries. If there is a mod conflict, please make a comment and let me know what problems are encountered.
Remember, if you haven't already done this for other mods, please remove the "META-INF" folder in the "minecraft.jar" file... otherwise the game will crash and become unplayable. This folder must be either recalculated (which is done by some installation programs) or removed for almost any mod to Minecraft, and this mod is no different.
== Obligatory Picture ==
This really doesn't change anything visually in the game, in fact it just removes code from the game. None the less, to keep trolls from commenting on this thread and to oblige by forum rules, here is the pic of a world using this mod:
== Technical Details ==
The problem that happens here is with the constructor for the "EntityPlayerMP" class in Minecraft (obfuscated as gt for version 1.3.1 and gu for 1.3.2). The sourcecode can be seen as follows:
The Deobfuscated code (thanks to the guys making the Minecraft Coder Pack [MCP]):
The real kicker is the "fuzz" area in the middle of this constructor:
Note that the world terrain generators have already selected a spawn location that is appropriate for the world map which has been generated, or perhaps somebody set the spawn location with MCEdit on a custom map made with that tool. Minecraft is saying essentially that it knows better where players should be spawning and moves the location around again.
Also, look at that code again. Note that the y position is being changed based upon the x & z position on the map, and then the z position is set again. Special thanks needs to be given to KeyBounce pointing this bug out on the MC Wiki. Even if you aren't concerned about some silly map maker like Noobcrew, this still will cause harm to many players causing them to be killed by spawning inside of a hillside or inside of a tree if the land is sloped along the z-axis. Basically it would cause some players to immediately die with a hardcore version of the map or world and be locked out of the world without doing a single thing.
If I was involved with the Mojang dev team, I'd likely make this change:
where the "spawnFuzz" field would be something read from a configuration file and set by default to 10 with server installations and set to 0 for "single player" clients. Instead, with this "mod", I just culled the code completely but I'll admit there is a legitimate reason for having this in the game... just that it should be something more under the control of server operators or a player on single player worlds.
== From about 1.5.x onward ==
There have been some changes that more or less updated the issue. The code inside of the above routine mentioned has been changed to the following:
This "protection size" argument comes from the "server" configuration.... which is exactly what it should be doing. All is well with how this should be working except that the "protection size" parameter is a bit interesting and has the following code in the MinecraftServer class:
So close.... yet not quite done. I would definitely consider this to be a bug or at least an unimplemented feature by having a "magic number" constant. I have to assume Mojang plans on either reading this constant from a configuration file or from the argument strings as something settable by server operators or players.
== Disclaimer ==
Disclaimer: This mod require altering minecraft.jar, and SMP or other aspects of Minecraft may or may not work with this mod installed. This mod may add new content. Do not load worlds with this new content if the respective mod is not installed. I am not responsible for any damage done to your computer, worlds, network, time lost and lowered productivity, or your copy of Minecraft. That said, backup your worlds and bin folder, but that is just friendly advise!
== Copyright ==
Copyright © 2012, Robert Horning (aka "King Korihor"). This game modification is hereby placed into the public domain, and if for some reason that isn't sufficient for legal purposes, license is hereby granted for anybody to reuse this mod according to the terms of the Creative Commons CC0 1.0 Universal License, country of original publication is the United States of America. Be aware that this mod contains substantial content copyrighted by Mojang AB of Sweden, which has not been waived by the use of this mod as I have no license or authority to make such a claim. Use according to the terms of service agreement to your legally purchased copy of Minecraft and is only intended to be a way to modify the game in the specific manner explained in this document.
Version 2.1 now updated for MC 1.6.2
EDIT: FIRST ES!!
Say hi to 682 for me.
You should match the same version of Minecraft as the version number.
Keep in mind that this isn't like a ModLoader mod, as you don't put it in a mod folder or anything like that. You need to put the class file into the "minecraft.jar" file.
Version 2.1 now updated for MC 1.6.2
You need to find the ".minecraft" file and then look in the "bin" folder. You should see a file called "minecraft.jar". Where it is located at depends on the operating system you are using and other factors.
Since Java uses the same file format for "jar" files as the "zip" compression algorithm uses, you can use any sort of archiving software (like 7-zip or something similar) to open up that "jar" file and add or remove files... almost like you would do with your file manager.
In fact, both Windows (as of Windows XP and later) and Linux (check the version... but it has been in there for several years) can do this by default simply using the ordinary file explorer. That is a bit tricky, so I wouldn't do that unless you are pretty skilled with using computers as you need to rename the extension and change it back. Other archive managers will often just let you change the contents of a jar file directly.
You can also try to download some Minecraft mod installation programs that can help you out. I'd suggest looking around the forums for several suggestions if you want to go that route. I don't use them myself, so you need to get a suggestion on which one is better from somebody else.
Version 2.1 now updated for MC 1.6.2
Are you using any other mods? You also need to make sure you are using the correct version of this mod for the correct version of Minecraft.
Version 2.1 now updated for MC 1.6.2
any advice?
i put the gu.class file in minecraft.jar, ensuring that the old file is replaced. seems like a straight forward procedure. my game says 1.32, i'm using 1.32.
here's the report:
http://pastebin.com/VhnUSwMn
As a quick and dirty fix, you can try the version on my WorldGen API: http://adf.ly/BzzND
The code should be the same as what I provided in the download link above, but bundled with other classes. You can ignore the other classes in that zip file unless you want to install my other mod. At the very least it is something to try.
I should also mention that you need to delete the "META-INF" directory in your minecraft.jar file. The point of that file in jar files is to perform a "checksum" to verify that 3rd party applications aren't fiddling with the jar files. Unfortunately if you are modifying Minecraft, you are changing the classes, so the checksums don't work. In fact, I'd suggest that is likely the problem you are having here if you claim you are using the correct version of Minecraft.
Version 2.1 now updated for MC 1.6.2
If you can provide a link to other API libraries that use the gu.class (aka EntityPlayerMP class), I would like to talk with those developers and at least encourage them to make this change to their libraries as well, or at least consider making the same change so they can be compatible with this fix.
As a side note, for those people who have been experiencing problems with travel through Nether portals, I think this current version (as of today, September 23, 2012) should solve the problem. I'm keeping the same link on the original post, but it should pull up an updated version of the class file that you can install in the minecraft.jar file. If you are having other problems, please let me know.
Some older versions of this class did cause problems with enchantment tables and other features. That should be fixed as well, but if you are getting the file from anywhere but the above link you are likely getting an older version that definitely has bugs.
Version 2.1 now updated for MC 1.6.2
HELP MOI!
Woot! Major Woot! for nether portals! Believe it or not, I've got mystcraft linking books up at each of my nether portals just because the linking books are fail-safe while nether portals are fail-fail.
So what else had to be changed for nether portals/enchantment tables/etc?
Seriously, when a nether portal (old) failed, it would put you in the new dimension at the old co-ordinates. Not only are you 8 times as far from origin as you expected, but in the nether that likely means over lava. Or, going the other way into the overworld, you're near origin -- which in our world is in the middle of the ocean, and for one portal, in the middle of an underwater cave system that I only found because of this bug.
If a mystcraft linking book failed, you either were logged out at the location of the source book (dimension unchanged), or (happened once) at the proper location at the destination). No deaths, no fatal failure. Not that it didn't fail, but it was fail-safe -- you were safe when a failure happened. Not true with nether portals.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?