Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Thought I should make a new thread instead of continuing my other thread, seeing as I've successfully managed to attach other models onto the same model.

 

So I'm adding a Baked Model's quads to my main item's Baked Model, and that renders successfully. The problem I'm stuck at is, how do I move a BakedQuad, so basically changing it's position?

 

Here's my Baked Model code where I'm adding other Baked Models to my main item's Baked Model

https://gist.github.com/Spyeedy/2cdf9d335eb57dbe54bca1a9198650f8

Edited by Spyeedy

width=620 height=260http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img]

Till next time. Thank you for delivering funny scenes to Star Trek as Chekov :) . Will always remember you

  • 2 weeks later...
  • Author

I managed to solve it after a week or so of racking my brain for a solution.

 

I had a thought, why not modify the vertex data of the BakedQuad itself and change the numbers myself. I didn't know how to modify the vertex data, so I did some googling and it pointed me to this thread.

Which in turn lead me to this chunk of code here.

That's where I got stuck (yes, my mind was too fixated on that chunk of code to actually post an update here).

 

So I printed the float array provided by IVertexConsumer#put and I was scratching my head over the set of floats it was giving me, then today, it hit me, those were coordinates, specifically translation coordinates for Minecraft to draw a quad.

 

That's when I did some math (multiplication by 16) with the coordinates to determine which coordinate affect the 3 axes of a model, X Y Z.

 

And then, I came to my solution here. I just took the data

Edited by Spyeedy

width=620 height=260http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img]

Till next time. Thank you for delivering funny scenes to Star Trek as Chekov :) . Will always remember you

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.