Pixelmon Mod - Support tracker

Shopkeeper JSON reviewed

Ticket description:
I am trying to edit a JSON file for a custom Shopkeeper. However, I don't know what to do when it comes to getting different log types or different concrete types. I put all the logs and concrete in the code, however, in game, they only show as oak logs and white concrete. I do not know how to get them as the different colors.

Comments

#22291 Posted by ZodiacBullYT » 07 May 2021 11:30

You need to add an ItemData tag. This is because certain blocks in MC are coded so that their IDs are the same, but they change their look due to different metadata, NBT or damage values. This relates to things such as logs, planks, concrete, wool, concrete powder, dirt, slabs, etc.

An example of the logs can be found below:
Code: Select all{
      "id": "oakwood",
      "name": "minecraft:log",
     "itemData": 0,
     "buy": 50,
      "sell": 0
    },
    {
      "id": "sprucewood",
      "name": "minecraft:log",
      "itemData": 1,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "birchwood",
      "name": "minecraft:log",
      "itemData": 2,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "junglewood",
      "name": "minecraft:log",
      "itemData": 3,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "acadiawood",
      "name": "minecraft:log2",
      "itemData": 0,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "darkoakwood",
      "name": "minecraft:log2",
      "itemData": 1,
      "buy": 50,
      "sell": 0
    },


And here's the concrete:
Code: Select all{
      "id": "concrete",
      "name": "minecraft:concrete",
      "itemData": 0,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "orangeconcrete",
      "name": "minecraft:concrete",
      "itemData": 1,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "magentaconcrete",
      "name": "minecraft:concrete",
      "itemData": 2,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "lightblueconcrete",
      "name": "minecraft:concrete",
      "itemData": 3,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "yellowconcrete",
      "name": "minecraft:concrete",
      "itemData": 4,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "limeconcrete",
      "name": "minecraft:concrete",
      "itemData": 5,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "pinkconcrete",
      "name": "minecraft:concrete",
      "itemData": 6,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "grayconcrete",
      "name": "minecraft:concrete",
      "itemData": 7,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "lightgrayconcrete",
      "name": "minecraft:concrete",
      "itemData": 8,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "cyanconcrete",
      "name": "minecraft:concrete",
      "itemData": 9,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "purpleconcrete",
      "name": "minecraft:concrete",
      "itemData": 10,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "blueconcrete",
      "name": "minecraft:concrete",
      "itemData": 11,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "brownconcrete",
      "name": "minecraft:concrete",
      "itemData": 12,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "greenconcrete",
      "name": "minecraft:concrete",
      "itemData": 13,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "redconcrete",
      "name": "minecraft:concrete",
      "itemData": 14,
      "buy": 50,
      "sell": 0
    },
    {
      "id": "blackconcrete",
      "name": "minecraft:concrete",
      "itemData": 15,
      "buy": 50,
      "sell": 0
    },

Feel free to copy and paste them, however, you may want to change the display names and buy/sell values.

I hope this was helpful.

Ticket details

  • Ticket ID: 15719
  • Project: Pixelmon Mod
  • Status: Reviewed
  • Component: Gameplay
  • Project version: 8.x.x
  • Priority: Normal
  • Severity: Normal
  • Forge/Sponge: (unknown)
  • What else would be useful to know?: (unknown)
  • Assigned to: ZodiacBullYT
  • Reported by: Ares419
  • Reporter's tickets: (List all tickets)
  • Reported on: 05 May 2021 21:58
  • Ticket last visited by: ZodiacBullYT on 07 May 2022 03:13
JOIN THE TEAM