--- ../src-base/minecraft/net/minecraft/world/WorldType.java +++ ../src-work/minecraft/net/minecraft/world/WorldType.java @@ -113,4 +114,145 @@ this.field_151361_l = true; return this; } + + public int getMinimumSpawnHeight(World world) + { + return this == field_77138_c ? 4 : world.func_181545_F() + 1; + } + + public double voidFadeMagnitude() + { + return this == field_77138_c ? 1.0D : 0.03125D; + } + + /*=================================================== FORGE START ======================================*/ + + /** + * Gets the spawn fuzz for players who join the world. + * Useful for void world types. + * @return Fuzz for entity initial spawn in blocks. + */ + public int getSpawnFuzz(WorldServer world, net.minecraft.server.MinecraftServer server) + { + return Math.max(0, server.func_184108_a(world)); + } + + /** + * Creates the GenLayerBiome used for generating the world with the specified ChunkProviderSettings JSON String + * *IF AND ONLY IF* this WorldType == WorldType.CUSTOMIZED. + * + * + * @param worldSeed The world seed + * @param parentLayer The parent layer to feed into any layer you return + * @param chunkSettings The ChunkGeneratorSettings constructed from the custom JSON + * @return A GenLayer that will return ints representing the Biomes to be generated, see GenLayerBiome + */ + public net.minecraft.world.gen.layer.GenLayer getBiomeLayer(long worldSeed, net.minecraft.world.gen.layer.GenLayer parentLayer, net.minecraft.world.gen.ChunkGeneratorSettings chunkSettings) + { + net.minecraft.world.gen.layer.GenLayer ret = new net.minecraft.world.gen.layer.GenLayerBiome(200L, parentLayer, this, chunkSettings); + ret = net.minecraft.world.gen.layer.GenLayerZoom.func_75915_a(1000L, ret, 2); + ret = new net.minecraft.world.gen.layer.GenLayerBiomeEdge(1000L, ret); + return ret; + } }