Jump to content

Recommended Posts

Posted

Hello everyone! I am developing mod and I have a custom crossbow in it. It works fine, but I want to increase its damage. I've tried a lot of things, but still have no idea how to make it. Pls help. 

Thank you in advance!

Posted (edited)

unfortunately this is hardcoded in vanilla via private static methods in the CrossbowItem class,
the best way would be to copy these methods and edit them in your Item class the methods you need to copy are:

  • CrossbowItem.getArrow, CrossbowItem.shootProjectile and CrossbowItem.performShooting

then you be able to modify the AbstractArrow in your custom getArrow method, you can set the Arrow damage via AbstractArrow#setBaseDamage
after that you also need to override #use, you can copy the logic from vanilla but note you need to call you custom performShooting there

you will probably need a few AT's if you don't want to copy the complete vanilla logic from the Crossbow,
since there are several private static methods that you have to call from your custom methods (i told you above)

Edited by Luis_ST
  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.