making blocks give potion effects

Started by raebunnie on

Topic category: Help with MCreator software

Last seen on 16:36, 28. Apr 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
making blocks give potion effects

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?

Last seen on 18:37, 19. Apr 2024
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
on tick update for every…
Thu, 04/22/2021 - 20:26

on tick update for every entity in a square radius apply effect

Last seen on 16:36, 28. Apr 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thank you so much! i'm…
Fri, 04/23/2021 - 00:22

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

 

Last seen on 16:36, 28. Apr 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I still can't figure this…
Wed, 04/28/2021 - 16:24

I still can't figure this out. Any help would be very appreciated!

You can use command for that…
Wed, 04/28/2021 - 22:32

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!

Last seen on 07:46, 9. Aug 2022
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is very late, but I saw…
Tue, 08/09/2022 - 07:46

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.