Jump to content

[1.12] Rendering entity outside of chunk


thunderous_peanuts

Recommended Posts

Hello,

I have been trying to create a large entity that the player can drive around in. This entity is relatively large (longer than 6 blocks).
However, if the player drives across chunks, the vehicle will momentarily stop rendering. I believe this is caused by the previous chunk no longer rendering, since the player no longer sees it.
 

I tried setting

ignoreFrustumCheck = true;

and overriding

public boolean shouldRender(EntityRollingStock livingEntity, ICamera camera, double camX, double camY, double camZ) {
  return true;
}

in the render class, both with no success.

 

Is there any way to force an entity to render, even if the chunk is not being rendered?

I would appreciate any help!

Thanks

 

EDIT: I am using version 1.12.2-14.23.1.2555

Edited by thunderous_peanuts
Link to comment
Share on other sites

I don't think that should be a problem specifically. The chunk behind you is still loaded. I think maybe though it does cause bug for the frustum checking though. 

 

Does it happen to something that isn't riding the entity too? Like if you're watching it from the side? Also, is it a temporary thing or can you "park" your vehicle in a location where it won't render?

Edited by jabelar

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

3 hours ago, jabelar said:

I don't think that should be a problem specifically. The chunk behind you is still loaded. I think maybe though it does cause bug for the frustum checking though. 

After some more debugging it seems that the problem is coming from the RenderGlobal class (specifically lines 636 - 641). The frustrum checking does not even happen, since the entity is not in any of the rendered chunks, and therefore completely ignored.

 

3 hours ago, jabelar said:

Does it happen to something that isn't riding the entity too? Like if you're watching it from the side? Also, is it a temporary thing or can you "park" your vehicle in a location where it won't render?

Yes, even if I am not riding the vehicle it becomes invisible at certain camera angles. This also happens along the y-axis. The RenderGlobal class seems to also split up rendering into "vertical chunks" (line 639).

This behavior can also be seen when spawning a giant. When not looking at its feet, he disappears.

 

One temporary "solution" would be to render all vehicles from worldObj.loadedEntityList in the RenderWorldLastEvent. I would still rather find a real solution, since this method completely bypasses Minecraft's entity rendering code and will probably cause some unexpected problems later.

Edited by thunderous_peanuts
Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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