Started by
Thatoneguy10130
on
Topic category: Help with Minecraft modding (Java Edition)
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
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.
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?
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.
Use the Cooldown Item proceddure block
Oops, sorry didnt see your message when I posted it
I'm super new to modding so hopefully I can figure all that out.. but if it works I'll let you know!
@Shocking Artist I tried using that procedure block but it won't let me use that cause of the "itemstack" dependencies /:
Player Right Clicks with item should provide the itemstack dependency
@Shocking Artist It isn't for me, I've tested it and I'm definitely using player right clicks with item