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 Link icon

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

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

    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 Link icon

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

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

    getViewDistance, shouldRender, shouldRenderOffScreen

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

    getRenderBoundingBox
  • Field Details Link icon

    • model Link icon

      protected final M model
  • Constructor Details Link icon

    • RenderBlockEntityModel Link icon

      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 Link icon

    • getModel Link icon

      public M getModel()
    • getMaterial Link icon

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

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

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

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

      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 Link icon

      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.