Started by
Vollans
on
Topic category: Help with Minecraft modding (Java Edition)
I've been trying for quite a long time to make this item have a cooldown when right clicking on a block (turning the block into blue concrete), and I believe this cooldown works using the potion effect, but the problem is that I can't fill all the required dependencies, source entity / targeted entity, no matter if I put one or another. Please help, I have no ideia how to do this. Also sorry if my english is bad, i'm not a native speaker.
If you change 'provided itemstack' to 'item in main hand' of event/target entity, it will cooldown the item. I don't think you need a potion effect? Depends on what you're trying to do. You need to refer to the event/target entity, not the source entity.
Dependencies can be confusing when you're first starting out! Here's some useful tips:
event/target entity ~ this is usually the main entity that's a procedure targets. If a procedure only has one entity, this is how you refer to it.
source entity ~ If a procedure has multiple entities involved, this is the entity that's performing an action. (For example, if you use the global trigger 'entity attacked,' then the source entity is the entity that is attacking the event/target entity.) You usually won't use this as often.
immediate source entity ~ This usually refers to projectiles, and doesn't come up very often. (In the previous example, the source entity is the one who attacks, the target entity is the one being attacked, and the immediate source entity is the arrow or projectile that hits them.)
Anyways, hope that helps! I imagine coding is a lot harder when there's a language barrier too. Good luck!
Thank you so much! Sorry for responding that late, but now it's working very well! The mod is looking really good