Jump to content

Recommended Posts

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

Posted (edited)

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
Posted

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

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