Trade Data

The villager trade customization component is reused across several JSON files within Resourceful Bees. It is responsible for defining the costs and rewards of certain trade items depending on which file it is used in. Not including a villager trade customization component prevents the associated items from being added to the pool of trades.

Below are the JSON files which can have a villager trade customization component and the trades they create.

When the component is used in a custom bee JSON, a filled bee jar will be added to the Level 5 trade pool.

Template:
"resourcefulbees:trade/v1": {
  "amount": {
    "min": 1,
    "max": 1
  },
  "secondaryItem": "minecraft:coal_block",
  "secondaryItemCost": {
    "min": 4,
    "max": 8
  },
  "priceMultiplier": 0.4,
  "maxTrades": 2,
  "xp": 8
}

Identifier


The root JSON of the villager trade customization component looks like this:

"resourcefulbees:trade/v1": {
    ...
}

The identifier of the component is as such:

resourcefulbees:trade/v1

Customization Options


amount

The max amount of filled bee jars that can potentially be received in a single trade.


Name: Amount

Key: amount

Type: UniformInt

Default: 1, 64

Example
"resourcefulbees:trade/v1": {
  "amount": {
    "min": 1,
    "max": 1
  }
}

secondaryItem

The item needed, when the trade requires a secondary item, in addition to golden flowers.


Name: Secondary Item

Key: secondaryItem

Type: ItemStack

Default: ItemStack.EMPTY

Example
"resourcefulbees:trade/v1": {
  "secondaryItem": "minecraft:coal_block"
}

secondaryItemCost

The max base cost for the secondary item.


Name: Secondary Item Cost

Key: secondaryItemCost

Type: UniformInt

Default: 1, 4

Example
"resourcefulbees:trade/v1": {
  "secondaryItem": "minecraft:coal_block",
  "secondaryItemCost": {
    "min": 4,
    "max": 8
  }
}

priceMultiplier

When demand goes up, so does the price. Use this value to scale the price increase.


Name: Price Multiplier

Key: priceMultiplier

Type: Float

Range: 0.00 - 1.00

Default: 0.05

Example
"resourcefulbees:trade/v1": {
  "priceMultiplier": 0.4
}

maxTrades

The max number of trades that can be performed before a restock is needed.


Name: Max Trades

Key: maxTrades

Type: Integer

Range: 1 - 64

Default: 8

Example
"resourcefulbees:trade/v1": {
  "maxTrades": 2
}

xp

The XP awarded each trade.


Name: XP

Key: xp

Type: Integer

Range: 1 - 64

Default: 3

Example
"resourcefulbees:trade/v1": {
  "xp": 8
}

Last updated

Was this helpful?