Class RenderBlockEntityModel<T extends org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity,S extends net.minecraft.client.renderer.blockentity.state.BlockEntityRenderState & RenderBlockEntityModel.IRotationRenderState,M>

java.lang.Object
org.cyclops.cyclopscore.client.render.blockentity.RenderBlockEntityModel<T,S,M>
All Implemented Interfaces:
net.minecraft.client.renderer.blockentity.BlockEntityRenderer<T,S>, net.neoforged.neoforge.client.extensions.IBlockEntityRendererExtension<T>

public abstract class RenderBlockEntityModel<T extends org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity,S extends net.minecraft.client.renderer.blockentity.state.BlockEntityRenderState & RenderBlockEntityModel.IRotationRenderState,M> extends Object implements net.minecraft.client.renderer.blockentity.BlockEntityRenderer<T,S>
General renderer for CyclopsBlockEntity with models.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final M
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RenderBlockEntityModel(M model, net.minecraft.client.resources.model.Material material)
    Make a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.resources.model.Material
    Get the material.
     
    Function<net.minecraft.resources.ResourceLocation,net.minecraft.client.renderer.RenderType>
     
    protected void
    postRotate(S renderState, com.mojang.blaze3d.vertex.PoseStack matrixStack)
     
    protected void
    preRotate(S renderState, com.mojang.blaze3d.vertex.PoseStack matrixStack)
     
    void
    submit(S renderState, com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.SubmitNodeCollector nodeCollector, net.minecraft.client.renderer.state.CameraRenderState cameraRenderState)
     
    protected abstract void
    submitModel(S renderState, M model, com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.SubmitNodeCollector nodeCollector, net.minecraft.client.renderer.state.CameraRenderState cameraRenderState)
    Render the actual model, override this to change the way the model should be rendered.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraft.client.renderer.blockentity.BlockEntityRenderer

    createRenderState, extractRenderState, getViewDistance, shouldRender, shouldRenderOffScreen

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

    getRenderBoundingBox
  • Field Details

    • model

      protected final M model
  • Constructor Details

    • RenderBlockEntityModel

      public RenderBlockEntityModel(M model, net.minecraft.client.resources.model.Material material)
      Make a new instance.
      Parameters:
      model - The model to render.
      material - The material to render the model with.
  • Method Details

    • getModel

      public M getModel()
    • getMaterial

      public net.minecraft.client.resources.model.Material getMaterial()
      Get the material.
      Returns:
      The material.
    • getRenderTypeGetter

      public Function<net.minecraft.resources.ResourceLocation,net.minecraft.client.renderer.RenderType> getRenderTypeGetter()
    • preRotate

      protected void preRotate(S renderState, com.mojang.blaze3d.vertex.PoseStack matrixStack)
    • postRotate

      protected void postRotate(S renderState, com.mojang.blaze3d.vertex.PoseStack matrixStack)
    • submit

      public void submit(S renderState, com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.SubmitNodeCollector nodeCollector, net.minecraft.client.renderer.state.CameraRenderState cameraRenderState)
      Specified by:
      submit in interface net.minecraft.client.renderer.blockentity.BlockEntityRenderer<T extends org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity,S extends net.minecraft.client.renderer.blockentity.state.BlockEntityRenderState & RenderBlockEntityModel.IRotationRenderState>
    • submitModel

      protected abstract void submitModel(S renderState, M model, com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.SubmitNodeCollector nodeCollector, net.minecraft.client.renderer.state.CameraRenderState cameraRenderState)
      Render the actual model, override this to change the way the model should be rendered.
      Parameters:
      renderState - The tile entity render state.
      model - The base model.
      matrixStack - The matrix stack.
      nodeCollector - The node collector.
      cameraRenderState - The camera.