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 TypeMethodDescriptionstatic @Nullable DimensionRenderingRegistry.CloudRenderer
getCloudRenderer
(net.minecraft.util.registry.RegistryKey<net.minecraft.world.World> key) Gets the custom cloud renderer for the givenWorld
.static @Nullable net.minecraft.client.render.DimensionEffects
getDimensionEffects
(net.minecraft.util.Identifier key) Gets the dimension effects registered for an id.static @Nullable DimensionRenderingRegistry.SkyRenderer
getSkyRenderer
(net.minecraft.util.registry.RegistryKey<net.minecraft.world.World> key) Gets the custom sky renderer for the givenWorld
.static @Nullable DimensionRenderingRegistry.WeatherRenderer
getWeatherRenderer
(net.minecraft.util.registry.RegistryKey<net.minecraft.world.World> key) Gets the custom weather effect renderer for the givenWorld
.static void
registerCloudRenderer
(net.minecraft.util.registry.RegistryKey<net.minecraft.world.World> key, DimensionRenderingRegistry.CloudRenderer renderer) Registers a custom cloud renderer for aWorld
.static void
registerDimensionEffects
(net.minecraft.util.Identifier key, net.minecraft.client.render.DimensionEffects effects) Registers dimension effects for anIdentifier
.static void
registerSkyRenderer
(net.minecraft.util.registry.RegistryKey<net.minecraft.world.World> key, DimensionRenderingRegistry.SkyRenderer renderer) Registers the custom sky renderer for aWorld
.static void
registerWeatherRenderer
(net.minecraft.util.registry.RegistryKey<net.minecraft.world.World> key, DimensionRenderingRegistry.WeatherRenderer renderer) Registers a custom weather renderer for aWorld
.
-
Method Details
-
registerSkyRenderer
static void registerSkyRenderer(net.minecraft.util.registry.RegistryKey<net.minecraft.world.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(net.minecraft.util.registry.RegistryKey<net.minecraft.world.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
static void registerDimensionEffects(net.minecraft.util.Identifier key, net.minecraft.client.render.DimensionEffects effects) 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(net.minecraft.util.registry.RegistryKey<net.minecraft.world.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(net.minecraft.util.registry.RegistryKey<net.minecraft.world.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(net.minecraft.util.registry.RegistryKey<net.minecraft.world.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(net.minecraft.util.registry.RegistryKey<net.minecraft.world.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
@Nullable static @Nullable net.minecraft.client.render.DimensionEffects getDimensionEffects(net.minecraft.util.Identifier key) 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.
-