-
Bug
-
Resolution: Fixed
-
Minecraft 1.7.4, Minecraft 1.7.5, Minecraft 1.7.9, Minecraft 14w21b, Minecraft 14w25b, Minecraft 1.7.10, Minecraft 14w28b, Minecraft 14w29a, Minecraft 14w29b, Minecraft 14w30a, Minecraft 14w30b, Minecraft 14w33c
-
None
-
Ubuntu 13.04 64-bit
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
-
Confirmed
Minecraft crashes when populating a chunk which has empty columns ("void columns"), i.e. colums with just air blocks, no bedrock, such as can for instance be generated by creating a Superflat world with preset
2;0;1;decoration
I have attached the crash report. I don't have access to the Minecraft source code, but using the Minecraft Coder Pack for Minecraft 1.7.2 I've traced it to the following code in BiomeDecorator.java (method func_150513_a(BiomeGenBase), lines 160-166):
for(var3 = 0; var3 < this.grassPerChunk; ++var3) { var4 = this.chunk_X + this.randomGenerator.nextInt(16) + 8; var5 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; var6 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(var4, var5) * 2); WorldGenerator var10 = p_150513_1_.getRandomWorldGenForGrass(this.randomGenerator); var10.generate(this.currentWorld, this.randomGenerator, var4, var6, var5); }
It takes the height at a particular x,z coordinate and feeds the result (times two) to Random.nextInt(int). Unfortunately that method throws an exception when passed a value of zero.
One way to fix this would be to change those lines to something like:
for(var3 = 0; var3 < this.grassPerChunk; ++var3) { var4 = this.chunk_X + this.randomGenerator.nextInt(16) + 8; var5 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; int height = this.currentWorld.getHeightValue(var4, var5); if (height > 0) { var6 = this.randomGenerator.nextInt(height * 2); WorldGenerator var10 = p_150513_1_.getRandomWorldGenForGrass(this.randomGenerator); var10.generate(this.currentWorld, this.randomGenerator, var4, var6, var5); } }
The same would have to be done for the other loops in that method.
- is duplicated by
-
MC-52015 Game Crashes When Loading Adventure Map
- Resolved
-
MC-54341 Crashing from chunk pop.
- Resolved
-
MC-55761 Can't load world
- Resolved
-
MC-56829 Random crash at spawn chunks
- Resolved
-
MC-58667 Server constantly crashing when specific user joins
- Resolved
-
MC-63622 More and More Crashes
- Resolved
-
MC-64629 Crash For No Reason
- Resolved
-
MC-67543 Exception Ticking World
- Resolved
-
MC-69285 "n must be positive"
- Resolved
-
MC-69472 Can't open any SP world
- Resolved
- relates to
-
MC-80036 Crash when generating world with certain custom preset
- Resolved