Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by Avern

  1. I have a BlockEntityRenderer and I am rendering an obj model using: VertexConsumer vertexConsumer = iRenderTypeBuffer.getBuffer(RenderType.solid()); rendererProvider.getBlockRenderDispatcher().getModelRenderer().renderModel(matrixStack.last(), vertexConsumer, null, myModel, 255f, 255f, 255f, combinedLight, combinedOverlay, EmptyModelData.INSTANCE); The performance is pretty terrible rendering it this way. If I instead use the same model as the blockstate model for the block then there are no performance issues. I ran a profiler and found it was spending all its time in com.mojang.blaze3d.vertex.VertexConsumer.putBulkData(). There must be some way to cache what putBulkData() is doing? Just wondering if anyone has some thoughts on this, thanks.
  2. A bit new to modifying the HUD myself. At least one way to do it is to subscribe to the RenderGameOverlayEvent event (Post or Pre) and filter based on what the event's getType() returns. The event gives you a matrix stack that you can use to draw what you want. AbstractGui contains some useful static methods for things like drawing fills and strings. You can look at ForgeIngameGui to see how the existing HUD is rendered.
  3. Using getBlockModelRenderer().renderModel() with the color parameters allowed me to get the brightness I wanted, thanks!!
  4. Hello! I'm trying to render a block inside a TileEntityRenderer. Problem is the block is rendering darker than it should be. The block on the left in the screenshots is the block as it appears normally when placed. The block on the right is rendered inside the TileEntityRenderer of the block on the left. matrixStack.push(); matrixStack.translate(3, 0, 0); BlockRendererDispatcher blockRendererDispatcher = Minecraft.getInstance().getBlockRendererDispatcher(); blockRendererDispatcher.renderBlock(myBlockTile.getBlockState(), matrixStack, iRenderTypeBuffer, Integer.MAX_VALUE, Integer.MAX_VALUE, myBlockTile.getModelData()); matrixStack.pop(); Originally I was rendering a obj model, but the issue also appears with the "missing model" cube, cobblestone, etc. Any suggestions? Thanks!
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.