public abstract class WorldProvider
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected BiomeProvider |
biomeProvider |
protected boolean |
hasNoSky |
protected boolean |
isHellWorld |
protected float[] |
lightBrightnessTable |
static float[] |
MOON_PHASE_FACTORS |
protected World |
worldObj |
Constructor and Description |
---|
WorldProvider() |
Modifier and Type | Method and Description |
---|---|
float[] |
calcSunriseSunsetColors(float celestialAngle,
float partialTicks) |
float |
calculateCelestialAngle(long worldTime,
float partialTicks) |
void |
calculateInitialWeather() |
boolean |
canBlockFreeze(BlockPos pos,
boolean byWater) |
boolean |
canCoordinateBeSpawn(int x,
int z) |
boolean |
canDoLightning(Chunk chunk) |
boolean |
canDoRainSnowIce(Chunk chunk) |
boolean |
canDropChunk(int x,
int z) |
boolean |
canMineBlock(EntityPlayer player,
BlockPos pos) |
boolean |
canRespawnHere() |
boolean |
canSnowAt(BlockPos pos,
boolean checkLight) |
protected void |
createBiomeProvider() |
IChunkGenerator |
createChunkGenerator() |
WorldBorder |
createWorldBorder() |
boolean |
doesWaterVaporize() |
boolean |
doesXZShowFog(int x,
int z) |
protected void |
generateLightBrightnessTable() |
int |
getActualHeight() |
int |
getAverageGroundLevel() |
Biome |
getBiomeForCoords(BlockPos pos) |
BiomeProvider |
getBiomeProvider() |
Vec3d |
getCloudColor(float partialTicks) |
float |
getCloudHeight() |
IRenderHandler |
getCloudRenderer() |
float |
getCurrentMoonPhaseFactor()
Calculates the current moon phase factor.
|
java.lang.String |
getDepartMessage()
A Message to display to the user when they transfer out of this dismension.
|
int |
getDimension() |
abstract DimensionType |
getDimensionType() |
Vec3d |
getFogColor(float p_76562_1_,
float p_76562_2_) |
boolean |
getHasNoSky() |
int |
getHeight() |
double |
getHorizon() |
float[] |
getLightBrightnessTable() |
int |
getMoonPhase(long worldTime) |
double |
getMovementFactor()
The dimensions movement factor.
|
BlockPos |
getRandomizedSpawnPoint() |
int |
getRespawnDimension(EntityPlayerMP player)
Determines the dimension the player will be respawned in, typically this brings them back to the overworld.
|
java.lang.String |
getSaveFolder()
Returns the sub-folder of the world folder that this WorldProvider saves to.
|
long |
getSeed() |
Vec3d |
getSkyColor(Entity cameraEntity,
float partialTicks) |
IRenderHandler |
getSkyRenderer() |
BlockPos |
getSpawnCoordinate() |
BlockPos |
getSpawnPoint() |
float |
getStarBrightness(float par1)
Gets the Star Brightness for rendering sky.
|
float |
getSunBrightness(float par1)
Gets the Sun Brightness for rendering sky.
|
float |
getSunBrightnessFactor(float par1)
The current sun brightness factor for this dimension.
0.0f means no light at all, and 1.0f means maximum sunlight.
|
double |
getVoidFogYFactor() |
IRenderHandler |
getWeatherRenderer() |
java.lang.String |
getWelcomeMessage()
A message to display to the user when they transfer to this dimension.
|
long |
getWorldTime() |
boolean |
isBlockHighHumidity(BlockPos pos) |
boolean |
isDaytime() |
boolean |
isSkyColored() |
boolean |
isSurfaceWorld() |
void |
onPlayerAdded(EntityPlayerMP player) |
void |
onPlayerRemoved(EntityPlayerMP player) |
void |
onWorldSave() |
void |
onWorldUpdateEntities() |
void |
registerWorld(World worldIn) |
void |
resetRainAndThunder() |
void |
setAllowedSpawnTypes(boolean allowHostile,
boolean allowPeaceful) |
void |
setCloudRenderer(IRenderHandler renderer) |
void |
setDimension(int dim)
Sets the providers current dimension ID, used in default getSaveFolder()
Added to allow default providers to be registered for multiple dimensions.
|
void |
setSkyRenderer(IRenderHandler skyRenderer) |
void |
setSpawnPoint(BlockPos pos) |
void |
setWeatherRenderer(IRenderHandler renderer) |
void |
setWorldTime(long time) |
boolean |
shouldMapSpin(java.lang.String entity,
double x,
double y,
double z)
Determine if the cursor on the map should 'spin' when rendered, like it does for the player in the nether.
|
void |
updateWeather() |
public static final float[] MOON_PHASE_FACTORS
protected World worldObj
protected BiomeProvider biomeProvider
protected boolean isHellWorld
protected boolean hasNoSky
protected final float[] lightBrightnessTable
public final void registerWorld(World worldIn)
protected void generateLightBrightnessTable()
protected void createBiomeProvider()
public IChunkGenerator createChunkGenerator()
public boolean canCoordinateBeSpawn(int x, int z)
public float calculateCelestialAngle(long worldTime, float partialTicks)
public int getMoonPhase(long worldTime)
public boolean isSurfaceWorld()
@Nullable public float[] calcSunriseSunsetColors(float celestialAngle, float partialTicks)
public Vec3d getFogColor(float p_76562_1_, float p_76562_2_)
public boolean canRespawnHere()
public float getCloudHeight()
public boolean isSkyColored()
public BlockPos getSpawnCoordinate()
public int getAverageGroundLevel()
public double getVoidFogYFactor()
public boolean doesXZShowFog(int x, int z)
public BiomeProvider getBiomeProvider()
public boolean doesWaterVaporize()
public boolean getHasNoSky()
public float[] getLightBrightnessTable()
public WorldBorder createWorldBorder()
public void setDimension(int dim)
dim
- Dimension IDpublic int getDimension()
public java.lang.String getSaveFolder()
public java.lang.String getWelcomeMessage()
public java.lang.String getDepartMessage()
public double getMovementFactor()
public IRenderHandler getSkyRenderer()
public void setSkyRenderer(IRenderHandler skyRenderer)
public IRenderHandler getCloudRenderer()
public void setCloudRenderer(IRenderHandler renderer)
public IRenderHandler getWeatherRenderer()
public void setWeatherRenderer(IRenderHandler renderer)
public BlockPos getRandomizedSpawnPoint()
public boolean shouldMapSpin(java.lang.String entity, double x, double y, double z)
entity
- The entity holding the map, playername, or frame-ENTITYIDx
- X Positiony
- Y Positionz
- Z Positionpublic int getRespawnDimension(EntityPlayerMP player)
player
- The player that is respawningpublic boolean isDaytime()
public float getSunBrightnessFactor(float par1)
public float getCurrentMoonPhaseFactor()
public Vec3d getCloudColor(float partialTicks)
public float getSunBrightness(float par1)
public float getStarBrightness(float par1)
public void setAllowedSpawnTypes(boolean allowHostile, boolean allowPeaceful)
public void calculateInitialWeather()
public void updateWeather()
public boolean canBlockFreeze(BlockPos pos, boolean byWater)
public boolean canSnowAt(BlockPos pos, boolean checkLight)
public void setWorldTime(long time)
public long getSeed()
public long getWorldTime()
public BlockPos getSpawnPoint()
public void setSpawnPoint(BlockPos pos)
public boolean canMineBlock(EntityPlayer player, BlockPos pos)
public boolean isBlockHighHumidity(BlockPos pos)
public int getHeight()
public int getActualHeight()
public double getHorizon()
public void resetRainAndThunder()
public boolean canDoLightning(Chunk chunk)
public boolean canDoRainSnowIce(Chunk chunk)
public void onPlayerAdded(EntityPlayerMP player)
public void onPlayerRemoved(EntityPlayerMP player)
public abstract DimensionType getDimensionType()
public void onWorldSave()
public void onWorldUpdateEntities()
public boolean canDropChunk(int x, int z)