Jump to content

Recommended Posts

Posted

Hello guys,


I'm new to modding. I'm trying to make a soccer mod and struggling to create the ball entity. I created it in 1.12, but impossible to port it in 1.19+ because Glu Spheres are not usable anymore.

Do you have any idea how to do it ?
Thanks in advance

Posted

It's not something I know a lot about. But here's some pointers so you can research around the topic.

 

When minecraft draws stuff, it does so by sending vertices in a buffer to a shader. Each vertex has data like position, color, facing, texture co-ords in the atlas, etc.

Some terminology:

vertex -> structured data

buffer -> contiguous data passed to the graphics card, e.g. an array of vertices

shader -> program that runs on the graphics card: https://github.com/misode/mcmeta/tree/assets/assets/minecraft/shaders/core

 

Each buffer/vertex also has a "primitive", that says how it should be interpreted. https://www.khronos.org/opengl/wiki/Primitive

There is no sphere primitive in opengl. Instead you build it up from other primitives, e.g. https://stackoverflow.com/questions/7687148/drawing-sphere-in-opengl-without-using-glusphere

 

In minecraft which primitive to use is determined by the RenderType. Which has a VertextFormat.Mode (LINES, QUADS, TRIANGLES, etc.) amongst other things.

Most places in minecraft obviously use LINES or QUADS ("squares"). An example of using triangles can be found in MobRenderer.renderLeash().

 

That's the 10,000 foot view. I am not very good the at the details. 🙂

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

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.