1

Custom Item Help

coderman932's Avatar coderman93210/2/23 2:06 pm
10/24/2023 10:47 am
DD9448's Avatar DD9448
Hi, I am currently in the process of developing a fabric mod for 1.20, and I was wondering two things:
1. How do I make a model have different texture in gui from the texture in the hand?
2. How do I make a custom item change the position and rotation of the players limbs (specifically the arms and maybe the head)?
Posted by coderman932's Avatar
coderman932
Level 25 : Expert Sus
32

Create an account or sign in to comment.

1

DD9448
10/24/2023 10:47 am
Level 35 : Artisan Unicorn
DD9448's Avatar
I'm honestly really bad at rendering and models and stuff, but I do know a few examples off-hand.

For using a different texture in the GUI vs. in an entity's hand, you can mix into ItemRenderer#getHeldItemModel: https://github.com/mrsterner/Malum-Quilt/blob/40c32120ca8447641d9a7127e079a1fd32a4bd3a/src/main/java/dev/sterner/malum/mixin/client/ItemRendererMixin.java

For changing the position and rotation of the player's limbs when holding a particular item, you can mix into PlayerEntityRenderer#getArmPose: https://git.sleeping.town/unascribed-mods/Yttr/src/commit/ab727a2dbea7f0b9b9a5ca8e27df83fdbdcf9064/src/main/java/com/unascribed/yttr/mixin/rifle/client/MixinPlayerEntityRenderer.java
(I'm not sure about changing the rotation / position of the head...)
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome