2013-05-18 15:06:30 +00:00
|
|
|
package biomesoplenty.world;
|
|
|
|
|
|
|
|
import net.minecraft.util.Vec3;
|
|
|
|
import net.minecraft.world.WorldProvider;
|
|
|
|
import net.minecraft.world.chunk.IChunkProvider;
|
2013-05-29 01:05:27 +00:00
|
|
|
import biomesoplenty.api.Biomes;
|
2013-05-18 15:06:30 +00:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
public class WorldProviderBOPhell extends WorldProvider
|
|
|
|
{
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
public void registerWorldChunkManager()
|
|
|
|
{
|
2013-05-23 20:22:58 +00:00
|
|
|
if (Biomes.netherGarden.isPresent() || Biomes.netherDesert.isPresent() || Biomes.netherLava.isPresent() || Biomes.netherBone.isPresent())
|
2013-05-18 15:06:30 +00:00
|
|
|
{
|
2013-05-31 10:34:02 +00:00
|
|
|
worldChunkMgr = new WorldChunkManagerBOPhell(worldObj);
|
2013-05-18 15:06:30 +00:00
|
|
|
}
|
2013-05-31 10:34:02 +00:00
|
|
|
isHellWorld = true;
|
|
|
|
hasNoSky = true;
|
|
|
|
dimensionId = -1;
|
|
|
|
}
|
2013-05-18 15:06:30 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
public Vec3 getFogColor(float par1, float par2)
|
|
|
|
{
|
|
|
|
return worldObj.getWorldVec3Pool().getVecFromPool(0.20000000298023224D, 0.029999999329447746D, 0.029999999329447746D);
|
|
|
|
}
|
2013-05-18 15:06:30 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
protected void generateLightBrightnessTable()
|
|
|
|
{
|
|
|
|
float f = 0.1F;
|
2013-05-18 15:06:30 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
for (int i = 0; i <= 15; ++i)
|
|
|
|
{
|
|
|
|
float f1 = 1.0F - i / 15.0F;
|
|
|
|
lightBrightnessTable[i] = (1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isSurfaceWorld()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2013-05-18 15:06:30 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
public boolean canCoordinateBeSpawn(int par1, int par2)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2013-05-18 15:06:30 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
public float calculateCelestialAngle(long par1, float par3)
|
|
|
|
{
|
|
|
|
return 0.5F;
|
|
|
|
}
|
2013-05-18 15:06:30 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
public boolean canRespawnHere()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2013-05-18 15:06:30 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
public boolean doesXZShowFog(int par1, int par2)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2013-05-18 15:06:30 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
public String getDimensionName()
|
|
|
|
{
|
|
|
|
return "Nether";
|
|
|
|
}
|
2013-05-18 15:06:30 +00:00
|
|
|
|
2013-05-18 16:12:18 +00:00
|
|
|
@Override
|
|
|
|
public IChunkProvider createChunkGenerator()
|
|
|
|
{
|
2013-05-31 10:34:02 +00:00
|
|
|
return new ChunkProviderBOPhell(worldObj, worldObj.getSeed());
|
2013-05-18 16:12:18 +00:00
|
|
|
}
|
2013-05-18 15:06:30 +00:00
|
|
|
}
|