Class VertexConsumerWrapper

java.lang.Object
net.neoforged.neoforge.client.model.pipeline.VertexConsumerWrapper
All Implemented Interfaces:
com.mojang.blaze3d.vertex.VertexConsumer, IVertexConsumerExtension
Direct Known Subclasses:
TransformingVertexPipeline

public abstract class VertexConsumerWrapper extends Object implements com.mojang.blaze3d.vertex.VertexConsumer
Wrapper for VertexConsumer which delegates all operations to its parent.

Useful for defining custom pipeline elements that only process certain data.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final com.mojang.blaze3d.vertex.VertexConsumer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    VertexConsumerWrapper(com.mojang.blaze3d.vertex.VertexConsumer parent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.blaze3d.vertex.VertexConsumer
    addVertex(float x, float y, float z)
     
    com.mojang.blaze3d.vertex.VertexConsumer
    misc(com.mojang.blaze3d.vertex.VertexFormatElement element, int... values)
    Consumes an unknown VertexFormatElement as a raw int data array.
    com.mojang.blaze3d.vertex.VertexConsumer
    setColor(int r, int g, int b, int a)
     
    com.mojang.blaze3d.vertex.VertexConsumer
    setNormal(float x, float y, float z)
     
    com.mojang.blaze3d.vertex.VertexConsumer
    setUv(float u, float v)
     
    com.mojang.blaze3d.vertex.VertexConsumer
    setUv1(int u, int v)
     
    com.mojang.blaze3d.vertex.VertexConsumer
    setUv2(int u, int v)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.client.extensions.IVertexConsumerExtension

    applyBakedLighting, applyBakedNormals, putBulkData

    Methods inherited from interface com.mojang.blaze3d.vertex.VertexConsumer

    addVertex, addVertex, addVertex, addVertex, addVertex, putBulkData, putBulkData, setColor, setColor, setLight, setNormal, setNormal, setOverlay, setWhiteAlpha
  • Field Details

    • parent

      protected final com.mojang.blaze3d.vertex.VertexConsumer parent
  • Constructor Details

    • VertexConsumerWrapper

      public VertexConsumerWrapper(com.mojang.blaze3d.vertex.VertexConsumer parent)
  • Method Details

    • addVertex

      public com.mojang.blaze3d.vertex.VertexConsumer addVertex(float x, float y, float z)
      Specified by:
      addVertex in interface com.mojang.blaze3d.vertex.VertexConsumer
    • setColor

      public com.mojang.blaze3d.vertex.VertexConsumer setColor(int r, int g, int b, int a)
      Specified by:
      setColor in interface com.mojang.blaze3d.vertex.VertexConsumer
    • setUv

      public com.mojang.blaze3d.vertex.VertexConsumer setUv(float u, float v)
      Specified by:
      setUv in interface com.mojang.blaze3d.vertex.VertexConsumer
    • setUv1

      public com.mojang.blaze3d.vertex.VertexConsumer setUv1(int u, int v)
      Specified by:
      setUv1 in interface com.mojang.blaze3d.vertex.VertexConsumer
    • setUv2

      public com.mojang.blaze3d.vertex.VertexConsumer setUv2(int u, int v)
      Specified by:
      setUv2 in interface com.mojang.blaze3d.vertex.VertexConsumer
    • setNormal

      public com.mojang.blaze3d.vertex.VertexConsumer setNormal(float x, float y, float z)
      Specified by:
      setNormal in interface com.mojang.blaze3d.vertex.VertexConsumer
    • misc

      public com.mojang.blaze3d.vertex.VertexConsumer misc(com.mojang.blaze3d.vertex.VertexFormatElement element, int... values)
      Description copied from interface: IVertexConsumerExtension
      Consumes an unknown VertexFormatElement as a raw int data array.

      If the consumer needs to store the data for later use, it must copy it. There are no guarantees on immutability.

      Specified by:
      misc in interface IVertexConsumerExtension