Denizen Script Language Explanations


Language Explanations explain components of Denizen in a more direct and technical way than The Beginner's Guide.


Showing 1 out of 81 language explanations...
NameEntity Script Containers
DescriptionEntity script containers are an easy way to pre-define custom entities for use within scripts. Entity
scripts work with the EntityTag object, and can be fetched with the Object Fetcher by using the
EntityTag constructor of simply the script name. Example: - spawn <player.location> MyEntity

The following is the format for the container.
Except for the 'entity_type' key (and the required 'type' key), all other keys are optional.

You can also include a 'custom' key to hold any custom data attached to the script.


# The name of the entity script is the same name that you can use to construct a new
# EntityTag based on this entity script. For example, an entity script named 'space_zombie'
# can be referred to as 'space_zombie'.
Entity_Script_Name:

    type: entity

    # Must be a valid EntityTag (EG 'zombie' or 'pig[age=baby]') See 'EntityTag' for more information.
    # | All entity scripts MUST have this key!
    entity_type: BASE_ENTITY_TYPE_HERE

    # If you want custom data that won't be parsed, use the 'data' root key.
    # | Some entity scripts should have this key!
    data:
        example_key: example value

    # You can set flags on the entity when it spawns.
    # | Some entity scripts should have this key!
    flags:
        my_flag: my value

    # Specify any mechanisms to apply the entity when it spawns.
    # | Some entity scripts should have this key!
    mechanisms:

        # Samples of mechanisms to use (any valid EntityTag mechanisms may be listed like this):

        # Whether the entity has the default AI
        # | Do not copy this line, it is only an example.
        has_ai: true/false

        # What age the entity is
        # | Do not copy this line, it is only an example.
        age: baby/adult/<#>


MORE MECHANISM OPTIONS ARE LISTED HERE: 🔗https://meta.denizenscript.com/Docs/Mechanisms/entitytag.
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/EntityScriptContainer.java#L27