Jump to content

How to get a % of ranged weapon charge?


SentriKun

Recommended Posts

Hi, im looking for a way to check the % of charge on a bow/crossbow, but cant find it on any way to do it.
Is there something similar to player.getAttackStrengthScale() but for ranged weapons?

(Sorry if there is already a similar post, I kept searching for such but couldnt find it)

Edited by SentriKun
Link to comment
Share on other sites

2 hours ago, SentriKun said:

Hi, im looking for a way to check the % of charge on a bow/crossbow, but cant find it on any way to do it.
Is there something similar to player.getAttackStrengthScale() but for ranged weapons?

(Sorry if there is already a similar post, I kept searching for such but couldnt find it)

You can get the current power of a bow with:

BowItem.getPowerForTime(player.getUseItem().getUseDuration() - player.getUseItemRemainingTicks())

 

  • Like 1
Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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