Implemented Add trader type to its NBT data

Discussion in 'Server Gameplay Suggestions Archive' started by Pillow, Jun 10, 2023.

Thread Status:
Not open for further replies.
  1. Pillow
    Offline

    Pillow blanky Premium

    Joined:
    May 27, 2019
    Messages:
    1,947
    IGN:
    Pilberry
    Currently the wandering traders have the vanilla trades in their NBT, can we have the custom trades in the NBT? Or at least what vaguely they're selling (as in "fish" or "deepslate").
     
  2. sb
    Offline

    sb Active Member System

    Joined:
    Jan 5, 2021
    Messages:
    35
    Would be bad design. We might add an actual REST API for such data in the future.
     
  3. Pillow
    Offline

    Pillow blanky Premium

    Joined:
    May 27, 2019
    Messages:
    1,947
    IGN:
    Pilberry
    Oooh that'd be amazing, why would putting it in the NBT be bad design?
     
  4. sb
    Offline

    sb Active Member System

    Joined:
    Jan 5, 2021
    Messages:
    35
    Our system isn't compatible with the vanilla trader system so we'd have to inject custom NBT data that serves no purpose neither on the client nor on the server side. You as the client would then utilize mods to access data stored in an entity that only exists for presentation purposes. An actual API is the much cleaner solution.
     
  5. sb
    Offline

    sb Active Member System

    Joined:
    Jan 5, 2021
    Messages:
    35
    This will most likely get shipped within the next few days in this schema:
    Code:
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "entityId": {
          "type": "number"
        },
        "active": {
          "type": "boolean"
        },
        "sellable": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "item": {
                "type": "string"
              },
              "maximumAmount": {
                "type": "number"
              },
              "maximumAmountPerPlayer": {
                "type": "number"
              },
              "value": {
                "type": "number"
              }
            },
            "required": [
              "item",
              "maximumAmount",
              "maximumAmountPerPlayer",
              "value"
            ]
          }
        },
        "buyable": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "item": {
                "type": "string"
              },
              "maximumAmount": {
                "type": "number"
              },
              "maximumAmountPerPlayer": {
                "type": "number"
              },
              "value": {
                "type": "number"
              }
            },
            "required": [
              "item",
              "maximumAmount",
              "maximumAmountPerPlayer",
              "value"
            ]
          }
        }
      },
      "required": [
        "entityId",
        "active",
        "sellable",
        "buyable"
      ]
    }
     
  6. Pillow
    Offline

    Pillow blanky Premium

    Joined:
    May 27, 2019
    Messages:
    1,947
    IGN:
    Pilberry
    Oooh fancy, tysm!
     
  7. JAWD543
    Offline

    JAWD543 Active Member

    Joined:
    May 28, 2019
    Messages:
    625
    IGN:
    JAWD543
    Hopefully this means no more wasting my time going to spawn to see trader selling overpriced deepslate.
     
  8. Pillow
    Offline

    Pillow blanky Premium

    Joined:
    May 27, 2019
    Messages:
    1,947
    IGN:
    Pilberry
    Coming soon to Sky++!!
     
  9. sb
    Offline

    sb Active Member System

    Joined:
    Jan 5, 2021
    Messages:
    35
    Thank you for creating a suggestion!
    After looking at it we have decided that we will be adding this feature! We felt like this would improve the game-play by adding it, so your suggestion has been accepted!
    This thread has been locked and moved to Server Gameplay Suggestions Archive.
     
Thread Status:
Not open for further replies.

Share This Page