Jump to content

Recommended Posts

Posted (edited)

Good days 

 

in the previous 1.8 version

i made a custom render gui class,  to display the munition info and other stuff,

was hard to get it whith all the info, this time idont wanna kill mi self so much soo i wanna tray find an alternative method

 

i been notice than when i made an item the hotbar icon for the item is the same item texture an if i made an animation in the item the hotbar icon also change 

 

##################

soo i wanna know if its posible to have a diferent json file for the hotbar icon ?       

but whithout mess whith the firstview item texture 

 

it is posible?,  is posible to changeit in the run?

 

actually in mi mod i have a bow and 4 diferents kinds of arrow, plus vainilla arrow   five arrow for all

i wanna set this item bow hotbar icon to display the bow icon whith  tootpick representing the current type of arrow and the amoung number of arrows remainig in the inventory of the selected kind

but keeping the onhand animation as its now

 

something like

 

icono normal in the hot bar

arcomercenario_icono.png

 

 

icono plus info from the arrow type and the amount of this kind of arrow in inventory 

arcomercenario_icono_alternativo.png

 

this was mi bows in 1.8 

 

 

 

Thanks for reading

 

 

 

 

Edited by perromercenary00
gramaticak error
Posted (edited)

This might be a somewhat complicated way to do so but you can use a custom IPerspectiveAwareModel implementation. The IPerspectiveAwareModel::handlePerspective method returns a Pair of a model and a matrix of transforms to apply so you can in theory return a different model based on the TransformType you are getting.

 

Edit: as for displaying the number of arrows you will need to render that manually in a handler of  RenderGameOverlayEvent of a Hotbar type.

Edited by V0idWa1k3r

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.