July 10, 201510 yr #1 If you can get the player skin as a TextureAtlasSprite, then you can add it using TGG's createBakedQuadForFace method from the chess board tutorial. #2 That's the entire point of IPerspectiveAwareModel. Look at the examples in the two posts I mentioned earlier - they both return different models based on perspective. http://i.imgur.com/NdrFdld.png[/img]
July 10, 201510 yr Author How do I return an IPerspectiveAwareModel for my item? Do I do this in getModel? If so, how do I cast it to a ModelResourceLocation? Thanks again. Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]
July 10, 201510 yr Author UPDATE: ModelBakeEvent, correct? Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]
July 11, 201510 yr You create a class implementing it, and then register that class to your ModelResourceLocation during ModelBakeEvent. http://i.imgur.com/NdrFdld.png[/img]
July 11, 201510 yr Author I have most of it done. I appreciate your help @coolAlias. I have a class implementing IPerspectiveAwareModel and have registered it on the ModelBakeEvent. I'm pretty sure I still have to register the render for the item anyway? The tricky part for my item is that I want to de-render cuboids based on first person / third person etc. If you could just help me out on the the handlePerspective() method I think we can conclude this topic! By the way, why is almost everything deprecated? public class ModelItem implements IPerspectiveAwareModel { private IBakedModel modelItem; @Override public List getFaceQuads(EnumFacing par1EnumFacing) { return this.modelItem.getFaceQuads(par1EnumFacing); } @Override public List getGeneralQuads() { return this.modelItem.getGeneralQuads(); } @Override public boolean isAmbientOcclusion() { return this.modelItem.isAmbientOcclusion(); } @Override public boolean isGui3d() { return this.modelItem.isGui3d(); } @Override public boolean isBuiltInRenderer() { return this.modelItem.isBuiltInRenderer(); } @Override public TextureAtlasSprite getTexture() { return this.modelItem.getTexture(); } @Override public ItemCameraTransforms getItemCameraTransforms() { return this.modelItem.getItemCameraTransforms(); } @Override public Pair<IBakedModel, Matrix4f> handlePerspective(TransformType par1TransformType) { switch(par1TransformType) { case FIRST_PERSON: //What should I do here break; case THIRD_PERSON: //What should I do here break; case GUI: //What should I do here break; default: break; } return null; //What should I return here } Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]
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.