The cratest crate plugin of all time
3

Effects

Effects are things that are triggered by actions such as opening a crate. The available types are:

FireworkEffect

An effect that launches a firework when given.

  • WARNING: Firework explosions can damage players in survival - you should ensure the user is protected from damage and/or spawn the firework above the crate so the player is not in range of the explosion.
<id> = {
    firework = {
        shape = "<firework-shape>"
        colors = [<Integer>...]
        fades = [<Integer>...]
        trail = true/false
        flicker = true/false
        duration = <Integer>
    }
}

If only the shape needs to be specified, prefer using an inline reference instead of defining a new effect.

Properties

NameTypeDescriptionDefault
shapeFireworkShapeThe shape of the firework ("ball"/"large_ball"/"burst"/"star"/"creeper")Random
colorsListThe colors the firework has initially (RGB)Random (1-2 colors)
fadesListThe colors the firework fades into (RGB)Random (0-1 colors)
trailBooleanWhether the firework leaves a trailRandom
flickerBooleanWhether the firework has a flickerRandom
durationIntegerThe duration of the firework flightRandom (1-3)
target"player"/"location"The first part of the reference value, whether the initial position is at the player or crate location"location"
offsetVector3dThe second part of the reference value, the xyz offset from the initial position[0.0, 0.0, 0.0]

Referencing

The reference value of a firework is its spawn position, which consists of a target (the initial position) and offset (xyz offset for the position):

effects = [
    ["<firework-id>"]
    ["<firework-id>", "player"]
    ["<firework-id>", 0.0, 2.0, 0.0]
    ["<firework-id>", "player", 0.0, 2.0, 0.0]
    {
        firework = ...
        target = "player"/"location"
        offset = [x, y, z]
    }
]

If only the shape needs to be specified, prefer an inline reference instead of defining a new effect. Additionally, "firework" can be used for a random shape.

effects = [
    ["firework"] //random shape
    ["firework/<shape>"]
]

Examples

A green creeper firework with a random trail/flicker/duration.

green-creeper = {
    firework = {
        shape = "creeper"
        colors = [0x00FF00]
        fades = []
    }
}

A burst firework with random colors, fades, etc. that spawns above the player.

effects = [
    ["firework/burst", "player", 0.0, 2.0, 0.0]
]

ParticleEffect

An effect that runs a particle effect when given. Particle effects are generally only used as idle effects as an explicit duration cannot yet be customized.

<id> = {
    particle = {
        type = "<particle-type>"
        color = <Integer>
    }
    path = {
        type = "circle"/"helix"/"spiral"/"vortex"
        axis = [x, y, z] (circle only)
        interval = <Integer>
        precision = <Integer>
        segments = <Integer>
        shift = <Decimal>
        speed = <Decimal>
        scale = [x, y, z]
    }
}

If only the particle/path type needs to be specified, prefer setting it directly which will use the default values for the other properties.

<id> = {
    particle = "<particle-type>"
    path = "circle"/"helix"/"spiral"/"vortex"
}

Properties

NameTypeDescriptionDefault
typeParticleTypeThe particle typeRequired
colorIntegerThe particle color (only for minecraft:redstone_dust)Rainbow
type"circle"/"helix"/"spiral"/"vortex"The path typeRequired
axisVector3dThe rotation axis (only for circle paths)[0.0, 1.0, 0.0]
intervalIntegerThe interval between animation updates (in milliseconds)20
precisionIntegerThe number of available points along the path120
segmentsIntegerThe number of individual particles being animated1
shiftDecimalThe initial time offset of the animation for path calculations0.0
speedDecimalThe relative speed of the animation compared to the precision1.0
scaleVector3dThe relative scale of the animation[1.0, 1.0, 1.0]
target"player"/"location"The first part of the reference value, whether the initial position is at the player or crate location"location"
offsetVector3dThe second part of the reference value, the xyz offset from the initial position[0.0, 0.0, 0.0]

Referencing

The reference value of a potion is its duration, which is in seconds.

effects = [
    ["<potion-id>", 10]
    {
        potion = ...
        duration = Integer
    }
]

Unlike most other effects, particles cannot be defined as an inline reference as they often require further customization for many use cases.

Examples

A rainbow helix particle with 3 segments.

rainbow-helix = {
    particle = "minecraft:redstone_dust"
    path = {
        type = "helix"
        segments = 3
    }
}

A particle that produces 8 pillars of enchantment glyphs.

effects = {
    idle = [
        {
            particle = "minecraft:enchanting_glyphs"
            path = {
                type = "circle"
                segments = 8
                shift = 0.3925
                speed = 0.0
                scale = [1.5, 1.0, 1.5]
            }
            offset = [0.0, 0.75, 0.0]
        }
    ]
}
effects = [
    ["minecraft:regeneration/2", 10]
]

PotionEffect

An effect that gives the player a potion effect when given.

<id> = {
    potion = {
        type = "<potion-type>/<strength>"
        ambient = true/false
        particles = true/false
    }
}

If only the type needs to be specified, prefer using an inline reference instead of defining a new effect.

Properties

NameTypeDescriptionDefault
typePotionTypeThe potion type, which consists of an effect id and optionally a strength (ex. minecraft:regeneration/2 for Regeneration II)Required
ambientBooleanWhether the effect is ambient, meaning it is displayed less prominently (normally used for beacon effects)false
particlesBooleanWhether the effect shows particlestrue
durationIntegerThe reference value, which is the duration of the effect in secondsRequired

Referencing

The reference value of a potion is its duration, which is in seconds.

effects = [
    ["<potion-id>", 10]
    {
        potion = ...
        duration = Integer
    }
]

If only the type needs to be specified, prefer an inline reference instead of defining a new effect.

effects = [
    ["minecraft:regeneration/2"]
]

Examples

A Night Vision effect that is ambient and hides particles.

secret-night-vision = {
    potion = {
        type = "minecraft:night_vision"
        ambient = true
        particles = false
    }
}

A Regeneration II effect that lasts 10 seconds.

effects = [
    ["minecraft:regeneration/2", 10]
]

SoundEffect

An effect that plays a sound when given.

<id> = {
    sound = {
        type = "<sound-type>"
        volume = <Decimal>
        pitch = <Decimal>
    }
}

If only the type needs to be specified, prefer using an inline reference instead of defining a new effect.

Properties

NameTypeDescriptionDefault
typeSoundTypeThe type of the soundRequired
volumeDecimalThe volume of the sound1.0
pitchDecimalThe pitch of the sound1.0
target"player"/"location"The first part of the reference value, whether the initial position is at the player or crate location"location"
offsetVector3dThe second part of the reference value, the xyz offset from the initial position[0.0, 0.0, 0.0]

Referencing

The reference value of a sound is its position, which consists of a target (the initial position) and offset (xyz offset for the position):

effects = [
    ["<sound-id>"]
    ["<sound-id>", "player"]
    ["<sound-id>", 0.0, 2.0, 0.0]
    ["<sound-id>", "player", 0.0, 2.0, 0.0]
    {
        sound = ...
        target = "player"/"location"
        offset = [x, y, z]
    }
]

If only the type needs to be specified, prefer an inline reference instead of defining a new effect.

effects = [
    ["minecraft:block_note_bell"]
]

Examples

An explosion sound that plays twice as loud.

loud-explosion = {
    sound = {
        type = "minecraft:entity_generic_explode"
        volume = 2.0
    }
}

A bell sound from a note block that plays above the player.

effects = [
    ["minecraft:block_note_bell", "player", 0.0, 2.0, 0.0]
]

Category: Gameplay

Published on Sep 5, 2021

views

stars

watchers

total downloads

Licensed under MIT

Promoted Versions

Members