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.
  • 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 a World.

      This overrides Vanilla's sky rendering.

      Parameters:
      key - A RegistryKey for your World
      renderer - A DimensionRenderingRegistry.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 a World.

      This overrides Vanilla's weather rendering.

      Parameters:
      key - A RegistryKey for your World
      renderer - A DimensionRenderingRegistry.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 an Identifier.

      This registers a new option for the "effects" entry of the dimension type json.

      Parameters:
      key - The Identifier for the new option entry.
      effects - The DimensionEffects 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 a World.

      This overrides Vanilla's cloud rendering.

      Parameters:
      key - A RegistryKey for your World
      renderer - A DimensionRenderingRegistry.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 given World.
      Parameters:
      key - A RegistryKey for your World
      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 given World.
      Parameters:
      key - A RegistryKey for your World
      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 given World.
      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 - A RegistryKey for your World.
      Returns:
      overworld effect if no dimension effects is registered for the key.