Mutation Type

Customization Options


type

A mutation can be one of four different types:

Item | Block | Fluid | Entity

The type object is used for defining the Mutation Type, associated data, and the likelihood of obtaining, when used as an output option.


Name: Mutation Type

Key: type

Type: String

Default: This value is required or the recipe won't load!

item

The item being transformed or resulted.


Name: Item

Key: item

Type: RestrictedItemPredicate

Default: This value is required or the recipe won't load!

Example
{
  "type": "item",
  "item": {
    "id": "minecraft:nether_star"
  }
}

chance

The chance of actually resulting the item when selected as the output from the pool of items.


Name: Chance

Key: chance

Type: Double

Range: 0.0 - 1.0

Default: 1.0

Example
{
  "type": "item",
  "item": {
    "id": "minecraft:nether_star"
  },
  "chance": 0.5
}

weight

How likely the item is to be selected among a pool of items.

Calculating Weight Distributions:

A mutation recipe has five different output options.

The weights are as follows:

Output 1: 20
Output 2: 10
Output 3: 30
Output 4: 60    
Output 5: 80

The chances each output has of being selected are as follows:

Output 1: 10%
Output 2: 5%
Output 3: 15%
Output 4: 30%
Output 5: 40%

To calculate the chance:

  1. Add up all the weights

  2. Divide the weight you wish to check by the total in step 1


Name: Weight

Key: weight

Type: Double

Range: ≥0.0

Default: 10

Example
{
  "type": "item",
  "item": {
    "id": "minecraft:nether_star"
  },
  "weight": 69
}

Last updated