Systems
Block-Break Spawns
Breaking a matching block may turn it into a creature - for example a harvested pumpkin that becomes an evil pumpkin during Halloween. Rules are data in config/blockbreakspawns/*.json.
Configuration
{
"rules": [
{
"id": "halloween-evilpumpkin",
"eventId": "halloween",
"blockCodes": ["game:pumpkin-fruit-4"],
"chance": 0.09,
"entityCode": "alegacyevents:evilpumpkin",
"cancelDrops": true,
"sound": "alegacyevents:sounds/creature/evilpumpkin/spawn",
"messageLangKey": "alegacyevents:evilpumpkin-spawned"
}
]
}| Field | Default | Description |
|---|---|---|
id | none | Name used in log warnings |
eventId | none | Only while this seasonal event is active |
blockCodes | required | Block codes, wildcards allowed |
entityCode | required | Creature to spawn |
chance | 0.05 | Chance per broken block |
cancelDrops | true | The block drops nothing - it "became" the creature |
sound | none | Sound played at the block (16 block range) |
messageLangKey | none | Lang key of a chat message sent to the player who broke the block |
Notes:
- Rules are checked in file order and the first one that matches the block and passes its chance roll wins. Put rare rules first: in the Halloween pack the rarer king (2.5%) comes before the common evil pumpkin (9%).
- The creature appears at the block center, turned toward the player.
- Only breaking by a player counts; rules with a missing
entityCodeor emptyblockCodesare ignored.