Skip to content

feat: add quick fill clipboard foundation - #112

Draft
blackman-eric wants to merge 1 commit into
ForestOfLight:devfrom
blackman-eric:feature/quickfill-clipboard
Draft

blackman-eric wants to merge 1 commit into
ForestOfLight:devfrom
blackman-eric:feature/quickfill-clipboard

Conversation

@blackman-eric

Copy link
Copy Markdown
Contributor

Summary

Adds clipboard behavior to QuickFill while preserving the existing transfer/reverse behavior when no clipboard is active.

  • Break copies a container and activates the clipboard
  • Interact applies the clipboard
  • Sneak + Interact removes according to the clipboard
  • Sneak + Break deactivates the clipboard
  • Removing the QuickFill arrow disables QuickFill without clearing the clipboard; re-enabling it resumes the stored clipboard
  • Adds container-shape compatibility so inventories with different semantics aren't treated as interchangeable

Preset commands (save, set, delete), persistence, and wildcard editing will be addressed in follow-up PRs.

Testing

  • Full test suite: 1710 passed, 1 skipped
  • npm run lint
  • git diff --check
  • In-world walkthrough covering QuickFill on/off, clipboard active/inactive, empty/held-item interactions, copy/re-copy, paste/remove, deactivation, and the Sneak + Break edge cases

@blackman-eric
blackman-eric marked this pull request as draft September 18, 2026 16:42
@blackman-eric
blackman-eric force-pushed the feature/quickfill-clipboard branch from c00a4c4 to 6627cfe Compare September 18, 2026 17:02
@blackman-eric
blackman-eric force-pushed the feature/quickfill-clipboard branch from 6627cfe to 274d177 Compare September 18, 2026 17:04
'minecraft:lit_blast_furnace': 'blast_furnace:3',
'minecraft:brewing_stand': 'brewing:5',
'minecraft:chiseled_bookshelf': 'bookshelf:6',
'minecraft:crafter': 'crafter:9'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The crafter inventory is inaccessible to the Script API -- Mojang just never added support for it.

@ForestOfLight

Copy link
Copy Markdown
Owner

Hi Eric, thanks for contributing! Here are a couple of things to note as you continue developing this PR:

The @forestoflight/minecraft-vitest-mocks package can simplify your testing logic (removing the need for functions like makeContainer and makeItemStack). The package has been developed on an as-needed basis, so if you find yourself having to create a mock for anything in the Script API, please notify me or create a PR.

To match code style with the rest of the repo, please keep all function parameters on the same line.

When getting block, entity, or item components, please use EntityComponentTypes & its equivalents to eliminate the need for a magic string.

Since the classes/ folder is getting kinda full and there are several QuickFill classes, go ahead and throw those classes into their own subfolder.

There's generally a very good split of concerns between the classes and methods. Some of the methods are a little long for my taste and could be broken down further. If you don't want to worry about that, I'm happy to handle it myself.

static AdaptiveShape = 'adaptive';

static SpecialShapes = Object.freeze({
'minecraft:furnace': 'furnace:3',

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the furnace, smoker, and blast furnace incompatible because the sets of items they can smelt differ? If so, you should only need them to be separate from one another here if the game doesn't already enforce that constraint through container.setItem().

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