Skip to content

Add hasDataCommand and furnaceNbtUsesSnakeCase features - #1260

Merged
rom1504 merged 1 commit into
PrismarineJS:masterfrom
u9g:furnace-features
Aug 31, 2026
Merged

Add hasDataCommand and furnaceNbtUsesSnakeCase features#1260
rom1504 merged 1 commit into
PrismarineJS:masterfrom
u9g:furnace-features

Conversation

@u9g

@u9g u9g commented Aug 29, 2026

Copy link
Copy Markdown
Member

Two features needed by PrismarineJS/mineflayer#3990 so the furnace test can use bot.supportFeature instead of hardcoded version comparisons:

  • hasDataCommand (1.13+): /blockdata was replaced by /data merge block in 1.13.
  • furnaceNbtUsesSnakeCase (1.21.4+): the furnace block entity's CookTime key became cooking_time_spent in 1.21.4 (1.21.3 still accepts CookTime; 1.21.4 does not).

Both boundaries were verified against real servers across all 28 versions in mineflayer's CI matrix in that PR.

u9g added a commit to PrismarineJS/mineflayer that referenced this pull request Aug 29, 2026
Replaces the hardcoded version comparisons with hasDataCommand and
furnaceNbtUsesSnakeCase (PrismarineJS/minecraft-data#1260).
@rom1504

rom1504 commented Aug 30, 2026

Copy link
Copy Markdown
Member

Resolve conflicts

/blockdata was replaced by /data merge block in 1.13, and the furnace
block entity's CookTime key was renamed cooking_time_spent in 1.21.4
(1.21.3 still accepts CookTime). Needed by PrismarineJS/mineflayer#3990
to fast-forward a furnace without hardcoding version comparisons.
@u9g
u9g force-pushed the furnace-features branch from adc0c8f to fb52728 Compare August 30, 2026 23:31
@rom1504
rom1504 merged commit 50345c2 into PrismarineJS:master Aug 31, 2026
4 checks passed
u9g added a commit to PrismarineJS/mineflayer that referenced this pull request Aug 31, 2026
Replaces the hardcoded version comparisons with hasDataCommand and
furnaceNbtUsesSnakeCase (PrismarineJS/minecraft-data#1260).
u9g added a commit to PrismarineJS/mineflayer that referenced this pull request Sep 4, 2026
Replaces the hardcoded version comparisons with hasDataCommand and
furnaceNbtUsesSnakeCase (PrismarineJS/minecraft-data#1260).
u9g added a commit to PrismarineJS/mineflayer that referenced this pull request Sep 4, 2026
Replaces the hardcoded version comparisons with hasDataCommand and
furnaceNbtUsesSnakeCase (PrismarineJS/minecraft-data#1260).
rom1504 pushed a commit to PrismarineJS/mineflayer that referenced this pull request Sep 5, 2026
* Speed up furnace external test by fast-forwarding CookTime

The furnace test spent ~10s per version waiting out a real 200-tick
smelt. Instead, after asserting the smelt has genuinely started
(0 < progress < 1), merge CookTime:195s into the furnace block entity
and wait for the output slot to populate — the output is still produced
by the vanilla tick path, so all assertions are unchanged. Cuts the
test from ~12s to ~3s per version, ~4.5 minutes across the matrix.

The await runs 250-320ms on every tested version, so it uses a tight
500ms timeout: if the merge silently does nothing (wrong field name or
command for a future version), the test fails fast instead of sitting
out the real smelt.

Verified against real servers on all 28 tested versions (1.21.4+
placement verified on top of PR #3960, which master needs for those
versions regardless of this change).

* test(furnace): gate the NBT fast-forward on minecraft-data features

Replaces the hardcoded version comparisons with hasDataCommand and
furnaceNbtUsesSnakeCase (PrismarineJS/minecraft-data#1260).
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.

2 participants