Started by
raebunnie
on
Topic category: Help with MCreator software
i want to create a crystal block that gives a potion effect like luck when you're standing near it, but i'm not sure how to do that. i understand how you could give the player a potion effect if they were holding the block in their hand, but how would you set up a procedure for proximity potion effects?
on tick update for every entity in a square radius apply effect
thank you so much! i'm having trouble applying it to the block though. the dependencies for the procedure are xyz entity and world, but the update tick trigger section only takes world and xyz. so i cant use it that way. i don't have much experience with mcreator and i might just be doing it wrong.
heres what the procedure looks like: https://imgur.com/a/iLpz7J8
I still can't figure this out. Any help would be very appreciated!
You can use command for that. Simply use something like that:
effect give @e[distance=..distance_where_it_affects] name_of_your_effect duration amplifier
With "name of your effect" you need to precise if it's effect from Minecraft or your mod, so you need additional "minecraft:" or "your_workspace:" word before the name of effect.
So, if you, for example, want to add luck for 10 seconds, for any mob around 15 blocks of your block, you will write:
effect give @e[distance=..15] minecraft:luck 10
And if you want to use your own effect, let's say, called "Burning Shoes", with level III, for 10 seconds, then it will look like this:
effect give @e[distance=..15] my_mod:burning_shoes 10 3
If you want to use level I of any effect, you don't need to write amplifier number, which is by default 1, if I remember correctly.
Hope that helps!
This is very late, but I saw your procedure and it looks like your procedure says "Add potion to event/target entity" but that doesn't specify the player I don't think. What you have done here is getting information about an area of 4 blocks radius, but you need to also DO something in that area. There's a block that does an effect on each entity in the area. I think your best bet is to make a block do a command tho.