Jump to content

[1.12.2] How do you render a shape in the world ?


grand_gibus

Recommended Posts

Hello, so I'd like to know how, considering I have world coordinates, render a cube/shape in the world. Do I have to make an event handler for the RenderTick event? What do I have to write to render the cube? Do I have to extend a Render class?

I have no idea how to do it, thanks in advance!

Link to comment
Share on other sites

Ok so I figured it out by myself, luckily enough.

 

So if someone needs to know, you need to subscribe to the RenderWorldLastEvent and put your render code there.

The render coordinates are the player coordinates (Minecraft.getMinecraft().player) - the absolute coordinate where you want the element to render. If you need the partialTicks value, idk if its good but i subscribed the TickEvent.RenderTickEvent and got the partial tick value from there, its maybe trash but it works

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.

Announcements



×
×
  • Create New...

Important Information

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