Skip to content

Fix caching logic#226

Merged
Maxlego08 merged 2 commits intoMaxlego08:developfrom
1robie:developement
Mar 3, 2026
Merged

Fix caching logic#226
Maxlego08 merged 2 commits intoMaxlego08:developfrom
1robie:developement

Conversation

@1robie
Copy link
Collaborator

@1robie 1robie commented Mar 3, 2026

This pull request introduces a refinement to how item stacks are cached by adding a check for dynamic materials, ensuring that items with dynamic or placeholder-based materials are not cached prematurely. The main changes are:

Caching logic improvements:

  • Added a new method isDynamicMaterial() to ZMenuItemStack to determine if an item's material is dynamic by checking for placeholders (%) or special material syntax (:), and verifying if the material loader is present.
  • Updated the caching condition in MenuItemStackLoader to prevent caching of item stacks with dynamic materials, avoiding potential issues with items that require runtime evaluation.

@Maxlego08 Maxlego08 merged commit 881efdc into Maxlego08:develop Mar 3, 2026
2 checks 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.

2 participants