Posted February 11, 20241 yr 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 February 11, 20241 yr by SentriKun
February 11, 20241 yr 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())
February 14, 20241 yr naa a) you have to make your custom arrow entity and pass the value to the constructor way it gets internally stored in the arrow entity b) in your custome bow at moment of shooting you store the power value as nbt in the bow itemstack or capability
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.