item names issues

You might have seen stuff in the system (deposit, shop) where the name of the item has been missing. This was because of the quite annoying switch in minecraft from item IDs (numbers, 0 for air, 1 for stone etc) to item names (“air”, “stone” etc). Since Mojang decided to move (which in general is a good idea since you can read code easier), there has been some confusions:

  1. I had to change all the code that deals with stuff – which is quite a lot and update all the databases
  2. The new item names have changed over time (“ink_sack” is now “dye” etc).
  3. Websend, one of the major plugins that we use, is using different names (I could not really find out why) so I had to write code that alerts me when there is a name incoming from websend that is unknown and then add that to a translation table.

Because of those issues, the tables (requests, deposit, offers) have started to contain item names that were not recognizable and therefore showed up empty. So I now wrote a function that takes the current names from the minecraft wiki, checks them against the internal code and then finds out if there are any entries in the tables that do not match. Then I get alerts and can fix 100% of all occurrences of the bad names.

So there are still 2 issues remaining:

  1. I did not have the time to check for 100% of all items where websend uses a different name than the standard. I found 50 items and will get an alert each time someone has something in their inventory that was not recognized by the code, so this should fix itself eventually.
  2. If there are new changes in the minecraft code in future versions. I have to run the above check again to make sure everything is OK. If you see any item in the shop that does not have a proper name, please let me know immediately. Otherwise you risk losing the stock of that item.

10 thoughts on “item names issues

  1. As my offers are concerned, 5 items out of 9 do not load the corresponding image.

    Opening the “Goods” tab in the shop manager, down below I found what looks like a complete list of items not loading the image:

    Among that list, the 5 items that I offer are:
    Golden Horse Armour
    Golden Sword
    Golden Chestplate

    • ah yes, the images is another animal again. Will have to look into that separately. On top of that, the shop manager needs some updates anyhow. I will look into that once the whole lot reset thing is fixed.

      • Maybe you should be more precise about what would not be a “proper name” and worth signalling. For example “Leaves2” seems strange enough to me.. “Fish” used to be “Raw Fish” but is that improper?

  2. In addition, among the items which allow for image loading, the following two display a “failed to load” icon:
    Oak door
    Wooden door

  3. What a pain, thanks for slogging through it for us :)

  4. I honestly don’t know how you do it Unc. You are awesome.

  5. I see a type error of “polised_andeside” should be “polished_andeside.”

Comments are closed.