Red revers

Started by Gabry_2317 on

Topic category: Help with modding (Java Edition)

Last seen on 14:34, 27. Jun 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Red revers

I'm creating a jujutsu kaisen mod and I wanted to create an object/block/entity that sums up the red revers or that repels all the mobs within a radius of 5 blocks and 10 blocks away. I tried to use an explosion but it pushes back and also does damage to the player how can I do it so that I can push back and do damage only to mobs

Last seen on 03:32, 26. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here's a 'basic' example of…
Mon, 10/30/2023 - 11:31

Here's a 'basic' example of how to launch entities away from a point, though fair warning, it involves some math, and can be kind of annoying to balance properly. In your case, you would want to run this example on the player's update tick if they have your custom effect, and make sure to also check that the entity iterator DOES NOT equal the player. (Otherwise it will launch the player as well, or cause a bug since the outwards force will be centered on their position.) I promise this is relavant:

(Code] Trying to make block with bounce on all sides of block. | MCreator

For the part where you also damage the mobs, you would simply want to add a function inside the entity iterator with a random chance of damaging the entities. Random, (and very low), because the procedure is going to be running 20 times per second. If you really want to you could also configure it to deal more damage based on proximity, but it will kind of do this by default since things closer to the player will take longer to get outside the radius of the effect, and thus be more likely to be dealt damage.

Last seen on 14:34, 27. Jun 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you. as you said there…
Thu, 01/25/2024 - 10:01

Thank you. as you said there is a way to inflict more damage based on proximity if you can inform me how to do it, thanks

Last seen on 18:18, 30. Jun 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i send images or…
Thu, 05/30/2024 - 16:28

how do i send images or files? i have a procedure if you want it

Last seen on 05:46, 30. Jun 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can i see it ?  
Fri, 06/28/2024 - 15:42

Can i see it ?