Skip to content

fix: avoid duplicate brewing scanning boon - #40

Merged
SirEdvin merged 1 commit into
1.21from
fix/brewing-automata-duplicate-scanning-boon
Aug 3, 2026
Merged

fix: avoid duplicate brewing scanning boon#40
SirEdvin merged 1 commit into
1.21from
fix/brewing-automata-duplicate-scanning-boon

Conversation

@SirEdvin

@SirEdvin SirEdvin commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Bug Description

A turtle with the turtlematic:starbound_brewing_automata upgrade crashes the dedicated server while its block entity initializes.

Root Cause

ExperienceAutomataCorePeripheral invokes the virtual attachScanningBoon() hook from its initializer. BrewingAutomataCorePeripheral accepted that base boon and then attached another SCANNING boon from its own initializer, causing BasePeripheralOwner to reject the duplicate key.

Fix

  • Override attachScanningBoon() in the Brewing peripheral, matching the established Mercantile peripheral pattern.
  • Register only the richer Brewing scanning boon through the superclass hook.

How to Verify

  1. Build Fabric and NeoForge artifacts.
  2. Place an advanced turtle with only turtlematic:starbound_brewing_automata.
  3. Let the turtle block entity tick and confirm the server remains healthy.
  4. Provision the complete generated upgrade gallery and verify every turtle NBT entry.

Test Plan

  • Root Gradle build
  • Fabric and NeoForge GameTests
  • Dedicated-server generated upgrade gallery on all pack lanes

Risk Assessment

Low — the change uses an existing virtual customization hook and mirrors MercantileAutomataCorePeripheral; it removes one duplicate registration without changing the boon contents.

@SirEdvin
SirEdvin merged commit 51da351 into 1.21 Aug 3, 2026
1 check passed
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.

1 participant