Class WorldProvider

    • Field Detail

      • moonPhaseFactors

        public static final float[] moonPhaseFactors
      • worldObj

        protected World worldObj
      • isHellWorld

        protected boolean isHellWorld
      • hasNoSky

        protected boolean hasNoSky
      • lightBrightnessTable

        protected final float[] lightBrightnessTable
        + Light to brightness conversion table
      • dimensionId

        protected int dimensionId
    • Constructor Detail

      • WorldProvider

        public WorldProvider()
    • Method Detail

      • registerWorld

        public final void registerWorld​(World worldIn)
        + associate an existing world with a World provider, and setup its lightbrightness table
      • generateLightBrightnessTable

        protected void generateLightBrightnessTable()
        + Creates the light to brightness table
      • registerWorldChunkManager

        protected void registerWorldChunkManager()
        + creates a new world chunk manager for WorldProvider
      • canCoordinateBeSpawn

        public boolean canCoordinateBeSpawn​(int x,
                                            int z)
        + Will check if the x, z position specified is alright to be set as the map spawn point
      • calculateCelestialAngle

        public float calculateCelestialAngle​(long parLong1,
                                             float parFloat1)
        + Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime)
      • getMoonPhase

        public int getMoonPhase​(long parLong1)
      • isSurfaceWorld

        public boolean isSurfaceWorld()
        + Returns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions.
      • calcSunriseSunsetColors

        public float[] calcSunriseSunsetColors​(float celestialAngle,
                                               float partialTicks)
        + Returns array with sunrise/sunset colors
      • getFogColor

        public Vec3 getFogColor​(float parFloat1,
                                float parFloat2)
        + Return Vec3D with biome specific fog color
      • canRespawnHere

        public boolean canRespawnHere()
        + True if the player can respawn in this dimension (true = overworld, false = nether).
      • getProviderForDimension

        public static WorldProvider getProviderForDimension​(int dimension)
      • getCloudHeight

        public float getCloudHeight()
        + the y level at which clouds are rendered.
      • isSkyColored

        public boolean isSkyColored()
      • getSpawnCoordinate

        public BlockPos getSpawnCoordinate()
      • getAverageGroundLevel

        public int getAverageGroundLevel()
      • getVoidFogYFactor

        public double getVoidFogYFactor()
        + Returns a double value representing the Y value relative to the top of the map at which void fog is at its maximum. The default factor of 0.03125 relative to 256, for example, means the void fog will be at its maximum at (256*0.03125), or 8.
      • doesXZShowFog

        public boolean doesXZShowFog​(int x,
                                     int z)
        + Returns true if the given X,Z coordinate should show environmental fog.
      • getDimensionName

        public abstract java.lang.String getDimensionName()
      • getInternalNameSuffix

        public abstract java.lang.String getInternalNameSuffix()
      • doesWaterVaporize

        public boolean doesWaterVaporize()
      • getHasNoSky

        public boolean getHasNoSky()
      • getLightBrightnessTable

        public float[] getLightBrightnessTable()
      • getDimensionId

        public int getDimensionId()
        + Gets the dimension of the provider