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

Depends on how you got it to load.

If it is a block/item model then you can use RenderItem#renderItemAndEffectIntoGUI.

If it is a custom model with a custom loader it is up to you to upload each and every vertex to the BufferBuilder.

It also depends on where you want to do that from. If it is your own GUI then there are no problems. However if you just want it rendered somewhere on the screen at all time you will need to use an event. RenderGameOverlayEvent will do fine.

As far as I know OBJLoader is a custom model loader provided by forge designed to create block/item models from a wavefront file. If you are using OBJLoader then you must render your thing as an item. You could in theory bake the IModel you get from the loader yourself and later render it similar to how RenerItem#renderItemModelIntoGUI does it. That would be your example. But you would need to use ModelBakeEvent to bake your model first. And then you would need to fully mimic the code of RenerItem#renderItemModelIntoGUI(which expects an ItemStack btw so you would need to fix that too). It might be easier to use either a custom dummy item(don't show it in the creative menu and it will be completely hidden in the game) or a custom model loader, wavefront isn't too complicated - for example here is mine simple .obj loader and vertex uploader.

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.