Skip to content

Using Parts with Skript

Jay edited this page Oct 22, 2025 · 7 revisions

Getting Parts (Display/Interaction entities) of an Active Group and Part Filter

#Get parts of a group
set {_parts::*} to {_group}'s parts

#Get parts included in a filter
set {_parts::*} to {_filter}'s parts

## Get SPAWNED part from a Display/Interaction entity that is in a group
set {_spawnedpart} to {_display}'s spawned part

## Get the entity of a SPAWNED part
set {_entity} to {_spawnedpart}'s spawned part entity

Filtering Parts

Create a Part Filter with a group's parts

set {_filter} to a new part selection from {_activegroup}

#3.3.4+
set {_filter} to a new part filter from {_activegroup}

Filter by Part Tag

add filter to {_filter} with tag "includedTag" and without tags "excludedTag1" and "excludedTag2"

Filter by Block Display Block

set block filter of {_filter} with stone
set block filter of {_filter} with tag contents of minecraft tag "impermeable" #Keep only glass in the filter

Filter by Item Display Item

set item filter of {_filter} without stick and iron sword #Keeps all item displays, except ones showing sticks and iron swords
set item filter of {_filter} with tag contents of minecraft tag "swords" #Keep only swords in the filter

Filter by Part Type (BLOCK, ITEM, TEXT, INTERACTION)

#Filter parts by their type (inclusive)
set part type filter of {_filter} to parttype_text_display

#Filter parts by their type (exclusive)
set type filter of {_filter} to exclude parttype_block_display and parttype_item_display

Refresh/Reset/Remove a Part Filter

#Update selected parts in the filter, after manually adding/removing parts to/from a group
refresh {_filter}

#Reset all applied filters
reset {_filter}

#Remove and unregister a `PartFilter` (this makes it unusable afterwards)
remove {_filter}

DisplayEntityUtils Wiki

Overview

General Help / Examples

Display Groups

Interaction Entities

Animations

Animation Effects (w/ Frame Points)

DisplayControllers (Mounting, Custom Entities & Equipment)

Skript Help / Examples

API Help / Examples

Old Help / Examples

Clone this wiki locally