Custom "Fireball" won't damage ennemies in a 4 blocks range

Started by VioletPyre on

Topic category: Help with modding (Java Edition)

Last seen on 01:56, 16. Jan 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom "Fireball" won't damage ennemies in a 4 blocks range

Hello ! I am currently trying to do a "Fireball" thingy that crashes down and deals 325 damage (i know it's a lot but in my mod it isn't really) in a range of 4.

 

To make it the simplest at possible, when it hits the ground / entities , it rolls a procedure to deal 325 dmg and then it's done. Apparently the procedure :

[If : ][Does entity exist at x: [x] y: [y] z: [z] in square cube with side [4] of type [CUSTOM:SkeletonsMoblv1]] ##(This is an exemple, i would rather that it hits EVERY mob except players.)
do : Deal [325] damage to [Event/target entity] type : [IN_FIRE]

isn't what is the key to this functionality. Any help would be appreciated. (MCREATOR 2020.4 - FORGE 1.15.2)

Last seen on 14:43, 2. Aug 2022
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can't do all mobs in an…
Sun, 10/04/2020 - 18:22

You can't do all mobs in an area yet. Just add an explosion that has a power of 5.

Last seen on 01:56, 16. Jan 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well yes, but actually no. I…
Sun, 10/04/2020 - 18:33

Well yes, but actually no. I need a Set damage number and setting "Explosion power 5" will destroy my map. For now i was trying with only one mob to test it out but i can't apparently.

Last seen on 08:14, 28. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well then, just lock the…
Sun, 10/04/2020 - 22:37

well then, just lock the code of the procedure and change the "Explosion.Mode.BREAK" to "Explosion.Mode.NONE", so that it'll explode but not destroy any block.

Last seen on 01:56, 16. Jan 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hmm, I'll take that risky…
Sun, 10/04/2020 - 22:44

Hmm, I'll take that risky look, but do I lock the code BEFORE or AFTER ? Because wouldn't it prevent me from editing the codes if it's lock then ??

Last seen on 08:14, 28. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
after you're sure of the…
Mon, 10/05/2020 - 01:02

after you're sure of the procedure.

Last seen on 08:14, 28. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also, here's an example for…
Mon, 10/05/2020 - 01:46

also, here's an example for that:

 

if (world instanceof World && !world.getWorld().isRemote) {
			world.getWorld().createExplosion(null, (int) x, (int) y, (int) z, (float) 4, Explosion.Mode.NONE);
		}

 

Last seen on 01:56, 16. Jan 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Cool ! Thank you ! I think i…
Mon, 10/05/2020 - 01:47

Cool ! Thank you ! I think i might use that as a substitute until I find my way to make it like I would want, but in some other of my mods, explosions without breaking everything would be an amazing thing !

Last seen on 08:14, 28. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no problem :)
Mon, 10/05/2020 - 05:14

no problem :)