Class RenderBlockEntityModel<T extends CyclopsBlockEntity,M>

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

public abstract class RenderBlockEntityModel<T extends CyclopsBlockEntity,M> extends Object implements net.minecraft.client.renderer.blockentity.BlockEntityRenderer<T>
General renderer for CyclopsBlockEntity with models.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final M
     

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

    INFINITE_EXTENT_AABB
  • 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(T tile, com.mojang.blaze3d.vertex.PoseStack matrixStack)
     
    protected void
    preRotate(T tile, com.mojang.blaze3d.vertex.PoseStack matrixStack)
     
    void
    render(T tile, float partialTick, com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource buffer, int combinedLight, int combinedOverlay)
     
    protected abstract void
    renderModel(T tile, M model, float partialTick, com.mojang.blaze3d.vertex.PoseStack matrixStack, com.mojang.blaze3d.vertex.VertexConsumer vertexBuilder, net.minecraft.client.renderer.MultiBufferSource buffer, int combinedLight, int combinedOverlay)
    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

    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(T tile, com.mojang.blaze3d.vertex.PoseStack matrixStack)
    • postRotate

      protected void postRotate(T tile, com.mojang.blaze3d.vertex.PoseStack matrixStack)
    • render

      public void render(T tile, float partialTick, com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource buffer, int combinedLight, int combinedOverlay)
      Specified by:
      render in interface net.minecraft.client.renderer.blockentity.BlockEntityRenderer<T extends CyclopsBlockEntity>
    • renderModel

      protected abstract void renderModel(T tile, M model, float partialTick, com.mojang.blaze3d.vertex.PoseStack matrixStack, com.mojang.blaze3d.vertex.VertexConsumer vertexBuilder, net.minecraft.client.renderer.MultiBufferSource buffer, int combinedLight, int combinedOverlay)
      Render the actual model, override this to change the way the model should be rendered.
      Parameters:
      tile - The tile entity.
      model - The base model.
      partialTick - The partial tick value.
      matrixStack - The matrix stack.
      vertexBuilder - The vertex builder.
      buffer - The render type buffer.
      combinedLight - The combined light value.
      combinedOverlay - The combined overlay value.