public interface IForgeDimension
Modifier and Type | Interface and Description |
---|---|
static class |
IForgeDimension.SleepResult |
Modifier and Type | Method and Description |
---|---|
default void |
calculateInitialWeather() |
default boolean |
canDoLightning(Chunk chunk) |
default boolean |
canDoRainSnowIce(Chunk chunk) |
default boolean |
canMineBlock(PlayerEntity player,
BlockPos pos) |
default IForgeDimension.SleepResult |
canSleepAt(PlayerEntity player,
BlockPos pos)
Determines if the player can sleep in this world (or if the bed should explode for example).
|
default int |
getActualHeight() |
IRenderHandler |
getCloudRenderer() |
default float |
getCurrentMoonPhaseFactor(long time)
Calculates the current moon phase factor.
|
default Dimension |
getDimension() |
default int |
getHeight() |
default void |
getLightmapColors(float partialTicks,
float sunBrightness,
float skyLight,
float blockLight,
Vector3f colors)
Allows for manipulating the coloring of the lightmap texture.
|
default double |
getMovementFactor()
The dimension's movement factor.
|
default MusicTicker.MusicType |
getMusicType()
Called on the client to get the music type to play when in this world type.
|
default DimensionType |
getRespawnDimension(ServerPlayerEntity player)
Determines the dimension the player will be respawned in, typically this brings them back to the overworld.
|
default int |
getSeaLevel() |
default long |
getSeed() |
IRenderHandler |
getSkyRenderer() |
default BlockPos |
getSpawnPoint() |
IRenderHandler |
getWeatherRenderer() |
World |
getWorld() |
default long |
getWorldTime() |
default ICapabilityProvider |
initCapabilities()
Called from
World#initCapabilities() , to gather capabilities for this
world. |
default boolean |
isDaytime() |
default boolean |
isHighHumidity(BlockPos pos) |
void |
resetRainAndThunder() |
default void |
setAllowedSpawnTypes(boolean allowHostile,
boolean allowPeaceful) |
void |
setCloudRenderer(IRenderHandler renderer) |
void |
setSkyRenderer(IRenderHandler skyRenderer) |
default void |
setSpawnPoint(BlockPos pos) |
void |
setWeatherRenderer(IRenderHandler renderer) |
default void |
setWorldTime(long time) |
default boolean |
shouldMapSpin(java.lang.String entity,
double x,
double z,
double rotation)
Determine if the cursor on the map should 'spin' when rendered, like it does for the player in the nether.
|
default void |
updateWeather(java.lang.Runnable defaultLogic) |
default Dimension getDimension()
World getWorld()
default ICapabilityProvider initCapabilities()
World#initCapabilities()
, to gather capabilities for this
world. It's safe to access world here since this is called after world is
registered.
On server, called directly after mapStorage and world data such as Scoreboard
and VillageCollection are initialized. On client, called when world is
constructed, just before world load event is called. Note that this method is
always called before the world load event.default double getMovementFactor()
@Nullable IRenderHandler getSkyRenderer()
void setSkyRenderer(IRenderHandler skyRenderer)
@Nullable IRenderHandler getCloudRenderer()
void setCloudRenderer(IRenderHandler renderer)
@Nullable IRenderHandler getWeatherRenderer()
void setWeatherRenderer(IRenderHandler renderer)
default void getLightmapColors(float partialTicks, float sunBrightness, float skyLight, float blockLight, Vector3f colors)
partialTicks
- Progress between ticks.sunBrightness
- Current sun brightness.skyLight
- Sky light brightness factor.blockLight
- Block light brightness factor.colors
- The color values that will be used: [r, g, b].net.minecraft.client.renderer.GameRenderer#updateLightmap(float)
void resetRainAndThunder()
default boolean canDoLightning(Chunk chunk)
default boolean canDoRainSnowIce(Chunk chunk)
@Nullable default MusicTicker.MusicType getMusicType()
default IForgeDimension.SleepResult canSleepAt(PlayerEntity player, BlockPos pos)
player
- The player that is attempting to sleeppos
- The location where the player tries to sleep at (the position of the clicked on bed for example)default boolean isDaytime()
default float getCurrentMoonPhaseFactor(long time)
default void setAllowedSpawnTypes(boolean allowHostile, boolean allowPeaceful)
default void calculateInitialWeather()
default void updateWeather(java.lang.Runnable defaultLogic)
default long getSeed()
default long getWorldTime()
default void setWorldTime(long time)
default BlockPos getSpawnPoint()
default void setSpawnPoint(BlockPos pos)
default boolean canMineBlock(PlayerEntity player, BlockPos pos)
default boolean isHighHumidity(BlockPos pos)
default int getHeight()
default int getActualHeight()
default int getSeaLevel()
default boolean shouldMapSpin(java.lang.String entity, double x, double z, double rotation)
entity
- The entity holding the map, playername, or frame-ENTITYIDx
- X Positionz
- Z Positionrotation
- the regular rotation of the markerdefault DimensionType getRespawnDimension(ServerPlayerEntity player)
player
- The player that is respawning