Interface DimensionRenderingRegistry
@Environment(CLIENT)
public interface DimensionRenderingRegistry
Dimensional renderers render world specific visuals of a world.
They may be used to render the sky, weather, or clouds.
The
DimensionEffects
is the vanilla dimensional renderer.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptiongetCloudRenderer
(RegistryKey<World> key) Gets the custom cloud renderer for the givenWorld
.static @Nullable DimensionEffects
Gets the dimension effects registered for an id.getSkyRenderer
(RegistryKey<World> key) Gets the custom sky renderer for the givenWorld
.Gets the custom weather effect renderer for the givenWorld
.static void
Registers a custom cloud renderer for aWorld
.static void
registerDimensionEffects
(Identifier key, DimensionEffects effects) Registers dimension effects for anIdentifier
.static void
registerSkyRenderer
(RegistryKey<World> key, DimensionRenderingRegistry.SkyRenderer renderer) Registers the custom sky renderer for aWorld
.static void
registerWeatherRenderer
(RegistryKey<World> key, DimensionRenderingRegistry.WeatherRenderer renderer) Registers a custom weather renderer for aWorld
.
-
Method Details
-
registerSkyRenderer
static void registerSkyRenderer(RegistryKey<World> key, DimensionRenderingRegistry.SkyRenderer renderer) Registers the custom sky renderer for aWorld
.This overrides Vanilla's sky rendering.
- Parameters:
key
- ARegistryKey
for yourWorld
renderer
- ADimensionRenderingRegistry.SkyRenderer
implementation- Throws:
IllegalArgumentException
- if key is already registered.
-
registerWeatherRenderer
static void registerWeatherRenderer(RegistryKey<World> key, DimensionRenderingRegistry.WeatherRenderer renderer) Registers a custom weather renderer for aWorld
.This overrides Vanilla's weather rendering.
- Parameters:
key
- A RegistryKey for yourWorld
renderer
- ADimensionRenderingRegistry.WeatherRenderer
implementation- Throws:
IllegalArgumentException
- if key is already registered.
-
registerDimensionEffects
Registers dimension effects for anIdentifier
.This registers a new option for the "effects" entry of the dimension type json.
- Parameters:
key
- TheIdentifier
for the new option entry.effects
- TheDimensionEffects
option.- Throws:
IllegalArgumentException
- if key is already registered.
-
registerCloudRenderer
static void registerCloudRenderer(RegistryKey<World> key, DimensionRenderingRegistry.CloudRenderer renderer) Registers a custom cloud renderer for aWorld
.This overrides Vanilla's cloud rendering.
- Parameters:
key
- ARegistryKey
for yourWorld
renderer
- ADimensionRenderingRegistry.CloudRenderer
implementation- Throws:
IllegalArgumentException
- if key is already registered.
-
getSkyRenderer
@Nullable static @Nullable DimensionRenderingRegistry.SkyRenderer getSkyRenderer(RegistryKey<World> key) Gets the custom sky renderer for the givenWorld
.- Parameters:
key
- ARegistryKey
for yourWorld
- Returns:
null
if no custom sky renderer is registered for the dimension.
-
getCloudRenderer
@Nullable static @Nullable DimensionRenderingRegistry.CloudRenderer getCloudRenderer(RegistryKey<World> key) Gets the custom cloud renderer for the givenWorld
.- Parameters:
key
- ARegistryKey
for yourWorld
- Returns:
null
if no custom cloud renderer is registered for the dimension.
-
getWeatherRenderer
@Nullable static @Nullable DimensionRenderingRegistry.WeatherRenderer getWeatherRenderer(RegistryKey<World> key) Gets the custom weather effect renderer for the givenWorld
.- Returns:
null
if no custom weather effect renderer is registered for the dimension.
-
getDimensionEffects
Gets the dimension effects registered for an id.- Parameters:
key
- ARegistryKey
for yourWorld
.- Returns:
- overworld effect if no dimension effects is registered for the key.
-