Jump to content

[1.12.2] Modify deflected arrow distance for custom shield


Recommended Posts

I'm making a mod that adds enchantments to shield and I want to make one that increases the distance that deflected arrows travel. My plan is to use my custom shield class (that extends from ItemShield) to override the function that implements the arrow deflecting functionality, however I can't find it. All I could find related to "blocking" is this code:


this.addPropertyOverride(new ResourceLocation("blocking"), new IItemPropertyGetter()
            public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
                return entityIn != null && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? 1.0F : 0.0F;
        BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(this, ItemArmor.DISPENSER_BEHAVIOR);


However I don't know how to deal with this. Any ideas?

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.

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.