Skip to content

feat: make chest particle type and color configurable per rarity#507

Merged
tastybento merged 3 commits intodevelopfrom
copilot/add-chest-particle-options
Apr 26, 2026
Merged

feat: make chest particle type and color configurable per rarity#507
tastybento merged 3 commits intodevelopfrom
copilot/add-chest-particle-options

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 26, 2026

Chest particle effects (UNCOMMON/RARE/EPIC) were hardcoded to Particle.DUST with fixed colors. This adds full configurability for both particle type and color per rarity level.

Settings (config.ymlworld.chest-particles)

chest-particles:
  uncommon-particle: DUST       # any Particle enum name, or NONE to disable
  uncommon-color:               # only used for DUST-type particles
    ==: Color
    ALPHA: 255
    RED: 255
    GREEN: 255
    BLUE: 0
  rare-particle: DUST
  rare-color: ...               # default: white
  epic-particle: DUST
  epic-color: ...               # default: fuchsia

Implementation

  • Settings.java — adds 6 @ConfigEntry fields (3× String particle names + 3× Color). Getter/setter pairs are StringString for Java Beans compatibility with BentoBox's YAML reflection system (mismatched types cause IntrospectionException that silently nulls the entire settings object). Resolution to Particle enum happens via:

    • resolveChestParticle(Rarity) — parses the string, returns null for "NONE" (disables particles for that rarity), falls back to DUST on invalid names
    • resolveChestColor(Rarity) — returns the configured Color for the given rarity
  • BlockListener.fillChest() — replaced hardcoded color/particle logic with calls to the two resolve methods; non-DUST particles are spawned without DustOptions (color is irrelevant to them).

Copilot AI linked an issue Apr 26, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add configurable particle types for chests feat: make chest particle type and color configurable per rarity Apr 26, 2026
Copilot AI requested a review from tastybento April 26, 2026 01:10
@tastybento tastybento marked this pull request as ready for review April 26, 2026 01:15
@sonarqubecloud
Copy link
Copy Markdown

@tastybento tastybento merged commit cc3bc02 into develop Apr 26, 2026
3 checks passed
@tastybento tastybento deleted the copilot/add-chest-particle-options branch April 26, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Feature] Chests custom particles

2 participants