Class RegisterRenderBuffersEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterRenderBuffersEvent
All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent

public class RegisterRenderBuffersEvent extends net.neoforged.bus.api.Event implements net.neoforged.fml.event.IModBusEvent
Fired to allow mods to register custom render buffers. This allows to have dedicated render buffer for each render type that can filled and rendered in batch This event is fired after the default Minecraft render buffers have been registered.

This event is not cancellable, and does not

invalid reference
have a result
.

This event is fired on the mod-specific event bus, only on the logical client.

  • Field Details

  • Constructor Details

  • Method Details

    • registerRenderBuffer

      public void registerRenderBuffer(RenderType renderType)
      Registers a default render buffer with buffer size specified in the render type.
      Parameters:
      renderType - a render type of the render buffer
    • registerRenderBuffer

      public void registerRenderBuffer(RenderType renderType, ByteBufferBuilder renderBuffer)
      Registers a render buffer for specified render type.
      Parameters:
      renderType - a render type of the render buffer
      renderBuffer - a render buffer to register