Jump to content

Recommended Posts

Posted

Hi, I'm new to Minecraft modding. I am looking to add some distant terrain beyond the loaded chunks. Objects will be drawn with the tessellator from code. I need some advice on what the best way to do this would be. At first I thought I could create pieces of the terrain as Blocks and register it for rendering, but I felt it wouldn't provide any benefit (since I will be coding my own culling, probably coding my own lighting, not using JSON models), so I thought hooking directly to the renderer would be the best choice. It seems like the best way to do that would be to listen for the RenderTickEvent, but I was reading on this thread (http://www.minecraftforge.net/forum/index.php?topic=23500.0), that this event fires even in the menu before the world is loaded. It was suggested in that thread to hook directly into PlayerTickEvent, but I don't think that's the best choice for what I want to do. Before I dig deep into how to get this working, can I get some advice on what the best approach would be?

Posted

You might use TickEvent with Type.Render

As I know, there is no way to render blocks in unloaded chunk without that.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Unfortunately, unless I'm not mistaken, RenderTickEvent seems to come after the scene is fully rendered. Therefore anything I add in the handler shows up in the foreground. Is this surely the only way to render a background?

Posted

It seems like the ability to render a 3D scene from RenderTickEvent is extremely limited. Most of the methods that would help to set up the FOV and camera translations are not accessible (getFOVModifier, setupCameraTransform, orientCamera). All of the little nuances that are handled in these methods (viewbob, FOV modifiers such as zoom, etc) would be impossible to imitate without access.

 

I think the only way to feasibly do this is to render after the camera translations have been applied. Are you certain there is no other way to render behind the loaded chunks? One solution I thought of was to wait until the first RenderWorldEvent.Pre before I draw, then ignore subsequent RenderWorldEvents until the next RenderTickEvent. Kind of hacky but I can't think of another way. Unfortunately according to this thread (http://www.minecraftforge.net/forum/index.php?topic=31141.0), it seems this event doesn't exist anymore.

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.