Item ID recource plugins?

Discussion in 'Spigot Plugin Help' started by Ares_Xena, May 18, 2017.

  1. Hello Spigot community,

    On a very specific server I noticed something that caught my interest. It's a Minecraft server where you can play with 3D modelled guns. When I accidentally left the recourcepack as ''disabled'' I noticed that every gun is an iron axe without the recourcepack enabled. After that I left the recourcepack off for a while and noticed how one item can display different objects or images in a recourcepack. For example, all the kit images in the GUI are different from each other with the recourcepack enabled. However, without it they're all listed as ''wooden pickaxe''.

    My question is how this is possible. Haven't been able to find a plugin for this. And I'm genuinely curious as to how this is accomplished. If the answer is a ''custom plugin'' then can someone explain what needs to happen in order for this to work? I'm not looking for a copy of this plugin at the moment. Just very curious as I've never really seen it before.


    Kind regards and happy coding,
    Ares.
     
  2. This is really cool. With the MC 1.9 update, developers are able to change an item's texture based on the durability of that item. I'm assuming that's the reason they used an iron axe. If the different items are all distinguished by different damages, one can easily determine what custom item is being used based on the durability. A while back, I stumbled across an API that makes doing this easy here. Hope this helps!
     
  3. To my knowledge these (for example) iron axes don't have any durability loss. Unless you can disable this feature. A follow up question, can this also change armor? So one can have various types of armor? And yes the information you have provided did in fact shed some light on my question.
     
  4. You can disable durability loss on the axe with code yes. Then the developer can put a certain durability on every item, the designer then has to draw different pictures for every durability.
     
  5. They may be using nbt to make the items different.
     
  6. This is true. My only question is are they able to specify the texture to be used based on NBT tags or must it be damage?
     
  7. They should be able to, I believe I saw a thread on it a while back. Will have a look and see if I can find it.