API reference Obsidian.API.Client
IDimensionEffects interface
Code that adjusts or draws a mod's dimension type's sky, fog and clouds each frame, like NeoForge's DimensionSpecialEffects, for what the type's data can't say (see DimensionEffectsProperties). Give it as DimensionEffectsProperties.Effects; implement either method, or both.
public interface IDimensionEffects
In Obsidian.API.Client.
Remarks
Both run on the client's game thread inside a call into the mod, once a frame while the player is in a dimension of the type. Keep them short and free of allocations, as the frame waits for them. If one throws, the error is logged and the effects aren't called again until the mods reload: the dimension is drawn from its data alone.
Methods
Adjust(DimensionAtmosphere)
DimensionAtmosphere Adjust(DimensionAtmosphere atmosphere);Adjusts the frame's sky, fog and clouds, as the client worked them out from the dimension type's and biomes' data, the time and the weather. The player's view (under water, blind, in lava) still applies afterwards.
Parameters
atmosphere- The frame's sky, fog and clouds.
Returns
The frame's sky, fog and clouds; return atmosphere to keep them.
RenderSky(DimensionAtmosphere, IDimensionSkyBuffer)
void RenderSky(DimensionAtmosphere atmosphere, IDimensionSkyBuffer buffer);Draws into the sky, after the skybox the dimension type's data chooses: give the type "skybox": "none" to draw the whole sky here.
Parameters
atmosphere- The frame's sky, fog and clouds, as
IDimensionEffects.Adjustleft them. buffer- What the sky is drawn with.