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

How would I use a ModelBase java model for an item? Before you ask, I've tried re creating my models in blockbench, but that didn't work. Also I need part of one model to rotate which can't be done without a model or renderer afaik

As it happens, I've been trying to figure out how to do this too; the item in question is the PneumaticCraft Minigun, whose barrel spins (or at least it did in 1.7.10) when it's firing.  A few questions (not looking for code! just checking that my approach is sound):

 

  • "If you insist" sounds ominous.  Is there a better way than using TileEntityItemStackRenderer? The docs at https://mcforge.readthedocs.io/en/latest/rendering/teisr/ suggest it's a good way to handle this.
  • My understanding is that if my item model has a parent of "builtin/entity", it's an easy way of getting isBuiltInRenderer() to return true.  Right?
  • Really, I only want a fancy animated model for the in-hand (left/right, 1st & 3rd person) transformations, not for GUI/ground/fixed.  Can I specify (in my blockstate file) a simple static model (which I already have) for GUI/ground/fixed, and my "builtin/entity" model for the held variants?
  • Can that "builtin/entity" model be empty (define no quads), since I'm going to be handling all the rendering via TileEntityItemStackRenderer?
  • I already have a Java model for the animated minigun, since it's also rendered in an entity renderer (drones), and TESR (sentry turret).  Presumably it's OK to render that, with the appropriate transformations, in my TEISR handler?

 

Edited by desht

Thanks for that.  I've looked into the Forge animation system in the past, but documentation is really lacking.  I know Botania uses it for a couple of blocks, and I've been through the examples in https://github.com/MinecraftForge/MinecraftForge/blob/1.12.x/src/test/java/net/minecraftforge/debug/client/model/AnimatedModelTest.java but I'm still not getting my head round how it all hangs together.  And I can't find any examples at all for item animation.

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.