001 package net.minecraft.src; 002 003 import cpw.mods.fml.common.Side; 004 import cpw.mods.fml.common.asm.SideOnly; 005 006 public class WorldProviderHell extends WorldProvider 007 { 008 /** 009 * creates a new world chunk manager for WorldProvider 010 */ 011 public void registerWorldChunkManager() 012 { 013 this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.hell, 1.0F, 0.0F); 014 this.isHellWorld = true; 015 this.hasNoSky = true; 016 this.dimensionId = -1; 017 } 018 019 @SideOnly(Side.CLIENT) 020 021 /** 022 * Return Vec3D with biome specific fog color 023 */ 024 public Vec3 getFogColor(float par1, float par2) 025 { 026 return Vec3.getVec3Pool().getVecFromPool(0.20000000298023224D, 0.029999999329447746D, 0.029999999329447746D); 027 } 028 029 /** 030 * Creates the light to brightness table 031 */ 032 protected void generateLightBrightnessTable() 033 { 034 float var1 = 0.1F; 035 036 for (int var2 = 0; var2 <= 15; ++var2) 037 { 038 float var3 = 1.0F - (float)var2 / 15.0F; 039 this.lightBrightnessTable[var2] = (1.0F - var3) / (var3 * 3.0F + 1.0F) * (1.0F - var1) + var1; 040 } 041 } 042 043 /** 044 * Returns the chunk provider back for the world provider 045 */ 046 public IChunkProvider getChunkProvider() 047 { 048 return new ChunkProviderHell(this.worldObj, this.worldObj.getSeed()); 049 } 050 051 /** 052 * Returns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions. 053 */ 054 public boolean isSurfaceWorld() 055 { 056 return false; 057 } 058 059 /** 060 * Will check if the x, z position specified is alright to be set as the map spawn point 061 */ 062 public boolean canCoordinateBeSpawn(int par1, int par2) 063 { 064 return false; 065 } 066 067 /** 068 * Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime) 069 */ 070 public float calculateCelestialAngle(long par1, float par3) 071 { 072 return 0.5F; 073 } 074 075 /** 076 * True if the player can respawn in this dimension (true = overworld, false = nether). 077 */ 078 public boolean canRespawnHere() 079 { 080 return false; 081 } 082 083 @SideOnly(Side.CLIENT) 084 085 /** 086 * Returns true if the given X,Z coordinate should show environmental fog. 087 */ 088 public boolean doesXZShowFog(int par1, int par2) 089 { 090 return true; 091 } 092 093 /** 094 * Returns the dimension's name, e.g. "The End", "Nether", or "Overworld". 095 */ 096 public String getDimensionName() 097 { 098 return "Nether"; 099 } 100 }