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

Started by Thatoneguy10130 on

Topic category: Help with Minecraft modding (Java Edition)

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

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?

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.

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!

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 /:

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