how to make a 4x4 area fill up with a block after a projectile hits it?

Started by JPZamps on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make a 4x4 area fill up with a block after a projectile hits it?
Tue, 03/02/2021 - 02:49 (edited)

I'm trying to make a grenade in my mod that doesn't break blocks but damage the area around the mobs, so I created a block that damages and disappears right after it appears, my goal is when the grenade hits the entity/block it fills up a 4x4 area or larger of that block, the block is invisible and crossable but I can't, every time I try they appear only on one side diagonally, it seems very simple but I'm kind of lost in what to do, it is not possible to do with structures because they only with the blocks around doing with a block that replaces only air avoids damage

Edited by JPZamps on Tue, 03/02/2021 - 02:49
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
do you mean damage the mobs…
Tue, 03/02/2021 - 07:40

do you mean damage the mobs around a n x n area the grenade impacts but not damage blocks?

if so, then use the "when bullet hits block/entity" triggers if the grenade is a ranged item. in the procedure, use the "For each entity at x,y,z in square cube with size n do" code block to damage each entity within a n x n area.

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
so it was kind of what i did…
Tue, 03/02/2021 - 16:34

so it was kind of what i did but something must have gone wrong because only i am being affected and not the other entities?

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
show procedure
Wed, 03/03/2021 - 03:07

show procedure

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
deal damage to "Entity…
Wed, 03/03/2021 - 18:17

deal damage to "Entity Iterator"

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh i see, it work thank you
Wed, 03/03/2021 - 21:55

oh i see, it work thank you