making blocks give potion effects

Started by raebunnie on Thu, 04/22/2021 - 20:00

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:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
making blocks give potion effects
Thu, 04/22/2021 - 20:00

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 05:35, 13. May 2021
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • 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!

Last seen on 05:50, 13. May 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
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!