Full item stack doesn't add in inventory

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Mattllama987

Active Member
Aug 5, 2018
225
7
18
24
Its a little hard to explain whats happening. Im making a auto collecting hoppers, and there is a little bug with it. When i place down the collector, it will auto loop dropped items and add those items into the inventory of the event-block. But for a example. If i throw a stack of wheat on the ground, it will only pickup 32. Same for everything. How can i fix this? If anyone knows whats wrong, please let me know ASAP.

Thanks!
~Matt


Code:
on place:
    if name of player's held item contains "&bItem Collector":
        if {collectors::max::%player's uuid%} >= 1:
            cancel event
            send "&aYou already have a collector placed down!"
        else:
            add 1 to {collectors::max::%player's uuid%}
            send "&aYou placed your collector!" to player
            set {collector::start::%player's uuid%} to true
            set {collectors::%player's uuid%} to location of event-block
            set {collector::size::%player's uuid%} to uncolored 2nd element of (split (line 5 of lore of player's held item) at "x")
            while {collector::start::%player's uuid%} is true:
                loop dropped items in radius {collector::size::%player's uuid%} parsed as number of event-block:
                    if item of loop-value is wheat, raw beef, cactus, nether wart plant, carrot, potato, leather, player head, zombie head, skeleton skull or creeper head:
                        add item of loop-value to inventory of event-block
                        delete loop-value
                wait 1 ticks

Example of bug:
https://gyazo.com/a43dbc0311c49da81e96ff450dff9db0
[doublepost=1614193786,1614106322][/doublepost]bump
 
Status
Not open for further replies.