Give a certain effect when holding item and near a certain block

Started by xeno1t on

Topic category: Help with modding (Java Edition)

Last seen on 16:47, 17. Sep 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Give a certain effect when holding item and near a certain block

Hi, so I want to create the milionth copper tools mod ._. ,

but I want to make it special by giving the tools a kind of energized (potion) effect called Redstone Burst, when near redstone and holding the tool.

Right now I´m struggling with creating the procedure that gives the effect when near the Redstone.

 It should only apply to Redstone or and Redstone blocks.

I would be really glad if someone could help me creating the procedure.

On item tick of said item,…
Fri, 09/13/2024 - 17:40

On item tick of said item, check for blocks in range by looping through neighboring coordinates and checking for block at said coordinates.

I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei