Skip to main content

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 JSON Format Example
"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:

ValueDescription
BENEFICIALEffects that provide positive benefits to the entity.
HARMFULEffects that inflict negative effects on the entity.
NEUTRALEffects 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:

ValueDescription
==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:

ValueDescription
minecraft:playerThe player entity.
minecraft:creeperA hostile mob that explodes.
minecraft:skeletonA hostile mob that shoots arrows.
minecraft:zombieA hostile mob that attacks players.
minecraft:cowA passive mob that provides milk.
minecraft:sheepA passive mob that provides wool.
minecraft:pigA passive mob that provides pork.
minecraft:villagerA passive mob that trades items.
minecraft:iron_golemA neutral mob that protects villagers.
minecraft:witchA hostile mob that uses potions.
minecraft:endermanA neutral mob that can teleport.
minecraft:spiderA 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 JSON Format Example
"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:

ValueDescription
MAIN_HANDThe main hand (right hand for right-handed players).
OFF_HANDThe off hand (left hand for right-handed players).