-
Notifications
You must be signed in to change notification settings - Fork 5
Using SimpleBow
Using SimpleBow
Creates a bow item, such as the Mythril Bow. Note that this won't include any methods that are already detailed in the SimpleItem wiki page.
Usage:
yourBowItem = new SimpleBow(int maxDamage);Customising Methods:
You can customise your item using the below methods. In most cases, they will be appended to your initialization code (above, see the example below).
- setEffect(SimpleBowEffects effect):
Sets an effect on the bow that DOESN'T require a modifier. See the SimpleBowEffects class for all the different effects and their modifier requirements. Can be called more than once to add multiple effects.
yourBowItem = new SimpleBow(1000).modId("yourModId").setEffect(SimpleBowEffects.flameEffect);- setEffect(SimpleBowEffects effect, float modifier):
Sets an effect on the bow that requires a NON-INTEGER modifier. See the SimpleBowEffects class for all the different effects and their modifier requirements. Can be called more than once to add multiple effects.
yourBowItem = new SimpleBow(1000).modId("yourModId").setEffect(SimpleBowEffects.damageEffect, 3.0F);- setEffect(SimpleBowEffects effect, int modifier):
Sets an effect on the bow that requires an INTEGER modifier. See the SimpleBowEffects class for all the different effects and their modifier requirements. Can be called more than once to add multiple effects.
yourBowItem = new SimpleBow(1000).modId("yourModId").setEffect(SimpleBowEffects.efficiencyEffect, 95);- setRepairMaterial(ItemStack repairMaterial):
Sets the repair material for the bow. This is the item/block that, when placed in an anvil with the bow, will repair the bow.
yourBowItem = new SimpleBow(1000).modId("yourModId").setRepairMaterial(new ItemStack(yourItem));- setTextures(String bowTypeName):
Sets the icons for the bow. There should be 4 icons for each draw-back stage, name "bowTypeName_0.png", "bowTypeName_1.png", "bowTypeName_2.png", "bowTypeName_3.png".
yourBowItem = new SimpleBow(1000).modId("yourModId").setTextures("your_bow");- setZoomAmount(float zoomAmount):
Sets the zoom amount of the bow. Default is 0.22F.
yourBowItem = new SimpleBow(1000).modId("yourModId").setZoomAmount(0.35F);Example:
yourBowItem = new SimpleBow(1000).modId("yourModId").setTextures("your_bow")
.setRepairMaterial(new ItemStack(yourItem)).setZoomAmount(0.35F)
.setEffect(SimpleBowEffects.damageEffect, 1.5F)
.setEffect(SimpleBowEffects.efficiencyEffect, 50)
.setEffect(SimpleBowEffects.flameEffect);