RangedJS: KubeJS Addon

RangedJS: KubeJS Addon

780 Downloads

A KubeJS addon for pack dev to easily create custom bows. Source code for fabric

Download from CurseForge

download link

StartupEvents.registry("item", event => {
  	event.create("test_bow", "bow")
	.bow(bow => {
		bow.modifyBow(attributes => {
			attributes
			.fullChargeTick(40) //takes 40 ticks to full charge
			.flamingArrow() //shoot flaming arrows by default
			.baseDamage(20) //base damage is set to 20 (the default is 2.0)
		})
		.onArrowHit(arrow => {
			arrow.postHurtEffect((/**@type {Internal.LivingEntity} */ livingEntity) => {
				livingEntity.potionEffects.add("wither", 1000) //add wither effect to entity hit by arrows
			})	
		})
	})
})