Class NeoforgeMeshEmitter

java.lang.Object
dev.engine_room.flywheel.lib.model.baked.NeoforgeMeshEmitter
All Implemented Interfaces:
com.mojang.blaze3d.vertex.VertexConsumer, net.neoforged.neoforge.client.extensions.IVertexConsumerExtension

@Internal public class NeoforgeMeshEmitter extends Object implements com.mojang.blaze3d.vertex.VertexConsumer
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.blaze3d.vertex.VertexConsumer
    addVertex(float x, float y, float z)
     
    void
    end(com.google.common.collect.ImmutableList.Builder<Model.ConfiguredMesh> out)
     
    com.mojang.blaze3d.vertex.BufferBuilder
    getBuffer(Material material)
     
    void
    prepare(BlockMaterialFunction blockMaterialFunction)
     
    void
     
    void
    prepareForModelLayer(boolean defaultAo)
    Some mods, like FramedBlocks, have custom hooks to determine the default AO.
    void
    putBulkData(com.mojang.blaze3d.vertex.PoseStack.Pose pose, net.minecraft.client.renderer.block.model.BakedQuad quad, float[] brightness, float red, float green, float blue, float alpha, int[] lightmap, int packedOverlay, boolean readAlpha)
     
    void
    putBulkData(com.mojang.blaze3d.vertex.PoseStack.Pose pose, net.minecraft.client.renderer.block.model.BakedQuad quad, float red, float green, float blue, float alpha, int packedLight, int packedOverlay)
     
    com.mojang.blaze3d.vertex.VertexConsumer
    setColor(int red, int green, int blue, int alpha)
     
    com.mojang.blaze3d.vertex.VertexConsumer
    setNormal(float normalX, float normalY, float normalZ)
     
    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, misc, putBulkData

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

    addVertex, addVertex, addVertex, addVertex, addVertex, setColor, setColor, setLight, setNormal, setOverlay, setWhiteAlpha
  • Method Details

    • prepareForModelLayer

      public void prepareForModelLayer(boolean defaultAo)
      Some mods, like FramedBlocks, have custom hooks to determine the default AO. This method is invoked a second time from within a mixin to ModelBlockRenderer after the accurate value is computed, so we don't need to support those custom hooks manually. It is possible that the mixin injector will never run (primarily due to implementations of Fabric Renderer API on Forge, like Indigo in Forgified Fabric API), so we always compute the value manually beforehand too.
    • putBulkData

      public void putBulkData(com.mojang.blaze3d.vertex.PoseStack.Pose pose, net.minecraft.client.renderer.block.model.BakedQuad quad, float red, float green, float blue, float alpha, int packedLight, int packedOverlay)
      Specified by:
      putBulkData in interface com.mojang.blaze3d.vertex.VertexConsumer
    • putBulkData

      public void putBulkData(com.mojang.blaze3d.vertex.PoseStack.Pose pose, net.minecraft.client.renderer.block.model.BakedQuad quad, float[] brightness, float red, float green, float blue, float alpha, int[] lightmap, int packedOverlay, boolean readAlpha)
      Specified by:
      putBulkData in interface com.mojang.blaze3d.vertex.VertexConsumer
    • 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 red, int green, int blue, int alpha)
      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 normalX, float normalY, float normalZ)
      Specified by:
      setNormal in interface com.mojang.blaze3d.vertex.VertexConsumer
    • prepare

      public void prepare(BlockMaterialFunction blockMaterialFunction)
    • prepareForBlock

      public void prepareForBlock()
    • end

      public void end(com.google.common.collect.ImmutableList.Builder<Model.ConfiguredMesh> out)
    • getBuffer

      public com.mojang.blaze3d.vertex.BufferBuilder getBuffer(Material material)