use of net.minecraft.entity.projectile.EntitySpectralArrow in project Cavern2 by kegare.
the class EntityCavenicSkeleton method getArrow.
@Override
protected EntityArrow getArrow(float dist) {
ItemStack heldOff = getItemStackFromSlot(EntityEquipmentSlot.OFFHAND);
if (heldOff.getItem() == Items.SPECTRAL_ARROW) {
EntitySpectralArrow arrow = new EntitySpectralArrow(this.world, this);
arrow.setEnchantmentEffectsFromEntity(this, dist);
return arrow;
} else {
EntityArrow arrow = new EntityCavenicArrow(world, this);
arrow.setEnchantmentEffectsFromEntity(this, dist);
if (heldOff.getItem() == Items.TIPPED_ARROW && arrow instanceof EntityTippedArrow) {
((EntityTippedArrow) arrow).setPotionEffect(heldOff);
}
return arrow;
}
}
Aggregations