1. Wiki
  2. /Entities
  3. /minecraft:group_size

minecraft:group_size

Don't want to write this by hand? GodCraft sets minecraft:group_size for you with a switch.Get GodCraft

Overview

minecraft:group_size is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Counts how many matching entities are around this one, so you can react to crowds in filters.

Fields

FieldTypeDefaultDescription
filtersMinecraft FilternoneConditions an entity must pass to be counted.
radiusDecimal"16"Distance in blocks to count entities within.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:group_size": {
    "filters": {},
    "radius": "16"
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more