<commit_before>--- ../src_base/common/net/minecraft/src/WorldProvider.java
+++ ../src_work/common/net/minecraft/src/WorldProvider.java
@@ -1,5 +1,7 @@
 package net.minecraft.src;
 
+import net.minecraftforge.client.SkyProvider;
+import net.minecraftforge.common.DimensionManager;
 import cpw.mods.fml.common.Side;
 import cpw.mods.fml.common.asm.SideOnly;
 
@@ -30,6 +32,8 @@
 
     /** Array for sunrise/sunset colors (RGBA) */
     private float[] colorsSunriseSunset = new float[4];
+
+    private SkyProvider skyProvider = null;
 
     /**
      * associate an existing world with a World provider, and setup its lightbrightness table
@@ -185,7 +189,7 @@
 
     public static WorldProvider getProviderForDimension(int par0)
     {
-        return (WorldProvider)(par0 == -1 ? new WorldProviderHell() : (par0 == 0 ? new WorldProviderSurface() : (par0 == 1 ? new WorldProviderEnd() : null)));
+        return DimensionManager.createProviderFor(par0);
     }
 
     @SideOnly(Side.CLIENT)
@@ -254,4 +258,241 @@
      * Returns the dimension's name, e.g. "The End", "Nether", or "Overworld".
      */
     public abstract String getDimensionName();
+    
+
+    /*======================================= Forge Start =========================================*/
+
+    /**
+     * Sets the providers current dimension ID, used in default getSaveFolder()
+     * Added to allow default providers to be registered for multiple dimensions.
+     * 
+     * @param dim Dimension ID
+     */
+    public void setDimension(int dim)
+    {
+        this.dimensionId = dim;
+    }
+
+    /**
+     * Returns the sub-folder of the world folder that this WorldProvider saves to.
+     * EXA: DIM1, DIM-1
+     * @return The sub-folder name to save this world's chunks to.
+     */
+    public String getSaveFolder()
+    {
+        return (dimensionId == 0 ? null : "DIM" + dimensionId);
+    }
+
+    /**
+     * A message to display to the user when they transfer to this dimension.
+     *
+     * @return The message to be displayed
+     */
+    public String getWelcomeMessage()
+    {
+        if (this instanceof WorldProviderEnd)
+        {
+            return "Entering the End";
+        }
+        else if (this instanceof WorldProviderHell)
+        {
+            return "Entering the Nether";
+        }
+        return null;
+    }
+
+    /**
+     * A Message to display to the user when they transfer out of this dismension.
+     *
+     * @return The message to be displayed
+     */
+    public String getDepartMessage()
+    {
+        if (this instanceof WorldProviderEnd)
+        {
+            return "Leaving the End";
+        }
+        else if (this instanceof WorldProviderHell)
+        {
+            return "Leaving the Nether";
+        } 
+        return null;
+    }
+
+    /**
+     * The dimensions movement factor. Relative to normal overworld.
+     * It is applied to the players position when they transfer dimensions.
+     * Exa: Nether movement is 8.0
+     * @return The movement factor
+     */
+    public double getMovementFactor()
+    {
+        if (this instanceof WorldProviderHell)
+        {
+            return 8.0;
+        }
+        return 1.0;
+    }
+
+    @SideOnly(Side.CLIENT)
+    public SkyProvider getSkyProvider()
+    {
+        return this.skyProvider;
+    }
+
+    @SideOnly(Side.CLIENT)
+    public void setSkyProvider(SkyProvider skyProvider)
+    {
+        this.skyProvider = skyProvider;
+    }
+
+    public ChunkCoordinates getRandomizedSpawnPoint()
+    {
+        ChunkCoordinates var5 = new ChunkCoordinates(this.worldObj.getSpawnPoint());
+
+        boolean isAdventure = worldObj.getWorldInfo().getGameType() != EnumGameType.ADVENTURE;
+        int spawnFuzz = terrainType.getSpawnFuzz();
+        int spawnFuzzHalf = spawnFuzz / 2;
+
+        if (!this.hasNoSky && !isAdventure)
+        {
+            var5.posX += this.worldObj.rand.nextInt(spawnFuzz) - spawnFuzzHalf;
+            var5.posZ += this.worldObj.rand.nextInt(spawnFuzz) - spawnFuzzHalf;
+            var5.posY = this.worldObj.getTopSolidOrLiquidBlock(var5.posX, var5.posZ);
+        }
+
+        return var5;
+    }
+    
+
+    /*======================================= Start Moved From World =========================================*/
+
+    public BiomeGenBase getBiomeGenForCoords(int x, int z)
+    {
+        return worldObj.getBiomeGenForCoordsBody(x, z);
+    }
+
+    public boolean isDaytime()
+    {
+        return worldObj.skylightSubtracted < 4;
+    }
+
+    @SideOnly(Side.CLIENT)
+    public Vec3 getSkyColor(Entity cameraEntity, float partialTicks)
+    {
+        return worldObj.getSkyColorBody(cameraEntity, partialTicks);
+    }
+
+    @SideOnly(Side.CLIENT)
+    public Vec3 drawClouds(float partialTicks)
+    {
+        return worldObj.drawCloudsBody(partialTicks);
+    }
+
+    @SideOnly(Side.CLIENT)
+    public float getStarBrightness(float par1)
+    {
+        return worldObj.getStarBrightnessBody(par1);
+    }
+
+    public void setAllowedSpawnTypes(boolean allowHostile, boolean allowPeaceful)
+    {
+        worldObj.spawnHostileMobs = allowHostile;
+        worldObj.spawnPeacefulMobs = allowPeaceful;
+    }
+
+    public void calculateInitialWeather()
+    {
+        worldObj.calculateInitialWeatherBody();
+    }
+
+    public void updateWeather()
+    {
+        worldObj.updateWeatherBody();
+    }
+
+    public void toggleRain()
+    {
+        worldObj.worldInfo.setRainTime(1);
+    }
+
+    public boolean canBlockFreeze(int x, int y, int z, boolean byWater)
+    {
+        return worldObj.canBlockFreezeBody(x, y, z, byWater);
+    }
+
+    public boolean canSnowAt(int x, int y, int z)
+    {
+        return worldObj.canSnowAtBody(x, y, z);
+    }
+
+    public void setWorldTime(long time)
+    {
+        worldObj.worldInfo.setWorldTime(time);
+    }
+
+    public long getSeed()
+    {
+        return worldObj.worldInfo.getSeed();
+    }
+
+    public long getWorldTime()
+    {
+        return worldObj.worldInfo.getWorldTime();
+    }
+
+    public ChunkCoordinates getSpawnPoint()
+    {
+        WorldInfo info = worldObj.worldInfo;
+        return new ChunkCoordinates(info.getSpawnX(), info.getSpawnY(), info.getSpawnZ());
+    }
+
+    public void setSpawnPoint(int x, int y, int z)
+    {
+        worldObj.worldInfo.setSpawnPosition(x, y, z);
+    }
+
+    public boolean canMineBlock(EntityPlayer player, int x, int y, int z)
+    {
+        return worldObj.canMineBlockBody(player, x, y, z);
+    }
+
+    public boolean isBlockHighHumidity(int x, int y, int z)
+    {
+        return worldObj.getBiomeGenForCoords(x, z).isHighHumidity();
+    }
+
+    public int getHeight()
+    {
+        return 256;
+    }
+
+    public int getActualHeight()
+    {
+        return hasNoSky ? 128 : 256;
+    }
+
+    public double getHorizon()
+    {
+        return worldObj.worldInfo.getTerrainType().getHorizon(worldObj);
+    }
+
+    public void resetRainAndThunder()
+    {
+        worldObj.worldInfo.setRainTime(0);
+        worldObj.worldInfo.setRaining(false);
+        worldObj.worldInfo.setThunderTime(0);
+        worldObj.worldInfo.setThundering(false);
+    }
+    
+    public boolean canDoLightning(Chunk chunk)
+    {
+        return true;
+    }
+    
+    public boolean canDoRainSnowIce(Chunk chunk)
+    {
+        return true;
+    }
 }
<commit_msg>Fix patch errors in merge of last PR -.-<commit_after>--- ../src_base/common/net/minecraft/src/WorldProvider.java
+++ ../src_work/common/net/minecraft/src/WorldProvider.java
@@ -1,5 +1,7 @@
 package net.minecraft.src;
 
+import net.minecraftforge.client.SkyProvider;
+import net.minecraftforge.common.DimensionManager;
 import cpw.mods.fml.common.Side;
 import cpw.mods.fml.common.asm.SideOnly;
 
@@ -185,7 +187,7 @@
 
     public static WorldProvider getProviderForDimension(int par0)
     {
-        return (WorldProvider)(par0 == -1 ? new WorldProviderHell() : (par0 == 0 ? new WorldProviderSurface() : (par0 == 1 ? new WorldProviderEnd() : null)));
+        return DimensionManager.createProviderFor(par0);
     }
 
     @SideOnly(Side.CLIENT)
@@ -254,4 +256,238 @@
      * Returns the dimension's name, e.g. "The End", "Nether", or "Overworld".
      */
     public abstract String getDimensionName();
+
+    /*======================================= Forge Start =========================================*/
+    private SkyProvider skyProvider = null;
+    /**
+     * Sets the providers current dimension ID, used in default getSaveFolder()
+     * Added to allow default providers to be registered for multiple dimensions.
+     * 
+     * @param dim Dimension ID
+     */
+    public void setDimension(int dim)
+    {
+        this.dimensionId = dim;
+    }
+
+    /**
+     * Returns the sub-folder of the world folder that this WorldProvider saves to.
+     * EXA: DIM1, DIM-1
+     * @return The sub-folder name to save this world's chunks to.
+     */
+    public String getSaveFolder()
+    {
+        return (dimensionId == 0 ? null : "DIM" + dimensionId);
+    }
+
+    /**
+     * A message to display to the user when they transfer to this dimension.
+     *
+     * @return The message to be displayed
+     */
+    public String getWelcomeMessage()
+    {
+        if (this instanceof WorldProviderEnd)
+        {
+            return "Entering the End";
+        }
+        else if (this instanceof WorldProviderHell)
+        {
+            return "Entering the Nether";
+        }
+        return null;
+    }
+
+    /**
+     * A Message to display to the user when they transfer out of this dismension.
+     *
+     * @return The message to be displayed
+     */
+    public String getDepartMessage()
+    {
+        if (this instanceof WorldProviderEnd)
+        {
+            return "Leaving the End";
+        }
+        else if (this instanceof WorldProviderHell)
+        {
+            return "Leaving the Nether";
+        } 
+        return null;
+    }
+
+    /**
+     * The dimensions movement factor. Relative to normal overworld.
+     * It is applied to the players position when they transfer dimensions.
+     * Exa: Nether movement is 8.0
+     * @return The movement factor
+     */
+    public double getMovementFactor()
+    {
+        if (this instanceof WorldProviderHell)
+        {
+            return 8.0;
+        }
+        return 1.0;
+    }
+
+    @SideOnly(Side.CLIENT)
+    public SkyProvider getSkyProvider()
+    {
+        return this.skyProvider;
+    }
+
+    @SideOnly(Side.CLIENT)
+    public void setSkyProvider(SkyProvider skyProvider)
+    {
+        this.skyProvider = skyProvider;
+    }
+
+    public ChunkCoordinates getRandomizedSpawnPoint()
+    {
+        ChunkCoordinates var5 = new ChunkCoordinates(this.worldObj.getSpawnPoint());
+
+        boolean isAdventure = worldObj.getWorldInfo().getGameType() != EnumGameType.ADVENTURE;
+        int spawnFuzz = terrainType.getSpawnFuzz();
+        int spawnFuzzHalf = spawnFuzz / 2;
+
+        if (!this.hasNoSky && !isAdventure)
+        {
+            var5.posX += this.worldObj.rand.nextInt(spawnFuzz) - spawnFuzzHalf;
+            var5.posZ += this.worldObj.rand.nextInt(spawnFuzz) - spawnFuzzHalf;
+            var5.posY = this.worldObj.getTopSolidOrLiquidBlock(var5.posX, var5.posZ);
+        }
+
+        return var5;
+    }
+
+    /*======================================= Start Moved From World =========================================*/
+
+    public BiomeGenBase getBiomeGenForCoords(int x, int z)
+    {
+        return worldObj.getBiomeGenForCoordsBody(x, z);
+    }
+
+    public boolean isDaytime()
+    {
+        return worldObj.skylightSubtracted < 4;
+    }
+
+    @SideOnly(Side.CLIENT)
+    public Vec3 getSkyColor(Entity cameraEntity, float partialTicks)
+    {
+        return worldObj.getSkyColorBody(cameraEntity, partialTicks);
+    }
+
+    @SideOnly(Side.CLIENT)
+    public Vec3 drawClouds(float partialTicks)
+    {
+        return worldObj.drawCloudsBody(partialTicks);
+    }
+
+    @SideOnly(Side.CLIENT)
+    public float getStarBrightness(float par1)
+    {
+        return worldObj.getStarBrightnessBody(par1);
+    }
+
+    public void setAllowedSpawnTypes(boolean allowHostile, boolean allowPeaceful)
+    {
+        worldObj.spawnHostileMobs = allowHostile;
+        worldObj.spawnPeacefulMobs = allowPeaceful;
+    }
+
+    public void calculateInitialWeather()
+    {
+        worldObj.calculateInitialWeatherBody();
+    }
+
+    public void updateWeather()
+    {
+        worldObj.updateWeatherBody();
+    }
+
+    public void toggleRain()
+    {
+        worldObj.worldInfo.setRainTime(1);
+    }
+
+    public boolean canBlockFreeze(int x, int y, int z, boolean byWater)
+    {
+        return worldObj.canBlockFreezeBody(x, y, z, byWater);
+    }
+
+    public boolean canSnowAt(int x, int y, int z)
+    {
+        return worldObj.canSnowAtBody(x, y, z);
+    }
+
+    public void setWorldTime(long time)
+    {
+        worldObj.worldInfo.setWorldTime(time);
+    }
+
+    public long getSeed()
+    {
+        return worldObj.worldInfo.getSeed();
+    }
+
+    public long getWorldTime()
+    {
+        return worldObj.worldInfo.getWorldTime();
+    }
+
+    public ChunkCoordinates getSpawnPoint()
+    {
+        WorldInfo info = worldObj.worldInfo;
+        return new ChunkCoordinates(info.getSpawnX(), info.getSpawnY(), info.getSpawnZ());
+    }
+
+    public void setSpawnPoint(int x, int y, int z)
+    {
+        worldObj.worldInfo.setSpawnPosition(x, y, z);
+    }
+
+    public boolean canMineBlock(EntityPlayer player, int x, int y, int z)
+    {
+        return worldObj.canMineBlockBody(player, x, y, z);
+    }
+
+    public boolean isBlockHighHumidity(int x, int y, int z)
+    {
+        return worldObj.getBiomeGenForCoords(x, z).isHighHumidity();
+    }
+
+    public int getHeight()
+    {
+        return 256;
+    }
+
+    public int getActualHeight()
+    {
+        return hasNoSky ? 128 : 256;
+    }
+
+    public double getHorizon()
+    {
+        return worldObj.worldInfo.getTerrainType().getHorizon(worldObj);
+    }
+
+    public void resetRainAndThunder()
+    {
+        worldObj.worldInfo.setRainTime(0);
+        worldObj.worldInfo.setRaining(false);
+        worldObj.worldInfo.setThunderTime(0);
+        worldObj.worldInfo.setThundering(false);
+    }
+    
+    public boolean canDoLightning(Chunk chunk)
+    {
+        return true;
+    }
+    
+    public boolean canDoRainSnowIce(Chunk chunk)
+    {
+        return true;
+    }
 }

{'fraction_non_alphanumeric': 0.14481570788839132, 'fraction_numerical': 0.009300723389596968, 'mean_word_length': 2.537037037037037, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4261445', 'n_tokens_mistral': 4851, 'n_tokens_neox': 4726, 'n_words': 1001}