Skip to content

Add CraftEngine & Other Plugins CustomBlock Support - #64

Open
MaXoNeRYT wants to merge 20 commits into
MagmaGuy:masterfrom
MaXoNeRYT:master
Open

Add CraftEngine & Other Plugins CustomBlock Support#64
MaXoNeRYT wants to merge 20 commits into
MagmaGuy:masterfrom
MaXoNeRYT:master

Conversation

@MaXoNeRYT

Copy link
Copy Markdown
{058F6E86-A4E5-40E3-9794-8BD81327F92B} Author said that is not supported, so i just added this

MagmaGuy and others added 20 commits May 24, 2026 16:50
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously the treasureFilename ternary in fillChests keyed off
schematicContainer.getChestContents() != null, which is now always true
after SchematicContainer unconditionally seeds chestContents from the
generator. That caused ChestFillEvent.getTreasureFilename() to be null
when the schematic had no per-schematic treasureFile. Now keys off the
source field directly. Also simplifies the dead fallback ternaries for
contents (both chest and barrel branches).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…hematicContainer

Pre-existing bug: chest override passed schematicConfigField.getFilename()
to TreasureConfig.getConfigFields() instead of getTreasureFile(), so the
defensive verification in SchematicContainer never resolved correctly.

Also soften the early returns on treasure-resolution failure for both
chest and barrel paths — a typo in treasureFile / barrelTreasureFilename
should not exclude the schematic from generation. We fall back to the
generator-level defaults that were already assigned.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Track each placed barrel with its source ModulesConfigFields so per-module
barrelTreasureFilename and generateLootInBarrels overrides take effect.
The module-generator-level toggle remains a hard kill-switch. Treasure
configs are cached per unique name to avoid rebuilding ChestContents
across many barrels.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cosmetic cleanup flagged in the follow-up review. No behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nfigFields

The cached barrelContents field on ModulesConfigFields was never read
anywhere — ModulePasting resolves the treasure by filename at fill time.
The eager lookup in processConfigFields was emitting a "Failed to get
barrel treasure config file" warning per module on servers where the
TreasureConfig had not yet finished registering the BarrelFoodTreasureConfig
premade (older builds, partial deploys). Removing the dead field, dead
getter, and dead lookup. The per-module override still works via the
barrelTreasureFilename string, which ModulePasting reads at fill time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ookup

Root cause: CustomConfigFields auto-appends .yml to the filename when
constructed (CustomConfigFields:41), so the premade is stored under the
map key "treasure_barrel_food.yml". My defaults referenced the value
without .yml ("treasure_barrel_food"), so TreasureConfig.getConfigFields()
returned null for every generator and module on user servers.

Matches the existing convention used by premade generator configs
(GeneratorLiquidNether.setTreasureFilename("treasure_nether.yml") etc).

Also normalize TreasureConfig.getConfigFields() to auto-append .yml when
missing, so existing user YAMLs that already have the old default baked
in continue to resolve correctly without manual fixup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- [New] Barrel loot generation — barrels in schematics and modules now get treasure rolled into them on placement, gated by new `generateLootInBarrels` toggles on both the generator config (top-level kill-switch) and per-module config (defaults true on both).
- [New] Inherent barrel detection — barrels baked into schematics and modules are now picked up automatically with no special markup required; routed through the same fill pipeline as chests.
- [New] `barrelTreasureFilename` override — per-schematic and per-module field for pointing a placement at a specific treasure config; falls back to the generator-level default on typo or missing rather than skipping the schematic.
- [New] `treasure_barrel_food.yml` premade — ships a tiered food loot map (mean=1, stddev=0.7) as the default barrel treasure, matching the `treasure_*.yml` convention.
- [New] Tiered barrel food loot map — drop-in food tier definitions backing the new premade.
- [Fix] `treasure_barrel_food` lookup now resolves correctly — the premade key was missing `.yml`, breaking every generator and module default; `TreasureConfig.getConfigFields()` now also auto-appends `.yml` so existing user YAMLs keep working without manual edits.
- [Fix] Schematic chest override now resolves via `getTreasureFile()` instead of `getFilename()` — a typo in `treasureFile` or `barrelTreasureFilename` no longer excludes the schematic from generation.
- [Fix] `ChestFillEvent.getTreasureFilename()` now reports the per-schematic treasure file when one is set, instead of always reporting null.
- [Fix] Removed a spurious "Failed to get barrel treasure config file" warning logged per module on partial deploys.
- [Tweak] Setup menu rebuilt on MagmaCore's `SetupMenuBuilder` shared UI — same Structure Packs / Module Packs filters, cleaner filter wiring.
- [Tweak] MagmaCore shared assets now exported on enable via `MagmaCore.exportSharedAssets(this)`.
- [Tweak] Various MagmaCore library improvements (NMS v26 / Paper 26.1 support, type-based `EntityDimensions` reflection with cached lookup, `WorldFolderResolver` and Paper-migration debris quarantine, `TemporaryBlockManager`, `SetupMenuBuilder` + `InfoButtonFactory` + `NightbreakSetupIcons` shared UI, `ContainerAllowlist` / `WorldProtectionRules` instance protection, `MagmaCore.exportSharedAssets` / `enableWorldProtections` / `isShutdownRequested`, `AdvancedCommand` optional-argument support, `LocationAPI` with WorldGuard + GriefPrevention providers, Nightbreak token-change subscribers, `ClientboundEntityPositionSyncPacket` adoption on 1.21.2+ with Bedrock `ClientboundBundlePacket` skip, ArmorStand HeadPose force-send every tick for Bedrock attachable rebind, `DAMAGE_INDICATOR` outbound particle-count clamp, per-plugin Netty handler name in `PacketInteractionListener`, lazy Lua field support, `ZipFile` STORED-with-EXT-descriptor fix, dedup / rate-limited Nightbreak auth-failure logs, three-tier BedrockChecker detection — name pattern `^\..*\d{4}$` + UUID-MSB == 0 + case-insensitive plugin lookup — so Bedrock viewers are detected even when Floodgate hasn't registered them yet).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-tracking fix

- [New] Check for and one-click download BetterStructures updates in-game from the setup menu (the server checks on boot and refreshes about hourly; restart to apply)
- [New] Automatic Updates toggle (off by default) that downloads updates on startup, also exposed as autoDownloadPluginUpdates in config.yml
- [New] Recommended Plugins view in the setup menu (plus a recommendedplugins command) and a /nightbreak plugins catalog to browse MagmaGuy's other plugins
- [Tweak] Reworked the setup and first-time setup menus with clearer, clickable actions, including a prompt to renew your account token when it expires
- [Tweak] Renamed bulk commands (downloadallcontent / updateallcontent); downloadall now checks for plugin updates alongside content
- [Fix] Reworked valid-world tracking to key worlds by name and prune them when worlds unload
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