JSON Formats
Effect
The Effect JSON format is used to define status effects that can be applied to entities in Minecraft. Below is the structure of the Effect JSON format:
"effect": {
"id": "<effect id>", // required, e.g. "minecraft:speed"
"amplifier": <amplifier>, // optional, default is 0
"duration": <duration in ticks>, // optional, default is 0 (ticks)
"ambient": <true|false>, // optional, default is false
"showParticles": <true|false>, // optional, default is true
"showIcon": <true|false> // optional, default is true
}
Effect Category
The MobEffectCategory is used to classify status effects into different categories based on their nature. The following categories are available:
| Value | Description |
|---|---|
BENEFICIAL | Effects that provide positive benefits to the entity. |
HARMFUL | Effects that inflict negative effects on the entity. |
NEUTRAL | Effects that neither provide benefits nor inflict harm. |
Comparison Type
The ComparisonType is used in various condition parameters to specify how two values should be compared. The following comparison types are available:
| Value | Description |
|---|---|
== | Equal to |
!= | Not equal to |
> | Greater than |
< | Less than |
>= | Greater than or equal to |
<= | Less than or equal to |
Entity Type
The EntityType is used to specify different types of entities in Minecraft. Below is a list of some common entity types:
| Value | Description |
|---|---|
minecraft:player | The player entity. |
minecraft:creeper | A hostile mob that explodes. |
minecraft:skeleton | A hostile mob that shoots arrows. |
minecraft:zombie | A hostile mob that attacks players. |
minecraft:cow | A passive mob that provides milk. |
minecraft:sheep | A passive mob that provides wool. |
minecraft:pig | A passive mob that provides pork. |
minecraft:villager | A passive mob that trades items. |
minecraft:iron_golem | A neutral mob that protects villagers. |
minecraft:witch | A hostile mob that uses potions. |
minecraft:enderman | A neutral mob that can teleport. |
minecraft:spider | A hostile mob that climbs walls. |
For a comprehensive list of all entity types, refer to the Entity#Types_of_entities page on the Minecraft Wiki.
Item
The Item JSON format is used to define items in Minecraft. Below is the structure of the Item JSON format:
"item": {
"id": "<item id>", // required, e.g. "minecraft:stone"
"count": <item count>, // optional, default is 1
"components": { // optional, additional item components
"<component name>": { /* component data */ }
}
}
Hand
The Hand enum is used to specify which hand an entity is using to perform an action. The following values are available:
| Value | Description |
|---|---|
MAIN_HAND | The main hand (right hand for right-handed players). |
OFF_HAND | The off hand (left hand for right-handed players). |