Jose3T5 Posted November 8, 2021 Share Posted November 8, 2021 What would be the code to render the entity's hand so that it can hold objects in its hands? Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 8, 2021 Share Posted November 8, 2021 you need to add a custom RenderLayer, you can use the vanilla HandLayers as an example Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 8, 2021 Author Share Posted November 8, 2021 Please, could you tell me an example of the code Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 8, 2021 Author Share Posted November 8, 2021 (edited) Is the code okay like this? public EsqueletoDelCieloRenderer(EntityRendererManager renderManagerIn) { super(renderManagerIn, new ModelSkeletonModel<>(), 0.5F); this.addLayer(new HandLayers(this)); } Edited November 8, 2021 by Jose3T5 Spanish language Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 8, 2021 Share Posted November 8, 2021 looks okay, does it work? Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 8, 2021 Author Share Posted November 8, 2021 No, it does not work Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 8, 2021 Share Posted November 8, 2021 then show the HandLayers you create Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 8, 2021 Author Share Posted November 8, 2021 I'm a newbie, how do I make HandLayers? Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 8, 2021 Share Posted November 8, 2021 4 hours ago, Jose3T5 said: new HandLayers(this) post this class Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 8, 2021 Author Share Posted November 8, 2021 But new HandLayers(this) That is already in : public EsqueletoDelCieloRenderer(EntityRendererManager renderManagerIn) { super(renderManagerIn, new ModelSkeletonModel<>(), 0.5F); this.addLayer(new HandLayers(this)); } Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 8, 2021 Share Posted November 8, 2021 show the class HandLayers and which kind of error do you get Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 8, 2021 Author Share Posted November 8, 2021 I don't have that class How is it done? Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 9, 2021 Share Posted November 9, 2021 HandLayers is not a class, if you haven't create it you need to cerate your own, like i already told you, you can take a look at the vanilla layer classes e.g. ItemInHandLayer Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 9, 2021 Author Share Posted November 9, 2021 The ItemInHandLayer I put it in the entity rendering Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 9, 2021 Share Posted November 9, 2021 then you use the vanilla Layer to render the Item, does it work? Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 9, 2021 Author Share Posted November 9, 2021 This is for version 1.16.5? Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 9, 2021 Share Posted November 9, 2021 nop its for 1.17.1 but if you want to use this for 1.16.5, you need to search in your IDE for the class since it can be that the class name I gave you above is different (since 1.17 use mojang class names) Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 9, 2021 Author Share Posted November 9, 2021 How can I do this for version 1.16.5? Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 9, 2021 Share Posted November 9, 2021 the ItemInHandLayer is called in 1.16.5 HeldItemLayer, everything else should be the same Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 9, 2021 Author Share Posted November 9, 2021 I did it again It's well done? public EsqueletoDelCieloRenderer(EntityRendererManager renderManagerIn) { super(renderManagerIn, new Modelcustom_model<>(), 0.5F); this.addLayer(new HeldItemLayer(this)); } Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 9, 2021 Share Posted November 9, 2021 2 hours ago, Jose3T5 said: It's well done? this question is completely irrelevant, you could simply test it if it works it is done, if it doesn't work it's not done Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 9, 2021 Author Share Posted November 9, 2021 I was just wondering, it doesn't work, so how would it be for the entity to be able to hold objects in its hands Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 9, 2021 Share Posted November 9, 2021 post more of your code, i prefer a git repo Quote Link to comment Share on other sites More sharing options...
Jose3T5 Posted November 9, 2021 Author Share Posted November 9, 2021 Entity Renderer : https://pastebin.com/TJYZyWdf Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted November 10, 2021 Share Posted November 10, 2021 First of all do never use @OnlyIn since it is only for vanilla, second since you are creating a skeleton you can look at the vanilla skeleton renderer Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.