Skip to content

Sounds, potions, particles, and displays

Obtain a Sound value from Objects and edit it to choose the supported sound and set pitch/volume. Copy the value into a Player Play Sound or matching sound operation. Set/Get Sound Type, Pitch, and Volume let code transform/read a Sound value.

Preview a key with /playsound minecraft:block.note_block.pling 1 1 in authorized Build/Dev. The preview is personal; a running Player action uses its own target and lifecycle rules. Entity-attached sounds require the compatible receiver/attachment inputs.

Choose an effect type and set duration/amplifier. The literal form defaults to 200 ticks and amplifier 0 when those properties are not already configured. Values use ticks where labelled; amplifier 0 represents the base effect strength. Operations can get/set type, duration, and amplifier, then apply/clear effects on compatible living targets.

Do not confuse a typed Potion effect with a drinkable Item stack. Applying an effect and giving a potion item use different input types.

The current Particle editor supports Void-data particles. A Flame effect is a useful simple test. Ordinary playback produces one particle per supplied effect; an optional ordered group can add more effects, up to 256 total. Execution is metered per effect.

Data-bearing particle authoring and particle shapes/animations are not available. A particle’s presence in Minecraft does not automatically mean the visual editor has the data representation needed to author it.

World operations can spawn block/item/text displays and interaction entities. Then target applicable display methods for transformations and appearance. A transformation matrix must have exactly 16 finite row-major Numbers within ±1,000,000, with final row 0, 0, 0, 1.

Displays are transient runtime entities and disappear during cleanup when nobody is playing or the program stops. Temporary per-player presentation also restores on departure/stop/recompile. Build permanent scenery with normal build tools when it should remain independent of runtime execution.

Use the operation reference for exact subtype inputs and the native lifecycle guide for cleanup restrictions.