Skip to content

Support ItemStack Usage - #8806

Draft
APickledWalrus wants to merge 3 commits into
dev/featurefrom
feature/item-stack-usage
Draft

Support ItemStack Usage#8806
APickledWalrus wants to merge 3 commits into
dev/featurefrom
feature/item-stack-usage

Conversation

@APickledWalrus

Copy link
Copy Markdown
Member

Problem

As data management on items continues to change in the API, usage of ItemType has become more difficult (see handling for data components as an example). With manually written aliases mostly removed, Skript would benefit from ItemType taking a reduced role (e.g. as a representation of base items or groups of items, such as aliases as tags). Otherwise, for items that are being changed, ItemStack could be preferred.

Solution

The primary goal of this PR is to allow the usage of ItemStack in syntaxes without major internal changes/syntax rewriting. I'm currently approaching this through a simple flag (naming TBD of course, implementation is not at all final) on ItemType that changes getRandom to actually return the raw stack (rather than cloning). This flag will be set to true for parsed ItemTypes that represent a single regular stack (e.g. a dirt).

For now, I'm looking to gather general feedback.

Testing Completed

I have updated the book syntaxes to make use of ItemStack while also updating them to be compatible with the book data components.

Supporting Information

n/a


Completes:

Related: none
AI assistance: none

@APickledWalrus APickledWalrus added enhancement Feature request, an issue about something that could be improved, or a PR improving something. needs testing Needs testing to determine current status or issue validity, or for WIP feature pulls. labels Aug 3, 2026
@skriptlang-automation skriptlang-automation Bot added the needs triage An issue that hasn't been classified or verified yet label Aug 3, 2026
@skriptlang-automation

This comment has been minimized.

@APickledWalrus APickledWalrus linked an issue Aug 3, 2026 that may be closed by this pull request
1 task
@skriptlang-automation skriptlang-automation Bot moved this to In Progress in 2.17 Releases Aug 4, 2026
@skriptlang-automation skriptlang-automation Bot removed the needs triage An issue that hasn't been classified or verified yet label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature request, an issue about something that could be improved, or a PR improving something. needs testing Needs testing to determine current status or issue validity, or for WIP feature pulls.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

OpenBook effect hardcoded for WrittenBook

1 participant