how to make a hammer that with the right click does damage in a 6x6 area

Started by davidS on

Topic category: Help with modding (Java Edition)

Last seen on 19:39, 19. Nov 2022
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make a hammer that with the right click does damage in a 6x6 area

hi how can i make a hammer that right clicking damages a 6x6 area if anyone knows how i would appreciate it?
I am using mcreator 2020.3
I am using Google Translate

Last seen on 04:13, 19. Jun 2023
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is tricky, you can…
Fri, 06/12/2020 - 00:50

This is tricky, you can create a custom block that has no texture and you can walk through, make so that on block collision it will damage the entity and destroy itself, also create a timer inside on block tick so it will destroy itself in a couple of ticks. Then on right click of your hammer it will spawn 6x6 blocks of those, it may damage the player but you can set up as IF entity not is subtype of player DO damage inside on block collision procedure, remember to mark "enable tile entity and inventory on this block"

Last seen on 19:39, 19. Nov 2022
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
could you explain in more…
Sat, 06/13/2020 - 00:40

could you explain in more detail with images or a video

Last seen on 03:12, 31. Jul 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it's actually super simple,…
Thu, 06/18/2020 - 02:04

it's actually super simple,

just make a function that runs the command,

execute at @e[distance=6,type=!player] run effect give @s minecraft:instant_damage 1 1 true

then make a procedure for on item right click that runs the function

:)

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@e[distance=6,type=!player]…
Thu, 06/18/2020 - 04:43

@e[distance=6,type=!player] run effect give @s minecraft:instant_damage 1 1 true

Why are you using commands... This is already possible in MCreator I believe, if not, super easy in custom code.

You can use;

World::getEntitiesWithinAABB

This give you an iterable list, now to damage entities just do something similar to;

Entity::attackEntityFrom

 

Last seen on 19:39, 19. Nov 2022
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know how to program…
Fri, 06/26/2020 - 18:21

I don't know how to program and with the function it doesn't work

Last seen on 17:21, 24. Dec 2023
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
execute at @e[distance=..6…
Thu, 11/09/2023 - 14:50
execute at @e[distance=..6,type=!player] run effect give @e[distance=..6,type=!player] minecraft:instant_damage 1 1 true 
write this instead
Last seen on 17:21, 24. Dec 2023
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh and for the particle
Thu, 11/09/2023 - 14:57

Oh and for the particle