Stacked Result Items. #292


Open
  • whatflavour created this issue Oct 9, 2017

    Hello, 

     

    We have a recipe (Here: https://hastebin.com/oniqilikun.nginx) That outputs 3x Mushroom Stew.

     

    However, in vanilla minecraft, mushroom stew cannot be stacked. In this recipe, instead of giving 3 separate mushroom stews, it gives the player a stack of 3.

     

    I was not able to find a recipe flag for this. Is there a way i can make this output 3 separate mushroom stews in stead of 1 stack of 3 stews?

  • Ryan_plays_mediocrely posted a comment Oct 12, 2017

    The only current way to do this would be to use the @command flag with /give, but you'd have to replicate the item in a vanilla command. I don't think there's any other flags currently that would let this work. I'll look into a split stack or add to inventory option as that could be useful in some other situations as well.

  • whatflavour posted a comment Oct 14, 2017

    @haveric

     

    I looked into the @command flag, this is what i came up with: https://hastebin.com/ecumosopel.pl

    While it does work, it also gives the result item (next to the equal sign). I understand i put 283:0:3 there. But even if i change that to any other item, it will still give that item as well as run the @command flag. If i change it to 0, then there is nothing for the player to click on, so then the @command flag wont run. 

     

     

     

    I was looking around a bit. Would your plugin StackableItems be able to fix this issue?

  • Ryan_plays_mediocrely posted a comment Oct 14, 2017

    I wouldn't recommend StackableItems in this case. It might work but it also causes more complications by doing so.  In your case, I was thinking having one item that is still given as a result and the other 2 added by command. Alternatively, you can give them all via command and add the @noresult flag.

  • whatflavour posted a comment Oct 15, 2017

    Okay. The command giving 2 and recipe outputting one works just fine. Thanks!

  • whatflavour posted a comment Oct 17, 2017

    OKEY JK

     

    Here is recipe: https://hastebin.com/ifevikosuw.pl

    Now here is the problem: We like players to be able to craft a lot of the item, so they will put 1 stack of all the materials in the table like so: http://prntscr.com/gysa2n

    Then they ctrl + click the result and you can probably guess what happens next, but basically the server is spammed with /give command 63 times in the same second causing TPS drops, tons of unstackable items dropped on the ground, etc. 


    Is there a way to only craft enough until the inventory is full, and then cancel all further crafting until there is space in the inventory? Im aware an easy fix would only be allowing the player to craft a set of 3 at a time using @ingredientcondition with 'amount' flag, but is there an alternative?

     

  • whatflavour posted a comment Oct 17, 2017

    Okay so i put an @cooldown 2 at the end of the file, so that stopped the lag, which i can live with. The inv check would still be cool though


To post a comment, please login or register a new account.