Jump to content

[Solved] [1.18.1] BlockEntityRenderer only renders when the source block is within the players viewport


Recommended Posts

Posted

I'm looking to recreate the beacon rendering effect to act as a visible waypoint marker.

I have created the block, blockentity and blockentityrenderer all based on the vanilla beacon code.

This works as expected and the light beam is rendered.  However, it only renders whilst the source block is within the players 'viewport', if the player looks up to such a degree that the source block is below the line of sight, the beam stops rendering.

It doesn't matter if the block is actually visible to the player, it can be hidden behind other blocks and still renders as long as the source block would be in the viewport of the player.

I've also checked TheEndGatewayRenderer which calls the BeaconRenderer.renderBeaconBeam and I've tried implementing it this way but this also has the same problem.

I'm running out of things to check and just wondered if there is something else that needs to be done to keep a block rendering even when it's not in view?  Any pointers greatly appreciated.

Example repo showing the issue

Posted
15 minutes ago, diesieben07 said:

In your BlockEntity override getRenderBoundingBox and return the correct AABB for your rendered shape

Many thanks diesieben07, this was the piece I was missing.  It works like a charm after adding this, you're a star!

  • Tintow changed the title to [Solved] [1.18.1] BlockEntityRenderer only renders when the source block is within the players viewport

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.