Skip to content

Loop-item amount in shulker inventory not updating correctly #8887

Description

@MrMarshOfficial

Skript/Server Version

[08:06:24]
[Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[08:06:24]
[Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[08:06:24]
[Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[08:06:24]
[Skript] Server Version: 26.2-92-0a99345 (MC: 26.2)
[08:06:24]
[Skript] Skript Version: 2.16.2 (skriptlang-github)
[08:06:24]
[Skript] Installed Skript Addons: 
[08:06:24]
[Skript]  - skript-placeholders v1.7.1 (https://github.com/APickledWalrus/skript-placeholders)
[08:06:24]
[Skript]  - Lusk v1.3.14 (https://github.com/JakeGBLP/Lusk)
[08:06:24]
[Skript]  - skript-reflect v2.6.3 (https://github.com/SkriptLang/skript-reflect)
[08:06:24]
[Skript]  - SkBee v3.25.4 (https://github.com/ShaneBeee/SkBee)
[08:06:24]
[Skript]  - Skript-LuckPerms v1.0.3
[08:06:24]
[Skript]  - Skonic v1.2.8
[08:06:24]
[Skript] Installed dependencies: 
[08:06:24]
[Skript]  - Vault v1.7.3-b131
[08:06:24]
[Skript]  - WorldGuard v7.0.19+2400-f395a16
[08:06:24]
[Skript]  - GriefPrevention v16.18.7

Bug Description

When looping a shulker's inventory, changing a loop-item's amount, and stopping the loop, that change doesn't happen unless you broadcast the loop-item's amount, or send it to console.

Expected Behavior

The loop-item amount in the shulker's inventory should be updated without having to broadcast the loop-item's amount or send it to console.

Steps to Reproduce

Loop a shulker's inventory, set a loop-item's amount to a different amount, then stop the loop. The loop-item amount will not be changed. However, when broadcasting the loop-item's amount or sending it to console right after setting it, it will be changed. Without stopping the loop, the item amount is also changing correctly.

The code below can be used to reproduce the issue:
command /testshulker:
trigger:
loop all items in player's held item's inventory:
set loop-item's amount to 1
#send loop-item's amount to console # Weirdly only works when broadcasting the loop-item's amount, or by sending to console.

		stop loop

Uncommenting the commented line fixes the issue, and so does removing the "stop loop".

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions