(help) Making explosion knockback bigger

Started by hey23 on

Topic category: Help with modding (Java Edition)

Last seen on 21:19, 29. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(help) Making explosion knockback bigger

I have a mod called "Useless No More" and I have a potion effect called 'Lightness' when it is applied to the player its supposed to launch him further from explosions, but it does not work. For anyone curious the amp value returns correctly but the mx, my and mz values are near 0. And I can't wait 1 tick or something like that since I cannot set local values in the wait block. And that might not even be the solution.

 

Last seen on 21:19, 29. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The image does not seem to…
Fri, 07/26/2024 - 13:14

The image does not seem to be loading but this is basically it in text form:

  • [ If ] [ Is [ Provided Damage Source ] of type EXPLOSION [ OR ] [ Is [ Provided damage source ] of type PLAYER_EXPLOSION
  • [ If ] [ Has ] [ Event/target entity ] active potion Lightness
  • Set number amp to 4+(get effect level amplifier of potion Lightness*2)
  • Set number mx to X delta movement of event/target entity
  • Set number my to Y delta movement of event/target entity
  • Set number mz to Z delta movement of event/target entity
  • Attempt to override motion vector of Event/target entity to mx, my, mz
Last seen on 21:19, 29. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The procedure gets called…
Fri, 07/26/2024 - 13:15

The procedure gets called when "Entity attacked" I forgot to mention this 

Last seen on 09:55, 13. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The only solution I could…
Mon, 07/29/2024 - 19:16

The only solution I could get to work was temporarily disabling the entity's gravity. Sadly, the way you're using the delta movement data doesn't work since it seems its intended use is for figuring out direction rather than the entity's speed (the numbers are never anything other than 1 or 0). I think the best way to do this is by shooting an arrow with a large knockback, but I can't find a way to make the arrow hit the entity.
 

This disables and then enables gravity again after a certain amount of time. You could do a check to see if the entity is on the ground after the explosion so it doesn't just disable its gravity for no reason. Tweak the wait time to change the distance. Placeholder name "Lit" for the potion. This certainly isn't the best way to do it, but it's better than nothing.

Disable gravity and enable it again later

If you do find a way to make it work with arrows, I'd really like to see the solution