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

Hi there, got some questions about rendering:

 

1. I want to render an ItemStack on top of my TileEntity, where the ItemStack is also stored. As far as i could find out, the best way is with IBackedModel and not with a TESR. I kinda know how to get the model for the ItemStack, but i dont understand where to exactly put the code.

 

2. Besides an TESR, are there others methods to make the rendered ItemStack move. (like floating above the TileEntity, and asuming the ItemStack is rendered as a IBackedModel)

 

3. When I have an TESR, in the time where it does nothing (for example code that only is used in certain situations), how "bad" in term of performance is it?

1. You would put that code into the getQuads(...) method of your custom IBakedModel which replaces the block model loaded from the json.

2. You could potentially use the Animation System but there is almost no documentation on that.

3. If you use an if statement in the TESR before doing anything else, the only performance impact comes from the method(s) or variable(s) that you access in the if statement.

 

All in all I wouldn't propose the use of the baked model system for this because you would need to rebake the item model with different translations and store those models.

  • Author

1. well thats then kinda bad, because my TileEntity is using an obj model

2. Will take a look in there but will proberly stick to the TESR then

3. Then its just as i thought, wasnt sure because its still calling the render each frame.

 

I was thinking of using it because its kinda bad to use the TESR for rendering the ItemStack, when its static, and moving around etc.

You can render static models using OBJ files, instead of JSON.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

The TileEntity is using an obj to render its model. I am searching for a way to render the ItemStack in its Inventory.

The TileEntity is using an obj to render its model. I am searching for a way to render the ItemStack in its Inventory.

 

1) You don't need a TESR to render tile entities. You can use baked models just fine

2) If you ARE using a TESR, you can render one in the inventory by using a fake TE that supplies default data to the renderer.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

The TileEntity is using an obj to render its model. I am searching for a way to render the ItemStack in its Inventory.

 

1) You don't need a TESR to render tile entities. You can use baked models just fine

2) If you ARE using a TESR, you can render one in the inventory by using a fake TE that supplies default data to the renderer.

The TileEntity renders fine(I am not using a TESR for this, its an obj model that is loaded with the model system).

I want to render an ItemStack ontop of the TileEntity and the ItemStack is stored in the Inventory of the TileEntity.

(Properly I wasnt too clear on this point, sorry for that)

 

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.