[New!] New weapon knockback.

Started by Asriel Dreemurr on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[New!] New weapon knockback.

I am making a hammer weapon for a mod, and want it to have a really high knockback. I can't figure out how to do that. I need a level of knockback that is not possible with the /enchant command.

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
https://www.youtube.com…
Tue, 07/20/2021 - 20:59

https://www.youtube.com/watch?v=9jRueHixYBY

use the command here and if you want to make a custom item like that hammer, in the "triggers" select "when item is crafted/smelted" make it run the command on the item, giving it the enchantment, that's the easiest way of going about it  

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I specially said that I need…
Thu, 07/29/2021 - 18:52

I specially said that I need a level of knockback that is not possible with the /enchant command.

Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
go to https://mcstacker.net/…
Mon, 08/02/2021 - 20:24

go to https://mcstacker.net/ , its a command generator. generate a give command of an item and just replace it with the hammer id

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no the command in the video…
Thu, 08/05/2021 - 20:10

no the command in the video I sent will allow you to use knockback far stronger then the normal amount 

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't want to give the…
Mon, 08/09/2021 - 17:27

I don't want to give the player 2 hammers.

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could try messing with …
Mon, 06/19/2023 - 06:49

you could try messing with /attribute @s minecraft:generic.attack_knockback base set #

Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@pottassination how do i…
Sat, 09/09/2023 - 20:37

@pottassination how do i exactly do that? im making a mod with custom weapons and i want to make a sword with knockback bonus without enchants (i dont want  the sword to display a glint or an enchant)

Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can put this procedure…
Sun, 09/10/2023 - 12:13

You can put this procedure to Hammer's trigger section.

 

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
kinda neat how there's just…
Sat, 09/16/2023 - 17:35

kinda neat how there's just ol' asriel vibin' 'round on this website.

 

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@XenraO, that works miles…
Tue, 09/26/2023 - 01:28

@XenraO, that works miles better

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Pictures deleted. If I…
Sat, 11/02/2024 - 23:42

Pictures deleted. If I remember correctly, the code below is accurate to the picture(s) and can be done with the block editor:

entity.setDeltaMovement(new Vec3((entity.getDeltaMovement().x() - Math.sin(sourceentity.getYRot() * (Math.PI / 180))), (entity.getDeltaMovement().y() + 0.5), (entity.getDeltaMovement().z() + Math.cos(sourceentity.getYRot() * (Math.PI / 180)))));