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 Summary
-
Constructor Summary
ConstructorDescriptionRegisterRenderBuffersEvent
(SequencedMap<RenderType, ByteBufferBuilder> renderBuffers) -
Method Summary
Modifier and TypeMethodDescriptionvoid
registerRenderBuffer
(RenderType renderType) Registers a default render buffer with buffer size specified in the render type.void
registerRenderBuffer
(RenderType renderType, ByteBufferBuilder renderBuffer) Registers a render buffer for specified render type.
-
Field Details
-
renderBuffers
-
-
Constructor Details
-
RegisterRenderBuffersEvent
@Internal public RegisterRenderBuffersEvent(SequencedMap<RenderType, ByteBufferBuilder> renderBuffers)
-
-
Method Details
-
registerRenderBuffer
Registers a default render buffer with buffer size specified in the render type.- Parameters:
renderType
- a render type of the render buffer
-
registerRenderBuffer
Registers a render buffer for specified render type.- Parameters:
renderType
- a render type of the render bufferrenderBuffer
- a render buffer to register
-