Posted February 4, 20187 yr 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 February 4, 20187 yr by thunderous_peanuts
February 4, 20187 yr Author To clarify, here's a crude mspaint drawing of the problem. In this scenario, the vehicle is invisible since it is still technically in Chunk 1.
February 4, 20187 yr 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 February 4, 20187 yr by jabelar Check out my tutorials here: http://jabelarminecraft.blogspot.com/
February 4, 20187 yr Author 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 February 4, 20187 yr by thunderous_peanuts
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.