Developers
Landing Page
Custom Bees
Custom Bees
  • Creating A Custom Bee
    • The Custom Bee JSON
    • Core Data
    • Render Data
      • Layer Data
      • Color Data
    • Breed Data
      • Bee Family
    • Combat Data
    • Mutation Data
      • Mutation Recipe
        • Mutation Type
    • Trait Data
      • Bee Aura
      • Potion Effect
      • Damage Effect
      • Damage Type
    • Trade Data
Powered by GitBook
On this page
  • Identifier
  • Customization Options
  • amount
  • secondaryItem
  • secondaryItemCost
  • priceMultiplier
  • maxTrades
  • xp

Was this helpful?

Edit on GitHub
Export as PDF
  1. Creating A Custom Bee

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.

When the component is used in a custom honeycomb JSON, the honeycomb and honeycomb block will be added to the Level 3 trade pool.

The component can be used in three different sections of a custom honey JSON:

  • When used in the honey bottle section, a honey bottle will be added to the Level 3 trade pool.

  • When used in the honey block section, a honey block will be added to the Level 3 trade pool.

  • When used in the honey fluid section, a honey bucket will be added to the Level 3 trade pool.

Adding an empty villager trade component will add the trade to the pool using all default values.

Example
{
  "resourcefulbees:block/v1": {
    "color": "rainbow",
    "honeyBlockItem": "resourcefulbees:rainbow_honey_block",
    "honeyBlock": "resourcefulbees:rainbow_honey_block",
    "tradeData": {}
  }
}
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

In custom honeycomb and honey JSON's the identifier is tradeData:

Example
{
  "resourcefulbees:block/v1": {
    "tradeData": {}    <---- Identifier
  }
}

Customization Options


amount

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

When trades are being populated, the amount actually used is a randomized value between the min and the max, therefore, not all trades will always have this amount.


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.

When trades are being populated, the amount actually used is a randomized value between the min and the max, therefore, not all trades will always have this amount.


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.

Most vanilla trades have a price multiplier of 0.05


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
}

PreviousDamage Type

Last updated 1 year ago

Was this helpful?