githubEdit

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.

circle-exclamation
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:

The identifier of the component is as such:

triangle-exclamation

Customization Options


amount

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

circle-exclamation

circle-info

Name: Amount

Key: amount

Type: UniformInt

Default: 1, 64

chevron-rightExamplehashtag

secondaryItem

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


circle-info

Name: Secondary Item

Key: secondaryItem

Type: ItemStack

Default: ItemStack.EMPTY

chevron-rightExamplehashtag

secondaryItemCost

The max base cost for the secondary item.

circle-exclamation

circle-info

Name: Secondary Item Cost

Key: secondaryItemCost

Type: UniformInt

Default: 1, 4

chevron-rightExamplehashtag

priceMultiplier

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

circle-exclamation

circle-info

Name: Price Multiplier

Key: priceMultiplier

Type: Float

Range: 0.00 - 1.00

Default: 0.05

chevron-rightExamplehashtag

maxTrades

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


circle-info

Name: Max Trades

Key: maxTrades

Type: Integer

Range: 1 - 64

Default: 8

chevron-rightExamplehashtag

xp

The XP awarded each trade.


circle-info

Name: XP

Key: xp

Type: Integer

Range: 1 - 64

Default: 3

chevron-rightExamplehashtag

Last updated

Was this helpful?