How to choose amount of dropped items using procedures (SOLVED)

Started by Thatoneguy10130 on

Topic category: Help with modding (Java Edition)

Last seen on 16:18, 30. Nov 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to choose amount of dropped items using procedures (SOLVED)
Thu, 11/19/2020 - 09:15 (edited)

  Hey, so I'm using the "Spawn Gem" procedure to make blocks drop more than one kind of item but how do I choose the amount of each Item?

 

 In other words, how to I edit the "Spawn Gem" procedure in order to choose the amount spawned?

Edited by Thatoneguy10130 on Thu, 11/19/2020 - 09:15
Last seen on 15:43, 1. Jan 2024
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well, for your case, you…
Tue, 10/20/2020 - 17:07

Well, for your case, you could have multiple of the drop gem procedure lined up directly after eachother. Or a repeat _ amount of times over a specific one.

But in this case I would actually recommend using loot tables for the block instead. By setting the name of a loot table to the block and setting the loot table type to block. Then editing it.

Last seen on 16:18, 30. Nov 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
  I ended up using the…
Wed, 10/21/2020 - 17:02

  I ended up using the repeat function and it seemed to work, I don't know anything about loot tables haha. Thank you for the help!

 

  I have another problem though. Is there a way to put a cooldown on the "player right clicks with item" function? or a way to make it so you can't spam it?

Last seen on 15:43, 1. Jan 2024
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There should be a cooldown…
Wed, 10/21/2020 - 17:14

There should be a cooldown thing you can set with ranged items.
But if it isnt a ranged item what you could do. Have it so on player tick, have it make a numerical NBT tag constantly count down. When right clicking, have it check if that same NBT is less than 1, and if it is, then set that same numerical NBT tag of the event/target entity to the number of ticks you want the cooldown to be (every 20 ticks is 1 second). Alongside the effect you want the item to have.

I may've not done a good job explaining that, but I think it should work.

Last seen on 00:05, 19. Apr 2024
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oops, sorry didnt see your…
Wed, 10/21/2020 - 17:18

Oops, sorry didnt see your message when I posted it

Last seen on 16:18, 30. Nov 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm super new to modding so…
Thu, 10/22/2020 - 07:09

I'm super new to modding so hopefully I can figure all that out.. but if it works I'll let you know!

Last seen on 16:18, 30. Nov 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Shocking Artist I tried…
Thu, 10/22/2020 - 07:12

@Shocking Artist I tried using that procedure block but it won't let me use that cause of the "itemstack" dependencies /:

Last seen on 00:05, 19. Apr 2024
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Player Right Clicks with…
Thu, 10/22/2020 - 12:38

Player Right Clicks with item should provide the itemstack dependency

Last seen on 16:18, 30. Nov 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Shocking Artist It isn't…
Fri, 10/23/2020 - 04:03

@Shocking Artist It isn't for me, I've tested it and I'm definitely using player right clicks with item