1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Full item stack doesn't add in inventory

Discussion in 'Skript' started by Mattllama987, Feb 23, 2021.

Thread Status:
Not open for further replies.
  1. Mattllama987

    Mattllama987 Active Member

    Joined:
    Aug 5, 2018
    Messages:
    225
    Likes Received:
    7
    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 (Text):
    1. on place:
    2.     if name of player's held item contains "&bItem Collector":
    3.         if {collectors::max::%player's uuid%} >= 1:
    4.             cancel event
    5.             send "&aYou already have a collector placed down!"
    6.         else:
    7.             add 1 to {collectors::max::%player's uuid%}
    8.             send "&aYou placed your collector!" to player
    9.             set {collector::start::%player's uuid%} to true
    10.             set {collectors::%player's uuid%} to location of event-block
    11.             set {collector::size::%player's uuid%} to uncolored 2nd element of (split (line 5 of lore of player's held item) at "x")
    12.             while {collector::start::%player's uuid%} is true:
    13.                 loop dropped items in radius {collector::size::%player's uuid%} parsed as number of event-block:
    14.                     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:
    15.                         add item of loop-value to inventory of event-block
    16.                         delete loop-value
    17.                 wait 1 ticks
    Example of bug:
    https://gyazo.com/a43dbc0311c49da81e96ff450dff9db0
    --- Double Post Merged, Feb 24, 2021, Original Post Date: Feb 23, 2021 ---
    bump
     
Thread Status:
Not open for further replies.

Share This Page

Loading...