Skip to content

Conditions

FrankyRay edited this page Nov 22, 2021 · 1 revision

Conditions

Conditions are used to define how an item is chosen in certain conditions. The items will be chosen IF all condition has been met.

For example, A creeper will drop any disk if the skeleton kill the creeper

{
    "rolls": 1,
    "conditions": {
        "condition": "killed_by_entity",
        "entity_type": "minecraft:skeleton"
    },
    "entries": []
}

Condition Type

entity_properties

Used by: Various Mobs

Set true if entity properties have met. Used when "function": "furnace_smelt" given.

{
    "function": "furnace_smelt",
    "conditions": [
        {
            "condition": "entity_properties",
            "entity": "this",
            "properties": {
                "on_fire": true
            }
        }
    ]
}

has_mark_variant

Used by: mooshroom_milking.json
[Sorry, no documentation yet]

killed_by_entity

Used by: Creeper

Set true if the entity was killed by a specific entity.

Parameters:

Name Type Description
entity_type String Name of the entity

killed_by_player

Used by: Various Mobs

Set true if the entity was killed by the player

killed_by_player_or_pets

Used by: Various Mobs

Set true if the entity was killed by a player or tamed entity

random_chance

Used by: Drowned Equipment and Fox Equipment

Set a random chance for an entity. Used for entity equipment

Parameters:

Name Type Description
chance Float Set the chance to appear
Allow number from 0-1 as 0% - 100%

random_chance_with_looting

Used by: Varioud Mobs

Set a random chance with the chance for looting for an entity.
Following formula for using Looting = chance + (lootingChance x lootingLevel)

Parameters:

Name Type Description
chance Float Set the chance to appear
Allow number from 0-1 as 0% - 100%
looting Float Set the chance for using Looting to appear
Allow number from 0-1 as 0% - 100%

random_difficulty_chance

Used by: Armor equipment and Various Entity Equipment

Set a random chance based on the difficulty for an entity. Used for entity equipment

Parameters:

Name Type Description
default_chance Float Set the default chance to appear
Allow number from 0-1 as 0% - 100%
peaceful Float Set the chance for Peaceful difficulty
Allow number from 0-1 as 0% - 100%
easy Float Set the chance for Easy difficulty
Allow number from 0-1 as 0% - 100%
normal Float Set the chance for Normal difficulty
Allow number from 0-1 as 0% - 100%
hard Float Set the chance for Hard difficulty
Allow number from 0-1 as 0% - 100%

random_regional_difficulty_chance

Used by: Piglin, Zombie, and Skeleton Equipment
[Sorry, no documentation yet]

This is pure my documentation, so any mistake is my fault :)

Reference Link:
Bedrock Wiki
Microsoft Docs

Not affiliated with Mojang Studio or Microsoft

Clone this wiki locally